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

Extract shared list-array construction from the split_* functions in split.rs

未关闭 适合新手
#6,983 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@arminazimi 已经在做这个了。

开始于 2026年10月15日。

  • #7004 来自 @arminazimi —— 未关闭

评估

难度
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 内容生成。

描述

area:expressions enhancement good first issue help wanted requires-triage rust tech debt
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.

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

环境准备

从这里开始

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

apache/datafusion-comet 的其他 Issue

查看 apache/datafusion-comet 的全部 Issue

相似的 Issue

更多 Scala Issue

把新 issue 发到你的邮箱

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