AngersZhuuuu commented on a change in pull request #31979:
URL: https://github.com/apache/spark/pull/31979#discussion_r602840162
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveInspectors.scala
##########
@@ -512,6 +527,12 @@ private[hive] trait HiveInspectors {
_ => constant
case poi: VoidObjectInspector =>
_ => null // always be null for void object inspector
+ case ym: WritableConstantHiveIntervalDayTimeObjectInspector =>
+ val constant =
ym.getWritableConstantValue.asInstanceOf[HiveIntervalDayTime]
+ _ => constant.getTotalSeconds * DateTimeConstants.NANOS_PER_MICROS +
constant.getNanos
Review comment:
> I didn't get this. You multiply seconds by 1000 which is milliseconds
and add nanoseconds. Which is obviously wrong (btw day-time interval has
microsecond precision). Could you fix this and write a test for this piece of
code, please.
Ohhh, sorry, I want to write `DateTimeConstants.NANOS_PER_SECOND`
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]