Skip to content

Conversation

@beliefer
Copy link
Contributor

What changes were proposed in this pull request?

Currently, InferFiltersFromConstraints construct a new Filter which condition without the same order in scala 2.12 and 2.13

It seems -- of ExpressionSet cannot guarantee the order of elements.

The behavior lead to #35947 (comment)

Why are the changes needed?

Fix bug

Does this PR introduce any user-facing change?

'Yes'.
The behavior will be consistent between scala 2.12 and 2.13

How was this patch tested?

Exists tests.

@github-actions github-actions bot added the SQL label Jun 21, 2022
private def inferFilters(plan: LogicalPlan): LogicalPlan = plan.transformWithPruning(
_.containsAnyPattern(FILTER, JOIN)) {
case filter @ Filter(condition, child) =>
val newFilters = filter.constraints --
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible to override -- in ExpressionSet?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@LuciferYang LuciferYang Jun 21, 2022

Choose a reason for hiding this comment

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

Yes, after SPARK-39520, this issue should no longer exists, and @HyukjinKwon already mark SPARK-39523 as RESOLVED

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems #36925 fixed this issue ? @LuciferYang

Copy link
Contributor

Choose a reason for hiding this comment

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

SPARK-39520 was not merged to 3.3, do we have this issue in 3.3?

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems #36925 fixed this issue ? @LuciferYang

Yes

Copy link
Contributor

Choose a reason for hiding this comment

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

SPARK-39520 was not merged to 3.3, do we have this issue in 3.3?

Let me double check this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cloud-fan @LuciferYang I have tested and the issue no longer exists. I will close this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

SPARK-39520 was not merged to 3.3, do we have this issue in 3.3?

@cloud-fan 3.3 no this issue due to SPARK-38836 not in branch-3.3, the -- method hasn't been deleted, and I manually check the relevant suites(inlcude TPCDSV1_4_PlanStabilitySuite, AdaptiveQueryExecSuite, ExpressionSetSuite, JDBCV2Suite, GeneratorFunctionSuite), all passed.

@beliefer
Copy link
Contributor Author

ping @HyukjinKwon @huaxingao cc @cloud-fan

@beliefer beliefer closed this Jun 21, 2022
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.

3 participants