StarRocks / starrocks

The world's fastest open query engine for sub-second analytics both on and off the data lakehouse. With the flexibility to support nearly any scenario, StarRocks provides best-in-class performance for multi-dimensional analytics, real-time analytics, and ad-hoc queries. A Linux Foundation project.
https://starrocks.io
Apache License 2.0
9.03k stars 1.82k forks source link

[Refactor] add `getCatalogDbName` and `getCatalogTableName` in `Table` #53072

Open dirtysalt opened 1 day ago

dirtysalt commented 1 day ago

Why I'm doing:

There are so many overlapped concepts and interfaces on tables


But there are some tricks right here: when you use resource mapping:

So here is the solution:

What I'm doing:

This PR is to:

Fixes #issue

What type of PR is this:

Does this PR entail a change in behavior?

If yes, please specify the type of change:

Checklist:

Bugfix cherry-pick branch check:

sonarcloud[bot] commented 1 day ago

Quality Gate Failed Quality Gate failed

Failed conditions
3.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

github-actions[bot] commented 1 day ago

[Java-Extensions Incremental Coverage Report]

:white_check_mark: pass : 0 / 0 (0%)

github-actions[bot] commented 1 day ago

[FE Incremental Coverage Report]

:x: fail : 198 / 279 (70.97%)

file detail

