apache / apache/datafusion-sqlparser-rs

Support Snowflake lambda functions

未关闭
#1,273 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
3.5k
派生
772
平均合并
4 天 9 小时
30 天内合并 PR
17

描述

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)`.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先检查现有的 Databricks lambda-function 支持和 PR #1257,然后将其与 Snowflake 的 lambda-expression 和 higher-order-function 语法进行比较。完成标准是 Snowflake lambda 能够成功解析,包括带有显式类型的参数,例如 `(x INT, y INT) -> (x + y)`,同时不破坏现有的兼容语法。

由索引模型根据 Issue 内容生成。

评估

技术栈
rust, sql
领域
compilers
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。