bubulalabu commented on code in PR #18019:
URL: https://github.com/apache/datafusion/pull/18019#discussion_r2463781880
##########
datafusion/sql/src/expr/function.rs:
##########
@@ -668,8 +703,44 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
qualifier: qualifier.into(),
options: Box::new(WildcardOptions::default()),
};
-
- Ok(expr)
+ Ok((expr, None))
+ }
+ // PostgreSQL dialect uses ExprNamed variant with expression for
name
+ FunctionArg::ExprNamed {
+ name,
+ arg: FunctionArgExpr::Expr(arg),
+ operator: _,
+ } => {
+ let expr = self.sql_expr_to_logical_expr(arg, schema,
planner_context)?;
+ let arg_name = match name {
+ SQLExpr::Identifier(ident) =>
crate::utils::normalize_ident(ident),
+ _ => {
+ return plan_err!(
+ "Named argument must use a simple identifier, got:
{name:?}"
+ )
+ }
+ };
+ Ok((expr, Some(arg_name)))
+ }
Review Comment:
done, thanks for the hint
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]