JingsongLi 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_r353573553
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/ExpressionReducer.scala
##########
@@ -153,12 +154,13 @@ class ExpressionReducer(
reducedValues.add(maySkipNullLiteralReduce(rexBuilder, value,
unreduced))
reducedIdx += 1
case SqlTypeName.TIMESTAMP_WITH_LOCAL_TIME_ZONE =>
- val value = if (!reduced.isNullAt(reducedIdx)) {
- val mills = reduced.getField(reducedIdx).asInstanceOf[Long]
- Long.box(SqlDateTimeUtils.timestampWithLocalZoneToTimestamp(
- mills, TimeZone.getTimeZone(config.getLocalTimeZone)))
+ val reducedValue = reduced.getField(reducedIdx)
+ val value = if (reducedValue != null) {
+ val ins =
reduced.getField(reducedIdx).asInstanceOf[SqlTimestamp].toInstant
Review comment:
`reduced.getField(reducedIdx)` => `reducedValue `
----------------------------------------------------------------
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