liyafan82 commented on a change in pull request #2444:
URL: https://github.com/apache/calcite/pull/2444#discussion_r658540347



##########
File path: 
core/src/main/java/org/apache/calcite/sql/fun/SqlBasicAggFunction.java
##########
@@ -181,7 +184,21 @@ public SqlBasicAggFunction withAllowsSeparator(boolean 
allowsSeparator) {
         getReturnTypeInference(), getOperandTypeInference(),
         getOperandTypeChecker(), getFunctionType(), requiresOrder(),
         requiresOver(),  requiresGroupOrder(), distinctOptionality, syntax,
-        allowsNullTreatment, allowsSeparator);
+        allowsNullTreatment, allowsSeparator, isPercentile);
+  }
+
+  /** Returns whether this aggregate function is a PERCENTILE function. */
+  public boolean isPercentile() {
+    return isPercentile;

Review comment:
       IMO, PERCENTILE function is a small class of agg functions. So does it 
deserve a special flag here?
   Maybe we can implement a static method like this?
   
   ```
   public static boolean isPercentile(SqlBasicAggFunction aggFunc) {
       return aggFunc == PERCENTILE_CONT || aggFunc == PERCENTILE_DISC;
   }
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to