starrocks
starrocks copied to clipboard
[Refactor] Introduce ColumnId to support Column renaming (part2)
Why I'm doing:
We need a unique ID to identify the Column. This ID is used in all places that reference the Column. In this way, to change the attributes of the Column, such as name, we only need to change the attributes in the Column object. There is a uniqueId in the current Column, but it is only available in newly created tables. For compatibility reasons, we need to introduce another Id: ColumnID. The ColumnID of the historical table is the name of the column, because the name was previously immutable.
What I'm doing:
There are currently three ways to reference Column: 1: direct copy of Column object, 2: reference to Column name, 3: sql expression reference. This PR changes the copied Column object to use ColumnId reference.
What type of PR is this:
- [ ] BugFix
- [ ] Feature
- [ ] Enhancement
- [x] Refactor
- [ ] UT
- [ ] Doc
- [ ] Tool
Does this PR entail a change in behavior?
- [ ] Yes, this PR will result in a change in behavior.
- [x] No, this PR will not result in a change in behavior.
If yes, please specify the type of change:
- [ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
- [ ] Parameter changes: default values, similar parameters but with different default values
- [ ] Policy changes: use new policy to replace old one, functionality automatically enabled
- [ ] Feature removed
- [ ] Miscellaneous: upgrade & downgrade compatibility, etc.
Checklist:
- [ ] I have added test cases for my bug fix or my new feature
- [ ] This pr needs user documentation (for new or modified features or behaviors)
- [ ] I have added documentation for my new feature or new function
- [ ] This is a backport pr
Bugfix cherry-pick branch check:
- [ ] I have checked the version labels which the pr will be auto-backported to the target branch
- [ ] 3.3
- [ ] 3.2
- [ ] 3.1
- [ ] 3.0
- [ ] 2.5
[FE Incremental Coverage Report]
:white_check_mark: pass : 365 / 414 (88.16%)
file detail
| path | covered_line | new_line | coverage | not_covered_line_detail | |
|---|---|---|---|---|---|
| :large_blue_circle: | com/starrocks/common/proc/EsPartitionsProcDir.java | 0 | 1 | 00.00% | [110] |
| :large_blue_circle: | com/starrocks/sql/optimizer/rewrite/OptExternalPartitionPruner.java | 0 | 4 | 00.00% | [96, 97, 490, 492] |
| :large_blue_circle: | com/starrocks/sql/optimizer/dump/DesensitizedSQLBuilder.java | 0 | 4 | 00.00% | [539, 663, 809, 819] |
| :large_blue_circle: | com/starrocks/catalog/PartitionInfo.java | 0 | 1 | 00.00% | [226] |
| :large_blue_circle: | com/starrocks/catalog/Table.java | 1 | 2 | 50.00% | [469] |
| :large_blue_circle: | com/starrocks/connector/elasticsearch/EsTablePartitions.java | 2 | 4 | 50.00% | [87, 116] |
| :large_blue_circle: | com/starrocks/sql/analyzer/AstToStringBuilder.java | 1 | 2 | 50.00% | [1609] |
| :large_blue_circle: | com/starrocks/catalog/OlapTable.java | 14 | 23 | 60.87% | [1669, 1685, 1686, 1687, 1689, 1744, 1760, 1761, 1762] |
| :large_blue_circle: | com/starrocks/task/PushTask.java | 4 | 6 | 66.67% | [188, 189] |
| :large_blue_circle: | com/starrocks/load/loadv2/SparkLoadPendingTask.java | 4 | 6 | 66.67% | [382, 383] |
| :large_blue_circle: | com/starrocks/common/proc/PartitionsProcDir.java | 10 | 13 | 76.92% | [380, 381, 383] |
| :large_blue_circle: | com/starrocks/catalog/RangePartitionInfo.java | 23 | 29 | 79.31% | [115, 116, 119, 120, 497, 560] |
| :large_blue_circle: | com/starrocks/catalog/MaterializedView.java | 5 | 6 | 83.33% | [683] |
| :large_blue_circle: | com/starrocks/sql/common/MetaUtils.java | 30 | 35 | 85.71% | [289, 297, 309, 329, 340] |
| :large_blue_circle: | com/starrocks/catalog/HashDistributionInfo.java | 19 | 22 | 86.36% | [128, 145, 161] |
| :large_blue_circle: | com/starrocks/catalog/ListPartitionInfo.java | 27 | 30 | 90.00% | [236, 451, 501] |
| :large_blue_circle: | com/starrocks/sql/analyzer/MaterializedViewAnalyzer.java | 14 | 15 | 93.33% | [493] |
| :large_blue_circle: | com/starrocks/common/proc/TablesProcDir.java | 5 | 5 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/scheduler/PartitionBasedMvRefreshProcessor.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/optimizer/transformer/RelationTransformer.java | 4 | 4 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/optimizer/rule/tree/PhysicalDistributionAggOptRule.java | 3 | 3 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/optimizer/MvRewritePreprocessor.java | 7 | 7 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/server/OlapTableFactory.java | 3 | 3 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/catalog/Partition.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/service/FrontendServiceImpl.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/planner/OlapScanNode.java | 11 | 11 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/optimizer/rule/transformation/materialization/MaterializedViewRewriter.java | 4 | 4 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/ast/ListPartitionDesc.java | 3 | 3 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/analyzer/PartitionDescAnalyzer.java | 6 | 6 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/catalog/RandomDistributionInfo.java | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/planner/OlapTableSink.java | 7 | 7 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/catalog/ColocateGroupSchema.java | 5 | 5 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/http/rest/v2/vo/PartitionInfoView.java | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/load/DeleteMgr.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/optimizer/rewrite/OptDistributionPruner.java | 3 | 3 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/common/ErrorCode.java | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/common/util/DynamicPartitionUtil.java | 3 | 3 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/analyzer/AlterTableClauseAnalyzer.java | 8 | 8 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/common/SyncPartitionUtils.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/server/LocalMetastore.java | 21 | 21 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/analyzer/AnalyzerUtils.java | 6 | 6 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/leader/LeaderImpl.java | 3 | 3 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/planner/FragmentNormalizer.java | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/planner/DictionaryCacheSink.java | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/leader/ReportHandler.java | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/catalog/ColocateTableIndex.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/optimizer/rule/transformation/RemoveAggregationFromAggTable.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/catalog/ExpressionRangePartitionInfo.java | 15 | 15 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/task/AlterReplicaTask.java | 8 | 8 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/ast/RangePartitionDesc.java | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/ast/ExpressionPartitionDesc.java | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/optimizer/rewrite/PartitionColPredicateEvaluator.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/service/InformationSchemaDataSource.java | 4 | 4 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/catalog/CatalogUtils.java | 4 | 4 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/http/rest/v2/vo/TableSchemaView.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/http/rest/v2/vo/DistributionInfoView.java | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/clone/DynamicPartitionScheduler.java | 7 | 7 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/alter/SchemaChangeHandler.java | 4 | 4 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/backup/BackupMeta.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/catalog/ExpressionRangePartitionInfoV2.java | 14 | 14 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/common/PartitionDiffer.java | 5 | 5 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/optimizer/rewrite/OptOlapPartitionPruner.java | 12 | 12 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/connector/ConnectorPartitionTraits.java | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/optimizer/rewrite/PartitionColPredicateExtractor.java | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/alter/RollupJobV2.java | 4 | 4 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/optimizer/rule/transformation/materialization/MvPartitionCompensator.java | 1 | 1 | 100.00% | [] |
[BE Incremental Coverage Report]
:white_check_mark: pass : 0 / 0 (0%)
@mergifyio backport branch-3.3
backport branch-3.3
✅ Backports have been created
- #47906 [Refactor] Introduce ColumnId to support Column renaming (part2) (backport #45215) has been created for branch
branch-3.3but encountered conflicts
