Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/17099#discussion_r103610959 --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/FoldablePropagationSuite.scala --- @@ -130,6 +130,20 @@ class FoldablePropagationSuite extends PlanTest { comparePlans(optimized, correctAnswer) } + test("Propagate in inner join") { + val ta = testRelation.select('a, Literal("a").as('tag)) + .union(testRelation.select('a, Literal("b").as('tag))) + .subquery('ta) + val tb = testRelation.select('a, Literal("a").as('tag)) + .union(testRelation.select('a, Literal("b").as('tag))) + .subquery('tb) + val query = ta.join(tb, Inner, + Some("ta.a".attr === "tb.a".attr && "ta.tag".attr === "tb.tag")) --- End diff -- This is wrong. What you are doing is to compare the column `ta.tag` with a string constant "tb.tag"
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org