apache / apache/datafusion-python
WindowEvaluator already provides the pure-Python window UDF base class #1577 (item 6) asks for
- Langage dominant
- Python
- Étoiles
- 604
- Forks
- 174
- Merge moyen
- 1 j 7 h
- PR mergées (30 j)
- 4
Description
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?
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- data-engineering
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Calme
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100