[fix](planner)should keep at least one slot materialized in agg node (#26116)

This commit is contained in:
starocean999
2023-10-31 16:52:45 +08:00
committed by GitHub
parent a6e010f722
commit 958c7fdfd9
3 changed files with 41 additions and 1 deletions

View File

@ -905,7 +905,9 @@ public final class AggregateInfo extends AggregateInfoBase {
intermediateSlotDesc.setIsMaterialized(true);
}
if (!slotDesc.isMaterialized()) {
if (!slotDesc.isMaterialized()
&& !(i == aggregateExprsSize - 1 && materializedSlots.isEmpty() && groupingExprs.isEmpty())) {
// we need keep at least one materialized slot in agg node
continue;
}