Add optional fieldId and aliases to FieldSpec for column identity#18833
Open
navina wants to merge 1 commit into
Open
Add optional fieldId and aliases to FieldSpec for column identity#18833navina wants to merge 1 commit into
navina wants to merge 1 commit into
Conversation
Extend FieldSpec with stable fieldId and alias metadata for logical-to-physical column mapping, following the description/tags serde pattern and excluding these fields from backward compatibility checks. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18833 +/- ##
============================================
+ Coverage 64.78% 64.81% +0.02%
Complexity 1319 1319
============================================
Files 3392 3392
Lines 210988 211004 +16
Branches 33127 33132 +5
============================================
+ Hits 136687 136758 +71
+ Misses 63283 63206 -77
- Partials 11018 11040 +22
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:
|
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
Adds two optional, nullable metadata fields to
FieldSpec(pinot-spi):fieldIdIntegeraliasesList<String>Both follow the existing
description/tagsconvention onFieldSpec:fieldIdis serialized with@JsonInclude(NON_NULL),aliaseswith@JsonInclude(NON_EMPTY).toJsonObject()serialization and included inequals()/hashCode().Why
fieldIdprovides a stable column identity that is decoupled from the column name. Together withaliases, it lays the groundwork for advanced schema evolutions like column rename in Pinot — a rename can preserve the column's identity and record the prior name as an alias, instead of looking like a drop-plus-add.Compatibility
null/empty and are omitted from JSON, so the serialized schema and wire format are unchanged for any column that doesn't set them.Tests
FieldSpecTestadds coverage for the new getters/setters, JSON round-trip (including omission when unset), andequals/hashCodeparticipation.