diff --git common/src/java/org/apache/hadoop/hive/conf/HiveConf.java common/src/java/org/apache/hadoop/hive/conf/HiveConf.java index d13e03d14bdbf7172a55bf24d6624f02761f0402..047504274dc32618868e8d0a6c058b38898e35b0 100644 --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java @@ -1322,7 +1322,7 @@ private static void populateLlapDaemonVarsSet(Set llapDaemonVarsSetLocal HIVE_PARQUET_TIMESTAMP_SKIP_CONVERSION("hive.parquet.timestamp.skip.conversion", true, "Current Hive implementation of parquet stores timestamps to UTC, this flag allows skipping of the conversion" + "on reading parquet files from other tools"), - PARQUET_INT96_DEFAULT_UTC_WRITE_ZONE("parquet.mr.int96.enable.utc.write.zone", false, + HIVE_PARQUET_INT96_DEFAULT_UTC_WRITE_ZONE("hive.parquet.mr.int96.enable.utc.write.zone", false, "Enable this variable to use UTC as the default timezone for new Parquet tables."), HIVE_INT_TIMESTAMP_CONVERSION_IN_SECONDS("hive.int.timestamp.conversion.in.seconds", false, "Boolean/tinyint/smallint/int/bigint value is interpreted as milliseconds during the timestamp conversion.\n" + diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java index 641e9d9c586aa8c31f31af5567db41c8ea20b7b7..c11ba9724f00b48658e437c15adf5481db9dea67 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java @@ -4224,11 +4224,11 @@ private int createTable(Hive db, CreateTableDesc crtTbl) throws HiveException { } } - // If PARQUET_INT96_DEFAULT_UTC_WRITE_ZONE is set to True, then set new Parquet tables timezone + // If HIVE_PARQUET_INT96_DEFAULT_UTC_WRITE_ZONE is set to True, then set new Parquet tables timezone // to UTC by default (only if the table property is not set) if (tbl.getSerializationLib().equals(ParquetHiveSerDe.class.getName())) { SessionState ss = SessionState.get(); - if (ss.getConf().getBoolVar(ConfVars.PARQUET_INT96_DEFAULT_UTC_WRITE_ZONE)) { + if (ss.getConf().getBoolVar(ConfVars.HIVE_PARQUET_INT96_DEFAULT_UTC_WRITE_ZONE)) { String parquetTimezone = tbl.getProperty(ParquetTableUtils.PARQUET_INT96_WRITE_ZONE_PROPERTY); if (parquetTimezone == null || parquetTimezone.isEmpty()) { tbl.setProperty(ParquetTableUtils.PARQUET_INT96_WRITE_ZONE_PROPERTY, ParquetTableUtils.PARQUET_INT96_NO_ADJUSTMENT_ZONE); diff --git ql/src/test/queries/clientpositive/parquet_int96_timestamp.q ql/src/test/queries/clientpositive/parquet_int96_timestamp.q index e5eb610b7ffa5c68ad5672ff43c7f598fff32684..5de2c3f1244b8340b97eb0547fe66e52d80fb065 100644 --- ql/src/test/queries/clientpositive/parquet_int96_timestamp.q +++ ql/src/test/queries/clientpositive/parquet_int96_timestamp.q @@ -1,7 +1,7 @@ create table dummy (id int); insert into table dummy values (1); -set parquet.mr.int96.enable.utc.write.zone=true; +set hive.parquet.mr.int96.enable.utc.write.zone=true; set hive.parquet.timestamp.skip.conversion=false; -- read/write timestamps using UTC as default write zone @@ -18,7 +18,7 @@ select * from timestamps; describe formatted timestamps; drop table timestamps; -set parquet.mr.int96.enable.utc.write.zone=false; +set hive.parquet.mr.int96.enable.utc.write.zone=false; -- read/write timestamps using local timezone create table timestamps (ts timestamp) stored as parquet;