Affects Version/s: None
Fix Version/s: None
Component/s: Query Processor
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:
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)
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"