kgyrtkirk commented on code in PR #3882:
URL: https://github.com/apache/calcite/pull/3882#discussion_r1691090007


##########
core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java:
##########
@@ -6154,7 +6150,7 @@ private class HistogramShuttle extends RexShuttle {
                     : c.rangeBetween(lowerBound, upperBound))
             .exclude(exclude)
             .allowPartial(allowPartial)
-            .nullWhenCountZero(needSum0)
+            .nullWhenCountZero(aggOp == SqlStdOperatorTable.SUM && 
type.isNullable())

Review Comment:
   wouldn't this will still add the count stuff if the actual 
`relBuilder.windowedAggregateOperator` decided to not override it?



##########
core/src/main/java/org/apache/calcite/tools/RelBuilder.java:
##########
@@ -1475,6 +1475,16 @@ protected AggCall aggregateCall(SqlAggFunction 
aggFunction, boolean distinct,
         filter, alias, preOperands, operands, distinctKeys, orderKeys);
   }
 
+  public SqlAggFunction windowedAggregateOperator(SqlAggFunction aggFunction,

Review Comment:
   shouldn't this be a `SqlToRelConverter` config option?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to