Repository navigation
feat(blob): read Paimon video files #601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
XiaoHongbo-Hope
wants to merge
19
commits into
apache:main
Choose a base branch
from
XiaoHongbo-Hope:codex/video-read-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e215adb
feat(blob): read Paimon video files
XiaoHongbo-Hope b4bbe8d
fix(blob): avoid copying optional video read requests
XiaoHongbo-Hope d90c80b
fix(blob): preserve video frame identity and descriptor ABI
XiaoHongbo-Hope a231733
fix(blob): bound video index memory before decoding
XiaoHongbo-Hope c722c4c
fix(blob): bound video row selection and clarify legacy layout errors
XiaoHongbo-Hope 2d701f3
fix(blob): reject ambiguous v1 video layouts
XiaoHongbo-Hope 2a7792d
docs(blob): shorten video read guidance
XiaoHongbo-Hope 7b5f393
test(blob): simplify legacy video layout coverage
XiaoHongbo-Hope 7bd6898
fix(blob): preserve video frame descriptors in blob views
XiaoHongbo-Hope 697f1cd
fix(blob): validate video layouts with one bounded index read
XiaoHongbo-Hope ace18f2
perf(blob): open data evolution blob files by row range
XiaoHongbo-Hope d71e30b
fix(blob): preserve video frame locations and enforce table declarations
XiaoHongbo-Hope abbdbb8
fix(blob): use a C++17 capture for lazy file readers
XiaoHongbo-Hope 4f7f408
fix(blob): preserve frame references across stream wrappers and inlin…
XiaoHongbo-Hope 1c19c12
fix(blob): reject ambiguous four-index video packs
XiaoHongbo-Hope 7e5cb7a
fix(blob): read the moov-based video layout directly
XiaoHongbo-Hope 37f9deb
style(blob): satisfy clang-tidy in varint decoding
XiaoHongbo-Hope 35d2593
fix(blob): handle video-only deltas and release video reader resources
XiaoHongbo-Hope b4848ea
fix(blob): align video delta rows and preserve fallback metadata
XiaoHongbo-Hope File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <cstdint> | ||
|
|
||
| #include "paimon/fs/file_system.h" | ||
|
|
||
| namespace paimon { | ||
|
|
||
| /// A stream whose position zero can be at an offset in the file identified by GetUri(). | ||
| /// Wrappers that preserve positions forward the backing stream's file offset. | ||
| class PAIMON_EXPORT FileOffsetInputStream : public InputStream { | ||
| public: | ||
| ~FileOffsetInputStream() override = default; | ||
|
|
||
| /// Returns the nonnegative backing-file offset of position zero. | ||
| virtual Result<int64_t> GetFileOffset() const = 0; | ||
|
|
||
| /// Ordinary whole-file streams start at offset zero. | ||
| static Result<int64_t> GetFileOffset(const InputStream& stream); | ||
| }; | ||
|
|
||
| } // namespace paimon |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,6 +50,9 @@ class BlobDefs { | |
| /// Metadata value identifying a Paimon Blob extension type field. | ||
| static constexpr char kExtensionTypeValue[] = "paimon.type.blob"; | ||
|
|
||
| /// Java Paimon table option naming scalar BLOB fields stored as video frames. | ||
| static constexpr char kVideoFrameFieldOption[] = "video-frame-field"; | ||
|
SteNicholas marked this conversation as resolved.
Resolved
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the definition and parsing of the |
||
|
|
||
| /// A bin_length value of -1 in the index indicates a null blob entry. | ||
| static constexpr int64_t kNullBinLength = -1; | ||
| /// A bin_length value of -2 in the index indicates a placeholder blob entry, written by | ||
|
|
||
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you expose
VideoFrameDescriptorunderinclude/paimon/data/and remove the video-specific accessors fromBlob? Video callers can parse the frame descriptor directly and open itsPayload()through the existingBlobAPI.Blob::FromDescriptor()andToDescriptor()can then work withBlobDescriptoralone.