You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/06/16 03:14:37 UTC

[GitHub] [spark] wangyum opened a new pull request, #36886: [MINOR][SQL] Remove duplicate code for `AggregateExpression.isAggregate` usage

wangyum opened a new pull request, #36886:
URL: https://github.com/apache/spark/pull/36886

   ### What changes were proposed in this pull request?
   
   Remove duplicate code for `AggregateExpression.isAggregate` usage.
   
   ### Why are the changes needed?
   
   Make the code easier to maintain.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Existing UT.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [spark] huaxingao commented on pull request #36886: [MINOR][SQL] Remove duplicate code for `AggregateExpression.isAggregate` usage

Posted by GitBox <gi...@apache.org>.
huaxingao commented on PR #36886:
URL: https://github.com/apache/spark/pull/36886#issuecomment-1157223864

   Merged to master. Thanks @wangyum 


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [spark] huaxingao closed pull request #36886: [MINOR][SQL] Remove duplicate code for `AggregateExpression.isAggregate` usage

Posted by GitBox <gi...@apache.org>.
huaxingao closed pull request #36886: [MINOR][SQL] Remove duplicate code for `AggregateExpression.isAggregate` usage
URL: https://github.com/apache/spark/pull/36886


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [spark] wangyum commented on a diff in pull request #36886: [MINOR][SQL] Remove duplicate code for `AggregateExpression.isAggregate` usage

Posted by GitBox <gi...@apache.org>.
wangyum commented on code in PR #36886:
URL: https://github.com/apache/spark/pull/36886#discussion_r898653846


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala:
##########
@@ -301,20 +301,16 @@ trait CheckAnalysis extends PredicateHelper with LookupCatalog {
               failAnalysis("Input argument tolerance must be non-negative.")
             }
 
-          case a @ Aggregate(groupingExprs, aggregateExprs, child) =>
-            def isAggregateExpression(expr: Expression): Boolean = {
-              expr.isInstanceOf[AggregateExpression] || PythonUDF.isGroupedAggPandasUDF(expr)
-            }

Review Comment:
   https://github.com/apache/spark/blob/c97216c449f5993af0482b0caa689fa0c0cd56a6/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/interfaces.scala#L89-L91



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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