diff --git a/datafusion/sql/src/statement.rs b/datafusion/sql/src/statement.rs index 0f3245bfdcd40..1ebeba7d6fefc 100644 --- a/datafusion/sql/src/statement.rs +++ b/datafusion/sql/src/statement.rs @@ -1152,8 +1152,8 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> { let value_string = match &value[0] { SQLExpr::Identifier(i) => ident_to_string(i), SQLExpr::Value(v) => match crate::utils::value_to_string(v) { - Err(_) => return plan_err!("Unsupported Value {}", value[0]), - Ok(v) => v, + None => return plan_err!("Unsupported Value {}", value[0]), + Some(v) => v, }, // for capture signed number e.g. +8, -8 SQLExpr::UnaryOp { op, expr } => match op { diff --git a/datafusion/sql/tests/sql_integration.rs b/datafusion/sql/tests/sql_integration.rs index df8bb7a0fc732..2bb216bb72e04 100644 --- a/datafusion/sql/tests/sql_integration.rs +++ b/datafusion/sql/tests/sql_integration.rs @@ -194,7 +194,7 @@ fn test_parse_options_value_normalization() { enable_options_value_normalization, }, ); - if let Ok(plan) = plan { + if let Ok(plan) = plan { assert_eq!(expected_plan, format!("{plan:?}")); match plan {