should control the maximum memory usage

Open
#736 0 comments 0 reactions 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 with ArrowVectorIterator::consume and the existing targetBatchSize handling. Determine how a maxBufferSize limit should interact with record-batch construction, then define tests for large variable-length values; done means iteration respects the memory limit without requiring an oversized batch.

Written by the indexing model from the issue text.

Description

Type: enhancement
Describe the enhancement requested

ArrowVectorIterator::consume only concern about the ArrowVectorIterator#targetBatchSize but not the memory used.

Let's suppose a scenario:

  1. A database table with a longtext field;
  2. All of the rows in the table are larger than 500M;
  3. ArrowVectorIterator#targetBatchSize is 256;

We need at least for 125G memory to get one record batch.

So I think it's better add a parameter such as maxBufferSize to control the memory usage.

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.