Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
If a simplification could happen after some ReduceExpression rewrite; the simplification result may have a slightly different type in nullability.
@Test public <T> void testReduceCaseNullabilityChange() throws Exception { HepProgram program = new HepProgramBuilder() .addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE) .addRuleInstance(ReduceExpressionsRule.PROJECT_INSTANCE) .build(); try (Hook.Closeable a = Hook.REL_BUILDER_SIMPLIFY.add(Hook.propertyJ(false))) { checkPlanning(program, "select case when empno = 1 then 1 when 1 IS NOT NULL then 2 else null end as qx " + "from emp"); }
Exposed by CALCITE-1413 changes; I'm not sure if there is any other variations for which the same could happen.
Attachments
Issue Links
- causes
-
CALCITE-2687 Is distinct from could lead to Exceptions in ReduceExpressionRule
- Closed
- relates to
-
HIVE-20913 Narrowing nullability may cause typecheck failures
- Resolved
- links to