-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.21.0
-
Component/s: None
-
Labels:
CALCITE-2929 have added a safety check to avoid simplifying problematic cases.
The safety check apparently misses some kinds, for example: UNARY_PLUS
@Test public void testIsNullSimplificationWithUnaryPlus() { RexNode expr = isNotNull(coalesce(unaryPlus(vInt(1)), vIntNotNull(0))); RexNode s = simplify.simplifyUnknownAs(expr, RexUnknownAs.UNKNOWN); assertThat(expr.isAlwaysTrue(), is(true)); assertThat(s, is(trueLiteral)); }
- links to