You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Riju Trivedi (Jira)" <ji...@apache.org> on 2023/06/01 14:41:00 UTC

[jira] [Updated] (HIVE-27398) SHOW CREATE TABLE doesn't output backticks for CLUSTERED by Col names

     [ https://issues.apache.org/jira/browse/HIVE-27398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Riju Trivedi updated HIVE-27398:
--------------------------------
    Description: 
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 
{code:java}
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 test_ts_reserved_keyword7;
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';
{code}
 

  was:
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';


> 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
>            Priority: Minor
>
> 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 
> {code:java}
> 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 test_ts_reserved_keyword7;
> 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';
> {code}
>  



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