Support parquet write from Arrow record batch
- Lingua principale
- Java
- Stelle
- 94
- Fork
- 152
- Merge medio
- 3g 16h
- PR unite (30g)
- 11
Descrizione
### Describe the enhancement requested
I'm working on https://github.com/alibaba/fluss/issues/107 which enable convert Fluss arow structure data to Parquet directly but found the API missing in here.
Althogh [ARROW-11776](https://github.com/apache/arrow-java/commit/0318b07908f240a57f134e34b871786f6a168b6c) supports to write from ArrowReader to file, it read from the ArrowReader, write and close the file direclty. But it's in a very coarse-grained , we almost have no control about the writing. Sometime, we want to control when to close the written parquet. Also it requires `ArrowReader`, but if the arrow RecordBatch is read continuously from remote server . It's not easy to constuct a `ArrowReader`.
So, I think we may need to support the interface to write Arrow RecordBatch to Parquet via [virtual ::arrow::Status WriteRecordBatch(const ::arrow::RecordBatch& batch) = 0](https://github.com/apache/arrow/blob/c506b0806bd2b90410400d349a16bc4a5b1dd51c/cpp/src/parquet/arrow/writer.h#L125)
Just to as a show case, the api may look like:
```
public class ArrowBatchParquetWriter {
void write(RecordBatch recordbatch);
void close()
}
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Iniziare esaminando il percorso di scrittura Parquet esistente basato su ArrowReader e l’API ArrowBatchParquetWriter proposta. Confrontarne le esigenze con l’interfaccia WriteRecordBatch di Arrow e l’uso di RecordBatch. Il lavoro è completo quando i chiamanti possono scrivere più batch di record in modo incrementale e chiudere esplicitamente l’output Parquet senza richiedere un ArrowReader.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- data-engineering
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100