Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DSL#log(Field, Field) overload #8703

Closed
knutwannheden opened this issue May 28, 2019 · 3 comments
Closed

Add DSL#log(Field, Field) overload #8703

knutwannheden opened this issue May 28, 2019 · 3 comments

Comments

@knutwannheden
Copy link
Contributor

The current DSL#log() overloads (log(Number, int) and log(Field, int)) don't allow for the computation of logarithms where the base is a floating point value or some arbitrary expression (as in e.g. LOG(LENGTH('AA'), 4)). Many dialects support this, so in order to allow the parser to parse such expressions a new DSL#log(Field, Field) overload is required.

@knutwannheden knutwannheden added this to the Version 3.12.0 milestone May 28, 2019
@knutwannheden knutwannheden self-assigned this May 28, 2019
knutwannheden added a commit that referenced this issue May 28, 2019
Adds an overload DSL#log(Field, Field) which is also used by the parser,
as the base can for multiple dialects both be a float literal or an
arbitrary expression.
@knutwannheden
Copy link
Contributor Author

For the new overload we still need to work out what the @Support list should look like.

@lukaseder
Copy link
Member

we still need to work out what the @Support list should look like.

A pragmatic approach in this case is to duplicate the one from the existing methods, and then fix bugs as we encounter them with tests.

@knutwannheden
Copy link
Contributor Author

A pragmatic approach in this case is to duplicate the one from the existing methods, and then fix bugs as we encounter them with tests.

That's what I did for now. Automated tests should then help us here.

knutwannheden added a commit that referenced this issue May 28, 2019
In DSL#log(Number, int) the input is known to be a Number so it makes
more sense to call DSL#val(Object) directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants