KurtYoung 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_r344431614
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarFunctionCallGen.scala
##########
@@ -66,7 +69,15 @@ class ScalarFunctionCallGen(scalarFunction: ScalarFunction)
extends CallGenerato
boxedTypeTermForType(returnType)
}
val resultTerm = ctx.addReusableLocalVariable(resultTypeTerm, "result")
- val evalResult =
s"$functionReference.eval(${parameters.map(_.resultTerm).mkString(", ")})"
+ val evalResult =
+ if (returnType.getTypeRoot ==
LogicalTypeRoot.TIMESTAMP_WITHOUT_TIME_ZONE) {
Review comment:
I'm not sure about the changes of this class.
Why we have to treat this as a special case? Other types will have similar
problems, like `BinaryString`.
----------------------------------------------------------------
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