path covered_line new_line coverage not_covered_line_detail
:large_blue_circle: com/starrocks/common/proc/HMSTablePartitionsProcDir.java 0 4 00.00% [41, 53, 57, 58]
:large_blue_circle: com/starrocks/planner/KuduScanNode.java 0 1 00.00% [106]
:large_blue_circle: com/starrocks/planner/PaimonScanNode.java 0 2 00.00% [140, 326]
:large_blue_circle: com/starrocks/connector/partitiontraits/OdpsPartitionTraits.java 0 1 00.00% [24]
:large_blue_circle: com/starrocks/planner/OdpsScanNode.java 0 3 00.00% [98, 158, 180]
:large_blue_circle: com/starrocks/connector/hive/ConnectorTableMetadataProcessor.java 0 3 00.00% [161, 199, 200]
:large_blue_circle: com/starrocks/common/proc/TableProcDir.java 0 2 00.00% [105, 106]
:large_blue_circle: com/starrocks/sql/common/DebugOperatorTracer.java 0 6 00.00% [130, 140, 149, 350, 360, 369]
:large_blue_circle: com/starrocks/connector/partitiontraits/KuduPartitionTraits.java 0 1 00.00% [29]
:large_blue_circle: com/starrocks/sql/Explain.java 0 3 00.00% [234, 251, 266]
:large_blue_circle: com/starrocks/catalog/Table.java 1 6 16.67% [264, 268, 291, 493, 758]
:large_blue_circle: com/starrocks/connector/hive/HiveMetadata.java 3 11 27.27% [175, 177, 236, 295, 296, 459, 460, 474]
:large_blue_circle: com/starrocks/connector/iceberg/IcebergPartitionUtils.java 1 3 33.33% [121, 224]
:large_blue_circle: com/starrocks/connector/hudi/HudiMetadata.java 2 5 40.00% [155, 243, 245]
:large_blue_circle: com/starrocks/sql/analyzer/AstToStringBuilder.java 3 7 42.86% [1798, 1799, 1808, 1809]
:large_blue_circle: com/starrocks/connector/kudu/KuduMetadata.java 1 2 50.00% [320]
:large_blue_circle: com/starrocks/connector/hive/HiveCacheUpdateProcessor.java 7 14 50.00% [111, 114, 123, 124, 146, 147, 223]
:large_blue_circle: com/starrocks/connector/partitiontraits/HudiPartitionTraits.java 1 2 50.00% [28]
:large_blue_circle: com/starrocks/connector/jdbc/JDBCMetadata.java 1 2 50.00% [295]
:large_blue_circle: com/starrocks/connector/hive/HiveCommitter.java 11 16 68.75% [413, 414, 449, 450, 632]
:large_blue_circle: com/starrocks/server/GlobalStateMgr.java 41 53 77.36% [1646, 1822, 1828, 1861, 1913, 1929, 1973, 2366, 2414, 2452, 2456, 2457]
:large_blue_circle: com/starrocks/planner/IcebergScanNode.java 4 5 80.00% [122]
:large_blue_circle: com/starrocks/connector/iceberg/IcebergMetadata.java 16 20 80.00% [551, 612, 613, 1096]
:large_blue_circle: com/starrocks/connector/paimon/PaimonMetadata.java 5 6 83.33% [417]
:large_blue_circle: com/starrocks/connector/hive/HiveMetastore.java 7 7 100.00% []
:large_blue_circle: com/starrocks/sql/optimizer/rule/transformation/materialization/compensation/OptCompensator.java 1 1 100.00% []
:large_blue_circle: com/starrocks/catalog/IcebergTable.java 1 1 100.00% []
:large_blue_circle: com/starrocks/connector/partitiontraits/JDBCPartitionTraits.java 1 1 100.00% []
:large_blue_circle: com/starrocks/connector/partitiontraits/HivePartitionTraits.java 2 2 100.00% []
:large_blue_circle: com/starrocks/server/IcebergTableFactory.java 2 2 100.00% []
:large_blue_circle: com/starrocks/catalog/OdpsTable.java 1 1 100.00% []
:large_blue_circle: com/starrocks/sql/analyzer/QueryAnalyzer.java 3 3 100.00% []
:large_blue_circle: com/starrocks/connector/iceberg/cost/IcebergStatisticProvider.java 1 1 100.00% []
:large_blue_circle: com/starrocks/connector/hive/HiveMetastoreOperations.java 8 8 100.00% []
:large_blue_circle: com/starrocks/connector/delta/DeltaLakeCacheUpdateProcessor.java 1 1 100.00% []
:large_blue_circle: com/starrocks/connector/hive/HiveConnectorScanRangeSource.java 3 3 100.00% []
:large_blue_circle: com/starrocks/server/HiveTableFactory.java 2 2 100.00% []
:large_blue_circle: com/starrocks/sql/analyzer/MaterializedViewAnalyzer.java 7 7 100.00% []
:large_blue_circle: com/starrocks/connector/partitiontraits/IcebergPartitionTraits.java 2 2 100.00% []
:large_blue_circle: com/starrocks/sql/optimizer/rule/transformation/IcebergEqualityDeleteRewriteRule.java 5 5 100.00% []
:large_blue_circle: com/starrocks/qe/ExecuteExceptionHandler.java 1 1 100.00% []
:large_blue_circle: com/starrocks/connector/hive/HiveMetastoreApiConverter.java 3 3 100.00% []
:large_blue_circle: com/starrocks/connector/hive/HiveStatisticsProvider.java 7 7 100.00% []
:large_blue_circle: com/starrocks/connector/partitiontraits/DeltaLakePartitionTraits.java 1 1 100.00% []
:large_blue_circle: com/starrocks/connector/delta/DeltaLakeMetadata.java 4 4 100.00% []
:large_blue_circle: com/starrocks/sql/optimizer/rewrite/OptExternalPartitionPruner.java 9 9 100.00% []
:large_blue_circle: com/starrocks/sql/optimizer/statistics/StatisticsCalculator.java 1 1 100.00% []
:large_blue_circle: com/starrocks/connector/partitiontraits/PaimonPartitionTraits.java 1 1 100.00% []
:large_blue_circle: com/starrocks/statistic/StatisticUtils.java 6 6 100.00% []
:large_blue_circle: com/starrocks/sql/analyzer/AnalyzerUtils.java 6 6 100.00% []
:large_blue_circle: com/starrocks/connector/jdbc/MysqlSchemaResolver.java 1 1 100.00% []
:large_blue_circle: com/starrocks/sql/optimizer/rule/transformation/materialization/OptExpressionDuplicator.java 1 1 100.00% []
:large_blue_circle: com/starrocks/scheduler/mv/MVTraceUtils.java 1 1 100.00% []
:large_blue_circle: com/starrocks/connector/odps/OdpsMetadata.java 4 4 100.00% []
:large_blue_circle: com/starrocks/server/HudiTableFactory.java 2 2 100.00% []
:large_blue_circle: com/starrocks/planner/DeltaLakeScanNode.java 1 1 100.00% []
:large_blue_circle: com/starrocks/connector/hive/CachingHiveMetastore.java 5 5 100.00% []
github-actions[bot] commented 1 day ago

[BE Incremental Coverage Report]

:white_check_mark: pass : 0 / 0 (0%)