caicancai commented on code in PR #3711:
URL: https://github.com/apache/calcite/pull/3711#discussion_r1509906580
##########
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java:
##########
@@ -2157,6 +2165,23 @@ private static RelDataType
deriveTypeMapFromEntries(SqlOperatorBinding opBinding
OperandTypes.NUMERIC,
SqlFunctionCategory.NUMERIC);
+ /** The "LOG10(numeric)" function. Returns the base 10 logarithm of numeric.
*/
+ @LibraryOperator(libraries = {MYSQL, SPARK})
+ public static final SqlFunction LOG10_MS =
+ SqlBasicFunction.create("LOG10",
+ ReturnTypes.DOUBLE_FORCE_NULLABLE,
+ OperandTypes.NUMERIC,
+ SqlFunctionCategory.NUMERIC);
Review Comment:
Thank you for your feedback. I have asked similar questions in jira. Because
the behavior of log10 and ln functions is inconsistent between mysql and spark
and the log10 and ln functions in SqlStdOperatorTable. The problem you
mentioned does occur. I am trying to find a reasonable way to solve this
problem. If you have a way to solve this problem without modifying
SqlStdOperatorTable, that would be great.
--
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]