Github user wuchong commented on the issue:
https://github.com/apache/flink/pull/2686
Hi @tonycox , I agree with what Fabian said, it's the same as I mean in
this
[comment](https://github.com/apache/flink/pull/2686#issuecomment-256963469).
What I'm talking about POWER_DEC is another problem. Using
`ScalarOperators.generateCast()` for casting BigDecimal to double can fix this
problem. It can support BigDecimal for `power` in SQL. But if we support for
`power`, we should also support BigDecimal for `log10`, `ln`, `exp`, etc.
So I there are 2 approaches:
(1). Bind BuiltInMethods.POWER_DEC to the new created `power(double,
BigDecimal)`, no other code involved. This will lose BigDecimal support for
power and sqrt in SQL. Users can call an explicit cast.
(2). Support BigDecimal for `log`,`ln`,`exp` too. This can be done in a
separate JIRA.
I prefer approach (2). What do you think ?
cc @fhueske
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---