[eslib] Do not require build-time es-index options when reading persisted indexes - #9969
Merged
JingsongLi merged 1 commit intoSep 19, 2026
Conversation
…sted indexes ESIndexGlobalIndexer parsed ESIndexOptions eagerly in its constructor, so an ARRAY<FLOAT> es-index whose dimension was only passed to the build procedure could not be read: the core read paths create the indexer from the table options alone and failed with "requires a positive dimension" before the reader could use the field configuration persisted in the index metadata. Defer the parse failure to createWriter, which re-parses the options and keeps the same fail-fast message for builds. The reader now accepts a null fallback and only requires the current options for legacy offset-only metadata that does not persist the field configuration. The configured vector metric is resolved from the options directly so metric() stays available before a reader is registered. Generated-by: Claude Code
Contributor
|
+1 |
XiaoHongbo-Hope
pushed a commit
that referenced
this pull request
Sep 20, 2026
thswlsqls
deleted the
fix/eslib-read-persisted-index-without-build-options
branch
September 21, 2026 07:09
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
fix #9968
ARRAY<FLOAT>es-index whosedimensionis passed only throughsys.create_global_index(... options => ...)fails everyvector_search,full_text_searchand companion-columnWHEREquery with "Vector field 'embedding' requires a positive dimension":ESIndexGlobalIndexerparsesESIndexOptionsin its constructor, while the core read paths create it from the table options only.createWriter, so invalid build options still fail there with the same message instead of in the constructor.ESIndexGlobalIndexReaderuses the persisted field configuration and requires the current options only for legacy offset-only metadata.metric()works before a reader is registered.Tests
ESIndexVectorMetricTest#readerDoesNotRequireCurrentOptionsToDescribeBuild,#writerStillRejectsOptionsThatCannotDescribeBuild,#legacyMetadataStillRequiresCurrentOptions; all three fail on master in theESIndexGlobalIndexerconstructor.mvn -Ppaimon-eslib -pl paimon-eslib clean install(JDK 11, checkstyle and spotless included): BUILD SUCCESS, 0 failures;ESIndexVectorMetricTest7/7.