docete commented on a change in pull request #10399:
[FLINK-14959][table-planner-blink] Support precision of LocalZonedTimestampType
in blink planner
URL: https://github.com/apache/flink/pull/10399#discussion_r353643575
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/utils/RexNodeExtractor.scala
##########
@@ -345,8 +345,11 @@ class RexNodeToExpressionConverter(
SqlTimestamp.fromEpochMillis(millisecond,
nanoOfMillisecond).toLocalDateTime
case TIMESTAMP_WITH_LOCAL_TIME_ZONE =>
- val v = literal.getValueAs(classOf[java.lang.Long])
- unixTimestampToLocalDateTime(v).atZone(timeZone.toZoneId).toInstant
+ val v = literal.getValueAs(classOf[TimestampString])
+ val millisecond = unixTimestampToLocalDateTime(v.getMillisSinceEpoch)
+ .atZone(timeZone.toZoneId).toInstant.toEpochMilli
+ val nanoOfMillisecond =
SqlDateTimeUtils.getNanoOfMillisSinceEpoch(v.toString)
Review comment:
ditto, the `Instant` only contains millisecond part
----------------------------------------------------------------
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]
With regards,
Apache Git Services