Expose _tier metadata attribute in ESQL#139894
Conversation
|
Hi @idegtiarenko, I've created a changelog YAML for you. |
...main/java/org/elasticsearch/xpack/cluster/routing/allocation/mapper/DataTierFieldMapper.java
Show resolved
Hide resolved
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
🔍 Preview links for changed docs |
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
|
|
||
| public void testMetadataFieldUnsupportedPrimitiveType() { | ||
| expectError("from test metadata _tier", "line 1:20: unsupported metadata field [_tier]"); | ||
| } |
There was a problem hiding this comment.
This verifies the error is the same as below but for a different attribute.
It is safe to remove.
# Conflicts: # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
nik9000
left a comment
There was a problem hiding this comment.
For a followup I think:
We should have an integration test that proves that we filter out the index dispatch. I think Stas wrote one, but I don't know what it's called.
And maybe also one that proves that filters get pushed to the underlying index as MatchAll/MatchNone - maybe in PushQueriesIT or something.
I think both of these tests are fairly important, especially because the pushing process is fairly magical. And because the index dispatch bit is, like, a big hammer that we'd like to make sure works consistently. So a paranoid integration test all the way on the outside seems called for.
|
|
||
| _index:keyword | ||
| employees | ||
| ; |
There was a problem hiding this comment.
I think we have this test above, right?
|
Thanks for adding the stuff to CanMatchIT. I hadn't realized it was there. But I'm happy we have it. |
💔 Backport failed
You can use sqren/backport to manually backport by running |
(cherry picked from commit 272ca11)
(cherry picked from commit 272ca11) # Conflicts: # docs/reference/query-languages/esql/esql-metadata-fields.md # x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/expression/MetadataAttribute.java # x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/plugin/CanMatchIT.java # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/planner/TestPhysicalOperationProviders.java
* upstream/main: Add hook for blocking termination (elastic#133555) Delegate to ES93ScalarQuantizedVectorsFormat rather than copying behaviour (elastic#139834) Refactor compound block types (elastic#140219) Flush the rate buffer when the slice index changes (elastic#138856) Log linked project connection errors at debug during shutdown (elastic#140239) Periodic FIPS 140-3 buildkite pipelines (elastic#139909) ES|QL - Remove TERM function (elastic#139953) Fix name of started time field in shutdown status (elastic#139910) Drop `project_routing` from query params (elastic#140272) Fix flaky test: AllocationDecidersTests (elastic#140271) Add List Reindex API (elastic#140184) Expose _tier metadata attribute in ESQL (elastic#139894) Tweak TSDBRestEsqlIT#testTimeSeriesQuerying(...) (elastic#140210) Fix an OOM error when creating to many chained synonym graph token filter. (elastic#140026) Suppress Azure SDK error logs (elastic#139730) Rewritten integer sorts need to use SortedNumericSortField (elastic#139538) (elastic#139700) Adjust index versions for skippers for time series (elastic#139670) Fix host.name skippers index version range (elastic#139636) Remove BWC shim for a broken commit Fix index.mapping.use_doc_values_skipper defaults in serverless (elastic#139532)
This change exposes
_tieras an metadata attribute in ESQL.Same as
_searchattribute emits top index tier preference, not current tier (in case if index is still relocating).This attribute may be used in filter conditions,
but as for today this will not automatically eliminate entire index during can match phaseresulted condition is pushed into underlying QueryBuilder.Related to #108264