apache / apache/datafusion-python

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

Abierto
#1,670 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
604
Forks
174
Merge medio
1 d 7 h
PR fusionados (30 d)
4

Descripción

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?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
data-engineering
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Tranquilo
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.