Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-3111

Selecting collection types returns json output rather than analysis error

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: Impala 2.3.0
    • Fix Version/s: Not Applicable
    • Component/s: Frontend
    • Labels:

      Description

      Today, an outermost select list may not return collection types-- Impala now throws an AnalysisException.

      E.g.

      [localhost:21000] > select c_orders from tpch_nested_parquet.customer limit 1;
      Query: select c_orders from tpch_nested_parquet.customer limit 1
      ERROR: AnalysisException: Expr 'c_orders' in select list returns a complex type 'ARRAY<STRUCT<o_orderkey:BIGINT,o_orderstatus:STRING,o_totalprice:DECIMAL(12,2),o_orderdate:STRING,o_orderpriority:STRING,o_clerk:STRING,o_shippriority:INT,o_comment:STRING,o_lineitems:ARRAY<STRUCT<l_partkey:BIGINT,l_suppkey:BIGINT,l_linenumber:INT,l_quantity:DECIMAL(12,2),l_extendedprice:DECIMAL(12,2),l_discount:DECIMAL(12,2),l_tax:DECIMAL(12,2),l_returnflag:STRING,l_linestatus:STRING,l_shipdate:STRING,l_commitdate:STRING,l_receiptdate:STRING,l_shipinstruct:STRING,l_shipmode:STRING,l_comment:STRING>>>>'.
      Only scalar types are allowed in the select list.
      

      Instead, we should support returning collection types in the outermost select list as json strings.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mjacobs Matthew Jacobs
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: