Use the shared aggr_test_schema in CSV scan tests instead of a local copy
维护者通常 1 天内回复
@med9110 已经在做这个了。
开始于 2026年10月14日。
评估
调研方向
从 datafusion/core/src/datasource/physical_plan/csv.rs 的测试模块开始,找到私有的 aggr_test_schema() 副本。它的公开对应版本位于 datafusion/core/src/test_util/mod.rs,因此请从 crate::test_util 导入它,并保持 aggr_test_schema_with_missing_col 基于它构建。在 datafusion-core crate 中使用 cargo test 运行 CSV 测试。当本地副本被删除且这些测试仍然通过时,即完成。
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem or challenge?
The test module in core/src/datasource/physical_plan/csv.rs defines a private aggr_test_schema() that is a verbatim copy of the public datafusion::test_util::aggr_test_schema(). If the shared schema changes (for example new columns or metadata on aggregate_test_100.csv), the CSV tests keep using the stale copy.
The same module also repeats about 35 lines of scan setup in every rstest case (session context, partitioned_file_groups, CsvOptions, TableSchema, CsvSource, FileScanConfigBuilder), differing only in projection, limit and the expected snapshot (L130-L442). json.rs (L213-L372) does the same with prepare_store and JsonSource.
Describe the solution you'd like
- Delete the local
aggr_test_schemain the csv.rs tests and importcrate::test_util::aggr_test_schema. Keepaggr_test_schema_with_missing_colas a derivation of it. - Optionally add a test helper such as
csv_scan_config(file_compression_type, file_schema, |builder| ...) -> FileScanConfigthat does the shared setup, so each rstest case only applies its projection or limit and asserts. Do the same for json.rs.
Describe alternatives you've considered
Do step 1 only.
Additional context
Step 1 is a small, self-contained change and a good first issue. Line references are pinned to commit 0d79252f61bd.
- 主要语言
- Rust
- 星标
- 9.4k
- 派生
- 2.5k
- 平均合并
- 4 天 9 小时
- 30 天内合并 PR
- 329
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/datafusion 的其他 Issue
-
bug help wanted unparser
难度 2/5 1-3 小时 新手友好度 72/100
apache/datafusion#26316 · 1 条评论 ·
维护者通常 1 天内回复
-
Deduplicate bucket computation in width_bucket_interval_mdn_exact可能已有人在做 @nightcityblade 今天认领。 未关闭enhancement good first issue help wanted spark tech debt
难度 2/5 1-3 小时 新手友好度 85/100
apache/datafusion#26307 · 3 条评论 ·
维护者通常 1 天内回复
-
gcd benchmarks pass number_rows: 0 for 100k-row inputs可能已有人在做 @med9110 今天认领。 未关闭bug functions good first issue help wanted tech debt
难度 1/5 1 小时以内 新手友好度 92/100
apache/datafusion#26297 · 1 条评论 ·
维护者通常 1 天内回复
-
Struct union type coercion takes field nullability from the wrong field when field order differs可能已有人在做 @med9110 今天认领。 未关闭bug help wanted logical-expr tech debt
难度 2/5 1-3 小时 新手友好度 68/100
apache/datafusion#26296 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
apache/datafusion#26290 ·
维护者通常 1 天内回复
查看 apache/datafusion 的全部 Issue
相似的 Issue
-
RUSTSEC-2026-0348: Brotli certificate decompression can allocate up to 1 GiB before authentication未关闭
难度 2/5 1-3 小时 新手友好度 60/100
-
难度 1/5 1-3 小时 新手友好度 62/100
-
core: Amount::from_str panics on values above 21M BTC instead of returning an error可能已有人在做 @bhuvan-somisetty 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
crate: spate-s3
难度 2/5 半天 新手友好度 62/100
维护者通常 1 天内回复
-
write_iceberg ignores the table's write.parquet.compression-codec property可能已有人在做 @YuangGao 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
Eventual-Inc/Daft#7606 ·
维护者通常 1 天内回复