This is an automated email from the ASF dual-hosted git repository. zhaojinchao 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 e4a857f51c8 Add exclude field in SubstitutableColumnNameToken to avoid token duplicate (#33307) e4a857f51c8 is described below commit e4a857f51c8129d288f1949d6596d236d7d72709 Author: Zhengqiang Duan <duanzhengqi...@apache.org> AuthorDate: Fri Oct 18 19:43:45 2024 +0800 Add exclude field in SubstitutableColumnNameToken to avoid token duplicate (#33307) * Add exclude field in SubstitutableColumnNameToken to avoid token duplicate * fix unit test --- .../binder/engine/segment/from/type/SimpleTableSegmentBinder.java | 2 +- .../sql/token/common/pojo/generic/SubstitutableColumnNameToken.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SimpleTableSegmentBinder.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SimpleTableSegmentBinder.java index f02b27f33e5..11efe589743 100644 --- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SimpleTableSegmentBinder.java +++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SimpleTableSegmentBinder.java @@ -123,7 +123,7 @@ public final class SimpleTableSegmentBinder { if (SystemSchemaManager.isSystemTable(schemaName, tableName)) { return; } - if (binderContext.getExternalTableBinderContexts().containsKey(tableName)) { + if (binderContext.getExternalTableBinderContexts().containsKey(new CaseInsensitiveString(tableName))) { return; } ShardingSpherePreconditions.checkState(binderContext.getMetaData().containsDatabase(databaseName) diff --git a/infra/rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/token/common/pojo/generic/SubstitutableColumnNameToken.java b/infra/rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/token/common/pojo/generic/SubstitutableColumnNameToken.java index e7d114d406e..e4cec11c354 100644 --- a/infra/rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/token/common/pojo/generic/SubstitutableColumnNameToken.java +++ b/infra/rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/token/common/pojo/generic/SubstitutableColumnNameToken.java @@ -39,7 +39,8 @@ import java.util.Map; /** * Substitutable column name token. */ -@EqualsAndHashCode(callSuper = false) +// TODO remove @EqualsAndHashCode in token rewriter +@EqualsAndHashCode(callSuper = false, exclude = "projections") public final class SubstitutableColumnNameToken extends SQLToken implements Substitutable, RouteUnitAware { private static final String COLUMN_NAME_SPLITTER = ", ";