Skip to content

Commit

Permalink
[fix](planner) retain groupingSlotIds as materialized for aggregate (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nextdreamblue authored and Doris-Extras committed Mar 31, 2024
1 parent 31db335 commit cddf133
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ public Set<SlotId> computeInputSlotIds(Analyzer analyzer) throws NotImplementedE
}
}
allRequestIds.forEach(allUnRequestIds::remove);
groupingSlotIds.forEach(allUnRequestIds::remove);
allUnRequestIds.forEach(result::remove);
}
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@
-- !select5 --
3

-- !select5 --
3

Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,67 @@ suite("test_inlineview_with_project") {
) as a;
"""

qt_select5 """
select
count(*)
from
(
select
cast(random() * 10000000000000000 as bigint) as id,
ga.column1 as column1,
ga.column6 as column2,
CAST(count(CAST(ga.column1 AS CHAR)) AS CHAR) as column3
from
(
select
t1.id as id,
upper(t1.caseId) as column1,
t1.`timestamp` as column2,
lower(t1.content) as column6
from
(
select
id,
caseId,
content,
`timestamp`
from
(
select
id,
caseId,
content,
`timestamp`
from
dr_user_test_t2
) aaa
) t1
left join (
select
id,
caseId,
content,
`timestamp`
from
(
select
id,
caseId,
content,
`timestamp`
from
dr_user_test_t2
) bbb
) t2 on t1.id = t2.id
) as ga
group by
ga.column1,
ga.column6
) as tda;
"""

sql """DROP TABLE IF EXISTS `dr_user_test_t1`;"""
sql """DROP TABLE IF EXISTS `dr_user_test_t2`;"""
}

0 comments on commit cddf133

Please sign in to comment.