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-30433][SQL] Make conflict attributes resolution more scalable in ResolveReferences #27105

Closed

Conversation

Ngone51
Copy link
Member

@Ngone51 Ngone51 commented Jan 6, 2020

What changes were proposed in this pull request?

This PR tries to make conflict attributes resolution in ResolveReferences more scalable by doing resolution in batch way.

Why are the changes needed?

Currently, ResolveReferences rule only resolves conflict attributes of one single conflict plan pair in one iteration, which can be inefficient when there're many conflicts.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Covered by existed tests.

@Ngone51
Copy link
Member Author

Ngone51 commented Jan 6, 2020

cc @cloud-fan

}

/*
* Note that it's possible for conflictPlans to be empty while it implies that there
Copy link
Contributor

Choose a reason for hiding this comment

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

`conflictPlans`

Copy link
Contributor

@cloud-fan cloud-fan Jan 6, 2020

Choose a reason for hiding this comment

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

`conflictPlans` can be empty which implies that ...

// transformDown so that we can replace all the old Relations in one turn due to
// the reason that conflictPlans are also collected in pre-order.
right transformDown {
case r if conflictPlanMap.contains(r) => conflictPlanMap(r)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: case r => conflictPlanMap.getOrElse(r, r)

@SparkQA
Copy link

SparkQA commented Jan 6, 2020

Test build #116153 has finished for PR 27105 at commit de75edf.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 6, 2020

Test build #116168 has finished for PR 27105 at commit 3ae4bc8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan cloud-fan closed this in da07615 Jan 7, 2020
@cloud-fan
Copy link
Contributor

thanks, merging to master!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants