[KYUUBI #7245] Fix arrow batch converter error #7246
+7
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are the changes needed?
Control the amount of data to prevent memory overflow and increase to initial speed.
When
kyuubi.operation.result.format=arrow,spark.connect.grpc.arrow.maxBatchSizedoes not work as expected.Reproduction:
You can debug
KyuubiArrowConvertersor add the following log to line 300 ofKyuubiArrowConverters:Test data: 1.6 million rows, 30 columns per row. Command executed:
Log output
Original Code
When the
limitis not set, i.e.,-1, all data will be retrieved at once. If the row count is too large, the following three problems will occur:(1) Driver/executor oom
(2) Array oom cause of array length is not enough
(3) Transfer data slowly
After updating the code, the log output is as follows:
The estimatedBatchSize is slightly larger than the maxEstimatedBatchSize. Data can be written in batches as expected.
Fix #7245.
How was this patch tested?
Test data: 1.6 million rows, 30 columns per row.
Was this patch authored or co-authored using generative AI tooling?
No