This is an automated email from the ASF dual-hosted git repository.

jiangmaolin pushed a commit to branch dev-5.5.1
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git

commit 49342e88f54a824c1bc41810be2d0b4091dc047e
Author: Raigor <[email protected]>
AuthorDate: Thu Oct 31 23:25:19 2024 +0800

    For #31218, revert RuleNodePathProvider and RepositoryTupleSwapperEngine 
(#29)
---
 .../nodepath/ReadwriteSplittingRuleNodePathProvider.java      |  6 +++++-
 .../yaml/config/YamlReadwriteSplittingRuleConfiguration.java  |  3 ++-
 ...eSplittingConfigurationRepositoryTupleSwapperEngineIT.java |  5 +++--
 .../shadow/metadata/nodepath/ShadowRuleNodePathProvider.java  | 10 ++++++++--
 .../shadow/yaml/config/YamlShadowRuleConfiguration.java       |  7 ++++---
 ...ShadowRuleConfigurationRepositoryTupleSwapperEngineIT.java | 11 ++++++-----
 .../metadata/nodepath/ShardingRuleNodePathProvider.java       |  6 +++++-
 .../sharding/yaml/config/YamlShardingRuleConfiguration.java   |  3 ++-
 .../ShardingConfigurationRepositoryTupleSwapperEngineIT.java  | 11 ++++++-----
 .../mode/tuple/RepositoryTupleSwapperEngine.java              |  6 +++++-
 .../mode/tuple/annotation/RepositoryTupleField.java           | 10 ++++++++++
 11 files changed, 56 insertions(+), 22 deletions(-)

diff --git 
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/metadata/nodepath/ReadwriteSplittingRuleNodePathProvider.java
 
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/metadata/nodepath/ReadwriteSplittingRuleNodePathProvider.java
index 9f33225412a..f6fbcca3bbb 100644
--- 
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/metadata/nodepath/ReadwriteSplittingRuleNodePathProvider.java
+++ 
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/metadata/nodepath/ReadwriteSplittingRuleNodePathProvider.java
@@ -17,6 +17,8 @@
 
 package org.apache.shardingsphere.readwritesplitting.metadata.nodepath;
 
+import com.sphereex.dbplusengine.SphereEx;
+import com.sphereex.dbplusengine.SphereEx.Type;
 import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
 import org.apache.shardingsphere.mode.path.rule.RuleNodePath;
 import org.apache.shardingsphere.mode.spi.RuleNodePathProvider;
@@ -32,7 +34,9 @@ public final class ReadwriteSplittingRuleNodePathProvider 
implements RuleNodePat
     
     public static final String RULE_TYPE = "readwrite_splitting";
     
-    public static final String DATA_SOURCE_GROUPS = "data_source_groups";
+    // Revert https://github.com/apache/shardingsphere/pull/31218
+    @SphereEx(Type.MODIFY)
+    public static final String DATA_SOURCE_GROUPS = "data_sources";
     
     public static final String LOAD_BALANCERS = "load_balancers";
     
diff --git 
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/YamlReadwriteSplittingRuleConfiguration.java
 
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/YamlReadwriteSplittingRuleConfiguration.java
index 519233150b7..04d9aeba7fe 100644
--- 
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/YamlReadwriteSplittingRuleConfiguration.java
+++ 
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/config/YamlReadwriteSplittingRuleConfiguration.java
@@ -25,6 +25,7 @@ import 
org.apache.shardingsphere.mode.tuple.annotation.RepositoryTupleField;
 import org.apache.shardingsphere.mode.tuple.annotation.RepositoryTupleEntity;
 import 
org.apache.shardingsphere.mode.tuple.annotation.RepositoryTupleField.Type;
 import 
org.apache.shardingsphere.readwritesplitting.config.ReadwriteSplittingRuleConfiguration;
+import 
org.apache.shardingsphere.readwritesplitting.metadata.nodepath.ReadwriteSplittingRuleNodePathProvider;
 import 
org.apache.shardingsphere.readwritesplitting.yaml.config.rule.YamlReadwriteSplittingDataSourceGroupRuleConfiguration;
 
 import java.util.LinkedHashMap;
@@ -38,7 +39,7 @@ import java.util.Map;
 @Setter
 public final class YamlReadwriteSplittingRuleConfiguration implements 
YamlRuleConfiguration {
     
-    @RepositoryTupleField(type = Type.DATA_SOURCE)
+    @RepositoryTupleField(value = 
ReadwriteSplittingRuleNodePathProvider.DATA_SOURCE_GROUPS, type = 
Type.DATA_SOURCE)
     private Map<String, 
YamlReadwriteSplittingDataSourceGroupRuleConfiguration> dataSourceGroups = new 
LinkedHashMap<>();
     
     @RepositoryTupleField(type = Type.ALGORITHM)
diff --git 
a/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/ReadwriteSplittingConfigurationRepositoryTupleSwapperEngineIT.java
 
b/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/ReadwriteSplittingConfigurationRepositoryTupleSwapperEngineIT.java
index 983a2c3012e..c197f665a30 100644
--- 
a/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/ReadwriteSplittingConfigurationRepositoryTupleSwapperEngineIT.java
+++ 
b/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/ReadwriteSplittingConfigurationRepositoryTupleSwapperEngineIT.java
@@ -38,7 +38,8 @@ class 
ReadwriteSplittingConfigurationRepositoryTupleSwapperEngineIT extends Repo
         assertThat(actualRepositoryTuples.size(), is(4));
         assertRepositoryTuple(actualRepositoryTuples.get(0), 
"load_balancers/random", ((YamlReadwriteSplittingRuleConfiguration) 
expectedYamlRuleConfig).getLoadBalancers().get("random"));
         assertRepositoryTuple(actualRepositoryTuples.get(1), 
"load_balancers/roundRobin", ((YamlReadwriteSplittingRuleConfiguration) 
expectedYamlRuleConfig).getLoadBalancers().get("roundRobin"));
-        assertRepositoryTuple(actualRepositoryTuples.get(2), 
"data_source_groups/ds_0", ((YamlReadwriteSplittingRuleConfiguration) 
expectedYamlRuleConfig).getDataSourceGroups().get("ds_0"));
-        assertRepositoryTuple(actualRepositoryTuples.get(3), 
"data_source_groups/ds_1", ((YamlReadwriteSplittingRuleConfiguration) 
expectedYamlRuleConfig).getDataSourceGroups().get("ds_1"));
+        // Revert https://github.com/apache/shardingsphere/pull/31218
+        assertRepositoryTuple(actualRepositoryTuples.get(2), 
"data_sources/ds_0", ((YamlReadwriteSplittingRuleConfiguration) 
expectedYamlRuleConfig).getDataSourceGroups().get("ds_0"));
+        assertRepositoryTuple(actualRepositoryTuples.get(3), 
"data_sources/ds_1", ((YamlReadwriteSplittingRuleConfiguration) 
expectedYamlRuleConfig).getDataSourceGroups().get("ds_1"));
     }
 }
