navina opened a new pull request, #18832:
URL: https://github.com/apache/pinot/pull/18832

   ## What
   Adds two optional, nullable metadata fields to `FieldSpec` (`pinot-spi`):
   
   | Field | Type | Meaning |
   |---|---|---|
   | `fieldId` | `Integer` | A stable, name-independent identifier for the 
column. |
   | `aliases` | `List<String>` | Alternate / historical names for the column. |
   
   Both follow the existing `description` / `tags` convention on `FieldSpec`:
   - `fieldId` is serialized with `@JsonInclude(NON_NULL)`, `aliases` with 
`@JsonInclude(NON_EMPTY)`.
   - Both are mirrored in the manual `toJsonObject()` serialization and 
included in `equals()` / `hashCode()`.
   - They are not part of schema backward-compatibility validation, so adding 
or changing them doesn't fail a schema update today.
   
   ## Why
   `fieldId` provides a stable column identity that is decoupled from the 
column name. Together with `aliases`, 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
   - **No impact on existing tables.** Both fields default to `null`/empty and 
are omitted from JSON, so the serialized schema and wire format are unchanged 
for any column that doesn't set them.
   - **Mixed-version safe.** Older components ignore the unknown JSON 
properties on read; newer components emit nothing for columns without these 
fields. They are excluded from backward-compatibility checks, so a schema 
carrying them validates against one that doesn't.
   - **No updates to query/ingestion paths or segment metadata today** — this 
change only adds the fields to the schema model.
   
   ## Tests
   `FieldSpecTest` adds coverage for the new getters/setters, JSON round-trip 
(including omission when unset), and `equals`/`hashCode` participation.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to