Dictionary-shaped takes decode every row of FoR, ALP and ZigZag values
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- databases, performance
调研方向
Start by reading #12048 and #11890, then locate the TakeExecuteAdaptor and the take kernels for FoR, ZigZag, and ALP. Add benchmarks comparing pushdown with decoding values before gathering across several codes-to-values ratios, recording time and allocations. Use the results to recommend where the rule belongs and whether a length threshold or ratio is appropriate; preserve pushdown for Sparse, RunEnd, Sequence, and Chunked.
由索引模型根据 Issue 内容生成。
描述
This concerns take on encodings that wrap a child and decode it one element at a time: FoR, ZigZag, ALP, ALPRD, Delta and Widen. In Vortex, ArrayRef::take builds a lazy DictArray(indices, values). Each of these encodings registers a TakeExecuteAdaptor kernel for a Dict parent. So a real dictionary column, such as Dict(codes, FoR), takes the same path as a plain take.
When the codes outnumber the values, the kernel still pushes the codes into the encoded child and returns a full-length array, such as FoR(take(encoded, codes)). So one execution step turns a dictionary-encoded column into a full-length encoded array. The decode then runs once per row instead of once per distinct value. Nobody has measured what this costs in time or memory.
#12048 adds a guard to ZigZag only. Its take kernel declines when indices.len() > array.len(), so Dict decodes its values first and stays a Dict. No benchmark measures that guard, and FoR and ALP keep the old path. The length test is also only a stand-in for "this take is dictionary-shaped".
Questions to answer with benchmarks:
- For
DictoverFoR,ZigZagandALPvalues, which is faster: pushing the take into the encoded child, or decoding the values and then gathering? Measure several ratios of codes to values, and what each path allocates. - Does the answer differ by encoding?
ZigZagdecodes with a shift and an XOR, whileALPmultiplies and applies patches. - If decoding first wins, should the rule live once in
TakeExecuteAdaptoras an opt-in, or in each encoding's kernel?Sparse,RunEnd,SequenceandChunkedrely on the pushdown and must keep it. - Is
indices.len() > array.len()the right test, or should the rule use a ratio of codes to values?
Related to #11890.
🤖 Generated with Claude Code
- 主要语言
- Rust
- 星标
- 3.2k
- 派生
- 239
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 684
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
vortex-data/vortex 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
vortex-data/vortex#12633 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
vortex-data/vortex#12628 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
vortex-data/vortex#12491 ·
维护者通常 1 天内回复
-
Fallible constructor for nested_case_when可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
vortex-data/vortex#11425 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 67/100
vortex-data/vortex#12635 ·
维护者通常 1 天内回复
查看 vortex-data/vortex 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
marklauter/tsong#110 ·
-
docs enhancement
难度 2/5 1-3 小时 新手友好度 78/100
wasm-bindgen/wasm-bindgen#5503 · 1 条评论 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
marketing
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
area: engine bug needs milestone
难度 2/5 1-3 小时 新手友好度 70/100
Mudcrab-Team/mudcrab#1197 · 1 条评论 ·
维护者通常 1 天内回复