Class PromqlAttributesTranslationContext.InheritedAttributes
java.lang.Object
org.elasticsearch.xpack.esql.optimizer.rules.logical.promql.PromqlAttributesTranslationContext.InheritedAttributes
- Enclosing class:
PromqlAttributesTranslationContext
The inherited attribute: the scope a subtree must preserve, threaded down the aggregate chain. An
InheritedAttributes is produced by unconstrained() above the outermost aggregate and narrowed by each
aggregate before being handed to its child. The leaf selector ends the descent with reflect().-
Method Summary
Modifier and TypeMethodDescriptionWITHOUT(E):Edrops out of scope (G \ E) and joins the accumulated exclusions.A function-internal requirement (e.g.BY(W): the child scope becomes exactlyW, and the accumulated exclusions are cleared.Every dimension excluded along the path to here, for the innermost aggregate'sTimeSeriesWithout.reflect()End the descent at the leaf selector: it exposes exactly the labels demanded of it, with no exclusions of its own (the selector sits below everyWITHOUT).Everything in scope (G=T), nothing excluded.
-
Method Details
-
unconstrained
Everything in scope (G=T), nothing excluded. -
limitedTo
BY(W): the child scope becomes exactlyW, and the accumulated exclusions are cleared. ABYfixes its subtree's output to concrete keys, so any outerWITHOUTapplies over those concrete labels (handled by the outer aggregate), not as a leaf_timeseriesexclusion. Carrying the outer exclusions past aBYwould wrongly inject a_timeseriesinto the inner concrete aggregate, making it group byidentity \ excludedinstead ofWand leaking every other label. -
excluding
WITHOUT(E):Edrops out of scope (G \ E) and joins the accumulated exclusions. -
including
A function-internal requirement (e.g.histogram_quantilematerializing thelebucket label): keep the current scope and additionally requirelabels. UnlikelimitedTo(java.util.List<org.elasticsearch.xpack.esql.core.expression.Attribute>)this widens the scope rather than replacing it; likeBYit re-fixes the subtree to concrete keys and so clears the accumulated exclusions (the function regroups by concrete labels, so an outerWITHOUTapplies over those keys at the outer aggregate, not as a leaf_timeseriesexclusion). When the current scope is the full universeTthe labels already cover it, so it collapses to exactlylabels. -
reflect
End the descent at the leaf selector: it exposes exactly the labels demanded of it, with no exclusions of its own (the selector sits below everyWITHOUT). -
pathExclusions
Every dimension excluded along the path to here, for the innermost aggregate'sTimeSeriesWithout.
-