Skip to content

Pushdown of spatial sort-by-distance does not allow partial sorts #114515

@craigtaverner

Description

@craigtaverner

The work done in #112938 does most of the work to enable partial sorts, but the last change was disabled to keep the PR from growing even larger. We would like to re-enable this, but also by first writing a benchmark that demonstrates that it actually helps.

Consider the following query:

FROM airports 
| EVAL scale = 10 - scalerank
| EVAL distance = ST_DISTANCE(location, TO_GEOPOINT("POINT(12.565 55.673)"))
| SORT distance ASC, scale DESC
| LIMIT 10

This could have the sort by distance pushed down, but leave the sort by scale for the compute engine. This should improve performance, but we would like a benchmark to validate that.

Metadata

Metadata

Assignees

Labels

:Analytics/ES|QLAKA ESQL:Analytics/GeoIndexing, search aggregations of geo points and shapes>enhancementTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions