JingsongLi commented on a change in pull request #10105:
[Flink-14599][table-planner-blink] Support precision of TimestampType in blink
planner
URL: https://github.com/apache/flink/pull/10105#discussion_r345722560
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/ExpressionReducer.scala
##########
@@ -172,6 +172,19 @@ class ExpressionReducer(
}
reducedValues.add(maySkipNullLiteralReduce(rexBuilder, value,
unreduced))
reducedIdx += 1
+ case SqlTypeName.TIMESTAMP =>
+ val reducedValue = reduced.getField(reducedIdx)
+ val value = if (reducedValue != null) {
+ val ts = reducedValue.asInstanceOf[SqlTimestamp]
+ val milliseconds = ts.getMillisecond
+ val nanoseconds = ts.toLocalDateTime.getNano
Review comment:
I think you can fix it, and it is very worthwhile to fix. Otherwise it will
bring a lot of strange code.
----------------------------------------------------------------
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