Skip to content

Conversation

@924060929
Copy link
Contributor

cherry pick from #33091

Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty

(cherry picked from commit e7d6697)
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@924060929 924060929 changed the title [fix](Nereids) fix group concat (#33091) [fix](Nereids) fix group concat May 24, 2024
@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.79% (8079/21377)
Line Coverage: 29.45% (65960/223997)
Region Coverage: 28.94% (33999/117474)
Branch Coverage: 24.80% (17454/70382)
Coverage Report: http://coverage.selectdb-in.cc/coverage/33c783f604bfa4cd78d28cefe8b44138d3a7b350_33c783f604bfa4cd78d28cefe8b44138d3a7b350/report/index.html

Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty

(cherry picked from commit e7d6697)
@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.78% (8077/21377)
Line Coverage: 29.43% (65927/223997)
Region Coverage: 28.92% (33977/117474)
Branch Coverage: 24.78% (17442/70382)
Coverage Report: http://coverage.selectdb-in.cc/coverage/5689908d2283611653cc6fc71ff621da1acacc85_5689908d2283611653cc6fc71ff621da1acacc85/report/index.html

@morrySnow morrySnow merged commit e965013 into apache:branch-2.0 May 24, 2024
@924060929 924060929 deleted the branch-2.0-fix-group-concat branch May 24, 2024 06:34
mongo360 pushed a commit to mongo360/doris that referenced this pull request Aug 16, 2024
cherry pick from apache#33091
commit e7d6697

Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty

(cherry picked from commit e7d6697)

* [fix](Nereids) fix group concat (apache#33091)

Fix failed in regression_test/suites/query_p0/group_concat/test_group_concat.groovy

select
group_concat( distinct b1, '?'), group_concat( distinct b3, '?')
from
table_group_concat
group by
b2

exception:

lowestCostPlans with physicalProperties(GATHER) doesn't exist in root group

The root cause is '?' is push down to slot by NormalizeAggregate, AggregateStrategies treat the slot as a distinct parameter and generate a invalid PhysicalHashAggregate, and then reject by ChildOutputPropertyDeriver.

I fix this bug by avoid push down literal to slot in NormalizeAggregate, and forbidden generate stream aggregate node when group by slots is empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants