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

[GLUTEN-5696] Add preprojection support for ArrowEvalPythonExec #5697

Merged
merged 2 commits into from May 16, 2024

Conversation

yma11
Copy link
Contributor

@yma11 yma11 commented May 11, 2024

What changes were proposed in this pull request?

Add preprojection support for ArrowEvalPythonExec
Fixes: #5696)

How was this patch tested?

New UTs added

Copy link

#5696

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

@yma11
Copy link
Contributor Author

yma11 commented May 13, 2024

@jinchengchenghh @zhouyuan please help take a review. Thanks.

@@ -738,5 +739,7 @@ trait SparkPlanExecApi {

def genPostProjectForGenerate(generate: GenerateExec): SparkPlan

def genPreProjectForArrowEvalPythonExec(arrowEvalPythonExec: ArrowEvalPythonExec): SparkPlan
Copy link
Contributor

Choose a reason for hiding this comment

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

Can default return arrowEvalPythonExec, and remove the change in CH backend

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

Copy link

Run Gluten Clickhouse CI

val argOffsets = inputs.map {
input =>
input.map {
e =>
if (allInputs.exists(_.semanticEquals(e))) {
allInputs.indexWhere(_.semanticEquals(e))
} else {
if (!e.isInstanceOf[AttributeReference]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

else if (!e.isInstanceOf[AttributeReference]) {}
else {}

// flatten all the arguments
val allInputs = new ArrayBuffer[Expression]
for (input <- inputs) {
input.map {
Copy link
Contributor

Choose a reason for hiding this comment

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

input.filter(allInputs.exists(_.semanticEquals(e))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line is not to filter the inputs but add the matched expression in allInputs and replace it using faked Attribute.

Copy link

Run Gluten Clickhouse CI

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.

Thanks!

@zhztheplayer zhztheplayer merged commit 0cbb7f2 into apache:main May 16, 2024
43 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.

[VL] Add preprojection support for ArrowEvalPythonExec
3 participants