Databricks: support for lambda functions#1257
Conversation
| /// ```sql | ||
| /// SELECT transform(array(1, 2, 3), x -> x + 1); -- returns [2,3,4] | ||
| /// ``` | ||
| fn supports_lambda_functions(&self) -> bool { |
There was a problem hiding this comment.
One thing I was unsure of here is whether to enable this for the generic dialect. Our policy is to enable everything for generic, but this syntax conflicts with the -> operator from dialects like Postgres. So supporting this would be a breaking change of somewhat dubious benefit, since we both gain and lose a feature in generic. Thoughts?
There was a problem hiding this comment.
I think this makes sense to not support via GenericDialect when there is a conflict
🤔 that might be a good thing to add to the policy https://github.com/sqlparser-rs/sqlparser-rs?tab=readme-ov-file#new-syntax
Pull Request Test Coverage Report for Build 8952370439Details
💛 - Coveralls |
|
|
||
| let res = databricks().parse_sql_statements("SELECT EXISTS ("); | ||
| assert_eq!( | ||
| // TODO: improve this error message... |
There was a problem hiding this comment.
was the todo meant for this PR or as a general improvement/followup with error reporting?
| databricks().verified_only_select(sql).projection[0] | ||
| ); | ||
|
|
||
| databricks().verified_expr( |
| /// ```sql | ||
| /// SELECT transform(array(1, 2, 3), x -> x + 1); -- returns [2,3,4] | ||
| /// ``` | ||
| fn supports_lambda_functions(&self) -> bool { |
There was a problem hiding this comment.
I think this makes sense to not support via GenericDialect when there is a conflict
🤔 that might be a good thing to add to the policy https://github.com/sqlparser-rs/sqlparser-rs?tab=readme-ov-file#new-syntax
|
Thanks again for the review @iffyio |
No description provided.