apache / apache/datafusion-python

from_pycapsule! / try_from_pycapsule! macros don't support dunder methods that take arguments

Aperta
#1,669 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
604
Fork
174
Merge medio
1g 7h
PR unite (30g)
4

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start in context.rs at register_table_factory and inspect the from_pycapsule! and try_from_pycapsule! definitions. Compare them with table_provider_from_pycapsule in crates/util/src/lib.rs, then clarify the intended argument-passing shape before changing the macros or adding a helper.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, rust
Ambito
backend-api-design
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.