Skip to content

Conversation

@craigtaverner
Copy link
Contributor

The original work at #106065 did not support geospatial types with this comment:

I made this work for everything but geo_point and cartesian_point because I'm not 100% sure how to integrate with those. We can grab those in a follow up.

The geospatial types should be possible to collect using the VALUES aggregation with similar behavior to the ST_COLLECT OGC function, based on the Elasticsearch convention that treats multi-value geospatial fields as behaving similarly to any geometry collection. So this implementation is a trivial addition to the existing values types support.

Fixes #122413

@craigtaverner craigtaverner added >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL v9.0.0 v8.18.1 v8.19.0 v9.1.0 labels Feb 18, 2025
@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.

return isType(e, DataType::isSpatial, operationName, paramOrd, SPATIAL_TYPE_NAMES);
}

public static Expression.TypeResolution isNotSpatial(Expression e, String operationName, TypeResolutions.ParamOrdinal paramOrd) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function was never used anyway

@github-actions
Copy link
Contributor

Warning

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

@github-actions
Copy link
Contributor

Warning

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

We run older yaml tests, but they make assertions that are not longer valid and so we need to exclude those tests using task.skipTest
@github-actions
Copy link
Contributor

Warning

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.


protected static void renderDocs(String name) throws IOException {
if (System.getProperty("generateDocs") == null) {
if (System.getProperty("generateDocs") == null || true) {
Copy link
Member

Choose a reason for hiding this comment

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

Add a comment about how we're turning these off please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@craigtaverner craigtaverner added auto-backport Automatically create backport pull requests when merged and removed v8.18.1 v8.19.0 labels Feb 21, 2025
@craigtaverner
Copy link
Contributor Author

Since this disabled docs generation, I've changed the backport to 9.0 only. We can decide to backport this to an 8.x as a bug-fix if we feel that's necessary, using a new PR without any docs generation changes. For now it's 9.0 and 9.1 only.

@craigtaverner craigtaverner merged commit ec82c24 into elastic:main Feb 25, 2025
17 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.0

craigtaverner added a commit to craigtaverner/elasticsearch that referenced this pull request Feb 25, 2025
The original work at elastic#106065 did not support geospatial types with this comment:

> I made this work for everything but geo_point and cartesian_point because I'm not 100% sure how to integrate with those. We can grab those in a follow up.

The geospatial types should be possible to collect using the VALUES aggregation with similar behavior to the `ST_COLLECT` OGC function, based on the Elasticsearch convention that treats multi-value geospatial fields as behaving similarly to any geometry collection. So this implementation is a trivial addition to the existing values types support.
elasticsearchmachine pushed a commit that referenced this pull request Feb 25, 2025
The original work at #106065 did not support geospatial types with this comment:

> I made this work for everything but geo_point and cartesian_point because I'm not 100% sure how to integrate with those. We can grab those in a follow up.

The geospatial types should be possible to collect using the VALUES aggregation with similar behavior to the `ST_COLLECT` OGC function, based on the Elasticsearch convention that treats multi-value geospatial fields as behaving similarly to any geometry collection. So this implementation is a trivial addition to the existing values types support.
craigtaverner added a commit that referenced this pull request May 2, 2025
…127627)

* Add support to VALUES aggregation for spatial types (#122886)

The original work at #106065 did not support geospatial types with this comment:

> I made this work for everything but geo_point and cartesian_point because I'm not 100% sure how to integrate with those. We can grab those in a follow up.

The geospatial types should be possible to collect using the VALUES aggregation with similar behavior to the `ST_COLLECT` OGC function, based on the Elasticsearch convention that treats multi-value geospatial fields as behaving similarly to any geometry collection. So this implementation is a trivial addition to the existing values types support.

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

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ES|QL VALUES aggregation does not support geospatial types

3 participants