Michael Malak created HIVE-4771:
-----------------------------------

             Summary: Support subqueries in INSERT for array types
                 Key: HIVE-4771
                 URL: https://issues.apache.org/jira/browse/HIVE-4771
             Project: Hive
          Issue Type: Improvement
          Components: Query Processor
            Reporter: Michael Malak


Since Hive supports SQL1999-style array types for columns, it would be nice for 
there to be a way to INSERT non-static data into such columns -- i.e. from 
another table based on a complex query as opposed to loading from a static 
file, loading from hard-coded values within the INSERT query, or copying 
complete arrays verbatim from another table.

An example can be found at:
http://www.postgresql.org/message-id/20041028232152.ga76...@winnie.fuhr.org

CREATE TABLE table_a(a int, b int, c int[]);

INSERT INTO table_a
  SELECT a, b, ARRAY(SELECT c FROM table_c WHERE table_c.parent = table_b.id)
  FROM table_b

This should be implemented after regular correlated and uncorrelated subqueries 
are implemented:

https://issues.apache.org/jira/browse/HIVE-784 "Support uncorrelated subqueries 
in the WHERE clause"

https://issues.apache.org/jira/browse/HIVE-1799 "Support correlated subqueries 
in the WHERE clause"


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to