title: SELECT query in Hive to fetch data from a table as struct column
body: <p>I'm trying to get data from a <em>Hive CTE</em> having normal columns in form of a <strong>struct</strong> column (data type), Also the 2nd value of the struct should be a ARRAY
  Tried using <strong>named struct</strong> function,
  When using ARRAY() function its throwing an error
  <em>cannot recognize input near '('...</em></p>
  <p>table1 :</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">id</th>
  <th style="text-align: left;">col1</th>
  <th style="text-align: left;">col2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: left;">0.3</td>
  <td style="text-align: left;">0.12</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: left;">0.14</td>
  <td style="text-align: left;">0.56</td>
  </tr>
  <tr>
  <td style="text-align: left;">3</td>
  <td style="text-align: left;">0.76</td>
  <td style="text-align: left;">0.21</td>
  </tr>
  </tbody>
  </table>
  </div>
  <pre><code>SELECT 
      id
      , named_struct(
            &quot;key1&quot;, col1,
            &quot;key2&quot;, ARRAY( col1, col2) ) as dummy_col
  FROM table1
  </code></pre>