Skip to content

Commit 3107f75

Browse files
committed
Fix window rewrite aggregate call type inference
1 parent 94113d4 commit 3107f75

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/logical/IgniteLogicalWindowRewriteRule.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,6 @@ private static AggregateCall toAggregateCall(Window.RexWinAggCall winAggCall) {
300300

301301
SqlAggFunction agg = (SqlAggFunction)winAggCall.getOperator();
302302

303-
// Use the type resolved for the window call itself. It already includes correct
304-
// nullability (for example AVG over constant expressions), while direct inference
305-
// from operands can return a different nullability and break AggregateCall checks.
306-
RelDataType inferredType = winAggCall.getType();
307-
308303
return AggregateCall.create(
309304
agg,
310305
winAggCall.distinct,
@@ -313,7 +308,7 @@ private static AggregateCall toAggregateCall(Window.RexWinAggCall winAggCall) {
313308
argList,
314309
-1,
315310
RelCollations.EMPTY,
316-
inferredType,
311+
null,
317312
null
318313
);
319314
}

0 commit comments

Comments
 (0)