Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/17185#discussion_r206380665
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala
---
@@ -262,17 +262,47 @@ abstract class Star extends LeafExpression with
NamedExpression {
*/
case class UnresolvedStar(target: Option[Seq[String]]) extends Star with
Unevaluable {
- override def expand(input: LogicalPlan, resolver: Resolver):
Seq[NamedExpression] = {
+ /**
+ * Returns true if the nameParts match the qualifier of the attribute
+ *
+ * There are two checks: i) Check if the nameParts match the qualifier
fully.
+ * E.g. SELECT db.t1.* FROM db1.t1 In this case, the nameParts is
Seq("db1", "t1") and
--- End diff --
what about `SELECT db1.t1.* FROM t1` while the current database is `db1`?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]