-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.23.0
-
Component/s: None
-
Labels:None
Null lowerBound/upperBond in RexWindow causes NPE in RexShuttle. Here's a test that can be dropped into RexShuttleTest.java:
@Test public void handlesNullBoundsInRexWindow() { final RelBuilder builder = RelBuilder.create(RelBuilderTest.config().build()); final RexNode over = builder.getRexBuilder().makeOver( builder.getTypeFactory().createSqlType(SqlTypeName.BIGINT), SqlStdOperatorTable.ROW_NUMBER, ImmutableList.of(), ImmutableList.of(), ImmutableList.of(), null, null, true, true, true, true, true ); assertThat(over.accept(new RexShuttle()), is(over)); }
That will raise an NPE. Fix is to handle NULLs when doing the child accept on the RexWindowBound[s] in RexShuttle.visitWindow.
- relates to
-
CALCITE-3897 Windowed aggregate with bracket (ROWS or RANGE) without ORDER BY is invalid
-
- Closed
-