iwanttobepowerful commented on code in PR #4614:
URL: https://github.com/apache/calcite/pull/4614#discussion_r2493181527
##########
core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java:
##########
@@ -796,17 +796,25 @@ protected RexNode removeCorrelationExpr(
RelNode newRel = relBuilder.build();
+ boolean hasCount = false;
for (AggregateCall aggCall : rel.getAggCallList()) {
if (aggCall.getAggregation() instanceof SqlCountAggFunction) {
- parentPropagatesNullValues = false;
+ hasCount = true;
break;
}
}
if (rel.getGroupType() == Aggregate.Group.SIMPLE
&& rel.getGroupSet().isEmpty()
Review Comment:
In the `Aggregate` class, we have:
```java
protected final ImmutableBitSet groupSet;
public final ImmutableList<ImmutableBitSet> groupSets;
```
Currently, we only check if `rel.getGroupSet().isEmpty()`. However, it might
be necessary to also check whether any element within `groupSets` is empty.
in `Improving Unnesting of Complex Queries`
https://dl.gi.de/server/api/core/bitstreams/c1918e8c-6a87-4da2-930a-bfed289f2388/content
<img width="857" height="327" alt="Image"
src="https://github.com/user-attachments/assets/112b1186-750d-4549-80ac-4ddf207109b7"
/>
--
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]