lovasoa commented on code in PR #1500:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1500#discussion_r1832990576
##########
src/ast/mod.rs:
##########
@@ -808,6 +808,21 @@ pub enum Expr {
},
/// Scalar function call e.g. `LEFT(foo, 5)`
Function(Function),
+ /// CompositeFunction (function chain)
+ ///
+ /// Syntax:
+ ///
+ /// `<arbitrary-expr>.<arbitrary-expr>.<arbitrary-expr>...`
+ ///
+ /// > `arbitrary-expr` can be any expression including a function call.
+ ///
+ /// Example:
+ ///
+ /// ```sql
+ /// SELECT (SELECT ',' + name FROM sys.objects FOR XML PATH(''),
TYPE).value('.','NVARCHAR(MAX)')
+ /// SELECT CONVERT(XML,'<Book>abc</Book>').value('.','NVARCHAR(MAX)')
+ /// ```
+ CompositeFunction(CompositeFunction),
Review Comment:
Maybe we can find a better name ? Something like `MethodCall { expr, method
}` instead of `CompositeFunction { left, right }`
--
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]