diff --git 
a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/metadata/nodepath/ShadowRuleNodePathProvider.java
 
b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/metadata/nodepath/ShadowRuleNodePathProvider.java
index b791711584e..c40ba675f96 100644
--- 
a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/metadata/nodepath/ShadowRuleNodePathProvider.java
+++ 
b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/metadata/nodepath/ShadowRuleNodePathProvider.java
@@ -17,6 +17,8 @@
 
 package org.apache.shardingsphere.shadow.metadata.nodepath;
 
+import com.sphereex.dbplusengine.SphereEx;
+import com.sphereex.dbplusengine.SphereEx.Type;
 import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
 import org.apache.shardingsphere.mode.path.rule.RuleNodePath;
 import org.apache.shardingsphere.mode.spi.RuleNodePathProvider;
@@ -36,9 +38,13 @@ public final class ShadowRuleNodePathProvider implements 
RuleNodePathProvider {
     
     public static final String TABLES = "tables";
     
-    public static final String SHADOW_ALGORITHMS = "shadow_algorithms";
+    // Revert https://github.com/apache/shardingsphere/pull/31218
+    @SphereEx(Type.MODIFY)
+    public static final String SHADOW_ALGORITHMS = "algorithms";
     
-    public static final String DEFAULT_SHADOW_ALGORITHM_NAME = 
"default_shadow_algorithm_name";
+    // Revert https://github.com/apache/shardingsphere/pull/31218
+    @SphereEx(Type.MODIFY)
+    public static final String DEFAULT_SHADOW_ALGORITHM_NAME = 
"default_algorithm_name";
     
     private static final RuleNodePath INSTANCE = new RuleNodePath(RULE_TYPE, 
Arrays.asList(DATA_SOURCES, TABLES, SHADOW_ALGORITHMS),
             Collections.singleton(DEFAULT_SHADOW_ALGORITHM_NAME));
diff --git 
a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/yaml/config/YamlShadowRuleConfiguration.java
 
b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/yaml/config/YamlShadowRuleConfiguration.java
index 05b37849ee7..0372bfdccc4 100644
--- 
a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/yaml/config/YamlShadowRuleConfiguration.java
+++ 
b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/yaml/config/YamlShadowRuleConfiguration.java
@@ -21,10 +21,11 @@ import lombok.Getter;
 import lombok.Setter;
 import 
org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration;
 import 
org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration;
-import org.apache.shardingsphere.mode.tuple.annotation.RepositoryTupleField;
 import org.apache.shardingsphere.mode.tuple.annotation.RepositoryTupleEntity;
+import org.apache.shardingsphere.mode.tuple.annotation.RepositoryTupleField;
 import 
org.apache.shardingsphere.mode.tuple.annotation.RepositoryTupleField.Type;
 import org.apache.shardingsphere.shadow.config.ShadowRuleConfiguration;
+import 
org.apache.shardingsphere.shadow.metadata.nodepath.ShadowRuleNodePathProvider;
 import 
org.apache.shardingsphere.shadow.yaml.config.datasource.YamlShadowDataSourceConfiguration;
 import 
org.apache.shardingsphere.shadow.yaml.config.table.YamlShadowTableConfiguration;
 
@@ -45,10 +46,10 @@ public final class YamlShadowRuleConfiguration implements 
YamlRuleConfiguration
     @RepositoryTupleField(type = Type.TABLE)
     private Map<String, YamlShadowTableConfiguration> tables = new 
LinkedHashMap<>();
     
-    @RepositoryTupleField(type = Type.ALGORITHM)
+    @RepositoryTupleField(value = 
ShadowRuleNodePathProvider.SHADOW_ALGORITHMS, type = Type.ALGORITHM)
     private Map<String, YamlAlgorithmConfiguration> shadowAlgorithms = new 
LinkedHashMap<>();
     
-    @RepositoryTupleField(type = Type.DEFAULT_ALGORITHM)
+    @RepositoryTupleField(value = 
ShadowRuleNodePathProvider.DEFAULT_SHADOW_ALGORITHM_NAME, type = 
Type.DEFAULT_ALGORITHM)
     private String defaultShadowAlgorithmName;
     
     @Override
diff --git 
a/features/shadow/core/src/test/java/org/apache/shardingsphere/shadow/yaml/ShadowRuleConfigurationRepositoryTupleSwapperEngineIT.java
 
b/features/shadow/core/src/test/java/org/apache/shardingsphere/shadow/yaml/ShadowRuleConfigurationRepositoryTupleSwapperEngineIT.java
index bbecf00019a..f3b92a39ab6 100644
--- 
a/features/shadow/core/src/test/java/org/apache/shardingsphere/shadow/yaml/ShadowRuleConfigurationRepositoryTupleSwapperEngineIT.java
+++ 
b/features/shadow/core/src/test/java/org/apache/shardingsphere/shadow/yaml/ShadowRuleConfigurationRepositoryTupleSwapperEngineIT.java
@@ -38,14 +38,15 @@ class ShadowRuleConfigurationRepositoryTupleSwapperEngineIT 
extends RepositoryTu
     protected void assertRepositoryTuples(final List<RepositoryTuple> 
actualRepositoryTuples, final YamlRuleConfiguration expectedYamlRuleConfig) {
         assertThat(actualRepositoryTuples.size(), is(9));
         List<RepositoryTuple> actual = new ArrayList<>(actualRepositoryTuples);
+        // Revert https://github.com/apache/shardingsphere/pull/31218
         assertRepositoryTuple(actual.get(0),
-                "shadow_algorithms/user-id-insert-match-algorithm", 
((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getShadowAlgorithms().get("user-id-insert-match-algorithm"));
+                "algorithms/user-id-insert-match-algorithm", 
((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getShadowAlgorithms().get("user-id-insert-match-algorithm"));
         assertRepositoryTuple(actual.get(1),
-                "shadow_algorithms/user-id-update-match-algorithm", 
((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getShadowAlgorithms().get("user-id-update-match-algorithm"));
+                "algorithms/user-id-update-match-algorithm", 
((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getShadowAlgorithms().get("user-id-update-match-algorithm"));
         assertRepositoryTuple(actual.get(2),
-                "shadow_algorithms/user-id-select-match-algorithm", 
((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getShadowAlgorithms().get("user-id-select-match-algorithm"));
-        assertRepositoryTuple(actual.get(3), 
"shadow_algorithms/sql-hint-algorithm", ((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getShadowAlgorithms().get("sql-hint-algorithm"));
-        assertRepositoryTuple(actual.get(4), "default_shadow_algorithm_name", 
((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getDefaultShadowAlgorithmName());
+                "algorithms/user-id-select-match-algorithm", 
((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getShadowAlgorithms().get("user-id-select-match-algorithm"));
+        assertRepositoryTuple(actual.get(3), "algorithms/sql-hint-algorithm", 
((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getShadowAlgorithms().get("sql-hint-algorithm"));
+        assertRepositoryTuple(actual.get(4), "default_algorithm_name", 
((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getDefaultShadowAlgorithmName());
         assertRepositoryTuple(actual.get(5), "data_sources/shadowDataSource", 
((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getDataSources().get("shadowDataSource"));
         assertRepositoryTuple(actual.get(6), "tables/t_order", 
((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getTables().get("t_order"));
         assertRepositoryTuple(actual.get(7), "tables/t_order_item", 
((YamlShadowRuleConfiguration) 
expectedYamlRuleConfig).getTables().get("t_order_item"));
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/metadata/nodepath/ShardingRuleNodePathProvider.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/metadata/nodepath/ShardingRuleNodePathProvider.java
index a501bfe249a..4cc52316c8b 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/metadata/nodepath/ShardingRuleNodePathProvider.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/metadata/nodepath/ShardingRuleNodePathProvider.java
@@ -17,6 +17,8 @@
 
 package org.apache.shardingsphere.sharding.metadata.nodepath;
 
+import com.sphereex.dbplusengine.SphereEx;
+import com.sphereex.dbplusengine.SphereEx.Type;
 import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
 import org.apache.shardingsphere.mode.path.rule.RuleNodePath;
 import org.apache.shardingsphere.mode.spi.RuleNodePathProvider;
@@ -37,7 +39,9 @@ public final class ShardingRuleNodePathProvider implements 
RuleNodePathProvider
     
     public static final String BINDING_TABLES = "binding_tables";
     
-    public static final String SHARDING_ALGORITHMS = "sharding_algorithms";
+    // Revert https://github.com/apache/shardingsphere/pull/31218
+    @SphereEx(Type.MODIFY)
+    public static final String SHARDING_ALGORITHMS = "algorithms";
     
     public static final String KEY_GENERATORS = "key_generators";
     
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/yaml/config/YamlShardingRuleConfiguration.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/yaml/config/YamlShardingRuleConfiguration.java
index c235a09dd45..4fb9e0526b7 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/yaml/config/YamlShardingRuleConfiguration.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/yaml/config/YamlShardingRuleConfiguration.java
@@ -26,6 +26,7 @@ import 
org.apache.shardingsphere.mode.tuple.annotation.RepositoryTupleEntity;
 import 
org.apache.shardingsphere.mode.tuple.annotation.RepositoryTupleField.Type;
 import 
org.apache.shardingsphere.mode.tuple.annotation.RepositoryTupleKeyListNameGenerator;
 import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
+import 
org.apache.shardingsphere.sharding.metadata.nodepath.ShardingRuleNodePathProvider;
 import 
org.apache.shardingsphere.sharding.yaml.config.cache.YamlShardingCacheConfiguration;
 import 
org.apache.shardingsphere.sharding.yaml.config.rule.YamlShardingAutoTableRuleConfiguration;
 import 
org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration;
@@ -69,7 +70,7 @@ public final class YamlShardingRuleConfiguration implements 
YamlRuleConfiguratio
     @RepositoryTupleField(type = Type.DEFAULT_STRATEGY)
     private YamlShardingAuditStrategyConfiguration defaultAuditStrategy;
     
-    @RepositoryTupleField(type = Type.ALGORITHM)
+    @RepositoryTupleField(value = 
ShardingRuleNodePathProvider.SHARDING_ALGORITHMS, type = Type.ALGORITHM)
     private Map<String, YamlAlgorithmConfiguration> shardingAlgorithms = new 
LinkedHashMap<>();
     
     @RepositoryTupleField(type = Type.ALGORITHM)
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/yaml/ShardingConfigurationRepositoryTupleSwapperEngineIT.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/yaml/ShardingConfigurationRepositoryTupleSwapperEngineIT.java
index 6be0ef1a1bd..04d5d3246ca 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/yaml/ShardingConfigurationRepositoryTupleSwapperEngineIT.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/yaml/ShardingConfigurationRepositoryTupleSwapperEngineIT.java
@@ -37,16 +37,17 @@ class ShardingConfigurationRepositoryTupleSwapperEngineIT 
extends RepositoryTupl
     @Override
     protected void assertRepositoryTuples(final List<RepositoryTuple> 
actualRepositoryTuples, final YamlRuleConfiguration expectedYamlRuleConfig) {
         assertThat(actualRepositoryTuples.size(), is(19));
+        // Revert https://github.com/apache/shardingsphere/pull/31218
         assertRepositoryTuple(actualRepositoryTuples.get(0),
-                "sharding_algorithms/core_standard_fixture", 
((YamlShardingRuleConfiguration) 
expectedYamlRuleConfig).getShardingAlgorithms().get("core_standard_fixture"));
+                "algorithms/core_standard_fixture", 
((YamlShardingRuleConfiguration) 
expectedYamlRuleConfig).getShardingAlgorithms().get("core_standard_fixture"));
         assertRepositoryTuple(actualRepositoryTuples.get(1),
-                "sharding_algorithms/core_complex_fixture", 
((YamlShardingRuleConfiguration) 
expectedYamlRuleConfig).getShardingAlgorithms().get("core_complex_fixture"));
+                "algorithms/core_complex_fixture", 
((YamlShardingRuleConfiguration) 
expectedYamlRuleConfig).getShardingAlgorithms().get("core_complex_fixture"));
         assertRepositoryTuple(actualRepositoryTuples.get(2),
-                "sharding_algorithms/core_hint_fixture", 
((YamlShardingRuleConfiguration) 
expectedYamlRuleConfig).getShardingAlgorithms().get("core_hint_fixture"));
+                "algorithms/core_hint_fixture", 
((YamlShardingRuleConfiguration) 
expectedYamlRuleConfig).getShardingAlgorithms().get("core_hint_fixture"));
         assertRepositoryTuple(actualRepositoryTuples.get(3),
-                "sharding_algorithms/database_inline", 
((YamlShardingRuleConfiguration) 
expectedYamlRuleConfig).getShardingAlgorithms().get("database_inline"));
+                "algorithms/database_inline", ((YamlShardingRuleConfiguration) 
expectedYamlRuleConfig).getShardingAlgorithms().get("database_inline"));
         assertRepositoryTuple(actualRepositoryTuples.get(4),
-                "sharding_algorithms/table_inline", 
((YamlShardingRuleConfiguration) 
expectedYamlRuleConfig).getShardingAlgorithms().get("table_inline"));
+                "algorithms/table_inline", ((YamlShardingRuleConfiguration) 
expectedYamlRuleConfig).getShardingAlgorithms().get("table_inline"));
         assertRepositoryTuple(actualRepositoryTuples.get(5), 
"key_generators/snowflake", ((YamlShardingRuleConfiguration) 
expectedYamlRuleConfig).getKeyGenerators().get("snowflake"));
         assertRepositoryTuple(actualRepositoryTuples.get(6),
                 "auditors/sharding_key_required_auditor", 
((YamlShardingRuleConfiguration) 
expectedYamlRuleConfig).getAuditors().get("sharding_key_required_auditor"));
diff --git 
a/mode/api/src/main/java/org/apache/shardingsphere/mode/tuple/RepositoryTupleSwapperEngine.java
 
b/mode/api/src/main/java/org/apache/shardingsphere/mode/tuple/RepositoryTupleSwapperEngine.java
index f90c40f8e01..79abd4bae63 100644
--- 
a/mode/api/src/main/java/org/apache/shardingsphere/mode/tuple/RepositoryTupleSwapperEngine.java
+++ 
b/mode/api/src/main/java/org/apache/shardingsphere/mode/tuple/RepositoryTupleSwapperEngine.java
@@ -20,6 +20,7 @@ package org.apache.shardingsphere.mode.tuple;
 import com.google.common.base.CaseFormat;
 import com.google.common.base.Strings;
 import com.sphereex.dbplusengine.SphereEx;
+import com.sphereex.dbplusengine.SphereEx.Type;
 import lombok.SneakyThrows;
 import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
 import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
@@ -163,8 +164,11 @@ public final class RepositoryTupleSwapperEngine {
                 .sorted(Comparator.comparingInt(o -> 
o.getAnnotation(RepositoryTupleField.class).type().ordinal())).collect(Collectors.toList());
     }
     
+    @SphereEx(Type.MODIFY)
     private String getTupleName(final Field field) {
-        return CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, 
field.getName());
+        // Revert https://github.com/apache/shardingsphere/pull/31218
+        RepositoryTupleField tupleField = 
field.getAnnotation(RepositoryTupleField.class);
+        return "".equals(tupleField.value()) ? 
CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, field.getName()) : 
tupleField.value();
     }
     
     /**
diff --git 
a/mode/api/src/main/java/org/apache/shardingsphere/mode/tuple/annotation/RepositoryTupleField.java
 
b/mode/api/src/main/java/org/apache/shardingsphere/mode/tuple/annotation/RepositoryTupleField.java
index f24182b7c74..33d7c901672 100644
--- 
a/mode/api/src/main/java/org/apache/shardingsphere/mode/tuple/annotation/RepositoryTupleField.java
+++ 
b/mode/api/src/main/java/org/apache/shardingsphere/mode/tuple/annotation/RepositoryTupleField.java
@@ -17,6 +17,7 @@
 
 package org.apache.shardingsphere.mode.tuple.annotation;
 
+import com.sphereex.dbplusengine.SphereEx;
 import lombok.RequiredArgsConstructor;
 
 import java.lang.annotation.ElementType;
@@ -31,6 +32,15 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 public @interface RepositoryTupleField {
     
+    /**
+     * Get persist path name.
+     * Revert https://github.com/apache/shardingsphere/pull/31218
+     * 
+     * @return persist path name
+     */
+    @SphereEx
+    String value() default "";
+    
     /**
      * Get type.
      *

Reply via email to