Github user skambha commented on a diff in the pull request: https://github.com/apache/spark/pull/17185#discussion_r206975896 --- 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 -- This (SELECT db1.t1.* FROM t1) would resolve correctly. Also a similar scenario (details in Section 2 in Table A # 5 in the design doc) select db1.t1.i1 from t1 will resolve correctly when the current database is db1. I will explicitly add a test case for the db1.t1.* from t1 as well.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org