You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/17 07:50:06 UTC

[GitHub] [flink] wuchong commented on a diff in pull request #19851: [FLINK-20765][table-planner] Make all expressions use the result type passed in instead of inferring it again in OperatorGen to avoid potential type missmatch

wuchong commented on code in PR #19851:
URL: https://github.com/apache/flink/pull/19851#discussion_r899829796


##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala:
##########
@@ -313,6 +313,7 @@ object ScalarOperatorGens {
   def generateUnaryIntervalPlusMinus(
       ctx: CodeGeneratorContext,
       plus: Boolean,
+      resultType: LogicalType,
       operand: GeneratedExpression): GeneratedExpression = {
     val operator = if (plus) "+" else "-"
     generateUnaryArithmeticOperator(ctx, operator, operand.resultType, operand)

Review Comment:
   Use the `resultType` parameter? 



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org