thomasrebele commented on code in PR #4646:
URL: https://github.com/apache/calcite/pull/4646#discussion_r2549028291


##########
core/src/test/java/org/apache/calcite/rex/RexProgramTest.java:
##########
@@ -2776,6 +2776,11 @@ trueLiteral, literal(1),
     checkSimplify(
         isNotNull(div(vDecimalNotNull(), 
cast(literal(BigDecimal.valueOf(2.5)), intType))),
         "true");
+
+    checkSimplify(isNull(cast(div(vIntNotNull(), literal(0)), tBigInt())),

Review Comment:
   As far as I know, `vIntNotNull()` has no specified value. It is just a 
dynamic parameter (`?0.notNullInt0`). Adding a paramater would change the 
index, so `vIntNotNull(1)` would become a `?0.notNullInt1`. The only place that 
I've seen that the dynamic parameters get assigned a value is in 
`org.apache.calcite.rex.RexSimplify#verify`, and that includes several 
constants: -1, 0, 1, and 1000000 (see 
`org.apache.calcite.rex.RexAnalyzer#getComparables`).



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