apache / apache/datafusion-sqlparser-rs

Support `WITH ORDINALITY` in PostgreSQL parsing

未關閉
#967 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Rust
星號
3.5k
分支
774
平均合併
4 天 9 小時
30 天內合併 PR
17

描述

`WITH ORDINALITY` can be used as a suffix for any [set returning function](https://www.postgresql.org/docs/devel/functions-srf.html) in a `FROM` clause to append a new column containing the row's ordinal position. Simple example:

```sql
SELECT * FROM unnest(ARRAY['a', 'b', 'c']) WITH ORDINALITY;
unnest | ordinality
--------+------------
a | 1
b | 2
c | 3
(3 rows)
```

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

首先定位 PostgreSQL 中 FROM 子句內 set-returning functions 的剖析器路徑,並檢查附近的語法涵蓋情況。使用 issue 中的 unnest 範例作為剖析案例,然後驗證 WITH ORDINALITY 後綴能被接受,並由剖析器正確表示。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
postgresql, rust, sql
領域
databases
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。