Skip to content

[deprecation] Block field-level forward encoding in table configs#18668

Draft
xiangfu0 wants to merge 1 commit into
apache:masterfrom
xiangfu0:codex/deprecate-fieldconfig-encoding-type
Draft

[deprecation] Block field-level forward encoding in table configs#18668
xiangfu0 wants to merge 1 commit into
apache:masterfrom
xiangfu0:codex/deprecate-fieldconfig-encoding-type

Conversation

@xiangfu0
Copy link
Copy Markdown
Contributor

@xiangfu0 xiangfu0 commented Jun 3, 2026

Summary

Deprecates field-level FieldConfig.encodingType and makes fieldConfig.indexes.forward.encodingType the 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 to fieldConfigList[].indexes.forward.encodingType.

Compatibility retained internally:

  • fieldConfig.encodingType still deserializes for backward-compatible FieldConfig reads.
  • FieldConfig#getEncodingType() still returns DICTIONARY when the field is absent for existing callers.
  • Legacy inputs such as noDictionaryColumns, noDictionaryConfig, and field-level encodingType remain fallback signals in index-conversion paths when no indexes.forward.encodingType is present.
  • When indexes.forward.encodingType is 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:

FieldConfig.encodingType is deprecated for column: message. Use fieldConfigList[].indexes.forward.encodingType instead.

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-local

license:check passes with pre-existing unknown-extension warnings for Lucene binary test resources under pinot-segment-local/src/test/resources/data/lucene_80_index.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 3, 2026

Codecov Report

❌ Patch coverage is 74.07407% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.47%. Comparing base (b50a421) to head (3b9a7b8).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
.../segment/index/dictionary/DictionaryIndexType.java 69.56% 2 Missing and 5 partials ⚠️
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     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 64.47% <74.07%> (+0.04%) ⬆️
temurin 64.47% <74.07%> (+0.04%) ⬆️
unittests 64.47% <74.07%> (+0.04%) ⬆️
unittests1 56.88% <25.92%> (+0.02%) ⬆️
unittests2 37.13% <74.07%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xiangfu0 xiangfu0 added configuration Config changes (addition/deletion/change in behavior) deprecation Marks deprecated APIs, configs, or features labels Jun 3, 2026
@xiangfu0 xiangfu0 changed the title [codex] Deprecate field-level forward encoding [deprecation] Deprecate field-level forward encoding Jun 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@xiangfu0 xiangfu0 force-pushed the codex/deprecate-fieldconfig-encoding-type branch from 3b9a7b8 to 69c7124 Compare June 3, 2026 21:39
@xiangfu0 xiangfu0 changed the title [deprecation] Deprecate field-level forward encoding [deprecation] Block field-level forward encoding in table configs Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

configuration Config changes (addition/deletion/change in behavior) deprecation Marks deprecated APIs, configs, or features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants