apache / apache/datafusion-sqlparser-rs
snowflake column identifier for copy into / query data staged in files
- 主要语言
- Rust
- 星标
- 3.5k
- 派生
- 772
- 平均合并
- 4 天 9 小时
- 30 天内合并 PR
- 17
描述
According to documentation, Snowflake allows:
* [query data staged in files](https://docs.snowflake.com/en/user-guide/querying-stage.html#required-parameters) with an identifier of a form `[.]$[.]`
* [copy into table](https://docs.snowflake.com/en/user-guide/data-load-transform.html) with an column identifier containing `$` character like `select t.$1,t.$2,t.$3 from @~/datafile.csv.gz t;`
Although the feature seems to be snowflake specific, it cannot be implemented within snowflake dialect. It's because tokens starting with `$` character are tokenized into `Token::Placeholder`. That's why parser's change is required.
Initial OpenLineage project issue: https://github.com/OpenLineage/OpenLineage/issues/814
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 lexer 和 parser 入手,检查以 `$` 开头的 token 的处理,特别是当前生成 `Token::Placeholder` 的路径,并审查 Snowflake 方言的处理。只要文档中所述的 staged-file 和 COPY INTO 列形式能够正确解析,且不会导致现有占位符语法回归,工作就完成了。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust, sql
- 领域
- compilers, databases
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100