Support target bucket count in TBUCKET with explicit from/to date range#142747
Support target bucket count in TBUCKET with explicit from/to date range#142747felixbarny merged 10 commits intoelastic:mainfrom
TBUCKET with explicit from/to date range#142747Conversation
Allow TBUCKET to accept either a temporal interval or a target bucket count with explicit from/to bounds, and add docs/spec coverage for the new signatures.
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
🔍 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?
|
leemthompo
left a comment
There was a problem hiding this comment.
Couple comments re. making sure we version tag new info and use lists where possible so it's obvious what's available in specific versions :)
...in/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/grouping/TBucket.java
Outdated
Show resolved
Hide resolved
...in/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/grouping/TBucket.java
Show resolved
Hide resolved
|
Hi @felixbarny, I've created a changelog YAML for you. |
docs/reference/query-languages/esql/_snippets/functions/parameters/tbucket.md
Outdated
Show resolved
Hide resolved
kkrik-es
left a comment
There was a problem hiding this comment.
I'll let Nhat approve since this generic esql functionality.
dnhatn
left a comment
There was a problem hiding this comment.
Two small comments, but LGTM. Thanks Felix!
...in/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/grouping/TBucket.java
Outdated
Show resolved
Hide resolved
...in/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/grouping/TBucket.java
Show resolved
Hide resolved
…elocations * upstream/main: (54 commits) [ES|QL|DS] Wire parallel parsing into production for text formats (elastic#143997) ESQL: Allow EXTERNAL commands be run part of the CsvTests suite (elastic#143970) [ESQL] Push stats to external source via metadata (elastic#143940) Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:approximation.Approximate stats with stats where} elastic#144051 Refactored SortedNumericDocValuesSyntheticFieldLoader into a Layer (elastic#143912) Enable extended doc_values params feature flag in RandomizedRollingUpgradeIT (elastic#143918) Mute org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT test {csv-spec:approximation.Approximate stats with sample} elastic#144022 Ensure we use float values for rolling upgrade float vectors (elastic#144032) Remove sensitive info from reindex task description (elastic#143635) Fix HistogramUnionState.equals (elastic#143990) Use dedicated IndexRouting API in ShardSplittingQuery (elastic#143776) Engine/Store DistributedArchitectureGuide doc (elastic#143818) Mute org.elasticsearch.snapshots.ConcurrentSnapshotsIT testDeletesAreBatched elastic#144034 Avoid serializing exceptions as JSON in remote write endpoint (elastic#143987) allow testLoadDocSequenceReturnsCorrectResultsText to circuit break, it happens in serverless occasionally (elastic#144023) [ESQL] Adds memory accounting to GroupedLimitOperator (elastic#143941) Adjust ESIntegTestCase.getLiveDocs method to account for pruned sequence numbers (elastic#143999) Support target bucket count in `TBUCKET` with explicit from/to date range (elastic#142747) TSDBDocValuesFormatSingleNodeTests with and without synthetic id (elastic#144002) Fix circuit breaker leak in BreakingTDigestHolder (elastic#143873) ...
…ange (elastic#142747) Allow TBUCKET to accept either a temporal interval or a target bucket count with explicit from/to bounds, and add docs/spec coverage for the new signatures.
Allow TBUCKET to accept either a temporal interval or a target bucket count with explicit from/to bounds, and add docs/spec coverage for the new signatures.
Right now, the
TBUCKETfunction isn't really usable in Kibana as it expects a fixed bucket size. In order for it to be adopted in real dashboards, it needs to adapt the number of buckets depending on the selected time range in the date picker.Example:
I'm planning to follow this up by automatically inferring start/end from the query dsl filter. This is similar to how we did it for the
PROMQLcommand. See #142580.TBucketTimestampBoundsAwarecc @miguel-sanchez-elastic