kezhenxu94 commented on code in PR #10544:
URL: https://github.com/apache/skywalking/pull/10544#discussion_r1138324380
##########
oap-server/server-storage-plugin/storage-shardingsphere-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/shardingsphere/ShardingRulesOperator.java:
##########
@@ -157,23 +152,35 @@ private ShardingRule.ShardingRuleBuilder
buildShardingRule(ShardingRule.Sharding
buildDataNodes(builder, tableName, dataSources, ttl, currentDate);
buildDatabaseStrategy(builder, dsShardingColumn, dataSources.size());
- switch (shardingAlgorithm) {
- case TIME_SEC_RANGE_SHARDING_ALGORITHM:
- buildTimeRangeTableStrategy(builder, tableShardingColumn,
TIME_SEC_RANGE_SHARDING_EXPRESSION);
- break;
- case TIME_MIN_RANGE_SHARDING_ALGORITHM:
- buildTimeRangeTableStrategy(builder, tableShardingColumn,
TIME_MIN_RANGE_SHARDING_EXPRESSION);
- break;
- case TIME_RELATIVE_ID_SHARDING_ALGORITHM:
- buildExpressionTableStrategy(builder, tableName,
tableShardingColumn,
-
TIME_RELATIVE_ID_SHARDING_EXPRESSION);
- break;
- case TIME_BUCKET_SHARDING_ALGORITHM:
- buildExpressionTableStrategy(builder, tableName,
tableShardingColumn, TIME_BUCKET_SHARDING_EXPRESSION);
- break;
- default:
- throw new UnexpectedException("Unsupported sharding algorithm
" + shardingAlgorithm);
- }
Review Comment:
> We don't need these anymore? But I don't see you remove them from the top
of the Class code.
Now removed.
--
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]