Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Make examples/ behave like examples: runnable, and consistent with the extension guide

未关闭
#1,723 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
python, rust

调研方向

先从 extension-guide/codecs.md 和 user-guide/data-sources.md:219 开始,然后检查 examples/ 下的三个目录树以及 datafusion-ffi-example/logical_extension_codec.rs:148。运行现有的 pytest 测试套件,以确定它们当前的入口点。完成的标准是:示例可以运行,逻辑编解码器不再依赖进程全局的提供程序注册表,物理计划隔离是明确的,并且指南与代码一致。

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

描述

documentation enhancement

#1721 added examples/distributed as a worked example and, in doing so, exposed two structural problems with the older example trees that the new one throws into relief.

The guide contradicts the code it points at. extension-guide/codecs.md tells authors to encode durable metadata, then spends a paragraph explaining that our own examples do not. Readers copy examples; an example that contradicts the rule beside it is worse than no example. #1719 records the reference-implementation half of this as G9, which examples/distributed/storage-library now satisfies — but the crate a reader is most likely to open first still does the wrong thing.

Two of the three trees have no runnable entry point. datafusion-ffi-example is 13 pytest files and no script; datafusion-ffi-query-planner-example is one pytest file and no script. This is not only an aesthetic problem: user-guide/data-sources.md:219 calls datafusion-ffi-example a "user example" and routes Python users to it from the user guide. They arrive at a test suite.

Investigation while reviewing #1721 found the first problem is smaller and differently shaped than the guide claims. Each item below was checked against the source, not inferred:

  • datafusion-ffi-query-planner-example has no object registry at all — grep -rn "HashMap\|OnceLock\|TOKEN" src/ is empty. It claims node.is::<DistributedExec>() narrowly and writes a fixed durable marker. The guide named it anyway. Corrected in #1721.
  • datafusion-ffi-example's logical codec parks providers in a process-global HashMap, and this is cheaply fixable: it claims MemTable narrowly (logical_extension_codec.rs:148), and a MemTable is fully describable as schema plus batches.
  • datafusion-ffi-example's physical codec parks plans, and this is not fixable here. It is forced by the greedy ForeignExecutionPlan claim, which is load-bearing for upstream defect apache/datafusion#25152 — that is G2 in #1719. Once you claim a node you cannot introspect, parking it is the only remaining option. The work is to make it uncopyable, not to remove it.

So the end state is one quarantined arm carrying an issue number and a delete-when condition, rather than a systemic contradiction.

Decided while planning this: the example trees stay in examples/. Relocating the conformance beds to an integration-tests/ tree was considered and rejected — making them runnable resolves the "these aren't examples" complaint, and a move would churn roughly 40 doc, README, and agent-skill references, none of which any build step validates.

Sub-issues track the pieces. They are ordered: the prose rewrite describes the state the first two produce.

主要语言
Python
星标
605
派生
176
平均合并
1 天 23 小时
30 天内合并 PR
8

贡献指南

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

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/datafusion-python 的其他 Issue

查看 apache/datafusion-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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