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_r343553894
########## File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/GenerateUtils.scala ########## @@ -438,10 +445,13 @@ object GenerateUtils { def generateProctimeTimestamp( ctx: CodeGeneratorContext, contextTerm: String): GeneratedExpression = { - val resultTerm = ctx.addReusableLocalVariable("long", "result") + val resultType = new TimestampType(3) + val resultTypeTerm = primitiveTypeTermForType(resultType) + val resultTerm = ctx.addReusableLocalVariable(resultTypeTerm, "result") val resultCode = s""" - |$resultTerm = $contextTerm.timerService().currentProcessingTime(); + |$resultTerm = $SQL_TIMESTAMP_TERM.fromEpochMillis( + | $contextTerm.timerService().currentProcessingTime()); |""".stripMargin.trim // the proctime has been materialized, so it's TIMESTAMP now, not PROCTIME_INDICATOR GeneratedExpression(resultTerm, NEVER_NULL, resultCode, new TimestampType(3)) Review comment: OK ---------------------------------------------------------------- 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