feat(metadata): MDT posting-block schema foundation for vector index#19300
Open
chrevanthreddy wants to merge 1 commit into
Open
feat(metadata): MDT posting-block schema foundation for vector index#19300chrevanthreddy wants to merge 1 commit into
chrevanthreddy wants to merge 1 commit into
Conversation
This was referenced Jul 15, 2026
Collaborator
Add the Metadata Table storage foundation for native vector search: - HoodieMetadata.avsc: vector index record types (centroids, quantizer, manifest, cluster stats, posting block, posting delta, tombstone) - HoodieMetadataPayload: VectorIndexMetadata field, entry-type constants, serde - MetadataPartitionType.VECTOR_INDEX partition type + record-type wiring - HoodieTableMetadataUtil: vector posting key -> file-group mapping - posting block codec (PostingBlockBuilder/View, structure-of-arrays) - vector index options/type/metric enums - MDT raw keys (VectorIndexMetadataKey, posting prefix, cluster, manifest) Tests: TestVectorDistanceMetric, TestVectorIndexMetadataKey, TestVectorIndexMetadataPayload (17 cases). Existing HoodieMetadataRecord all-args callers updated for the appended field. Compiles + tests green standalone on current master (hudi-common, JDK17). Part of apache#19094; resolves apache#19097.
chrevanthreddy
force-pushed
the
rfc-104-foundation
branch
from
July 15, 2026 18:03
5745d40 to
c44471c
Compare
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.
Describe the issue this Pull Request addresses
Adds the Metadata Table (MDT) storage foundation for native vector search proposed in RFC-104 (umbrella #19094): the Avro record types, payload wiring, partition type, and posting-block codec that later PRs (encoder, bootstrap, read path) build on.
Closes #19097
Summary and Changelog
Users gain no behavior change yet; this establishes the on-disk/serde contract for the vector index so subsequent PRs can encode, write, and read it.
Changes (all in
hudi-common, additive):HoodieMetadata.avsc: seven vector index record types — centroids, quantizer, manifest, cluster stats, posting block, posting delta, tombstone.HoodieMetadataPayload: newVectorIndexMetadatafield, entry-type constants, and serde for the vector records (co-exists with existing record-index logic).MetadataPartitionType.VECTOR_INDEX: new partition type plus record-type wiring.HoodieTableMetadataUtil: posting-key → file-group mapping.PostingBlockBuilder/PostingBlockView(structure-of-arrays packing of ~1–4K vectors per record).VectorIndexOptions,VectorIndexType,VectorDistanceMetric.VectorIndexMetadataKey,VectorPostingPrefixRawKey,VectorClusterRawKey,VectorGenerationManifestRawKey.TestVectorDistanceMetric,TestVectorIndexMetadataKey,TestVectorIndexMetadataPayload(17 cases). ExistingHoodieMetadataRecordall-args callers (TestAvroRecordSizeEstimator,TestBufferedRecordSerializer) updated for the appended field.Impact
Adds one nullable field (
VectorIndexMetadata) to theHoodieMetadataRecordAvro schema and a newMetadataPartitionType. The field is optional/defaulted, so existing MDT records and readers are unaffected; the new partition type is inert until a vector index is created (later PRs). No public API removed. No performance impact on existing partitions.Risk Level
low
Schema change is purely additive (new nullable field + new record types + new partition type), exercised by unit tests; existing metadata read/write paths are untouched apart from the appended constructor arg, which is covered by the updated tests. Full
hudi-commoncompiles and tests pass on current master under JDK17.Documentation Update
none (user-facing docs land with the feature-complete read/write PRs). The design is documented in RFC-104 (#19291).
Contributor's checklist