apache / apache/datafusion-sqlparser-rs
Support Snowflake lambda functions
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
Snowflake recently gained support for [higher-order functions](https://medium.com/snowflake/snowflake-supports-higher-order-functions-dfa4b7682f7a) like [`TRANSFORM`](https://docs.snowflake.com/en/sql-reference/functions/transform) and [`FILTER`](https://docs.snowflake.com/en/sql-reference/functions/filter) which utilize a new [lambda function syntax](https://docs.snowflake.com/en/user-guide/querying-semistructured#lambda-expressions) similar to that of [Databricks](https://docs.databricks.com/en/sql/language-manual/sql-ref-lambda-functions.html) for which I [recently added support](https://github.com/sqlparser-rs/sqlparser-rs/pull/1257).
The two syntaxes look compatible so we can mostly reuse what we have. The one difference I noted is that Snowflake lambdas are permitted to specify types, e.g. `(x INT, y INT) -> (x + y)`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing Databricks lambda-function support and PR #1257, then compare it with Snowflake's lambda-expression and higher-order-function syntax. Done means Snowflake lambdas parse successfully, including parameters with explicit types such as `(x INT, y INT) -> (x + y)`, without breaking the compatible existing syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100