apache / apache/datafusion-python

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

オープン
#1,670 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
604
フォーク
174
平均マージ
1日 7時間
マージ済み PR(30日)
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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Read datafusion.user_defined.WindowEvaluator and crates/core/src/udwf.rs::RustPartitionEvaluator, then review the pure-Python subclasses in python/tests/test_udwf.py. Determine whether an ABC is still needed and, if so, define an abstractness contract that covers the documented flag matrix; done means the requested direction is resolved and reflected in the issue or implementation plan.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
data-engineering
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。