docete 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_r344543636
########## 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: Currently many function use Long as the internal representation of Timestamp. And the document recommend this usage, see [Types.TIMESTAMP can be represented as long](https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/table/udfs.html#best-practices-for-implementing-udfs). We should cover this. ---------------------------------------------------------------- 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