GH-39789: [Go][Parquet] Close current row group when finished writing unbuffered batch#43326
Merged
zeroshade merged 1 commit intoapache:mainfrom Jul 19, 2024
Merged
Conversation
|
|
zeroshade
approved these changes
Jul 19, 2024
|
After merging your PR, Conbench analyzed the 0 benchmarking runs that have been run so far on merge-commit ed67a42. None of the specified runs were found on the Conbench server. The full Conbench report has more details. |
zeroshade
pushed a commit
to apache/arrow-adbc
that referenced
this pull request
Jul 29, 2024
…rgetSize on ingestion (#2026) Fixes: #1997 **Core Changes** - Change ingestion `writeParquet` function to use unbuffered writer, skipping 0-row records to avoid recurrence of #1847 - Use parquet writer's internal `RowGroupTotalBytesWritten()` method to track output file size in favor of `limitWriter` - Unit test to validate that file cutoff occurs precisely when expected **Secondary Changes** - Bump arrow dependency to `v18` to pull in the changes from [ARROW-43326](apache/arrow#43326) - Fix flightsql test that depends on hardcoded arrow version
lidavidm
pushed a commit
to adbc-drivers/snowflake
that referenced
this pull request
Oct 9, 2025
…(#2026) Fixes: #1997 **Core Changes** - Change ingestion `writeParquet` function to use unbuffered writer, skipping 0-row records to avoid recurrence of #1847 - Use parquet writer's internal `RowGroupTotalBytesWritten()` method to track output file size in favor of `limitWriter` - Unit test to validate that file cutoff occurs precisely when expected **Secondary Changes** - Bump arrow dependency to `v18` to pull in the changes from [ARROW-43326](apache/arrow#43326) - Fix flightsql test that depends on hardcoded arrow version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rationale for this change
Fixes: #39789
The number of bytes reported by
FileWriter.RowGroupTotalBytesWritten()was consistently lower than the actual bytes in the output buffer, if it was read before closing the writer. The issue is that the last column's data page was not flushed until the entire writer was closed, causing it's bytes not to be included in the total. By closing the row group writer before returning fromWrite(), we can ensure all pages are flushed and the totalBytesWritten will be accurate.What changes are included in this PR?
FileWriter.Write()Are these changes tested?
Yes
Are there any user-facing changes?
FileWriter.RowGroupTotalBytesWritten()will be accurate when read while still writing to the file.