File tree Expand file tree Collapse file tree 1 file changed +0
-8
lines changed
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/analysis Expand file tree Collapse file tree 1 file changed +0
-8
lines changed Original file line number Diff line number Diff line change 4949import org .elasticsearch .xpack .esql .core .util .Holder ;
5050import org .elasticsearch .xpack .esql .core .util .StringUtils ;
5151import org .elasticsearch .xpack .esql .expression .NamedExpressions ;
52- import org .elasticsearch .xpack .esql .expression .SurrogateExpression ;
5352import org .elasticsearch .xpack .esql .expression .UnresolvedNamePattern ;
5453import org .elasticsearch .xpack .esql .expression .function .EsqlFunctionRegistry ;
5554import org .elasticsearch .xpack .esql .expression .function .FunctionDefinition ;
@@ -2005,13 +2004,6 @@ private LogicalPlan doRule(Aggregate plan) {
20052004 aborted .set (Boolean .TRUE );
20062005 return aggFunc ;
20072006 }
2008- if (aggFunc instanceof Avg || aggFunc instanceof AvgOverTime ) {
2009- // This is related to a known bug involving AvgOverTime and aggregate_metric_double. We substitute
2010- // surrogates here so when AvgOverTime becomes Div(SumOverTime, CountOverTime), which then becomes
2011- // Div(SumOverTime(agg_metric.sum), SumOverTime(agg_metric.count)), we can distinguish between the
2012- // SumOverTimes produced here from references to Sum/CountOverTime in other parts of the query
2013- return ((SurrogateExpression ) aggFunc ).surrogate ();
2014- }
20152007 Map <String , Expression > typeConverters = typeConverters (aggFunc , fa , mtf );
20162008 if (typeConverters == null ) {
20172009 aborted .set (Boolean .TRUE );
You can’t perform that action at this time.
0 commit comments