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

    https://github.com/apache/spark/pull/4283#discussion_r23818400
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala
 ---
    @@ -94,12 +89,32 @@ case class Star(
       override def qualifiers = throw new UnresolvedException(this, 
"qualifiers")
       override lazy val resolved = false
     
    -  override def newInstance = this
    +  override def newInstance() = this
       override def withNullability(newNullability: Boolean) = this
       override def withQualifiers(newQualifiers: Seq[String]) = this
       override def withName(newName: String) = this
     
    -  def expand(input: Seq[Attribute], resolver: Resolver): 
Seq[NamedExpression] = {
    +  // Star gets expanded at runtime so we never evaluate a Star.
    +  override def eval(input: Row = null): EvaluatedType =
    +    throw new TreeNodeException(this, s"No function to evaluate 
expression. type: ${this.nodeName}")
    +
    +  def expand(input: Seq[Attribute], resolver: Resolver): 
Seq[NamedExpression]
    +}
    +
    +
    +/**
    + * Represents all of the input attributes to a given relational operator, 
for example in
    + * "SELECT * FROM ...".
    + *
    + * @param table an optional table that should be the target of the 
expansion.  If omitted all
    + *              tables' columns are produced.
    + */
    +case class UnresolvedStar(
    +    table: Option[String],
    +    mapFunction: Attribute => Expression = identity[Attribute])
    --- End diff --
    
    As long as you are cleaning up, I think this was a failed experiment of 
mine?  If it'll compile without I'd remove it.


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