itholic commented on code in PR #36113:
URL: https://github.com/apache/spark/pull/36113#discussion_r846907632
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala:
##########
@@ -571,9 +571,14 @@ abstract class SparkStrategies extends
QueryPlanner[SparkPlan] {
resultExpressions,
planLater(child)))
- case PhysicalAggregation(_, _, _, _) =>
+ case PhysicalAggregation(_, aggExpressions, _, _) =>
+ var groupAggPandasUDFNames = Set[String]()
+ aggExpressions.foreach(expr => if (expr.isInstanceOf[PythonUDF]) {
+ groupAggPandasUDFNames += expr.asInstanceOf[PythonUDF].name
+ })
// If cannot match the two cases above, then it's an error
- throw
QueryCompilationErrors.cannotUseMixtureOfAggFunctionAndGroupAggPandasUDFError()
+ throw
QueryCompilationErrors.cannotUseMixtureOfAggFunctionAndGroupAggPandasUDFError(
+ "<" + groupAggPandasUDFNames.mkString(",") + ">")
Review Comment:
Seems like we usually use single quotes for emphasize the name. Let me
change.
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala:
##########
@@ -571,9 +571,14 @@ abstract class SparkStrategies extends
QueryPlanner[SparkPlan] {
resultExpressions,
planLater(child)))
- case PhysicalAggregation(_, _, _, _) =>
+ case PhysicalAggregation(_, aggExpressions, _, _) =>
+ var groupAggPandasUDFNames = Set[String]()
+ aggExpressions.foreach(expr => if (expr.isInstanceOf[PythonUDF]) {
+ groupAggPandasUDFNames += expr.asInstanceOf[PythonUDF].name
+ })
// If cannot match the two cases above, then it's an error
- throw
QueryCompilationErrors.cannotUseMixtureOfAggFunctionAndGroupAggPandasUDFError()
+ throw
QueryCompilationErrors.cannotUseMixtureOfAggFunctionAndGroupAggPandasUDFError(
+ "<" + groupAggPandasUDFNames.mkString(",") + ">")
Review Comment:
Seems like we usually use single quotes for emphasizing the name. Let me
change.
--
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]