allisonwang-db commented on a change in pull request #32303:
URL: https://github.com/apache/spark/pull/32303#discussion_r639384170



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -174,13 +174,21 @@ trait CheckAnalysis extends PredicateHelper with 
LookupCatalog {
                 hof.failAnalysis(
                   s"cannot resolve '${hof.sql}' due to argument data type 
mismatch: $message")
             }
+          // Check if there are expressions with children containing star 
expressions.
+          case e if e.children.exists(_.isInstanceOf[Star]) =>
+            e.failAnalysis(s"Invalid usage of '*' in expression 
'${e.prettyName}'")

Review comment:
       Good point. The error message is slightly different from 
`invalidStarUsageError`(with an extra word 'expression') but it should be fine 
to unify them.




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

Reply via email to