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



##########
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:
       Yes. You are right. But This parameter means cant directly MODE(NULL). 
When using MODE(ColumnName) if the column value most common value is NULL, will 
return the second most common value insteed.




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