Skip to content

Commit ed05954

Browse files
AngersZhuuuucloud-fan
authored andcommitted
[SPARK-29145][SQL][FOLLOWUP] Clean up code about support sub-queries in join conditions
### What changes were proposed in this pull request? According to discuss #25854 (comment) ### Why are the changes needed? Clean code ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Existed UT Closes #32499 from AngersZhuuuu/SPARK-29145-fix. Authored-by: Angerszhuuuu <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
1 parent d92018e commit ed05954

File tree

1 file changed

+2
-2
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis

1 file changed

+2
-2
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,8 +2352,8 @@ class Analyzer(override val catalogManager: CatalogManager)
23522352
// Only a few unary nodes (Project/Filter/Aggregate) can contain subqueries.
23532353
case q: UnaryNode if q.childrenResolved =>
23542354
resolveSubQueries(q, q.children)
2355-
case j: Join if j.childrenResolved =>
2356-
resolveSubQueries(j, Seq(j, j.left, j.right))
2355+
case j: Join if j.childrenResolved && j.duplicateResolved =>
2356+
resolveSubQueries(j, j.children)
23572357
case s: SupportsSubquery if s.childrenResolved =>
23582358
resolveSubQueries(s, s.children)
23592359
}

0 commit comments

Comments
 (0)