HyukjinKwon commented on a change in pull request #35626:
URL: https://github.com/apache/spark/pull/35626#discussion_r814442624



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
##########
@@ -390,18 +390,18 @@ trait InheritAnalysisRules extends UnaryLike[Expression] 
{ self: RuntimeReplacea
 }
 
 /**
- * An aggregate expression that gets rewritten (currently by the optimizer) 
into a
+ * An add-on of [[RuntimeReplaceable]]. This gets rewritten (currently by the 
optimizer) into a
  * different aggregate expression for evaluation. This is mainly used to 
provide compatibility
  * with other databases. For example, we use this to support every, any/some 
aggregates by rewriting
  * them with Min and Max respectively.
  */
-abstract class RuntimeReplaceableAggregate extends AggregateFunction with 
RuntimeReplaceable {
-  def aggBufferSchema: StructType = throw new IllegalStateException(
-    "RuntimeReplaceableAggregate.aggBufferSchema should not be called")
-  def aggBufferAttributes: Seq[AttributeReference] = throw new 
IllegalStateException(
-    "RuntimeReplaceableAggregate.aggBufferAttributes should not be called")
-  def inputAggBufferAttributes: Seq[AttributeReference] = throw new 
IllegalStateException(
-    "RuntimeReplaceableAggregate.inputAggBufferAttributes should not be 
called")
+trait ReplaceableAggregateFunction extends AggregateFunction { self: 
RuntimeReplaceable =>

Review comment:
       Sure




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

Reply via email to