Project Hive Partition Columns With ProjectionExec
- Lingua principale
- Rust
- Stelle
- 9.3k
- Fork
- 2.4k
- Merge medio
- 3g 11h
- PR unite (30g)
- 360
Descrizione
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
Part of #2079
Currently the values of Hive partitions are projected within each of the various file format specific physical operators. As described in #2079 this has a number of drawbacks
**Describe the solution you'd like**
Rather than handling partition projection within the file scan operator, I would like to propose modifying `ListingTable` to add a `ProjectionExec` within `TableProvider::scan` instead of relying on the `FileFormat` implementations to do this. This `ProjectionExec` would be created with a set of literal expressions corresponding to the partition values
Therefore instead of `TableProvider::scan` generating something like
```
AvroExec:
```
It would generate
```
UnionExec
ProjectionExec: ... // Partition 1
AvroExec: ...
ProjectionExec: ... // Partition 2
AvroExec: ...
```
Note: this will depend on #2289
**Describe alternatives you've considered**
The logic could instead be moved to `FileFormat::create_physical_plan` implementations, but I think it would be better to keep what is a catalog detail close to the catalog implementation.
FYI @matthewmturner @yjshen @rdettai
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia leggendo ListingTable e TableProvider::scan, quindi esamina le implementazioni di FileFormat::create_physical_plan e la dipendenza in #2289. Traccia il modo in cui i valori delle partizioni Hive vengono attualmente proiettati e come vengono assemblati ProjectionExec e UnionExec. Il lavoro è completato quando la proiezione delle partizioni viene gestita da ListingTable anziché da operatori fisici specifici del formato di file e la struttura del piano proposta funziona per più partizioni.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- databases
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100