apache / apache/datafusion-python

WindowEvaluator already provides the pure-Python window UDF base class #1577 (item 6) asks for

未關閉
#1,670 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
604
分支
174
平均合併
1 天 7 小時
30 天內合併 PR
4

描述

Split out from #1577 (item 6), which asks for a `WindowUDF` ABC equivalent to `Accumulator`.

Checked this against current `main`: `datafusion.user_defined.WindowEvaluator` already provides the capability. `crates/core/src/udwf.rs::RustPartitionEvaluator` dispatches `memoize` / `get_range` / `evaluate` / `evaluate_all` / `evaluate_all_with_rank` / `supports_bounded_execution` / `uses_window_frame` / `include_rank` via `call_method`, and `python/tests/test_udwf.py` has several pure-Python subclasses driven through `udwf()`.

It's deliberately not `metaclass=ABCMeta` like `Accumulator`, though: which `evaluate*` method must be implemented depends on the `uses_window_frame` / `supports_bounded_execution` / `include_rank` flag matrix documented on the class, so no single method can be marked `@abstractmethod` the way `Accumulator`'s can.

Opening this to confirm: is the literal "ABC" form still wanted on top of what exists (and if so, what should the abstractness contract look like given the flag matrix), or should #1577 drop this item?

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

閱讀 datafusion.user_defined.WindowEvaluator 和 crates/core/src/udwf.rs::RustPartitionEvaluator,然後檢查 python/tests/test_udwf.py 中的純 Python 子類別。確定是否仍然需要 ABC;如果需要,則定義一個涵蓋已記錄 flag 矩陣的抽象性契約;當所要求的方向得到解決並反映在 issue 或實作計畫中時,即視為完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
data-engineering
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。