Shared design for DataTree tables with duckdb-zarr: one schema per node
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 12/100
調査の方向性
This is an open design proposal, not a task with a defined change. Read the proposal and the linked #82 and xqlsystems/duckdb-zarr#52, then the existing default_table_name and resolve_table_names helpers the design reuses per node. The open questions (catalog-per-tree versus flat names, root node as default schema, table_names keys) need a maintainer decision in the thread before any code. Done means that decision is recorded, not that a patch exists.
索引モデルが issue の本文から書いたものです。
説明
duckdb-zarr is adding support for Zarr stores with nested groups, such as those written by xarray.DataTree.to_zarr(). We'd like both projects to turn the same store into the same tables, with the same names, so this issue proposes a shared design. It builds on #82.
The duckdb-zarr version is decision 8 in xqlsystems/duckdb-zarr#52 (design only, no code yet).
Proposal
- A table is one dimension group in one node. It's identified by (node path, dims). Arrays in different nodes never share a table, even when their dimension names match. This is the
DataTreemodel:simulation/coarseandsimulation/finecan both havefoo(x, y)with different lengths ofx. - Tables inside a node are named with the existing rules.
default_table_name("_".join(dims)in dimension order,scalarfor none) andresolve_table_names(overrides keyed by the dims tuple, case-insensitive collision check), applied per node. - A node maps to a schema. Tree → catalog, node path → schema, dimension group → table:
- The root node is the default schema:
mainin DuckDB,publicin DataFusion. - A nested path is one quoted schema name:
sim."simulation/fine".x_y. - In DataFusion this is a
CatalogProviderwhoseSchemaProviders are the nodes, as suggested in #82.
- The root node is the default schema:
- Coordinates are inherited like xarray. A node's tables include coordinates from its ancestors for dimensions the node shares with them, the same view
dt["simulation/fine"].to_dataset()gives. - Opening one node uses xarray's word. duckdb-zarr adds
read_zarr(store, group := 'simulation/fine'), matchingxr.open_zarr(store, group=...). With nogroup, only the root node is read.
Questions for xarray-sql
- Does a catalog per tree and a schema per node fit the planned
from_datatreeAPI? Or would you rather have flat table names in one schema (for examplesimulation_fine__x_y)? - How should the root node look? Is it the default schema, or a schema named after the tree?
- Should
table_namesoverrides for a tree be keyed by(node_path, dims), with the per-nodedimskeys kept as they are? - Is anything in xarray-sql's pivot tied to one flat
Datasetthat would make inherited coordinates hard?
Why now
The immediate user is AnnData (xqlsystems/duckdb-zarr#40). An AnnData store is a tree: obs and var are nodes, and X, layers and obsm share their axes. The AnnData-specific parts come after this: naming its axes and decoding its categorical, nullable and sparse groups. Agreeing on the tree mapping first means both projects expose AnnData the same way.
- 主要言語
- Python
- スター
- 142
- フォーク
- 19
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
xqlsystems/xarray-sql のほかの issue
-
documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
xqlsystems/xarray-sql#268 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
xqlsystems/xarray-sql#267 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
xqlsystems/xarray-sql#243 ·
メンテナーはふだん 1 日以内に返信
-
publish.yml: the TestPyPI verification step is unreachable (and installs the wrong package name)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
xqlsystems/xarray-sql#242 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
xqlsystems/xarray-sql#237 ·
メンテナーはふだん 1 日以内に返信
xqlsystems/xarray-sql の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
eclipse-score/inc_someip_gateway#356 ·
メンテナーはふだん 2 日以内に返信
-
[BUG]: `GitHubRestAdapter.check_user_permission` and `has_write_access` raise `TypeError` (missing `params`), silently disabling the inactivity lifecycle対応中かも @tarunagnihotri534 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
AOSSIE-Org/Gitcord-GithubDiscordBot#167 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
mihai-vlc/sublime-jsfmt#56 ·
-
comp/cli comp/plugins P2 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
NousResearch/hermes-agent#141917 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
riscv/riscv-opcodes#441 ·