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

ESQL: Fix issues with ST_* functions and compound geometries #106992

Merged

Conversation

craigtaverner
Copy link
Contributor

@craigtaverner craigtaverner commented Apr 2, 2024

Building on the previous work for spatial relations:

These features had some short-comings:

  • Lucene pushdown to cartesian point indices when the right hand side was not a polygon or multi-polygon would result in an error. The underlying lucene support existed, so we needed to remove the error, and improve test coverage.
  • ST_CONTAINS would fail on queries where the right hand side was a compound geometry (MULTI*) when no Lucene pushdown was planned.

This PR fixes those issues as well as generally expands test coverage.

This was not supported for lucene push-down for any of the relates functions on point indices: ST_INTERSECTS, ST_WITHIN, ST_CONTAINS. In addition ST_CONTAINS had specific bugs around handling multi-component shapes within literals/constants.
@craigtaverner craigtaverner added >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL labels Apr 2, 2024
@craigtaverner craigtaverner requested a review from iverase April 2, 2024 09:56
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Hi @craigtaverner, I've created a changelog YAML for you.

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 499ebbf into elastic:main Apr 2, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Spatial Search in ES|QL (ST_INTERSECTS, ST_CONTAINS, ST_WITHIN and ST_DISJOINT)
3 participants