title: Hive concat two map object
body: <p>I have two tables as follow in hive:</p>
  
  <p><strong>Table 1</strong></p>
  
  <pre><code>key1  | value1
  
  int   | map(int,array(int))
  </code></pre>
  
  <p><strong>Table 2</strong></p>
  
  <pre><code>key2  |  value2
  
  int   | map(int,array(int))
  </code></pre>
  
  <p>and now I join the table on key and I want to concat two maps that have the same key. In other words the final should looklike . </p>
  
  <p><strong>Table</strong> </p>
  
  <pre><code>key  |  value
  
  int  | map(int,array(int))
  </code></pre>
  
  <p>I tried to use function collect_set when I am joining as follows:</p>
  
  <pre><code>collect_set(value1,value2) 
  </code></pre>
  
  <p>but it through exception that only one input is required. Any thoughts or comments?
  Thanks</p>