Repository navigation
Add optimized Parquet support and selective dataset reads - #481
Merged
Merged
Conversation
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.
Hugging Face optimized downloads are standard Parquet, but Matrix previously decoded every field through Group records, could not use caller predicates for page pruning, and mishandled several external logical types. This implements the reviewed plan for matrix-parquet 0.8.0, including migration coverage for existing Matrix files.
Modules touched: matrix-parquet; shared cookbook/tutorial and the release-tools workflow.
Validation passed:
The Parquet suite reports 137 tests, 132 passed, zero failures and five intentional opt-in benchmark/capture skips; default-size CDC ran. Arrow 21.0.0 verified annotated strings, binary, decimals and metadata-preserving CDC rewrites, then Java reread them. Fixture regeneration and the 12 offline huggingface_hub 2.2.0 URL cases are deterministic. The consumer compile probe excludes parquet-java/Hadoop from its compile classpath.
Local million-row comparisons measured 89.5% lower wide-scan median time and 43.8% lower categorical sampled live heap; mixed/nested time also improved. Independent page-index, bloom and HTTP byte counters demonstrate pruning without timing assertions. See benchmark methods/results and task evidence.
Native CDC writing remains deferred to apache/parquet-java#3818; the documented PyArrow rewrite is verified. Hadoop remains a runtime dependency because the codec-exclusion spike found upstream Hadoop linkage even for UNCOMPRESSED initialization. Original 0.7.x byte[] writing fails with InvalidSchemaException in the pinned checkout; the legacy
[Btext fixture is explicitly synthetic and no original bytes are claimed recoverable.Review fixes in 0d71ce5 address all thirteen findings: empty Arrow dictionaries; JSON/ENUM text; bulk ranges, redirect reuse and usable cache bounds; common static URL/Hub/directory routing; atomic file replacement; consistent source/index handling; shared column type descriptors; null map defaults; daemon workers; dot-segment rejection; projection around legacy
[Bcolumns; and corrected documentation.The new regression coverage includes a 1 MiB range served in one data request, repeated-range cache reuse, exact preservation of existing output bytes after mid-write decimal failures, and common index policy across collected and limited shard batches. Ordered module checks, the Python CDC lane and full repository suite passed. Review tasks and verification.
Follow-up review fixes preserve normal umask permissions for new output, retain existing symbolic
links while replacing their resolved targets, document the atomic-move filesystem requirement,
and avoid the extra scratch-buffer allocation for array-backed HTTP range reads. Added POSIX
permission/symlink and sliced/direct ByteBuffer regressions. Re-ran static analysis, formatting,
the full Parquet suite (137 tests: 132 passed, five intentional skips), Python interoperability,
consumer API compilation and
./gradlew test -Pheadless=truesuccessfully.Dangling symbolic links (relative/absolute and chained) now create their resolved target without
replacing the links; cyclic links fail before temporary output is created. The module guide also
explains leftover temporary siblings after abrupt JVM termination. Static analysis, formatting,
the Parquet suite (137 tests: 132 passed, five intentional skips), consumer compilation and the
full repository suite passed again; the new POSIX regressions ran successfully.
The merge-time Linux CI run exposed a stale BOM pin;
matrix-bom/bom.xmlnow referencesmatrix-parquet:0.8.0-SNAPSHOT, matching the module. Additional local verification passed:BOM_VERIFY_REPO=/private/tmp/matrix-pr481-bom-verify RUN_EXTERNAL_TESTS=false RUN_SLOW_TESTS=false GRADLE_OPTS=-Dorg.gradle.workers.max=2 bash matrix-bom/verifyBomApi.sh groovy scripts/release-all/test-manifest-verifier.groovy . /private/tmp/matrix-pr481-bom-verifyThis verified isolated publishing/resolution, 15 module tests, 27 API integration tests and the
manifest verifier's 21 unreleased release-coordinate fixtures with read-only staging.