Uh oh!
There was an error while loading. Please reload this page.
[fix](Index)Make column unique ids in index dynamically computed - #48988
Conversation
hello-stephen
commented
Mar 12, 2025
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
qidaye
commented
Mar 12, 2025
run buildall |
doris-robot
commented
Mar 12, 2025
TPC-H: Total hot run time: 32220 ms |
doris-robot
commented
Mar 12, 2025
TPC-DS: Total hot run time: 185002 ms |
a6fdd2b to
a40c156Comparedoris-robot
commented
Mar 12, 2025
ClickBench: Total hot run time: 31.35 s |
qidaye
commented
Mar 12, 2025
run buildall |
doris-robot
commented
Mar 12, 2025
TPC-H: Total hot run time: 32469 ms |
doris-robot
commented
Mar 12, 2025
TPC-DS: Total hot run time: 185263 ms |
doris-robot
commented
Mar 12, 2025
ClickBench: Total hot run time: 30.98 s |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
doris-robot
commented
Mar 13, 2025
TPC-DS: Total hot run time: 192813 ms |
doris-robot
commented
Mar 13, 2025
ClickBench: Total hot run time: 30.65 s |
PR approved by anyone and no changes requested. |
PR approved by at least one committer and no changes requested. |
…che#48988) Issue Number: closeapache#48989 Related PR: apache#46648apache#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
…che#48988) Issue Number: closeapache#48989 Related PR: apache#46648apache#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
…che#48988) Issue Number: closeapache#48989 Related PR: apache#46648apache#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
…che#48988) Issue Number: closeapache#48989 Related PR: apache#46648apache#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
…che#48988) Issue Number: closeapache#48989 Related PR: apache#46648apache#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
What problem does this PR solve?
Issue Number: close#48989
Related PR: #46648#42882
Problem Summary:
We introduced
Index.columnUniqueIdsin 3.0.3, and make sureIndex.columnUniqueIdsis not empty in 3.0.4.But when we upgrade Doris from 3.0.2 and before to 3.0.4, the
Index.columnUniqueIdswill benull.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
columnUniqueIdsfromIndexclass:Previously, column unique IDs were stored as a field in the
IndexclassNow they're dynamically computed when needed rather than stored redundantly
Added dynamic computation method:
New method
getColumnUniqueIds(List<Column> schema)computes IDs at runtimeColumn IDs are looked up by matching index column names with schema columns
Updated method signatures:
Changed
toThrift()totoThrift(List<Integer> indexColumnUniqueIds)Changed
toPb()totoPb(Map<Integer, Column> columnMap, List<Integer> indexColumnUniqueIds)Updated all callers to pass column IDs as parameters
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)