Skip to content

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

Description

@stantheman0128

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions