Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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.
Attachments
Issue Links
- relates to
-
CALCITE-3897 Windowed aggregate with bracket (ROWS or RANGE) without ORDER BY is invalid
- Closed
-
CALCITE-6538 OVER (ROWS CURRENT ROW) should return a window with one row, not all rows
- Closed