Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
Impala 2.2
-
None
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