kotwal-itpro commented on code in PR #29393:
URL: https://github.com/apache/flink/pull/29393#discussion_r4203230748


##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/ExpressionReducer.scala:
##########
@@ -281,18 +281,20 @@ class ExpressionReducer(
           // to ensure the division is non-zero when the operator is DIVIDE
           if (call.getOperator.getKind.equals(SqlKind.DIVIDE)) {
             val ops = call.getOperands
-            val divisionLiteral = ops.get(ops.size() - 1)
-
-            // according to BuiltInFunctionDefinitions, the DEVIDE's second op 
must be numeric
-            assert(RexUtil.isDeterministic(divisionLiteral))

Review Comment:
   No good reason, it was an oversight when I restructured the check. The 
divisor is still always deterministic here, including the non-literal case, so 
I restored the assertion in 9aeff1d. I also rebased onto the latest master. 
Thanks for catching it.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to