caicancai commented on code in PR #3689:
URL: https://github.com/apache/calcite/pull/3689#discussion_r1494221853
##########
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java:
##########
@@ -2149,6 +2149,18 @@ private static RelDataType
deriveTypeMapFromEntries(SqlOperatorBinding opBinding
OperandTypes.NUMERIC_OPTIONAL_NUMERIC,
SqlFunctionCategory.NUMERIC);
+ /** The "LOG2(value)" function.
+ *
+ * @see SqlStdOperatorTable#LN
+ * @see SqlStdOperatorTable#LOG10
+ */
+ @LibraryOperator(libraries = {MYSQL, SPARK})
+ public static final SqlFunction LOG2 =
+ SqlBasicFunction.create("LOG2",
+ ReturnTypes.DOUBLE_NULLABLE,
+ OperandTypes.NUMERIC,
Review Comment:
I don't think there is any problem in keeping it the same as log10. I added
test to explain it
--
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]