AngersZhuuuu commented on a change in pull request #30144:
URL: https://github.com/apache/spark/pull/30144#discussion_r610641688



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/grouping.scala
##########
@@ -231,3 +229,30 @@ object GroupingID {
     if (SQLConf.get.integerGroupingIdEnabled) IntegerType else LongType
   }
 }
+
+object GroupingAnalytics {
+  def unapply(exprs: Seq[Expression])

Review comment:
       > What's wrong with my proposal that returning None if the given 
expressions are not resolved yet?
   > 
   > ```
   > if (exprs.exists(!_.resolved)) {
   >   None
   > } else if (!exprs.exists(e => 
e.find(_.isInstanceOf[BaseGroupingSets]).isDefined)) ...
   > ```
   
   If here we return none, then it can't be resolved in current 
`ResolveGroupingAnalytics` then  will failed in `CheckAnalysis` when call 
datatype of CUBE/ROLLUP/GROUPING SETS and throw `UnsupportedOperationException`




-- 
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to