Repository navigation
[ESQL] Prune redundant stats groupings - #150030
Conversation
Remove constant and conservative external-derived grouping keys from STATS hash aggregation while rebuilding their output columns above the aggregation. This reduces unnecessary grouping width without changing parent-visible output. Developed using AI-assisted tooling
Remove constant and conservative external-derived grouping keys from STATS hash aggregation while rebuilding their output columns above the aggregation. This reduces unnecessary grouping width without changing parent-visible output. Developed using AI-assisted tooling
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Hi @costin, I've created a changelog YAML for you. |
🔍 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?
|
bpintea
left a comment
There was a problem hiding this comment.
LG, but let's add integration tests too and also test with on 0 columns and/or 0 rows, make sure we're not changing the corner cases semantics.
| } | ||
|
|
||
| private static boolean isSafeIntegralAttribute(Attribute attribute) { | ||
| return attribute.dataType() == INTEGER || attribute.dataType() == LONG; |
There was a problem hiding this comment.
We don't have an isIntegral into DataType -- should we add it? In case we'll push the new integral blocks through.
There was a problem hiding this comment.
Added DataType.isIntegral(...) and switched the pruning rule to use it.
There was a problem hiding this comment.
Let's add more tests with just constants, one, or two, eval or not (| EVAL a = 1 | STATS c = COUNT(*) BY a), recursed aliasing (| EVAL a = ClientIP - 1, b = a - 1 | STATS c = COUNT(*) BY ClientIP, b)
There was a problem hiding this comment.
Added unit coverage for all-constant groupings and recursive alias pruning.
|
Added REST coverage for constant grouping semantics with rows, zero rows, and zero-column input. |
25e5ca3 to
718fa04
Compare
718fa04 to
0241726
Compare
Remove constant and conservative external-derived grouping keys from
STATS hash aggregation while rebuilding their output columns above the
aggregation. This reduces unnecessary grouping width without changing
parent-visible output.
Developed with AI-assisted tooling