Should `PruningPredicate` coerce?
- Lingua principale
- Rust
- Stelle
- 9.3k
- Fork
- 2.4k
- Merge medio
- 3g 11h
- PR unite (30g)
- 360
Descrizione
### Describe the bug
Currently when you pass a pruning predicate where the predicate has a different type as the targeted column it will not prune it, even though in theory the value is castable to the target column type.
The predicate looks like this: "month_id = '202502' AND date_id = '20250226'"
However the columns are `int` column not `utf8`. So in theory these string values can be casted to int but I don't believe this is happening. Is this something that should be added
This is our rust code btw
```
// delta-rs/crates/core/src/delta_datafusion/mod.rs
let pruning_predicate = PruningPredicate::try_new(predicate.clone(), logical_schema.clone())?;
let files_to_prune = pruning_predicate.prune(self.snapshot)?;
```
### To Reproduce
Related delta-rs issue: https://github.com/delta-io/delta-rs/issues/3278#issuecomment-2691264921
### Expected behavior
Allow literal value coercion during pruning
### Additional context
_No response_
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia in delta-rs/crates/core/src/delta_datafusion/mod.rs e segui PruningPredicate::try_new seguito da prune usando il predicato mostrato nell’issue. Verifica come vengono gestiti i letterali stringa e le colonne int non corrispondenti, quindi verifica che una coercizione sicura dei letterali abiliti il pruning senza modificare i risultati validi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- data-engineering
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100