Jainik Vora created HIVE-24181: ---------------------------------- Summary: Hive bug prevents allowed characters in nested column Key: HIVE-24181 URL: https://issues.apache.org/jira/browse/HIVE-24181 Project: Hive Issue Type: Bug Components: Hive Affects Versions: 2.3.5 Reporter: Jainik Vora
Hive allows any unicode character in column name when specified within backtick (`). But this behavior didn’t work for a nested column containing hyphen (-) which points to a possible bug in hive DDL parsing logic. _Special characters at first level column works fine_ {code:java} CREATE EXTERNAL TABLE test_dwh.sample_parquet_table ( `user-agent`: string, -- first level column with “-” works `context` struct< `os`: struct< `name`: string, `version`: string > > ) PARTITIONED BY (day string) STORED as PARQUET LOCATION 's3://xxx/tmp/sample_data/events' {code} _Special characters in nested column throws error_ {code:java} CREATE EXTERNAL TABLE test_dwh.sample_parquet_table ( `context` struct< `os`: struct< `name`: string, `version`: string, `is-test`: string -- nested column with “-” throws error > > ) PARTITIONED BY (day string) STORED as PARQUET LOCATION 's3://xxx/tmp/sample_data/events' {code} FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.IllegalArgumentException: Error: : expected at the position 46 of 'struct<os:struct<name:string,version:string,is-test:string>>' but '-' is found. -- This message was sent by Atlassian Jira (v8.3.4#803005)