diff --git a/core/src/execution/datafusion/planner.rs b/core/src/execution/datafusion/planner.rs index bc2d9bed3..72174790b 100644 --- a/core/src/execution/datafusion/planner.rs +++ b/core/src/execution/datafusion/planner.rs @@ -1248,11 +1248,11 @@ impl PhysicalPlanner { expr.null_on_divide_by_zero, ))), 1 => Ok(Arc::new(Variance::new( - child, - "variance_pop", - datatype, - StatsType::Population, - expr.null_on_divide_by_zero, + child, + "variance_pop", + datatype, + StatsType::Population, + expr.null_on_divide_by_zero, ))), stats_type => Err(ExecutionError::GeneralError(format!( "Unknown StatisticsType {:?} for Variance", diff --git a/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala b/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala index fddd47294..d08fb6b90 100644 --- a/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala +++ b/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala @@ -481,6 +481,7 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde { .setVariance(varBuilder) .build()) } else { + withInfo(aggExpr, child) None } case variancePop @ VariancePop(child, nullOnDivideByZero) => @@ -500,6 +501,7 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde { .setVariance(varBuilder) .build()) } else { + withInfo(aggExpr, child) None } case fn =>