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

Generated column names for struct fields are "."-separated.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Impala 2.2
    • None
    • Frontend

    Description

      Impala generates column names for struct paths that are the "." separated struct path. These column names are not valid column names for actual tables, which is inconvenient for CTAS, etc.

      [tarmstrong-box.ca.cloudera.com:21000] > create table t (c struct<i:int>) stored as PARQUET;
      Query: create table t (c struct<i:int>) stored as PARQUET
      
      Fetched 0 row(s) in 0.07s
      [tarmstrong-box.ca.cloudera.com:21000] > create table t2 as select c.i from t;
      Query: create table t2 as select c.i from t
      ERROR: AnalysisException: Invalid column/field name: c.i
      
      [tarmstrong-box.ca.cloudera.com:21000] > 
      

      Workaround
      Provide an explicit column name as follows:

      create table t2 as select c.i AS MY_COL_NAME from t
      

      Attachments

        Activity

          People

            anjali_norwood Anjali Norwood
            tarmstrong Tim Armstrong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: