amaliujia commented on a change in pull request #2447:
URL: https://github.com/apache/calcite/pull/2447#discussion_r668968983



##########
File path: 
core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java
##########
@@ -952,6 +952,16 @@
    */
   public static final SqlAggFunction COUNT = new SqlCountAggFunction("COUNT");
 
+  /**
+   * <code>MODE</code> aggregate function.
+   */
+  public static final SqlAggFunction MODE =
+      SqlBasicAggFunction
+          .create("MODE", SqlKind.MODE,
+              ReturnTypes.ARG0_NULLABLE_IF_EMPTY, OperandTypes.ANY_NOT_NULL)

Review comment:
       In the JIRA discussion, I see that MODE allows NULL but if NULL is the 
most common value, return the second most common value instead. Why you choose 
to does not allow now in type?




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


Reply via email to