apache / apache/datafusion-python
from_pycapsule! / try_from_pycapsule! macros don't support dunder methods that take arguments
- Linguagem predominante
- Python
- Estrelas
- 604
- Forks
- 174
- Merge médio
- 1d 7h
- PRs com merge (30d)
- 4
Descrição
Split out from #1577 (item 5).
The inline decode that item 5 points at (`register_table_factory` in `context.rs`) calls `__datafusion_table_provider_factory__` with the logical-extension-codec capsule as an argument. The existing `from_pycapsule!` / `try_from_pycapsule!` macros always call the dunder with `call0()`, so this call site can't be folded into them as-is.
Fitting it into the macro would need either a variant that accepts call arguments, or a separate `Option`-returning helper like `table_provider_from_pycapsule` in `crates/util/src/lib.rs`, which already has the same argument-passing shape.
Leaving this open rather than changing the behavior of that registration path without input from whoever knows the intended macro shape.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
Comece em context.rs, em register_table_factory, e inspecione as definições de from_pycapsule! e try_from_pycapsule!. Compare-as com table_provider_from_pycapsule em crates/util/src/lib.rs e, em seguida, esclareça o formato pretendido para a passagem de argumentos antes de alterar as macros ou adicionar um helper.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python, rust
- Domínio
- backend-api-design
- Tipo de issue
- Funcionalidade
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Status de atividade
- Pouca atividade
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100