mdayakar commented on code in PR #6761:
URL: https://github.com/apache/hive/pull/6761#discussion_r3965293986
##########
ql/src/java/org/apache/hadoop/hive/ql/io/orc/WriterImpl.java:
##########
@@ -211,6 +213,16 @@ static void setColumn(int rowId, ColumnVector column,
.getPrimitiveJavaObject(obj).toSqlTimestamp());
break;
}
+ case TIMESTAMPLOCALTZ: {
+ TimestampColumnVector vector = (TimestampColumnVector) column;
+ vector.setIsUTC(true);
+ vector.setUsingProlepticCalendar(true);
+ TimestampTZ timestampTZ = ((TimestampLocalTZObjectInspector)
inspector)
+ .getPrimitiveJavaObject(obj);
+ vector.time[rowId] = timestampTZ.toEpochMilli();
+ vector.nanos[rowId] = timestampTZ.getNanos();
+ break;
+ }
Review Comment:
default case is not handled for primitive category due to that the data is
getting written in this case. Handle default case and throw exception so that
the error will come while writing the data itself for unsupported/unhandled
primitive type.
##########
ql/src/java/org/apache/hadoop/hive/ql/io/orc/WriterImpl.java:
##########
@@ -211,6 +213,16 @@ static void setColumn(int rowId, ColumnVector column,
.getPrimitiveJavaObject(obj).toSqlTimestamp());
break;
}
+ case TIMESTAMPLOCALTZ: {
Review Comment:
It looks indentation problem for this block, please check and fix.
--
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]