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

[SPARK-37933][SQL] Change the traversal method of V2ScanRelationPushDown push down rules #35242

Closed
wants to merge 3 commits into from

Conversation

jackylee-ch
Copy link
Contributor

What changes were proposed in this pull request?

This pr is trying to change the traversal method of V2ScanRelationPushDown push down rules , which is more readable and easier to extend and add new rules.

Does this PR introduce any user-facing change?

No

How was this patch tested?

origin tests

@github-actions github-actions bot added the SQL label Jan 18, 2022
@jackylee-ch
Copy link
Contributor Author

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

Thank you for pinging me, @stczwd . It looks reasonable.

@dongjoon-hyun
Copy link
Member

I'll leave this PR to @cloud-fan .

@HyukjinKwon HyukjinKwon changed the title [SPARK-37933][SQL] change the traversal method of V2ScanRelationPushDown push down rules [SPARK-37933][SQL] Change the traversal method of V2ScanRelationPushDown push down rules Jan 18, 2022
@@ -222,7 +231,7 @@ object V2ScanRelationPushDown extends Rule[LogicalPlan] with PredicateHelper {
Cast(aggAttribute, aggDataType)
}

def applyColumnPruning(plan: LogicalPlan): LogicalPlan = plan.transform {
def pushDownColumn(plan: LogicalPlan): LogicalPlan = plan.transform {
Copy link
Member

Choose a reason for hiding this comment

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

maybe pruneColumns?

Copy link
Contributor

Choose a reason for hiding this comment

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

I also think pruneColumns or the original name applyColumnPruning might be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pruneColumns sounds good to me, thanks.

@@ -308,7 +317,7 @@ object V2ScanRelationPushDown extends Rule[LogicalPlan] with PredicateHelper {
case other => other
}

def applyLimit(plan: LogicalPlan): LogicalPlan = plan.transform {
def pushDownLimit(plan: LogicalPlan): LogicalPlan = plan.transform {
Copy link
Member

Choose a reason for hiding this comment

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

the name pushDownLimit is same as pushDownLimit above. Can we use a different name or at least add some docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, maybe pushdownLimits is better.

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

LGTM2 except two comments above.

@HyukjinKwon
Copy link
Member

Merged to master.

@jackylee-ch
Copy link
Contributor Author

Thanks you all, guys

@jackylee-ch jackylee-ch deleted the SPARK-37933 branch January 19, 2022 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants