Class TranslateTimeSeriesCollapse


public final class TranslateTimeSeriesCollapse extends AnalyzerRules.ParameterizedAnalyzerRule<TimeSeriesCollapse,AnalyzerContext>
Populates a TimeSeriesCollapse that wraps a PromqlCommand with the dimensions and bounds extracted from the inner PromqlCommand. The PromqlCommand itself stays in place as the child and is translated to ESQL nodes by TranslatePromqlToEsqlPlan on a subsequent pass in the same batch.

TimeSeriesCollapse is only valid with a PromqlCommand child: parse rules enforce that for ES|QL text, but callers that build plans by hand must stack collapse the same way or optimization fails fast here instead of later with unresolved bounds.