Jefffrey commented on code in PR #16456: URL: https://github.com/apache/datafusion/pull/16456#discussion_r2285137490
########## datafusion/sql/src/expr/mod.rs: ########## @@ -823,13 +826,12 @@ impl<S: ContextProvider> SqlToRel<'_, S> { return not_impl_err!("ANY in LIKE expression"); } let pattern = self.sql_expr_to_logical_expr(pattern, schema, planner_context)?; - let escape_char = if let Some(char) = escape_char { - if char.len() != 1 { - return plan_err!("Invalid escape character in LIKE expression"); + let escape_char = match escape_char { + Some(Value::SingleQuotedString(char)) if char.len() == 1 => { + Some(char.chars().next().unwrap()) } - Some(char.chars().next().unwrap()) - } else { - None + Some(_) => return plan_err!("Invalid escape character in LIKE expression"), Review Comment: Updated the error messages to be more informative 👍 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org