From 5e6a35c5d7b6881203621da38e5422935f7890c7 Mon Sep 17 00:00:00 2001 From: "Prashant K. Sharma" Date: Sat, 11 May 2024 15:01:16 +0900 Subject: [PATCH] issue 361 fixed type issue for eval_mode in planner.rs --- core/src/execution/datafusion/planner.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/execution/datafusion/planner.rs b/core/src/execution/datafusion/planner.rs index 72174790b..fb8f18a3f 100644 --- a/core/src/execution/datafusion/planner.rs +++ b/core/src/execution/datafusion/planner.rs @@ -346,10 +346,10 @@ impl PhysicalPlanner { let child = self.create_expr(expr.child.as_ref().unwrap(), input_schema)?; let datatype = to_arrow_datatype(expr.datatype.as_ref().unwrap()); let timezone = expr.timezone.clone(); - let eval_mode = match expr.eval_mode.as_str() { - "ANSI" => EvalMode::Ansi, - "TRY" => EvalMode::Try, - "LEGACY" => EvalMode::Legacy, + let eval_mode = match expr.eval_mode { + 0 => EvalMode::Legacy, + 1 => EvalMode::Try, + 2 => EvalMode::Ansi, other => { return Err(ExecutionError::GeneralError(format!( "Invalid Cast EvalMode: \"{other}\""