Discuss partitioned execution for ASOF joins
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- rust
- 領域
- databases, performance
研究方向
Read the discussion and linked context in #26592, especially the feedback on the earlier pull request. The proposal concerns AsOfJoinExec, InputCursor, and hash-partitioned execution; compare its memory benefits with the reported slowdown for skewed keys. Done means reaching agreement on an execution design and a clear approach for a follow-up implementation.
由索引模型根據 Issue 內容生成。
描述
Following #26592, I'd like to discuss the design before attempting another implementation.
I should have discussed the approach before opening the PR. Sorry about that.
Proposed approach
The main issue I'm trying to address is that AsOfJoinExec currently collects the entire right input into memory. This means ASOF joins can run out of memory on large right inputs, even when the upstream sorts can spill.
My idea was to use hash-partitioned execution when equality keys are present. Then i could just sort each partition according to the ordering required by the join and have each left partition stream its corresponding right partition instead of collecting and broadcasting the complete right input. Since InputCursor already advances through the right input, I thought this could reuse much of the existing join logic while removing the need to materialize the complete right side. The join would still need memory for its active batches, candidate matches, and pending output rows, but it would no longer need to collect the entire right input.
Tradeoffs
Hash-partitioning both inputs adds work compared to the existing broadcast approach. If most rows share the same equality key, one partition can end up doing most of the work. In my benchmarks, partitioned execution was nearly twice as slow for skewed keys.
Alternatives
Another possibility would be to make the existing right-input collection spillable. However, this would still require merging the right input into a single stream, and each left partition could end up rereading the spilled data.
I think supporting both broadcast and partitioned execution could make sense, depending on input size and key distribution
Additional context
The comment about my PR mentions proto and config as changes i made, highlighting them as something bad. Are we not allowed to
@Xuanwo implemented the original ASOF joins, so i'd appreciate his perspective on this. I noticed he hasnt been active on DataFusion recently, so I'm not sure if he will see this.
@jayzhan211 @alamb I'd also appreciate your thoughts on the design and on how i should approach it.
One thing I was also wondering about is the mention of config and proto changes in the feedback on my PR. Are these generally changes I should avoid making, or was the concern more about how many parts of DataFusion the PR touched without discussing the design first?
- 主要語言
- Rust
- 星號
- 9.6k
- 分支
- 2.6k
- 平均合併
- 3 天 4 小時
- 30 天內合併 PR
- 345
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apache/datafusion 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
apache/datafusion#27315 · 2 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
apache/datafusion#27094 · 1 則留言 ·
維護者通常 1 天內回覆
-
Substrait consumer doesn't recognise `shift_left` / `shift_right` from functions_arithmetic.yaml可能已有人在做 @jonasHanhan 於 9 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 76/100
apache/datafusion#27059 ·
維護者通常 1 天內回覆
-
`ProjectionExprs::project_statistics` computes approximate `Statistics::total_byte_size` ignoring column stats可能已有人在做 @joseph-isaacs 於 10 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 72/100
apache/datafusion#27050 ·
維護者通常 1 天內回覆
-
physical-plan: decoding an Unnest or Explain node with an unset field panics可能已有人在做 @geoHeil 於 8 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
apache/datafusion#26999 · 1 則留言 ·
維護者通常 1 天內回覆
查看 apache/datafusion 的全部 Issue
相似的 Issue
-
P3
難度 2/5 1-3 小時 新手友好度 70/100
HerringtonDarkholme/hd-lang#1770 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
jonathanong/no-mistakes#3332 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
swc-project/swc-next-issues#310 ·
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
swc-project/swc-ai-issues#653 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
lbjlaq/Antigravity-Manager#3937 ·
維護者通常 1 天內回覆