zhengruifeng commented on code in PR #51292:
URL: https://github.com/apache/spark/pull/51292#discussion_r2512802559
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/python/ArrowAggregatePythonExec.scala:
##########
@@ -217,3 +218,17 @@ case class AggregateInPandasExec(
newIter
}
}
+
+object ArrowAggregatePythonExec {
+ def apply(
+ groupingExpressions: Seq[NamedExpression],
+ aggExpressions: Seq[AggregateExpression],
+ resultExpressions: Seq[NamedExpression],
+ child: SparkPlan): ArrowAggregatePythonExec = {
+ val evalTypes =
aggExpressions.map(_.aggregateFunction.asInstanceOf[PythonUDAF].evalType)
+ assert(evalTypes.distinct.size == 1,
+ "All aggregate functions must have the same eval type in
ArrowAggregatePythonExec")
Review Comment:
sure, we have a lot of assert in udf executions, it is better to use
`internalError` instead
--
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]