diff --git a/core/src/execution/datafusion/planner.rs b/core/src/execution/datafusion/planner.rs index a5bcf5654..6cea11d71 100644 --- a/core/src/execution/datafusion/planner.rs +++ b/core/src/execution/datafusion/planner.rs @@ -563,7 +563,7 @@ impl PhysicalPlanner { let child = self.create_expr(expr.child.as_ref().unwrap(), input_schema)?; Ok(Arc::new(NotExpr::new(child))) } - ExprStruct::Negative(expr) => { + ExprStruct::UnaryMinus(expr) => { let child: Arc = self.create_expr(expr.child.as_ref().unwrap(), input_schema.clone())?; let result = negative::create_negate_expr(child, expr.fail_on_error); diff --git a/core/src/execution/proto/expr.proto b/core/src/execution/proto/expr.proto index 9c6049013..5192bbd4c 100644 --- a/core/src/execution/proto/expr.proto +++ b/core/src/execution/proto/expr.proto @@ -65,7 +65,7 @@ message Expr { CaseWhen caseWhen = 38; In in = 39; Not not = 40; - Negative negative = 41; + UnaryMinus unary_minus = 41; BitwiseShiftRight bitwiseShiftRight = 42; BitwiseShiftLeft bitwiseShiftLeft = 43; IfExpr if = 44; @@ -452,7 +452,7 @@ message Not { Expr child = 1; } -message Negative { +message UnaryMinus { Expr child = 1; bool fail_on_error = 2; } 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 8d81b57c4..448c4ff0f 100644 --- a/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala +++ b/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala @@ -1987,13 +1987,13 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde with CometExprShim case UnaryMinus(child, failOnError) => val childExpr = exprToProtoInternal(child, inputs) if (childExpr.isDefined) { - val builder = ExprOuterClass.Negative.newBuilder() + val builder = ExprOuterClass.UnaryMinus.newBuilder() builder.setChild(childExpr.get) builder.setFailOnError(failOnError) Some( ExprOuterClass.Expr .newBuilder() - .setNegative(builder) + .setUnaryMinus(builder) .build()) } else { withInfo(expr, child)