Aggarwal-Raghav commented on code in PR #6242:
URL: https://github.com/apache/hive/pull/6242#discussion_r2644022735
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/serde/objectinspector/IcebergObjectInspector.java:
##########
@@ -135,6 +135,9 @@ public ObjectInspector primitive(Type.PrimitiveType
primitiveType) {
return adjustToUTC ? TIMESTAMP_INSPECTOR_WITH_TZ : TIMESTAMP_INSPECTOR;
case TIME:
return IcebergTimeObjectInspector.get();
+ case TIMESTAMP_NANO:
+ boolean adjust = ((Types.TimestampNanoType)
primitiveType).shouldAdjustToUTC();
+ return adjust ? TIMESTAMP_INSPECTOR_WITH_TZ : TIMESTAMP_INSPECTOR;
Review Comment:
Append the following in timestamp_ns.q and run once.
```
CREATE TABLE t_nano_source (
id int,
ts_ns nanosecond timestamp
) STORED BY ICEBERG TBLPROPERTIES ('format-version'='3');
INSERT INTO t_nano_source VALUES (1, '2025-12-24 10:00:00.123456789');
select * from t_nano_source;
CREATE TABLE t_nano_target STORED BY ICEBERG AS SELECT * FROM t_nano_source;
select * from t_nano_target;
DESCRIBE t_nano_target;
```
The CTAS table (t_nano_target) is having column as `timestamp`:
```
POSTHOOK: query: select * from t_nano_target
POSTHOOK: type: QUERY
POSTHOOK: Input: default@t_nano_target
POSTHOOK: Output: hdfs://### HDFS PATH ###
1 2025-12-24 10:00:00.123456
.....
POSTHOOK: Input: default@t_nano_target
id int
ts_ns timestamp
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]