jduo commented on code in PR #3711:
URL: https://github.com/apache/calcite/pull/3711#discussion_r1520523416
##########
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java:
##########
@@ -2142,13 +2143,21 @@ private static RelDataType
deriveTypeMapFromEntries(SqlOperatorBinding opBinding
* @see SqlStdOperatorTable#LN
* @see SqlStdOperatorTable#LOG10
*/
- @LibraryOperator(libraries = {BIG_QUERY})
+ @LibraryOperator(libraries = {BIG_QUERY, POSTGRESQL})
Review Comment:
PostgreSQL has different semantics for its log function.
If it's only 1 argument, PostgreSQL is the same as LOG10() and BigQuery is
the same as LN().
If it's 2-argument, PostgreSQL has the base as the first argument and
BigQuery has the base as the second argument.
See:
https://cloud.google.com/bigquery/docs/reference/standard-sql/mathematical_functions#log
https://www.postgresql.org/docs/9.1/functions-math.html
Mentioned in https://issues.apache.org/jira/browse/CALCITE-6312
--
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]