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

Implement lucene pushdown on ST_DISTANCE for Equality #110348

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

craigtaverner
Copy link
Contributor

This is the third PR for ST_DISTANCE pushdown to Lucene, and focuses on distance equality. The previous two PRs:

Curiously I was not able to reproduce any difference in behaviour between Lucene (pushdown) and ESQL distance calculation, even when focusing in on same data generated to be on the edge of the quantization boundaries and the haversinDistance boundary.
@craigtaverner craigtaverner added >non-issue :Analytics/Geo Indexing, search aggregations of geo points and shapes Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL labels Jul 1, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@craigtaverner craigtaverner changed the title St distance pushdown eq Implement lucene pushdown on ST_DISTANCE for Equality Jul 1, 2024
distance = comparisonType.eq ? distance : Math.nextUp(distance);
rewritten.add(new SpatialDisjoint(source, spatialExp, makeCircleLiteral(point, distance, literalExp)));
} else if (comparisonType.eq) {
rewritten.add(new SpatialIntersects(source, spatialExp, makeCircleLiteral(point, distance, literalExp)));
Copy link
Contributor

Choose a reason for hiding this comment

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

I was expecting for equality this to be disjoint too?

Copy link
Contributor

Choose a reason for hiding this comment

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

forget what I am saying it is fine

Copy link
Contributor

@iverase iverase left a comment

Choose a reason for hiding this comment

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

LGTM

@craigtaverner craigtaverner merged commit 5f91b7d into elastic:main Jul 2, 2024
15 checks passed
@craigtaverner craigtaverner deleted the st_distance_pushdown_eq branch July 2, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL :Analytics/Geo Indexing, search aggregations of geo points and shapes >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants