Support parquet write from Arrow record batch

Open
#735 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java

Research direction

Start by reviewing the existing ArrowReader-based Parquet writing path and the proposed ArrowBatchParquetWriter API. Compare its needs with Arrow's WriteRecordBatch interface and RecordBatch usage. Done means callers can write multiple record batches incrementally and explicitly close the Parquet output without requiring an ArrowReader.

Written by the indexing model from the issue text.

Description

Type: enhancement
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 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
Just to as a show case, the api may look like:

public class ArrowBatchParquetWriter {
   void write(RecordBatch recordbatch);
   void close()
}
Dominant language
Java
Stars
95
Forks
154
Avg merge
2d 10h
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow-java

All issues in apache/arrow-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.