Riju Trivedi created HIVE-27398:
-----------------------------------

             Summary: SHOW CREATE TABLE doesn't output backticks for CLUSTERED 
by Col names
                 Key: HIVE-27398
                 URL: https://issues.apache.org/jira/browse/HIVE-27398
             Project: Hive
          Issue Type: Bug
          Components: Hive
            Reporter: Riju Trivedi
            Assignee: Riju Trivedi


SHOW CREATE TABLE output uses backticks for all column names and partition 
column names but does not include backticks for CLUSTERED BY column names. This 
causes ParseException during table creation when any bucket column identifier 
matches reserved keywords when 
CREATE TABLE `test_ts_reserved_keyword7`(
`member_id` varchar(8),
`plan_nr` varchar(11),
`timestamp` timestamp,
`shared_ind` varchar(1),
`user_id` varchar(8))
CLUSTERED BY (
member_nr,
plan_nr,
`timestamp`)
INTO 4 BUCKETS;
SHOW CREATE TABLE OUTPUT
CREATE TABLE `test_ts_reserved_keyword7`(
`member_id` varchar(8),
 `plan_nr` varchar(11),
 `timestamp` timestamp, 
`shared_ind` varchar(1), 
`user_id` varchar(8)) 
CLUSTERED BY (
member_id,
plan_nr,
timestamp)
INTO 4 BUCKETS
ROW FORMAT 
SERDE'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'STORED AS 
INPUTFORMAT'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'OUTPUTFORMAT'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat';



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to