apache / apache/datafusion-python

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

Aberta
#1,670 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
604
Forks
174
Merge médio
2d 22h
PRs com merge (30d)
5

Descrição

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?

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Leia datafusion.user_defined.WindowEvaluator e crates/core/src/udwf.rs::RustPartitionEvaluator e, em seguida, revise as subclasses puramente Python em python/tests/test_udwf.py. Determine se uma ABC ainda é necessária e, em caso afirmativo, defina um contrato de abstração que cubra a matriz de flags documentada; considera-se concluído quando a direção solicitada estiver resolvida e refletida na issue ou no plano de implementação.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
python
Domínio
data-engineering
Tipo de issue
Funcionalidade
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Pouca atividade
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.