caicancai commented on code in PR #3732:
URL: https://github.com/apache/calcite/pull/3732#discussion_r1529753363
##########
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java:
##########
@@ -2205,6 +2205,14 @@ private static RelDataType
deriveTypeMapFromEntries(SqlOperatorBinding opBinding
OperandTypes.NUMERIC_OPTIONAL_NUMERIC,
SqlFunctionCategory.NUMERIC);
+ /** The "LOG(numeric, numeric1)" function. Returns the base numeric1
logarithm of numeric. */
Review Comment:
done
##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -2788,15 +2788,26 @@ public static double log(BigDecimal d0, BigDecimal d1) {
return Math.log(d0.doubleValue()) / Math.log(d1.doubleValue());
}
- /** SQL {@code LOG2(number)} function applied to double values. */
- public static @Nullable Double log2(double number) {
- return (number <= 0) ? null : log(number, 2);
+ /** SQL {@code LOGMySqlSpark(number, number2)} function applied to double
values. */
Review Comment:
done
--
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]