KurtYoung 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_r354135303
########## 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: You can use `LocalDateTime#of(int year, Month month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond)` to construct LocalDateTime and then change its timezone? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services