Skip to content

feat: support BlobDescriptor with version 2#290

Merged
lszskye merged 5 commits into
alibaba:mainfrom
lszskye:blob_read
May 20, 2026
Merged

feat: support BlobDescriptor with version 2#290
lszskye merged 5 commits into
alibaba:mainfrom
lszskye:blob_read

Conversation

@lszskye
Copy link
Copy Markdown
Collaborator

@lszskye lszskye commented May 19, 2026

Purpose

support BlobDescriptor with version 2

Linked issue: #283

Tests

BlobTableInteTest

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for BlobDescriptor serialization/deserialization version 2 (with a magic header) and extends integration/unit tests plus fixture tables to validate multi-blob reading and Java compatibility.

Changes:

  • Introduce BlobDescriptor v2 format (adds magic header) and a helper IsBlobDescriptor.
  • Update BlobDescriptor unit tests for v1/v2 Java compatibility and new identifier checks.
  • Add parquet/orc fixture tables + a new integration test for reading tables with multiple blob columns.

Reviewed changes

Copilot reviewed 14 out of 34 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/paimon/common/data/blob_descriptor.h Documents v2 layout, bumps current version to 2, adds APIs (Create(version,...), IsBlobDescriptor) and MAGIC.
src/paimon/common/data/blob_descriptor.cpp Implements v2 serialization (writes magic), v1/v2 deserialization, and IsBlobDescriptor.
src/paimon/common/data/blob_descriptor_test.cpp Splits Java compatibility tests for v1/v2 and adds IsBlobDescriptor test coverage.
test/inte/blob_table_inte_test.cpp Adds integration test to read multi-blob fields and validate null handling + row range scanning.
test/test_data/**/append_table_with_multi_blob.db/** Adds parquet/orc fixture dataset (schema/snapshot/readme) used by the integration test.
Comments suppressed due to low confidence (1)

src/paimon/common/data/blob_descriptor.cpp:1

  • The new version check only enforces an upper bound. This will accept version <= 0 and then parse using the v1 branch (no magic), which is very likely unintended and can cause mis-parsing of arbitrary bytes. Add a lower-bound validation (e.g., require version to be 1 or 2) and return Status::Invalid for unsupported/negative versions.
/*

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/paimon/common/data/blob_descriptor.cpp Outdated
Comment thread src/paimon/common/data/blob_descriptor.cpp Outdated
Comment thread src/paimon/common/data/blob_descriptor.cpp Outdated
Comment thread src/paimon/common/data/blob_descriptor.h Outdated
Comment thread src/paimon/common/data/blob_descriptor.h Outdated
Comment thread src/paimon/common/data/blob_descriptor.cpp
Comment thread src/paimon/common/data/blob_descriptor.h
Comment thread src/paimon/common/data/blob_descriptor.h Outdated
Comment thread src/paimon/common/data/blob_descriptor_test.cpp Outdated
Comment thread test/inte/blob_table_inte_test.cpp
Comment thread src/paimon/common/data/blob_descriptor.cpp Outdated
Comment thread src/paimon/common/data/blob_descriptor.cpp
Comment thread src/paimon/common/data/blob_descriptor_test.cpp
Comment thread src/paimon/common/data/blob_descriptor_test.cpp
Comment thread test/inte/blob_table_inte_test.cpp
Copy link
Copy Markdown
Collaborator

@lxy-9602 lxy-9602 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@lszskye lszskye merged commit e80cfaa into alibaba:main May 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants