Repository navigation
feat(vector): add dedicated Vortex storage for append-only tables - #438
Open
ChaomingZhangCN wants to merge 2 commits into
Open
ChaomingZhangCN wants to merge 2 commits into
ChaomingZhangCN wants to merge 2 commits into
Conversation
This branch has not been deployed
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.
Purpose
Linked issue: None.
Add dedicated Vortex storage for a single top-level VECTOR column in append-only tables, building on the Vortex format support in #376. With
vector.file.format=vortex, ordinary columns are written to Parquet main files and the VECTOR column is written to.vector.vortexfiles. Both files cover the same row range and are read together through the existing data-evolution reader.The dedicated mode requires:
vector.target-file-size, defaulting totarget-file-size.Separately, allow VECTOR columns in ordinary
file.format=vortextables. Validate visible VECTOR elements using ancestor validity before normalizing hidden NULL slots for Vortex import, so NULL STRUCT/LIST ancestors do not cause valid writes to fail. Visible NULL elements are still rejected for non-nullable VECTOR elements.This is a scoped implementation of dedicated VECTOR storage; it does not claim complete feature parity with Paimon Java.
Tests
Java interoperability is tested using checked-in files actually written and read back by Paimon Java
2.2-SNAPSHOTat commit7d6d146bbaf33a349dc83c3caf71334bd551e3d5(Vortex JNI0.73.0). The fixture contains two append commits, six rows including two NULL vectors, and two Parquet/Vortex file pairs. Its generator, runtime dependency POM, provenance, and reproduction commands are included.DataEvolutionTableTest.TestReadJavaDedicatedVectorStorereads the fixture without rewriting it and verifies full rows, ordinary-column and VECTOR-only projections, row ranges crossing commits, and paired file metadata (firstRowId, row counts, andwriteCols).VortexFileFormatTest.WriteThenReadVectorsWithNullAncestorscovers NULL STRUCT/LIST parents, batch boundaries, multiple read batch sizes, and rejection of the same invalid elements when the ancestors become visible. The NULL-ancestor regression fails before the fix and passes afterward.Local validation on macOS aarch64, C++17 Debug, with Vortex enabled:
dff3266paimon-data-evolution-table-testafter the fixpaimon-vortex-format-testafter the fixpaimon-write-and-read-inte-test --gtest_filter='Vortex*'after the fixgit diff --checkWhole-file clang-format was skipped to preserve unrelated existing formatting; new C++ files and modified lines were checked with clang-format
20.1.8. The existing local macOS build uses temporary dependency/link workarounds and still emits duplicate-library and deployment-target linker warnings. Linux CI, the repository-wideunittesttarget, sanitizers, and C++-written data read by Java have not been run.API and Format
Options::VECTOR_FILE_FORMATandOptions::VECTOR_TARGET_FILE_SIZEininclude/paimon/defs.h..vector.vortexnaming and data-evolution metadata (writeCols,firstRowId, and row counts); no new manifest version or protocol is introduced.vector.file.format=vortex; schemas and write contexts are validated before using this writer.Documentation
docs/source/user_guide/data_types.rstwith Vortex VECTOR support, dedicated-mode prerequisites, limitations, and paired rolling behavior.test/test_data/vortex/dedicated_vector_java_compat.db/dedicated_vector_java_compat/README.md.Generative AI tooling
Generated-by: OpenAI Codex (codex-cli 0.162.0-alpha.17.2).