Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1272,8 +1272,11 @@ object InferFiltersFromConstraints extends Rule[LogicalPlan]
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.

(child.constraints ++ splitConjunctivePredicates(condition))
var newFilters = filter.constraints
val itr = (child.constraints ++ splitConjunctivePredicates(condition)).iterator
while (itr.hasNext) {
newFilters = newFilters - itr.next()
}
if (newFilters.nonEmpty) {
Filter(And(newFilters.reduce(And), condition), child)
} else {
Expand Down