For discussion: Add suffixStart option to parquetMetadataAsync - #142
Open
ryan-williams wants to merge 1 commit into
Open
For discussion: Add suffixStart option to parquetMetadataAsync#142ryan-williams wants to merge 1 commit into
suffixStart option to parquetMetadataAsync#142ryan-williams wants to merge 1 commit into
Conversation
Allows caller to specify exact start offset for the footer fetch, instead of calculating from `initialFetchSize`. Useful when the caller knows exactly what data they have cached (e.g., after a refresh fetch from a known byte offset). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ryan-williams
marked this pull request as ready for review
December 5, 2025 02:07
Collaborator
|
Hey @ryan-williams thanks for the PR! I like this idea. I need to think a little about the API. Something about the name |
Author
|
The new API receives an offset (from start), instead of a size (from end), so this isn't right:
That's what it does today, reads the last I want to be able to say "skip N bytes and then read to the end, bc I already know where the footer (or last row-group) begins". |
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.
Adds a
suffixStartoption toparquetMetadataAsyncthat allows the caller to specify a byte offset to start fetching from (instead of fetching the lastinitialFetchSizebytes).It's analogous to fetching bytes
[idx:](idxto EOF) instead of[-n:](current behavior: lastnbytes).Motivation: polling append-only Parquet files
I built a dashboard that reads from append-only Parquet files in S3:
initialFetchSizedoesn't let me express that directly.Example usage
From runsascoded/awair parquetCache.ts:
Changes
suffixStartoption toMetadataAsyncOptionsbyteLength - initialFetchSizeHappy to discuss whether this is the right API shape, or whether it's too niche of a use-case to bother including here.
I also used runsascoded/gh-pnpm-dist to publish
6d0c51c(fromb81f95d), including this change, which I then use in my dashboard, so I'm not blocked on upstreaming this.