Simplified filter expression has a Null type instead of Int64 type across the FFI layer
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Ambito
- backend, data-engineering
Direzione di ricerca
Inizia con l’MRE collegato, in particolare con repro.py e la directory repro_provider, quindi confronta i branch main e datafusion52. Esegui i passaggi maturin develop e python repro.py per riprodurre il panic di LIMIT 5, quindi esegui il cargo test corrispondente per SELECT * FROM dummy_table WHERE a < 5 per confrontare il comportamento con e senza il livello FFI. Il lavoro è completato quando la query FFI riesce senza l’assertion Null-versus-Int64.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
A custom table provider for a ParquetSource with a trivial catalog and an Int64 column yields some errors when a SQL query has a filter with a literal limit on that column of the form
assertion `left == right` failed: Simplified expression should have the same data type as the original
left: Null
right: Int64
The error does not occur when using datafusion-python 52; it also does not occur when running the query purely in a Rust SessionContext; the backtrace for the above error shows it coming from datafusion-ffi code as well.
This may of course not be a bug, but instead some bad practice that the version 52 set of crates tolerates but which is now invalid. A MRE of this custom table provider can be found in the public repo https://github.com/jwimberl/datafusion_python_53_int64filter_repro, which contains
- a non-working datafusion53 version (in branch main)
- a baseline working version (in branch datafusion52)
and a canned dummy dataset. The README.md of this repo has more details.
To Reproduce
In the main branch, build the py_repro_provider crate with maturin develop and run python repro.py. This loads the dummy dataset as a table dummy_table and runs two queries
SELECT * FROM dummy_table LIMIT 1, which is successfulSELECT * FROM dummy_table LIMIT 5, which panics
Itss output should be something like
Successful query:
a b
0 0 42
Unsuccesful query:
thread '<unnamed>' panicked at /home/jwimberley/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/datafusion-physical-expr-53.1.0/src/simplifier/mod.rs:76:17:
assertion `left == right` failed: Simplified expression should have the same data type as the original
left: Null
right: Int64
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
followed by backtrace information.
Expected behavior
In the datafusion52 branch, build thepy_repro_provider with maturin develop and run python repro.py. It runs the same two queries, and its output should be
Successful query:
a b
0 0 42
Also successful query:
a b
0 0 42
1 1 42
2 2 42
3 3 42
4 4 42
Additional context
In either the main branch or datafusion52 branch, the Rust code for the table provider is in the directory repro_provider, and there is a corresponding cargo test that runs SELECT * FROM dummy_table WHERE a < 5. Without the FFI layer, this is successful with both datafusion 52 and 53.
- Lingua principale
- Python
- Stelle
- 605
- Fork
- 176
- Merge medio
- 1g 23h
- PR unite (30g)
- 8
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/datafusion-python
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/datafusion-python#1726 ·
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 88/100
apache/datafusion-python#1691 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/datafusion-python#1644 ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
apache/datafusion-python#1737 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
apache/datafusion-python#1735 · 1 commento ·
Tutte le issue di apache/datafusion-python
Issue simili
-
Add: hunch Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
DiamondLightSource/dodal#2211 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
openml/openml-python#1749 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
sipyourdrink-ltd/bernstein#6191 ·