Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 2.6.0, Impala 2.7.0
-
CentOS 7, CDH 5.8.0
Description
Show create table for partitioned tables with comments results an invalid SQL. "COMMENT" comes before "PARTITIONED BY" instead of reversed.
You can test it from shell with these commands:
impala-shell --quiet -q 'create table if not exists parted_table_w_comment (i int) partitioned by (day string) comment "A partitioned table with comment"' impala-shell --quiet -Bq 'show create table parted_table_w_comment' -o /tmp/create_parted_table_w_comment.sql impala-shell --quiet -q 'drop table parted_table_w_comment' sed -i -r 's/^"|"$//' /tmp/create_parted_table_w_comment.sql # remove double-quotes from beginning and end impala-shell --quiet -f /tmp/create_parted_table_w_comment.sql
The resulting error is rigthly:
ERROR: AnalysisException: Syntax error in line 5: PARTITIONED BY ( ^ Encountered: PARTITIONED