Description
"SELECT * FROM upperCaseData JOIN lowerCaseData where lowerCaseData.n = upperCaseData.N and lowerCaseData.n = 3"
== Analyzed Logical Plan == N: int, L: string, n: int, l: string Project [N#16,L#17,n#18,l#19] +- Filter ((n#18 = N#16) && (n#18 = 3)) +- Join Inner, None :- Subquery upperCaseData : +- LogicalRDD [N#16,L#17], MapPartitionsRDD[17] at beforeAll at BeforeAndAfterAll.scala:187 +- Subquery lowerCaseData +- LogicalRDD [n#18,l#19], MapPartitionsRDD[19] at beforeAll at BeforeAndAfterAll.scala:187
Before the improvement, the optimized logical plan is
== Optimized Logical Plan == Project [N#16,L#17,n#18,l#19] +- Join Inner, Some((n#18 = N#16)) :- LogicalRDD [N#16,L#17], MapPartitionsRDD[17] at beforeAll at BeforeAndAfterAll.scala:187 +- Filter (n#18 = 3) +- LogicalRDD [n#18,l#19], MapPartitionsRDD[19] at beforeAll at BeforeAndAfterAll.scala:187
After the improvement, the optimized logical plan should be like
== Optimized Logical Plan == Project [N#16,L#17,n#18,l#19] +- Join Inner, Some((n#18 = N#16)) :- Filter (N#16 = 3) : +- LogicalRDD [N#16,L#17], MapPartitionsRDD[17] at beforeAll at BeforeAndAfterAll.scala:187 +- Filter (n#18 = 3) +- LogicalRDD [n#18,l#19], MapPartitionsRDD[19] at beforeAll at BeforeAndAfterAll.scala:187
Attachments
Issue Links
- duplicates
-
SPARK-13219 Pushdown predicate propagation in SparkSQL with join
- Resolved
- links to