Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-4771

Support subqueries in INSERT for array types

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Query Processor
    • Labels:
      None

      Description

      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.GA76168@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"

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              michaelmalak Michael Malak
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: