Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CORE] Drop redundant partial sort which has pre-project when offload sortAgg #6294

Merged
merged 4 commits into from
Jul 4, 2024

Conversation

zml1206
Copy link
Contributor

@zml1206 zml1206 commented Jul 1, 2024

What changes were proposed in this pull request?

As titile.

How was this patch tested?

UT

Copy link

github-actions bot commented Jul 1, 2024

Thanks for opening a pull request!

Could you open an issue for this pull request on Github Issues?

https://github.com/apache/incubator-gluten/issues

Then could you also rename commit message and pull request title in the following format?

[GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}

See also:

Copy link

github-actions bot commented Jul 1, 2024

Run Gluten Clickhouse CI

1 similar comment
@zml1206
Copy link
Contributor Author

zml1206 commented Jul 2, 2024

Run Gluten Clickhouse CI

@@ -23,11 +23,27 @@ import org.apache.spark.sql.execution.{ProjectExec, SortExec, SparkPlan}
object SortUtils {
def dropPartialSort(plan: SparkPlan): SparkPlan = plan match {
case RewrittenNodeWall(p) => RewrittenNodeWall(dropPartialSort(p))
case sort: SortExec if !sort.global => sort.child
case PartialSortChild(p) => p
Copy link
Member

Choose a reason for hiding this comment

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

Why we only drop partial sorts? I know it's previous code but I am still curious about that.

Also I'd suggest renaming:

PartialSortChild(p) -> PartialSortLike(child)
ProjectChild(p) -> ProjectLike(child)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

github-actions bot commented Jul 2, 2024

Run Gluten Clickhouse CI

Copy link

github-actions bot commented Jul 2, 2024

Run Gluten Clickhouse CI

1 similar comment
@zml1206
Copy link
Contributor Author

zml1206 commented Jul 2, 2024

Run Gluten Clickhouse CI

zhztheplayer
zhztheplayer previously approved these changes Jul 3, 2024
Copy link
Member

@zhztheplayer zhztheplayer left a comment

Choose a reason for hiding this comment

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

Just some nits. Thank you.

@@ -50,6 +50,32 @@ abstract class VeloxAggregateFunctionsSuite extends VeloxWholeStageTransformerSu
.set("spark.sql.sources.useV1SourceList", "avro")
}

test("drop redundant partial sort which has pre-project when offload sortAgg") {
Copy link
Member

Choose a reason for hiding this comment

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

Would you like to move this test case down, to the bottom of this file, probably? Thanks.

Copy link

github-actions bot commented Jul 3, 2024

Run Gluten Clickhouse CI

@zml1206 zml1206 requested a review from zhztheplayer July 4, 2024 01:17
@zhztheplayer zhztheplayer merged commit a091ac5 into apache:main Jul 4, 2024
40 checks passed
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