Extract shared list-array construction from the split_* functions in split.rs
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
调研方向
从 native/spark-expr/src/string_funcs/split.rs 开始,比较 issue 中链接的四个泛型 split 函数(regex scalar、split_sql_generic_scalar、split_sql_generic_scalar_array、split_sql_generic_array)的结尾部分。将完成 values builder、根据 O::IS_LARGE 选择 Utf8 或 LargeUtf8、构建 item 字段并创建 GenericListArray 的共享代码块,移到一个新的辅助函数 finish_split_list 中,签名采用 issue 中提出的形式。完成的标准是:四个函数都调用该辅助函数,且现有行为和测试保持不变。
由索引模型根据 Issue 内容生成。
描述
What is the problem the feature request solves?
In native/spark-expr/src/string_funcs/split.rs, the four generic split functions end with the same block of code: finish the values builder, pick Utf8/LargeUtf8 from O::IS_LARGE, build the item field, and construct a GenericListArray with the offsets.
- L305-L327 (regex scalar)
- L338-L360 (
split_sql_generic_scalar) - L374-L397 (
split_sql_generic_scalar_array) - L415-L441 (
split_sql_generic_array)
They differ only in the per-row call and in how the null buffer is produced (cloned input nulls vs NullBufferBuilder). A fix to the list construction, such as the item field's nullability, has to be made in four places.
Describe the potential solution
Extract fn finish_split_list<O: OffsetSizeTrait>(offsets: Vec<O>, values: GenericStringBuilder<O>, nulls: Option<NullBuffer>) -> ColumnarValue and call it from all four functions. Optionally, also factor the per-row loop into a generic driver so each variant only supplies its null predicate and push call.
Additional context
This is small and a good first issue. Line references are pinned to commit 7d8d9b1544b7.
- 主要语言
- Scala
- 星标
- 1.3k
- 派生
- 387
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 422
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/datafusion-comet 的其他 Issue
-
requires-triage
难度 2/5 1-3 小时 新手友好度 68/100
apache/datafusion-comet#7001 ·
维护者通常 1 天内回复
-
area:expressions enhancement help wanted requires-triage rust tech debt
难度 2/5 半天 新手友好度 68/100
apache/datafusion-comet#6974 ·
维护者通常 1 天内回复
-
Iceberg data tables whose names end with a metadata-table name fall back to Spark可能重新可做 @aryan9948 于 9 天前认领,目前没有进行中的 PR。 未关闭requires-triage
难度 2/5 1-3 小时 新手友好度 75/100
apache/datafusion-comet#6719 · 1 条评论 ·
维护者通常 1 天内回复
-
ANSI integral SUM overflow reports "integer overflow" without Spark's try_add suggestion可能已有人在做 @0lai0 于 9 天前认领。 未关闭area:aggregation bug priority:medium
难度 2/5 1-3 小时 新手友好度 82/100
apache/datafusion-comet#6661 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Native from_json with a schema that repeats a field name fails with "ArrowArray struct has 2 children (expected 1)"可能已有人在做 @Samearth17 于 10 天前认领。 未关闭area:expressions area:ffi bug good first issue priority:medium
难度 2/5 1-3 小时 新手友好度 70/100
apache/datafusion-comet#6592 ·
维护者通常 1 天内回复
查看 apache/datafusion-comet 的全部 Issue
相似的 Issue
-
[Bug] HiveDialect shares its colspecs dict with SQLAlchemy's DefaultDialect (python/pyhive)可能已有人在做 @rusackas 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 80/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
? - Needs Triage documentation user_tools
难度 2/5 半天 新手友好度 62/100
NVIDIA/cudf-spark-tools#2190 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
lichess-org/lila#22088 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复