docete 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_r353642653
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarFunctionCallGen.scala
 ##########
 @@ -66,7 +67,18 @@ 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_WITH_LOCAL_TIME_ZONE
+          && (resultClass == classOf[Long] || resultClass == classOf[JLong])) {
+        // Convert Long to SqlTimestamp if the UDX's returnType is
 
 Review comment:
   will add a Long <-> Instant converter to support 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:
[email protected]


With regards,
Apache Git Services

Reply via email to