Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14682#discussion_r75483271
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/LogicalRelation.scala
 ---
    @@ -79,11 +79,18 @@ case class LogicalRelation(
       /** Used to lookup original attribute capitalization */
       val attributeMap: AttributeMap[AttributeReference] = 
AttributeMap(output.map(o => (o, o)))
     
    -  def newInstance(): this.type =
    +  /**
    +   * Returns a new instance of this LogicalRelation. According to the 
semantics of
    +   * MultiInstanceRelation, this method should returns a copy of this 
object with
    +   * unique expression ids. Thus we don't respect the 
`expectedOutputAttributes` and
    +   * create new instances of original output attributes.
    +   */
    +  override def newInstance(): this.type = {
         LogicalRelation(
           relation,
    -      expectedOutputAttributes,
    --- End diff --
    
    Once `expectedOutputAttributes` is `None`, we still need to have new 
instances of relation's output. `output` already covers both relation's output 
and `expectedOutputAttributes`.


---
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

Reply via email to