You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2026/03/27 04:58:28 UTC

(shardingsphere) branch master updated: Remove the useless identifierContext for ShardingSphereMetaData and ShardingSphereTable (#38568)

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

menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 573883de2ee Remove the useless identifierContext for ShardingSphereMetaData and ShardingSphereTable (#38568)
573883de2ee is described below

commit 573883de2ee85fc267c39f8352d01f9c16d58313
Author: Haoran Meng <me...@gmail.com>
AuthorDate: Fri Mar 27 12:58:21 2026 +0800

    Remove the useless identifierContext for ShardingSphereMetaData and ShardingSphereTable (#38568)
---
 .../shardingsphere/infra/metadata/ShardingSphereMetaData.java       | 4 ----
 .../infra/metadata/database/schema/model/ShardingSphereTable.java   | 6 +-----
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/ShardingSphereMetaData.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/ShardingSphereMetaData.java
index 5ac9740e75d..e750aa8a05a 100644
--- a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/ShardingSphereMetaData.java
+++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/ShardingSphereMetaData.java
@@ -54,9 +54,6 @@ import java.util.stream.Collectors;
 @Getter
 public final class ShardingSphereMetaData implements AutoCloseable {
     
-    @Getter(AccessLevel.NONE)
-    private final DatabaseIdentifierContext identifierContext;
-    
     @Getter(AccessLevel.NONE)
     private final IdentifierIndex<ShardingSphereDatabase> databaseIndex;
     
@@ -109,7 +106,6 @@ public final class ShardingSphereMetaData implements AutoCloseable {
         this.props = props;
         temporaryProps = new TemporaryConfigurationProperties(props.getProps());
         this.protocolType = protocolType;
-        this.identifierContext = identifierContext;
         databaseIndex = new IdentifierIndex<>(identifierContext, IdentifierScope.DATABASE);
         databaseIndex.rebuild(new LinkedHashMap<>(databases.stream().collect(Collectors.toMap(ShardingSphereDatabase::getName, each -> each))));
     }
diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/model/ShardingSphereTable.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/model/ShardingSphereTable.java
index fe9bbedb03e..b11dc1744e5 100644
--- a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/model/ShardingSphereTable.java
+++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/model/ShardingSphereTable.java
@@ -58,9 +58,6 @@ public final class ShardingSphereTable {
     
     private final Map<String, Integer> visibleColumnAndIndexMap = new CaseInsensitiveMap<>();
     
-    @Getter(AccessLevel.NONE)
-    private DatabaseIdentifierContext identifierContext;
-    
     @Getter(AccessLevel.NONE)
     private IdentifierIndex<ShardingSphereColumn> columnIndex;
     
@@ -101,7 +98,7 @@ public final class ShardingSphereTable {
     public ShardingSphereTable(final String name, final Collection<ShardingSphereColumn> columns,
                                final Collection<ShardingSphereIndex> indexes, final Collection<ShardingSphereConstraint> constraints, final TableType type) {
         this.name = name;
-        identifierContext = DatabaseIdentifierContextFactory.createDefault();
+        final DatabaseIdentifierContext identifierContext = DatabaseIdentifierContextFactory.createDefault();
         columnIndex = new IdentifierIndex<>(identifierContext, IdentifierScope.COLUMN);
         indexIdentifierIndex = new IdentifierIndex<>(identifierContext, IdentifierScope.INDEX);
         constraintIdentifierIndex = new IdentifierIndex<>(identifierContext, IdentifierScope.CONSTRAINT);
@@ -383,7 +380,6 @@ public final class ShardingSphereTable {
         final Collection<ShardingSphereColumn> columns = new LinkedList<>(columnIndex.getAll());
         final Collection<ShardingSphereIndex> indexes = new LinkedList<>(indexIdentifierIndex.getAll());
         final Collection<ShardingSphereConstraint> constraints = new LinkedList<>(constraintIdentifierIndex.getAll());
-        this.identifierContext = identifierContext;
         columnIndex = new IdentifierIndex<>(identifierContext, IdentifierScope.COLUMN);
         indexIdentifierIndex = new IdentifierIndex<>(identifierContext, IdentifierScope.INDEX);
         constraintIdentifierIndex = new IdentifierIndex<>(identifierContext, IdentifierScope.CONSTRAINT);