[fix](fe) slots in having clause should be set to need materialized (#27412)

This commit is contained in:
Jerry Hu
2023-11-22 19:47:09 +08:00
committed by GitHub
parent 7cdad51133
commit 0302a9d026
3 changed files with 67 additions and 0 deletions

View File

@ -698,6 +698,11 @@ public class SelectStmt extends QueryStmt {
if (whereClause != null) {
whereClause.collect(SlotRef.class, conjuntSlots);
}
if (havingClauseAfterAnalyzed != null) {
havingClauseAfterAnalyzed.collect(SlotRef.class, conjuntSlots);
}
resultSlots.removeAll(orderingSlots);
resultSlots.removeAll(conjuntSlots);
// reset slots need to do fetch column