Add ranged-read support to PinotFS#18861
Open
davecromberge wants to merge 3 commits into
Open
Conversation
Add additive default methods openForRead(uri, offset, length) and supportsRangedRead() to the PinotFS SPI. Defaults throw / return false so existing implementations are unaffected. Implement for LocalPinotFS (via RandomAccessFile) and GcsPinotFS (via ReadChannel seek/limit), enabling targeted reads of byte ranges (e.g. Parquet footers and column chunks) without downloading whole objects. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
davecromberge
added a commit
to permutive-engineering/pinot
that referenced
this pull request
Jun 26, 2026
Add additive default methods openForRead(uri, offset, length) and supportsRangedRead() to the PinotFS SPI (default-throws / false, so existing implementations are unaffected). Implemented for LocalPinotFS (RandomAccessFile) and GcsPinotFS (ReadChannel seek/limit), enabling targeted byte-range reads (e.g. Parquet footers and column chunks) without downloading whole objects. Upstream PR: apache#18861 (open) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18861 +/- ##
============================================
+ Coverage 64.79% 64.81% +0.01%
- Complexity 1322 1347 +25
============================================
Files 3393 3392 -1
Lines 211265 211669 +404
Branches 33212 33304 +92
============================================
+ Hits 136896 137185 +289
- Misses 63320 63419 +99
- Partials 11049 11065 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
NoClosePinotFS (the wrapper PinotFSFactory returns for every registered scheme) delegated each PinotFS method except the new openForRead / supportsRangedRead, so a factory-obtained FS reported no ranged-read support and threw on openForRead even when the underlying FS supports it. Delegate both to the wrapped FS. Completes the ranged-read SPI added in this branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
davecromberge
added a commit
to permutive-engineering/pinot
that referenced
this pull request
Jun 29, 2026
Delegate openForRead / supportsRangedRead through NoClosePinotFS so a PinotFSFactory-obtained FS (always NoClose-wrapped) actually supports ranged reads. Follow-up to the ranged-read SPI carry (569604a). Upstream PR: apache#18861 (open) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
xiangfu0
reviewed
Jun 30, 2026
xiangfu0
left a comment
Contributor
There was a problem hiding this comment.
Found a high-signal issue; see inline comment.
openForRead() called blob.reader() without the null check that open() already performs, so a ranged read against a missing GCS object threw NullPointerException instead of the SPI's FileNotFoundException contract. Mirror open()'s null check and add missing-object regression tests. Addresses review feedback on apache#18861. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
davecromberge
added a commit
to permutive-engineering/pinot
that referenced
this pull request
Jul 2, 2026
Null-check the blob in GcsPinotFS.openForRead so a ranged read against a missing GCS object throws FileNotFoundException instead of NPE, matching the SPI contract. Follow-up to the ranged-read SPI carry (569604a, b398c44). Scoped to the openForRead regression test only: release-1.5.0 predates the upstream open()/copy() null-safety fixes, so those tests (and open()'s own null check) are not present on this branch. Upstream PR: apache#18861 (open) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Description
Adds an additive ranged-read capability to the PinotFS SPI so callers can read a specific byte range of a file without downloading the whole object.
implementations remain source- and binary-compatible — no behavior change unless an implementation opts in.
Motivation
Enables targeted reads of file regions (e.g. Parquet footers and column chunks) for engines/plugins that query columnar data in place, avoiding full-object transfers.
Testing
LocalPinotFSTest covers mid-range, from-start, EOF truncation, zero-length, whole-file, and invalid-argument cases (runs in CI). GcsPinotFSTest adds a ranged-read case (credentials-gated, consistent with the existing GCS integration test).
PR Tags
featureperformancerelease-notes: