Repository navigation
GH-390: Refresh vector lookup when synchronizing the schema - #1389
Open
hutiefang76 wants to merge 1 commit into
Open
hutiefang76 wants to merge 1 commit into
hutiefang76 wants to merge 1 commit into
Conversation
Promoted child types change Field equality, leaving the lookup cache keyed by the old schema. Rebuild the cache when the schema changes so Field-based lookups and JSON serialization resolve the current vectors. Generated-by: Codex and DeepSeek
hutiefang76
requested review from
jbonofre,
laurentgo,
lidavidm and
wgtmac
as code owners
October 24, 2026 08:37
|
Thank you for opening a pull request! Please label the PR with one or more of:
Also, add the 'breaking-change' label if appropriate. See CONTRIBUTING.md for details. |
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.
What's Changed
After a child type is promoted,
syncSchema()updates the schema but leaves the vector lookup keyed by the oldFieldvalues. Looking up a vector using the new schema returns null, andJsonFileWriterthen throws a NullPointerException. Refresh the Field-keyed lookup in the schema-change branch, preserving vector identity and ordering.Add regressions using two rows of promoted nested-list data: direct lookup verifies the new Field, removal of the stale key, unchanged values and row count, and a second synchronization that makes no change. A real JSON write/read round trip verifies the schema and both nested row values. The unchanged implementation fails the lookup assertion and throws in the writer.
Validation on JDK 21:
mvn -B -ntp -Dmaven.gitcommitid.nativegit=true -pl vector -am verifypassed, including dependency modules.TestVectorSchemaRootcases passed in each execution without skips.Closes #390.
Maintainer note: the CI workflows are
action_required, and my account cannot add repository labels. Please addbug-fixand approve the runs when appropriate. Remote CI and maintainer review remain pending.AI-generated PR description. Investigation, implementation and automated review assisted by Codex and DeepSeek.