Repository navigation
ES|QL: fix TBUCKET(n) on empty filter range - #146366
Conversation
|
Hi @felixbarny, I've created a changelog YAML for you. |
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
🔍 Preview links for changed docs⏳ Building and deploying preview... View progress This comment will be updated with preview links when the build is complete. |
ℹ️ 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?
|
💔 Backport failedThe backport operation could not be completed due to the following error: You can use sqren/backport to manually backport by running |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
Closes elastic#146354 (cherry picked from commit f16c399) # Conflicts: # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
Closes #146354
When a query uses
TBUCKET(n)(numeric bucket count) with a top-level request filter that covers a time range containing no indexed data, field-caps returns no matching indices and the analysis is retried without the filter. Previously the retry path calledextractTimestampBounds(null, ...), returningnullbounds, causingTBUCKETverification to fail with"numeric argument requires at least bounds on @timestamp".The fix extracts
TimestampBoundseagerly from the request filter before index resolution begins, then threads the pre-computed bounds throughresolveIndicesAndAnalyze→analyzeWithRetry→analyzedPlan. On retry the same bounds are forwarded, soTBUCKETcan determine its bucketing interval from the original filter's time range regardless of whether the index resolution used that filter.