Skip to content

Conversation

@matriv
Copy link
Contributor

@matriv matriv commented Nov 26, 2018

SIGN and RADIANS where wrongly overriding mathFunction().
Converted mathFunction() to private in MathFunction since it
shouldn't be overriden, as it uses the assigned MathOperation
to get the funtion name for painless scripts.

Fixes: #35654

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

`SIGN` and `RADIANS` where wrongly overriding `mathFunction()`.
Converted `mathFunction()` to private in `MathFunction` since it
shouldn't be overriden, as it uses the assigned `MathOperation`
to get the funtion name for painless scripts.

Fixes: elastic#35654
Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I like the test!

Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a comment.

}

protected String mathFunction() {
private String mathFunction() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this method all together and simply use the classname inside the template.

@matriv matriv merged commit 1da9c6f into elastic:master Nov 27, 2018
@matriv matriv deleted the mt/fix-35654 branch November 27, 2018 14:33
matriv added a commit that referenced this pull request Nov 27, 2018
`SIGN` and `RADIANS` where wrongly overriding `mathFunction()`.
Converted `mathFunction()` to private in `MathFunction` since it
shouldn't be overriden, as it uses the assigned `MathOperation`
to get the funtion name for painless scripts.

Fixes: #35654
@matriv
Copy link
Contributor Author

matriv commented Nov 27, 2018

Backported to 6.x with 969d560

matriv added a commit that referenced this pull request Nov 27, 2018
`SIGN` and `RADIANS` where wrongly overriding `mathFunction()`.
Converted `mathFunction()` to private in `MathFunction` since it
shouldn't be overriden, as it uses the assigned `MathOperation`
to get the funtion name for painless scripts.

Fixes: #35654
@matriv
Copy link
Contributor Author

matriv commented Nov 27, 2018

Backported to 6.5 with e4b6eb4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants