Copilot commented on code in PR #35754: URL: https://github.com/apache/shardingsphere/pull/35754#discussion_r2156796359
########## proxy/dialect/mariadb/pom.xml: ########## @@ -69,5 +69,12 @@ <version>${project.version}</version> <scope>runtime</scope> </dependency> + + <dependency> + <groupId>org.apache.shardingsphere</groupId> + <artifactId>shardingsphere-sharding-mysql</artifactId> Review Comment: Including the MySQL sharding module in the MariaDB dialect may be confusing or incorrect. Consider depending on a dedicated MariaDB sharding module (e.g., `shardingsphere-sharding-mariadb`) or document why MySQL's implementation suffices for MariaDB. ########## features/sharding/dialect/mysql/src/main/java/org/apache/shardingsphere/sharding/route/mysql/MySQLShardingTableBroadcastRouteStatementProvider.java: ########## @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.shardingsphere.sharding.route.mysql; + +import org.apache.shardingsphere.sharding.route.engine.type.broadcast.DialectShardingTableBroadcastRouteStatementProvider; +import org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement; +import org.apache.shardingsphere.sql.parser.statement.mysql.dal.MySQLOptimizeTableStatement; + +import java.util.Collection; +import java.util.Collections; + +/** + * Sharding table broadcast route statement provider for MySQL. + */ +public final class MySQLShardingTableBroadcastRouteStatementProvider implements DialectShardingTableBroadcastRouteStatementProvider { + + @Override + public Collection<Class<? extends SQLStatement>> getBroadcastRouteStatementTypes() { + return Collections.singleton(MySQLOptimizeTableStatement.class); + } + + @Override + public String getDatabaseType() { + return "MySQL"; Review Comment: [nitpick] Using a hardcoded database type string can lead to typos or inconsistencies. Consider referencing a shared constant or enum for the database type. -- 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: notifications-unsubscr...@shardingsphere.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org