Repository navigation
Reject per-key OPEN_STRUCT settings that materialized keys silently ignore - #19687
Merged
Merged
Conversation
tarun11Mavani
approved these changes
Sep 28, 2026
Base automatically changed from
xiangfu0/codex/codec-stack/06-reload-enable
to
master
September 28, 2026 16:12
…gnore OPEN_STRUCT materialized keys honor only the per-key encodingType and the inverted, range and bloom indexes. The splitter replaces the per-key forward-index config with a dictionary-encoded or LZ4 raw one, FieldIndexConfigsUtil.fromFieldConfig skips the per-key dictionary config, and the compressionCodec, indexTypes, timestampConfig, properties and tierOverwrites fields are never read, at segment creation or on reload. Table-config validation now rejects each of those settings instead of dropping it silently, naming the OPEN_STRUCT column and the key or defaultValueFieldConfig. indexes.forward and indexes.dictionary may only restate what encodingType decides. The OpenStructIndexConfig Javadoc now lists the honored settings.
xiangfu0
force-pushed
the
xiangfu0/openstruct-perkey-validation
branch
from
September 29, 2026 13:00
b88a7bb to
e001205
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19687 +/- ##
=============================================
+ Coverage 39.77% 68.09% +28.31%
- Complexity 1449 1450 +1
=============================================
Files 3518 3518
Lines 228478 228516 +38
Branches 36201 36216 +15
=============================================
+ Hits 90881 155601 +64720
+ Misses 129364 60694 -68670
- Partials 8233 12221 +3988
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…the key is built
An enabled inverted index requires a dictionary, so a RAW key with one is
built dictionary-encoded. validatePerKeyDictionary compared
indexes.dictionary only against encodingType, so it rejected an accurate
`dictionary: {}` on such a key and accepted `dictionary: {disabled: true}`;
indexes.forward.encodingType had the same flaw. Both now compare against
the built outcome: dictionary-encoded when encodingType is DICTIONARY or
the inverted index is enabled.
A test pins inverted as the only vetted per-key index that requires a
dictionary, and new cases cover JSON-null fields and non-object forward and
dictionary blocks.
Jackie-Jiang
approved these changes
Sep 30, 2026
xiangfu0
added a commit
to pinot-contrib/pinot-docs
that referenced
this pull request
Sep 30, 2026
Clarifies honored OPEN_STRUCT per-key encoding and index settings, newly rejected ignored settings, and the effect on existing table-config updates. Follows apache/pinot#19687. Co-authored-by: Xiang Fu <xiangfu@Xiang-mac-mtv-2.local>
Contributor
Author
|
Documentation follow-up: pinot-contrib/pinot-docs#1076 (merged). This clarifies supported per-key OPEN_STRUCT settings and table-config validation. |
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.
PR flow
OPEN_STRUCT validation adds checks that reject per‑key settings not honored by materialized keys.
AI-generated · Green: added · Yellow: modified · Red: removed · Gray: existing
Diff evidence
Context
Follow-up to #19308 (merged), which started rejecting a per-key
codecSpecon OPEN_STRUCT keys. Rebased ontomasterafter #19608; its multi-value and nested-key changes apply per-key configs the same way, so the rules below hold for those keys too.Problem
An OPEN_STRUCT column materializes dense keys as child columns (e.g.
payload$clicks), each configured through a per-keyFieldConfiginvalueFieldConfigsordefaultValueFieldConfig. Only part of thatFieldConfigis honored; the rest is silently dropped:encodingTypeindexes.inverted,indexes.range,indexes.bloominvertedbuilds no inverted indexindexes.forwardOpenStructColumnSplitteralways builds a dictionary-encoded or LZ4 raw forward indexindexes.dictionaryFieldIndexConfigsUtil.fromFieldConfigderives the dictionary fromencodingTypecompressionCodec,indexTypes,timestampConfig,properties,tierOverwritesTraced through
OpenStructColumnSplitter.writeDenseKeyColumn/resolveUseDictionary(segment creation) andIndexLoadingConfig.withOpenStructChildConfigs→FieldIndexConfigsUtil.fromFieldConfig(reload, where the inverted, range and bloom handlers act on child columns andForwardIndexHandlerskips them).Changes
OpenStructIndexTypetable-config validation rejects each ignored setting, naming the OPEN_STRUCT column and the key ordefaultValueFieldConfig, for example:OPEN_STRUCT column 'payload': indexes.forward.targetDocsPerChunk is not supported for key 'clicks'; materialized keys always use a dictionary-encoded or LZ4 raw forward index.indexes.forwardandindexes.dictionarymay only restate how the key is built: it is dictionary-encoded whenencodingTypeis DICTIONARY or its inverted index is enabled, and raw with LZ4 otherwise. Soforward.encodingTypemust match that encoding,forward.disabledmay only befalse, anddictionary.disabledmust match whether the key has a dictionary (an empty{}enables it).properties/tierOverwritesand JSON nulls count as unset. ThecodecSpecmessage from Report V7 compression stats and reject per-key OPEN_STRUCT codecSpec #19308 is unchanged.OpenStructIndexConfigclass Javadoc lists the honored settings, correcting the per-key dictionary claim added in Report V7 compression stats and reject per-key OPEN_STRUCT codecSpec #19308.codecSpecsplitter guard from Report V7 compression stats and reject per-key OPEN_STRUCT codecSpec #19308 stays.Compatibility
Validation tightening only. OPEN_STRUCT has not been released, and no quickstart, test resource, doc or in-repo test config sets a newly rejected setting. A table that already carries one keeps loading and ingesting; its next table-config update fails validation until the setting is removed.
Testing
OpenStructIndexTypeTest(14 → 41 tests): 19 rejected-setting cases, honored and restated settings accepted,defaultValueFieldConfignaming, and an end-to-endTableConfigUtils.validateJSON round trip.*OpenStruct*Test,TableConfigUtilsTestandSegmentMetadataImplTestacrosspinot-spiandpinot-segment-local, 349 tests, 0 failures.pinot-spiandpinot-segment-local.