caicancai commented on code in PR #3732:
URL: https://github.com/apache/calcite/pull/3732#discussion_r1538391118
##########
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java:
##########
@@ -4127,14 +4130,14 @@ private static class LogicalNotImplementor extends
AbstractRexCallImplementor {
* <p>Handles all logarithm functions using log rules to determine the
* appropriate base (i.e. base e for LN).
*/
- private static class LogImplementor extends AbstractRexCallImplementor {
- LogImplementor() {
- super("log", NullPolicy.STRICT, true);
+ private static class LogImplementor extends MethodImplementor {
+ LogImplementor(Method method) {
+ super(method, NullPolicy.STRICT, true);
Review Comment:
@tanclary Hello
According to the extending AbstractRexCallImplementor at the beginning, we
need to identify different SQL dialects based on the "log" string, for example
```java
super("log", NullPolicy.STRICT, true);
```
But the problem is that we cannot identify all the dialects related to the
log function through a simple "log" string. We must use "logMySql" or The form
"logPostgres" identifies the corresponding SQL dialect, which means we need a
parameter.
Of course, it is also possible to pass a parameter through
AbstractRexCallImplementor, but I think BuiltInMethod.LOG.method already has
this ability. We only need to identify the methodName of the method without
passing other parameters. I think this is A simpler and more efficient method.
--
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]