cloud-fan commented on a change in pull request #34984:
URL: https://github.com/apache/spark/pull/34984#discussion_r778657315
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcDeserializer.scala
##########
@@ -127,10 +127,14 @@ class OrcDeserializer(
updater.setInt(ordinal, OrcShimUtils.getGregorianDays(value))
case TimestampType => (ordinal, value) =>
- updater.setLong(ordinal,
DateTimeUtils.fromJavaTimestamp(value.asInstanceOf[OrcTimestamp]))
-
- case TimestampNTZType => (ordinal, value) =>
- updater.setLong(ordinal,
OrcUtils.fromOrcNTZ(value.asInstanceOf[OrcTimestamp]))
+ if (value.isInstanceOf[OrcTimestamp]) {
Review comment:
We just need to add one single comment before the if-else
```
// When reading ORC timestamp as Spark LTZ, the ORC timestamp can be either
// `OrcTimestamp` (which maps to Spark LTZ) or `LongWritable` (which maps
// to Spark NTZ)
```
--
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]