apache / apache/datafusion-sqlparser-rs
Support `CREATE TYPE` for creating custom type
- 主要言語
- Rust
- スター
- 3.5k
- フォーク
- 772
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 17
説明
Hello, I think it would be nice to add `CREATE TYPE` statement for creating custom composite type.
### Use cases
```sql
-- Defining composite type
CREATE TYPE inventory_item AS (
name text,
supplier_id integer,
price numeric
);
-- Using composite type `inventory_item`
CREATE TABLE on_hand (
item inventory_item,
count integer
);
INSERT INTO on_hand VALUES (ROW('fuzzy dice', 42, 1.99), 1000);
```
### References
- Postgres: https://www.postgresql.org/docs/current/sql-createtype.html
- SQL server: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-type-transact-sql?view=sql-server-ver16
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
実装ファイルやテストは指定されていません。まず parser のエントリポイントと CREATE 文の AST 定義を見つけ、次に方言固有の構文がどのように表現されているかを確認してください。PostgreSQL の例のような複合 CREATE TYPE 文が正常にパースされ、サポート対象の構文がテストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust, sql
- 領域
- compilers, databases
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100