xiedeyantu commented on code in PR #4681:
URL: https://github.com/apache/calcite/pull/4681#discussion_r2613617026
##########
core/src/main/java/org/apache/calcite/sql/SqlAggFunction.java:
##########
@@ -212,6 +212,22 @@ public boolean allowsNullTreatment() {
return false;
}
+ /** Returns whether this aggregate function skips NULL input values.
+ *
+ * <p>Standard SQL aggregate functions skip NULL input values:
+ * {@code SUM}, {@code AVG}, {@code MIN}, {@code MAX}, {@code COUNT}, etc.
+ *
+ * <p>Custom user-defined aggregate functions may treat NULL values as
+ * semantically significant inputs. Such functions should override this
+ * method to return {@code false}.
+ *
+ * @return true if NULL input values are skipped (standard SQL behavior),
+ * false if NULL input values have semantic significance
+ */
+ public boolean skipsNullInputs() {
Review Comment:
I don't have a better idea, so I agree with your 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]