[deprecation] Block field-level forward encoding in table configs#18668
Draft
xiangfu0 wants to merge 1 commit into
Draft
[deprecation] Block field-level forward encoding in table configs#18668xiangfu0 wants to merge 1 commit into
xiangfu0 wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18668 +/- ##
============================================
+ Coverage 64.43% 64.47% +0.04%
Complexity 1291 1291
============================================
Files 3367 3367
Lines 208380 208380
Branches 32549 32544 -5
============================================
+ Hits 134274 134360 +86
+ Misses 63306 63215 -91
- Partials 10800 10805 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3b9a7b8 to
69c7124
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.
Summary
Deprecates field-level
FieldConfig.encodingTypeand makesfieldConfig.indexes.forward.encodingTypethe canonical forward-index encoding source.This change now blocks table creation/update configs that still use
fieldConfigList[].encodingType. Validation fails with a targeted message directing users tofieldConfigList[].indexes.forward.encodingType.Compatibility retained internally:
fieldConfig.encodingTypestill deserializes for backward-compatibleFieldConfigreads.FieldConfig#getEncodingType()still returnsDICTIONARYwhen the field is absent for existing callers.noDictionaryColumns,noDictionaryConfig, and field-levelencodingTyperemain fallback signals in index-conversion paths when noindexes.forward.encodingTypeis present.indexes.forward.encodingTypeis present, it is authoritative over legacy no-dictionary and field-level encoding signals.User Manual
For new or updated table configs, configure forward-index encoding under the internal forward-index block:
{ "fieldConfigList": [ { "name": "message", "indexes": { "forward": { "encodingType": "RAW", "compressionCodec": "ZSTANDARD" } } } ] }Do not use the deprecated field-level encoding form:
{ "fieldConfigList": [ { "name": "message", "encodingType": "RAW" } ] }That form now fails table validation with:
Sample Table Config
{ "tableName": "logs_OFFLINE", "tableType": "OFFLINE", "segmentsConfig": { "schemaName": "logs" }, "tableIndexConfig": {}, "fieldConfigList": [ { "name": "logLine", "indexes": { "forward": { "encodingType": "RAW", "compressionCodec": "ZSTANDARD" }, "text": {} } }, { "name": "statusCode", "indexes": { "forward": { "encodingType": "DICTIONARY" }, "inverted": {} } } ] }Validation
./mvnw -pl pinot-segment-local -am -Dtest=TableConfigUtilsTest,TableConfigConsumingSegmentTierOverrideTest -Dsurefire.failIfNoSpecifiedTests=false test./mvnw -pl pinot-segment-local -am -Dtest=TableConfigUtilsTest -Dsurefire.failIfNoSpecifiedTests=false test./mvnw -pl pinot-segment-local -am -Dtest=ForwardIndexTypeTest,DictionaryIndexTypeTest -Dsurefire.failIfNoSpecifiedTests=false test./mvnw -pl pinot-spi -Dtest=FieldConfigTest test./mvnw -pl pinot-segment-spi -Dtest=ForwardIndexConfigTest test./mvnw -pl pinot-spi -Dtest=FieldConfigTest,OpenStructIndexConfigTest test./mvnw spotless:apply -pl pinot-spi,pinot-segment-local./mvnw license:format -pl pinot-spi,pinot-segment-local./mvnw checkstyle:check -pl pinot-spi,pinot-segment-local./mvnw license:check -pl pinot-spi,pinot-segment-local./mvnw spotless:apply -pl pinot-spi,pinot-segment-spi,pinot-segment-local./mvnw checkstyle:check -pl pinot-spi,pinot-segment-spi,pinot-segment-local./mvnw license:format -pl pinot-spi,pinot-segment-spi,pinot-segment-local./mvnw license:check -pl pinot-spi,pinot-segment-spi,pinot-segment-locallicense:checkpasses with pre-existing unknown-extension warnings for Lucene binary test resources underpinot-segment-local/src/test/resources/data/lucene_80_index.