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?
Split out from #1577 (item 6), which asks for a
WindowUDFABC equivalent toAccumulator.Checked this against current
main:datafusion.user_defined.WindowEvaluatoralready provides the capability.crates/core/src/udwf.rs::RustPartitionEvaluatordispatchesmemoize/get_range/evaluate/evaluate_all/evaluate_all_with_rank/supports_bounded_execution/uses_window_frame/include_rankviacall_method, andpython/tests/test_udwf.pyhas several pure-Python subclasses driven throughudwf().It's deliberately not
metaclass=ABCMetalikeAccumulator, though: whichevaluate*method must be implemented depends on theuses_window_frame/supports_bounded_execution/include_rankflag matrix documented on the class, so no single method can be marked@abstractmethodthe wayAccumulator'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?