allisonwang-db commented on a change in pull request #32303:
URL: https://github.com/apache/spark/pull/32303#discussion_r620547937
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala
##########
@@ -392,16 +392,27 @@ case class UnresolvedStar(target: Option[Seq[String]])
extends Star with Unevalu
throw
QueryCompilationErrors.starExpandDataTypeNotSupportedError(target.get)
}
} else {
- val from = input.inputSet.map(_.name).mkString(", ")
- val targetString = target.get.mkString(".")
- throw
QueryCompilationErrors.cannotResolveStarExpandGivenInputColumnsError(
- targetString, from)
+ // Change the unresolved star to an expanded star to indicate the star
has been
+ // expanded once.
+ ExpandedStar(this) :: Nil
}
}
override def toString: String = target.map(_ + ".").getOrElse("") + "*"
}
+/**
+ * Represent an [[UnresolvedStar]] that has been to expand once.
Review comment:
This `ExpandedStar` is indeed confusing. It was used to detect invalid
usage of star expressions. I will update the logic here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]