Skip to content

Commit

Permalink
Add exclude field in SubstitutableColumnNameToken to avoid token dupl…
Browse files Browse the repository at this point in the history
…icate (#33307)

* Add exclude field in SubstitutableColumnNameToken to avoid token duplicate

* fix unit test
  • Loading branch information
strongduanmu authored Oct 18, 2024
1 parent 059477f commit e4a857f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private static void checkTableExists(final SQLStatementBinderContext binderConte
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
/**
* 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 = ", ";
Expand Down

0 comments on commit e4a857f

Please sign in to comment.