Github user jiangxb1987 commented on a diff in the pull request:
    --- Diff: 
    @@ -31,39 +31,46 @@ class ResolveNaturalJoinSuite extends AnalysisTest {
       lazy val aNotNull = a.notNull
       lazy val bNotNull = b.notNull
       lazy val cNotNull = c.notNull
    +  lazy val aNew = newAttribute(a)
    +  lazy val bNotNullNew = newAttribute(bNotNull)
       lazy val r1 = LocalRelation(b, a)
       lazy val r2 = LocalRelation(c, a)
       lazy val r3 = LocalRelation(aNotNull, bNotNull)
       lazy val r4 = LocalRelation(cNotNull, bNotNull)
    +  lazy val r2New = LocalRelation(c, aNew)
    +  lazy val r4New = LocalRelation(cNotNull, bNotNullNew)
    +  private def newAttribute(a: AttributeReference): Attribute =
    +    a.withExprId(NamedExpression.newExprId)
       test("natural/using inner join") {
         val naturalPlan = r1.join(r2, NaturalJoin(Inner), None)
         val usingPlan = r1.join(r2, UsingJoin(Inner, 
Seq(UnresolvedAttribute("a"))), None)
    -    val expected = r1.join(r2, Inner, Some(EqualTo(a, a))).select(a, b, c)
    +    val expected = r1.join(r2New, Inner, Some(EqualTo(a, aNew))).select(a, 
b, c)
    --- End diff --
    Previous `EqualTo(a, a)` introduces a conflicting attributes exception. 

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to