You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8fcdde1
Browse filesBrowse the repository at this point in the historyBrowse files
qiye
authored
[fix](Index)Make column unique ids in index dynamically computed (#48988)
Issue Number: close#48989
Related PR: #46648#42882
Problem Summary:
We introduced `Index.columnUniqueIds` in 3.0.3, and make sure
`Index.columnUniqueIds` is not empty in 3.0.4.
But when we upgrade Doris from 3.0.2 and before to 3.0.4, the
`Index.columnUniqueIds` will be `null`.
Versions 302 and earlier do not have this variable, and gson
deserialization will assign it to null.
We need to initialize the column unique ids associated with the index
correctly.
Key Changes
Removed stored `columnUniqueIds` from `Index` class:
Previously, column unique IDs were stored as a field in the `Index`
class
Now they're dynamically computed when needed rather than stored
redundantly
Added dynamic computation method:
New method `getColumnUniqueIds(List<Column> schema)` computes IDs at
runtime
Column IDs are looked up by matching index column names with schema
columns
Updated method signatures:
Changed `toThrift()` to `toThrift(List<Integer> indexColumnUniqueIds)`
Changed `toPb()` to `toPb(Map<Integer, Column> columnMap, List<Integer>
indexColumnUniqueIds)`
Updated all callers to pass column IDs as parameters
0 commit comments