normanj-bitquill commented on code in PR #3789:
URL: https://github.com/apache/calcite/pull/3789#discussion_r1612297858
##########
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java:
##########
@@ -645,12 +646,14 @@ Builder populate() {
defineMethod(EXP, BuiltInMethod.EXP.method, NullPolicy.STRICT);
defineMethod(POWER, BuiltInMethod.POWER.method, NullPolicy.STRICT);
defineMethod(ABS, BuiltInMethod.ABS.method, NullPolicy.STRICT);
- defineMethod(LOG2, BuiltInMethod.LOG2.method, NullPolicy.STRICT);
map.put(LN, new LogImplementor());
map.put(LOG, new LogImplementor());
map.put(LOG10, new LogImplementor());
+ map.put(LOG_MYSQLSPARK, new LogMysqlSparkImplementor());
Review Comment:
The SQL function name that you are registering is `LOG`, which is the same
as what is added on line 651. The `equals` and `hashCode` methods used for the
key is from the class `SqlOperator` and will only use the name+kind.
The result is that you overwrite the map entry from line 651. One way around
this is set `LOG_MYSQLSPARK` to a new anonymous inner subclass of
`SqlBasicFunction`. You would need to increase visibility of the
`SqlBasicFunction` constructor.
```
LOG_MYSQLSPARK = new SqlBasicFunction(...) {};
```
--
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]