apache / apache/datafusion-sqlparser-rs
Support Snowflake lambda functions
- Ngôn ngữ chính
- Rust
- Star
- 3.5k
- Fork
- 772
- Merge trung bình
- 4 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 17
Mô tả
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)`.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng việc xem xét hỗ trợ hiện có cho hàm lambda của Databricks và PR #1257, sau đó so sánh với cú pháp lambda-expression và higher-order-function của Snowflake. Công việc được coi là hoàn tất khi các lambda của Snowflake được phân tích cú pháp thành công, bao gồm cả các tham số có kiểu tường minh như `(x INT, y INT) -> (x + y)`, mà không làm hỏng cú pháp hiện có tương thích.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust, sql
- Lĩnh vực
- compilers
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100