Skip to content

Conversation

@romseygeek
Copy link
Contributor

DoubleValuesSource is the type-safe replacement for ValueSource in the lucene
core. Most of elasticsearch has moved to use these, but lang-expressions is still
using the old version. This commit migrates lang-expressions as well.

@romseygeek romseygeek added :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >refactoring v8.0.0 v7.7.0 labels Mar 17, 2020
@romseygeek romseygeek self-assigned this Mar 17, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Scripting)

@romseygeek
Copy link
Contributor Author

Note that this also means that we don't need to depend on lucene-queries here any more, but I'm not sure where that dependency is declared as it doesn't appear in the build.gradle for lang-expressions

@romseygeek romseygeek requested review from jdconrad and rjernst March 17, 2020 14:38
Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM

@rjernst
Copy link
Member

rjernst commented Mar 20, 2020

we don't need to depend on lucene-queries

This dependency is in :server.

Copy link
Contributor

@jdconrad jdconrad left a comment

Choose a reason for hiding this comment

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

LGTM too. Thanks for changing this.

@romseygeek romseygeek merged commit b2a6bd8 into elastic:master Mar 23, 2020
@romseygeek romseygeek deleted the refactoring/lang-expressions branch March 23, 2020 14:47
romseygeek added a commit that referenced this pull request Mar 23, 2020
DoubleValuesSource is the type-safe replacement for ValueSource in the lucene
core. Most of elasticsearch has moved to use these, but lang-expressions is still
using the old version. This commit migrates lang-expressions as well.
romseygeek added a commit that referenced this pull request Mar 31, 2020
After commit #53661 converted the lang-expressions module to using
DoubleValuesSource, we've seen a performance regression for expressions
that use geopoints. Some investigation suggests that this may be due to
GeoLatitudeValueSource and GeoLongitudeValueSource wrapping their
per-document values in a DoubleValues.withDefault() class. Values exposed
via expressions already have a '0' default value, so this extra wrapping is
unnecessary, and is directly on the hot path. This commit removes the extra
wrapping.
romseygeek added a commit that referenced this pull request Mar 31, 2020
After commit #53661 converted the lang-expressions module to using
DoubleValuesSource, we've seen a performance regression for expressions
that use geopoints. Some investigation suggests that this may be due to
GeoLatitudeValueSource and GeoLongitudeValueSource wrapping their
per-document values in a DoubleValues.withDefault() class. Values exposed
via expressions already have a '0' default value, so this extra wrapping is
unnecessary, and is directly on the hot path. This commit removes the extra
wrapping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >refactoring v7.7.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants