Skip to content

test: Ensure traversed operators during finding first partial aggregaion are all native#58

Merged
viirya merged 1 commit intoapache:mainfrom
viirya:fix_agg
Feb 20, 2024
Merged

test: Ensure traversed operators during finding first partial aggregaion are all native#58
viirya merged 1 commit intoapache:mainfrom
viirya:fix_agg

Conversation

@viirya
Copy link
Copy Markdown
Member

@viirya viirya commented Feb 20, 2024

Which issue does this PR close?

Closes #.

Rationale for this change

Running TPCH17 query fails now with columnar shuffle + native execution configs:

Couldn't find l_extendedprice#7 in [l_partkey#28L,l_quantity#31]
java.lang.IllegalStateException: Couldn't find l_extendedprice#7 in [l_partkey#28L,l_quantity#31]

It is because when we try to find aggregation function inputs for Final aggregation, we may get wrong inputs from unrelated CometHashAggregateExec. When collecting the Partial CometHashAggregateExec, we should ensure we don't cross between native and Spark operators.

The internal patch of this PR is originally a bug fix to HashAggregate. Above is its description.

But the just merged patch #42 which is actually a later patch internally and when it is ported it doesn't only copy original commit but latest code. So this fix is also ported in #42 together.

But there is one test added with the internal PR, and it is missed. This patch adds it to Comet.

What changes are included in this PR?

How are these changes tested?

Copy link
Copy Markdown
Member

@sunchao sunchao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (pending CI)

@viirya viirya merged commit 71064d2 into apache:main Feb 20, 2024
@viirya
Copy link
Copy Markdown
Member Author

viirya commented Feb 20, 2024

Merged. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants