Skip to content

Conversation

GalLalouche
Copy link
Contributor

Manual backporting of #119886, #121261, #122607.

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.0.1 labels Feb 17, 2025
@GalLalouche GalLalouche added backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Analytics/ES|QL AKA ESQL v9.0.0 and removed needs:triage Requires assignment of a team area label v9.0.1 labels Feb 17, 2025
@GalLalouche GalLalouche enabled auto-merge (squash) February 17, 2025 20:50
@GalLalouche
Copy link
Contributor Author

@elasticsearchmachine run Elasticsearch Serverless Checks

* ESQL: Support for _index metadata field in CsvTests

* Extract INDEX constant to MetadataAttribute

* Add comment on capability
This PR adds initial support for unmapped fields, using the INSIST clause. For starters, this unmapped fields without a cast.
Note that the INSIST keyword is potentially a placeholder, as the method of defining an unmapped field might change in the future, e.g., use a special magic function. As this is currently under development, the actual syntax is INSIST_🐔.

First stage of elastic#120072.

Specifically, the following features are implemented in this PR:

* Support for INSIST keyword without a cast. In particular, if the type being INSISTed upon is mapped to anything other than KEYWORD, it will result in an InvalidMappedField. There is no support for union type resolution on top of INSIST. Future PRs will handle these conflicts. There is support for multiple parameters, or INSIST on top of INSIST which is equivalent.
* Enforcing that INSIST must always be on top of a FROM or another INSIST. While this may change in the future, e.g., handling cases like `FROM foo | EVAL x = 1 | INSIST bar` will not be done in this PR, as it makes handling INSIST too complicated.
@GalLalouche GalLalouche force-pushed the feature/unmapped_fields_90 branch from 23907f7 to 602cf0e Compare February 18, 2025 09:07
@elasticsearchmachine elasticsearchmachine merged commit 7a3df49 into elastic:9.0 Feb 18, 2025
16 checks passed
@GalLalouche GalLalouche deleted the feature/unmapped_fields_90 branch February 18, 2025 10:26
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-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants