dtenedor commented on code in PR #56468:
URL: https://github.com/apache/spark/pull/56468#discussion_r3617125581


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/resolver/ResolverGuard.scala:
##########
@@ -392,11 +380,28 @@ class ResolverGuard(
    * [[UnresolvedStarExceptOrReplace]] is handled separately, because it's a 
leaf expression,
    * but it has replacement expressions, that could be non-trivial.
    */
-  private def checkStar(star: Star) = star match {
-    case starExceptOrReplace: UnresolvedStarExceptOrReplace =>
-      starExceptOrReplace.replacements.collectFirst { case 
CheckExpressionSeq(reason) => reason }
-    case star =>
-      star.children.collectFirst { case CheckExpression(reason) => reason }
+  private def checkStar(star: Star) =
+    checkStarTarget(star).orElse {
+      star match {
+        case starExceptOrReplace: UnresolvedStarExceptOrReplace =>
+          starExceptOrReplace.replacements.collectFirst {
+            case CheckExpressionSeq(reason) => reason
+          }
+        case star =>
+          star.children.collectFirst { case CheckExpression(reason) => reason }
+      }
+    }
+
+  private def checkStarTarget(star: Star): Option[String] = star match {

Review Comment:
   Thanks for adding the extra testing!



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to