Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10296#discussion_r47632111
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala ---
    @@ -499,10 +499,16 @@ class DataFrame private[sql](
         // Analyze the self join. The assumption is that the analyzer will 
disambiguate left vs right
         // by creating a new instance for one of the branch.
         val joined = sqlContext.executePlan(
    -      Join(logicalPlan, right.logicalPlan, joinType = Inner, 
None)).analyzed.asInstanceOf[Join]
    +      Join(logicalPlan, right.logicalPlan, joinType = JoinType(joinType), 
None)
    +    ).analyzed.asInstanceOf[Join]
     
         // Project only one of the join columns.
    -    val joinedCols = usingColumns.map(col => 
withPlan(joined.right).resolve(col))
    +    //
    +    // SPARK-12336: For outer joins, attributes of at least one child plan 
output will be forced to
    +    // be nullable. An `AttributeSet` is necessary so that we are not 
affected by different
    +    // nullability values.
    +    val joinedCols = AttributeSet(usingColumns.map(col => 
withPlan(joined.right).resolve(col)))
    --- End diff --
    
    should we rename this to `joinedColsFromRight`?


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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to