samuelcolvin commented on code in PR #1686:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1686#discussion_r1935157823
##########
src/dialect/mod.rs:
##########
@@ -340,12 +340,21 @@ pub trait Dialect: Debug + Any {
/// Returns true if the dialect supports lambda functions, for example:
///
/// ```sql
- /// SELECT transform(array(1, 2, 3), x -> x + 1); -- returns [2,3,4]
+ /// SELECT transform(array(1, 2, 3), (x) -> x + 1); -- returns [2,3,4]
/// ```
fn supports_lambda_functions(&self) -> bool {
false
}
+ /// Returns true if the dialect supports lambda functions without
parentheses for a single argument, for example:
+ ///
+ /// ```sql
+ /// SELECT transform(array(1, 2, 3), x -> x + 1); -- returns [2,3,4]
+ /// ```
+ fn supports_parensless_lambda_functions(&self) -> bool {
Review Comment:
Agreed. The lambda syntax looks identical to Pg JSON lookup syntax with a
completely different meaning.
--
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]