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

chengzhang 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 c9b8f99d07b Skip table exist validate when bind create table statement 
with skipMetaDadaValidate (#34095)
c9b8f99d07b is described below

commit c9b8f99d07bec3bb63d1600ebd2f2e99661c9527
Author: Zhengqiang Duan <duanzhengqi...@apache.org>
AuthorDate: Wed Dec 18 11:16:59 2024 +0800

    Skip table exist validate when bind create table statement with 
skipMetaDadaValidate (#34095)
---
 .../infra/binder/engine/SQLBindEngine.java               |  4 ++--
 .../engine/segment/combine/CombineSegmentBinder.java     |  3 ++-
 .../segment/expression/type/SubquerySegmentBinder.java   |  3 ++-
 .../segment/from/type/SimpleTableSegmentBinder.java      |  4 ++--
 .../segment/from/type/SubqueryTableSegmentBinder.java    |  3 ++-
 .../engine/statement/SQLStatementBinderContext.java      |  3 +++
 .../infra/binder/engine/type/DDLStatementBindEngine.java |  5 ++++-
 .../infra/binder/engine/type/DMLStatementBindEngine.java |  5 ++++-
 .../segment/expression/type/ColumnSegmentBinderTest.java | 11 ++++++-----
 .../type/ExistsSubqueryExpressionBinderTest.java         |  3 ++-
 .../type/FunctionExpressionSegmentBinderTest.java        |  3 ++-
 .../expression/type/SubquerySegmentBinderTest.java       |  3 ++-
 .../segment/from/type/JoinTableSegmentBinderTest.java    | 16 +++++++++++-----
 .../segment/from/type/SimpleTableSegmentBinderTest.java  |  4 +++-
 .../from/type/SubqueryTableSegmentBinderTest.java        | 10 +++++++---
 .../engine/statement/dml/DeleteStatementBinderTest.java  |  3 ++-
 .../engine/statement/dml/InsertStatementBinderTest.java  |  7 ++++---
 .../engine/statement/dml/SelectStatementBinderTest.java  |  3 ++-
 .../engine/statement/dml/UpdateStatementBinderTest.java  |  3 ++-
 19 files changed, 64 insertions(+), 32 deletions(-)

diff --git 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/SQLBindEngine.java
 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/SQLBindEngine.java
index df2059e29ef..191d4b73382 100644
--- 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/SQLBindEngine.java
+++ 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/SQLBindEngine.java
@@ -61,10 +61,10 @@ public final class SQLBindEngine {
     
     private SQLStatement bindSQLStatement(final SQLStatement statement) {
         if (statement instanceof DMLStatement) {
-            return new DMLStatementBindEngine(metaData, 
currentDatabaseName).bind((DMLStatement) statement);
+            return new DMLStatementBindEngine(metaData, currentDatabaseName, 
hintValueContext).bind((DMLStatement) statement);
         }
         if (statement instanceof DDLStatement) {
-            return new DDLStatementBindEngine(metaData, 
currentDatabaseName).bind((DDLStatement) statement);
+            return new DDLStatementBindEngine(metaData, currentDatabaseName, 
hintValueContext).bind((DDLStatement) statement);
         }
         return statement;
     }
diff --git 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/combine/CombineSegmentBinder.java
 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/combine/CombineSegmentBinder.java
index d3d6180de95..a818cd28604 100644
--- 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/combine/CombineSegmentBinder.java
+++ 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/combine/CombineSegmentBinder.java
@@ -51,7 +51,8 @@ public final class CombineSegmentBinder {
     private static SubquerySegment bindSubquerySegment(final SubquerySegment 
segment, final SQLStatementBinderContext binderContext,
                                                        final 
Multimap<CaseInsensitiveMap.CaseInsensitiveString, TableSegmentBinderContext> 
outerTableBinderContexts) {
         SubquerySegment result = new SubquerySegment(segment.getStartIndex(), 
segment.getStopIndex(), segment.getText());
-        SQLStatementBinderContext subqueryBinderContext = new 
SQLStatementBinderContext(binderContext.getMetaData(), 
binderContext.getCurrentDatabaseName(), segment.getSelect());
+        SQLStatementBinderContext subqueryBinderContext =
+                new SQLStatementBinderContext(binderContext.getMetaData(), 
binderContext.getCurrentDatabaseName(), binderContext.getHintValueContext(), 
segment.getSelect());
         
subqueryBinderContext.getExternalTableBinderContexts().putAll(binderContext.getExternalTableBinderContexts());
         result.setSelect(new 
SelectStatementBinder(outerTableBinderContexts).bind(segment.getSelect(), 
subqueryBinderContext));
         return result;
diff --git 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/SubquerySegmentBinder.java
 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/SubquerySegmentBinder.java
index afaca7dbcdb..63596a38ead 100644
--- 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/SubquerySegmentBinder.java
+++ 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/SubquerySegmentBinder.java
@@ -43,7 +43,8 @@ public final class SubquerySegmentBinder {
      */
     public static SubquerySegment bind(final SubquerySegment segment, final 
SQLStatementBinderContext binderContext,
                                        final Multimap<CaseInsensitiveString, 
TableSegmentBinderContext> outerTableBinderContexts) {
-        SQLStatementBinderContext selectBinderContext = new 
SQLStatementBinderContext(binderContext.getMetaData(), 
binderContext.getCurrentDatabaseName(), segment.getSelect());
+        SQLStatementBinderContext selectBinderContext =
+                new SQLStatementBinderContext(binderContext.getMetaData(), 
binderContext.getCurrentDatabaseName(), binderContext.getHintValueContext(), 
segment.getSelect());
         
selectBinderContext.getExternalTableBinderContexts().putAll(binderContext.getExternalTableBinderContexts());
         SelectStatement boundSelectStatement = new 
SelectStatementBinder(outerTableBinderContexts).bind(segment.getSelect(), 
selectBinderContext);
         return new SubquerySegment(segment.getStartIndex(), 
segment.getStopIndex(), boundSelectStatement, segment.getText());
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 7c3e9c00a68..eb57d97f828 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
@@ -125,8 +125,8 @@ public final class SimpleTableSegmentBinder {
     
     private static void checkTableExists(final SQLStatementBinderContext 
binderContext, final ShardingSphereSchema schema, final String schemaName, 
final String tableName) {
         if (binderContext.getSqlStatement() instanceof CreateTableStatement) {
-            CreateTableStatement sqlStatement = (CreateTableStatement) 
binderContext.getSqlStatement();
-            
ShardingSpherePreconditions.checkState(sqlStatement.isIfNotExists() || 
!schema.containsTable(tableName), () -> new TableExistsException(tableName));
+            
ShardingSpherePreconditions.checkState(binderContext.getHintValueContext().isSkipMetadataValidate()
+                    || ((CreateTableStatement) 
binderContext.getSqlStatement()).isIfNotExists() || 
!schema.containsTable(tableName), () -> new TableExistsException(tableName));
             return;
         }
         if ("DUAL".equalsIgnoreCase(tableName)) {
diff --git 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SubqueryTableSegmentBinder.java
 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SubqueryTableSegmentBinder.java
index bd8b3ae7362..3ab92e9a56e 100644
--- 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SubqueryTableSegmentBinder.java
+++ 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SubqueryTableSegmentBinder.java
@@ -51,7 +51,8 @@ public final class SubqueryTableSegmentBinder {
                                             final 
Multimap<CaseInsensitiveString, TableSegmentBinderContext> tableBinderContexts,
                                             final 
Multimap<CaseInsensitiveString, TableSegmentBinderContext> 
outerTableBinderContexts) {
         fillPivotColumnNamesInBinderContext(segment, binderContext);
-        SQLStatementBinderContext subqueryBinderContext = new 
SQLStatementBinderContext(binderContext.getMetaData(), 
binderContext.getCurrentDatabaseName(), segment.getSubquery().getSelect());
+        SQLStatementBinderContext subqueryBinderContext =
+                new SQLStatementBinderContext(binderContext.getMetaData(), 
binderContext.getCurrentDatabaseName(), binderContext.getHintValueContext(), 
segment.getSubquery().getSelect());
         
subqueryBinderContext.getExternalTableBinderContexts().putAll(binderContext.getExternalTableBinderContexts());
         SelectStatement boundSubSelect = new 
SelectStatementBinder(outerTableBinderContexts).bind(segment.getSubquery().getSelect(),
 subqueryBinderContext);
         SubquerySegment boundSubquerySegment = new 
SubquerySegment(segment.getSubquery().getStartIndex(), 
segment.getSubquery().getStopIndex(), boundSubSelect, 
segment.getSubquery().getText());
diff --git 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/SQLStatementBinderContext.java
 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/SQLStatementBinderContext.java
index 172660b6ed5..9a0afe11c16 100644
--- 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/SQLStatementBinderContext.java
+++ 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/statement/SQLStatementBinderContext.java
@@ -24,6 +24,7 @@ import com.google.common.collect.Multimap;
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 import 
org.apache.shardingsphere.infra.binder.engine.segment.from.context.TableSegmentBinderContext;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.item.ProjectionSegment;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement;
@@ -42,6 +43,8 @@ public final class SQLStatementBinderContext {
     
     private final String currentDatabaseName;
     
+    private final HintValueContext hintValueContext;
+    
     private final SQLStatement sqlStatement;
     
     private final Collection<String> usingColumnNames = new 
CaseInsensitiveSet<>();
diff --git 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/type/DDLStatementBindEngine.java
 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/type/DDLStatementBindEngine.java
index 66a5f021553..948a74bda03 100644
--- 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/type/DDLStatementBindEngine.java
+++ 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/type/DDLStatementBindEngine.java
@@ -21,6 +21,7 @@ import lombok.RequiredArgsConstructor;
 import 
org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext;
 import 
org.apache.shardingsphere.infra.binder.engine.statement.ddl.CreateTableStatementBinder;
 import 
org.apache.shardingsphere.infra.binder.engine.statement.ddl.CursorStatementBinder;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.ddl.CreateTableStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.ddl.CursorStatement;
@@ -36,6 +37,8 @@ public final class DDLStatementBindEngine {
     
     private final String currentDatabaseName;
     
+    private final HintValueContext hintValueContext;
+    
     /**
      * Bind DDL statement.
      *
@@ -43,7 +46,7 @@ public final class DDLStatementBindEngine {
      * @return bound DDL statement
      */
     public DDLStatement bind(final DDLStatement statement) {
-        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(metaData, currentDatabaseName, statement);
+        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(metaData, currentDatabaseName, hintValueContext, 
statement);
         if (statement instanceof CursorStatement) {
             return new CursorStatementBinder().bind((CursorStatement) 
statement, binderContext);
         }
diff --git 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/type/DMLStatementBindEngine.java
 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/type/DMLStatementBindEngine.java
index 00a1688655d..b164c09bb49 100644
--- 
a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/type/DMLStatementBindEngine.java
+++ 
b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/type/DMLStatementBindEngine.java
@@ -23,6 +23,7 @@ import 
org.apache.shardingsphere.infra.binder.engine.statement.dml.DeleteStateme
 import 
org.apache.shardingsphere.infra.binder.engine.statement.dml.InsertStatementBinder;
 import 
org.apache.shardingsphere.infra.binder.engine.statement.dml.SelectStatementBinder;
 import 
org.apache.shardingsphere.infra.binder.engine.statement.dml.UpdateStatementBinder;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dml.DMLStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.dml.DeleteStatement;
@@ -40,6 +41,8 @@ public final class DMLStatementBindEngine {
     
     private final String currentDatabaseName;
     
+    private final HintValueContext hintValueContext;
+    
     /**
      * Bind DML statement.
      *
@@ -47,7 +50,7 @@ public final class DMLStatementBindEngine {
      * @return bound DML statement
      */
     public DMLStatement bind(final DMLStatement statement) {
-        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(metaData, currentDatabaseName, statement);
+        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(metaData, currentDatabaseName, hintValueContext, 
statement);
         if (statement instanceof SelectStatement) {
             return new SelectStatementBinder().bind((SelectStatement) 
statement, binderContext);
         }
diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/ColumnSegmentBinderTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/ColumnSegmentBinderTest.java
index bfaddcd17ba..48dc9a9734d 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/ColumnSegmentBinderTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/ColumnSegmentBinderTest.java
@@ -26,6 +26,7 @@ import 
org.apache.shardingsphere.infra.binder.engine.segment.from.context.type.S
 import 
org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext;
 import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
 import 
org.apache.shardingsphere.infra.exception.kernel.syntax.AmbiguousColumnException;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.ColumnSegment;
@@ -66,7 +67,7 @@ class ColumnSegmentBinderTest {
         ColumnSegment columnSegment = new ColumnSegment(0, 0, new 
IdentifierValue("order_id"));
         SelectStatement selectStatement = mock(SelectStatement.class);
         when(selectStatement.getDatabaseType()).thenReturn(databaseType);
-        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(mock(ShardingSphereMetaData.class), "foo_db", 
selectStatement);
+        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(mock(ShardingSphereMetaData.class), "foo_db", new 
HintValueContext(), selectStatement);
         ColumnSegment actual = ColumnSegmentBinder.bind(columnSegment, 
SegmentType.JOIN_ON, binderContext, tableBinderContexts, 
LinkedHashMultimap.create());
         assertNotNull(actual.getColumnBoundInfo());
         assertNull(actual.getOtherUsingColumnBoundInfo());
@@ -89,7 +90,7 @@ class ColumnSegmentBinderTest {
         outerTableBinderContexts.put(new 
CaseInsensitiveString("t_order_item"), new 
SimpleTableSegmentBinderContext(Collections.singleton(new 
ColumnProjectionSegment(boundOrderItemStatusColumn))));
         SelectStatement selectStatement = mock(SelectStatement.class);
         when(selectStatement.getDatabaseType()).thenReturn(databaseType);
-        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(mock(ShardingSphereMetaData.class), "foo_db", 
selectStatement);
+        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(mock(ShardingSphereMetaData.class), "foo_db", new 
HintValueContext(), selectStatement);
         ColumnSegment columnSegment = new ColumnSegment(0, 0, new 
IdentifierValue("status"));
         ColumnSegment actual = ColumnSegmentBinder.bind(columnSegment, 
SegmentType.PROJECTION, binderContext, LinkedHashMultimap.create(), 
outerTableBinderContexts);
         assertNotNull(actual.getColumnBoundInfo());
@@ -113,7 +114,7 @@ class ColumnSegmentBinderTest {
         tableBinderContexts.put(new CaseInsensitiveString("temp"), new 
SimpleTableSegmentBinderContext(Collections.singleton(new 
ColumnProjectionSegment(boundOrderItemColumn))));
         SelectStatement selectStatement = mock(SelectStatement.class);
         when(selectStatement.getDatabaseType()).thenReturn(databaseType);
-        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(mock(ShardingSphereMetaData.class), "foo_db", 
selectStatement);
+        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(mock(ShardingSphereMetaData.class), "foo_db", new 
HintValueContext(), selectStatement);
         ColumnSegment columnSegment = new ColumnSegment(0, 0, new 
IdentifierValue("status"));
         columnSegment.setOwner(new OwnerSegment(0, 0, new 
IdentifierValue("temp")));
         assertThrows(AmbiguousColumnException.class, () -> 
ColumnSegmentBinder.bind(columnSegment, SegmentType.PROJECTION, binderContext, 
tableBinderContexts, LinkedHashMultimap.create()));
@@ -132,7 +133,7 @@ class ColumnSegmentBinderTest {
         tableBinderContexts.put(new CaseInsensitiveString("temp"), new 
SimpleTableSegmentBinderContext(Collections.singleton(new 
ColumnProjectionSegment(boundOrderItemColumn))));
         SelectStatement selectStatement = mock(SelectStatement.class);
         when(selectStatement.getDatabaseType()).thenReturn(databaseType);
-        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(mock(ShardingSphereMetaData.class), "foo_db", 
selectStatement);
+        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(mock(ShardingSphereMetaData.class), "foo_db", new 
HintValueContext(), selectStatement);
         ColumnSegment columnSegment = new ColumnSegment(0, 0, new 
IdentifierValue("status"));
         columnSegment.setOwner(new OwnerSegment(0, 0, new 
IdentifierValue("temp")));
         ColumnSegment actual = ColumnSegmentBinder.bind(columnSegment, 
SegmentType.PROJECTION, binderContext, tableBinderContexts, 
LinkedHashMultimap.create());
@@ -159,7 +160,7 @@ class ColumnSegmentBinderTest {
         columnSegment.setOwner(new OwnerSegment(0, 0, new 
IdentifierValue("t_order")));
         SelectStatement selectStatement = mock(SelectStatement.class);
         when(selectStatement.getDatabaseType()).thenReturn(databaseType);
-        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(mock(ShardingSphereMetaData.class), "foo_db", 
selectStatement);
+        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(mock(ShardingSphereMetaData.class), "foo_db", new 
HintValueContext(), selectStatement);
         ColumnSegment actual = ColumnSegmentBinder.bind(columnSegment, 
SegmentType.JOIN_ON, binderContext, tableBinderContexts, 
LinkedHashMultimap.create());
         assertTrue(actual.getOwner().isPresent());
         assertTrue(actual.getOwner().get().getTableBoundInfo().isPresent());
diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/ExistsSubqueryExpressionBinderTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/ExistsSubqueryExpressionBinderTest.java
index ce3d1b7b2a2..d5417af227c 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/ExistsSubqueryExpressionBinderTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/ExistsSubqueryExpressionBinderTest.java
@@ -19,6 +19,7 @@ package 
org.apache.shardingsphere.infra.binder.engine.segment.expression.type;
 
 import com.google.common.collect.LinkedHashMultimap;
 import 
org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.ExistsSubqueryExpression;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.subquery.SubquerySegment;
@@ -38,7 +39,7 @@ class ExistsSubqueryExpressionBinderTest {
         MySQLSelectStatement selectStatement = new MySQLSelectStatement();
         selectStatement.setProjections(new ProjectionsSegment(0, 0));
         ExistsSubqueryExpression existsSubqueryExpression = new 
ExistsSubqueryExpression(0, 0, new SubquerySegment(0, 0, selectStatement, 
"t_test"));
-        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(mock(ShardingSphereMetaData.class), "foo_db", 
mock(SQLStatement.class));
+        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(mock(ShardingSphereMetaData.class), "foo_db", new 
HintValueContext(), mock(SQLStatement.class));
         ExistsSubqueryExpression actual = 
ExistsSubqueryExpressionBinder.bind(existsSubqueryExpression, binderContext, 
LinkedHashMultimap.create());
         assertThat(actual.getStartIndex(), 
is(existsSubqueryExpression.getStartIndex()));
         assertThat(actual.getStopIndex(), 
is(existsSubqueryExpression.getStopIndex()));
diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/FunctionExpressionSegmentBinderTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/FunctionExpressionSegmentBinderTest.java
index 699ad7cc129..2fe99340671 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/FunctionExpressionSegmentBinderTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/FunctionExpressionSegmentBinderTest.java
@@ -20,6 +20,7 @@ package 
org.apache.shardingsphere.infra.binder.engine.segment.expression.type;
 import com.google.common.collect.LinkedHashMultimap;
 import org.apache.shardingsphere.infra.binder.engine.segment.SegmentType;
 import 
org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.expr.FunctionSegment;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement;
@@ -34,7 +35,7 @@ class FunctionExpressionSegmentBinderTest {
     @Test
     void assertBindFunctionExpressionSegment() {
         FunctionSegment functionSegment = new FunctionSegment(0, 0, "CONCAT", 
"('%','abc','%')");
-        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(new ShardingSphereMetaData(), "foo_db", 
mock(SQLStatement.class));
+        SQLStatementBinderContext binderContext = new 
SQLStatementBinderContext(new ShardingSphereMetaData(), "foo_db", new 
HintValueContext(), mock(SQLStatement.class));
         FunctionSegment actual = 
FunctionExpressionSegmentBinder.bind(functionSegment, SegmentType.PROJECTION, 
binderContext, LinkedHashMultimap.create(), LinkedHashMultimap.create());
         assertThat(actual.getStartIndex(), 
is(functionSegment.getStartIndex()));
         assertThat(actual.getStopIndex(), is(functionSegment.getStopIndex()));
diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/SubquerySegmentBinderTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/SubquerySegmentBinderTest.java
index f879f813eac..8e488801bae 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/SubquerySegmentBinderTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/expression/type/SubquerySegmentBinderTest.java
@@ -23,6 +23,7 @@ import com.google.common.collect.Multimap;
 import 
org.apache.shardingsphere.infra.binder.engine.segment.from.context.TableSegmentBinderContext;
 import 
org.apache.shardingsphere.infra.binder.engine.segment.from.context.type.SimpleTableSegmentBinderContext;
 import 
org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereColumn;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
@@ -68,7 +69,7 @@ class SubquerySegmentBinderTest {
         ExpressionSegment whereExpressionSegment = new ColumnSegment(86, 91, 
new IdentifierValue("status"));
         mysqlSelectStatement.setWhere(new WhereSegment(80, 102, 
whereExpressionSegment));
         SubquerySegment subquerySegment = new SubquerySegment(39, 103, 
mysqlSelectStatement, "order_id = (SELECT order_id FROM t_order WHERE status = 
'SUBMIT')");
-        SQLStatementBinderContext sqlStatementBinderContext = new 
SQLStatementBinderContext(createMetaData(), "foo_db", mock(SQLStatement.class));
+        SQLStatementBinderContext sqlStatementBinderContext = new 
SQLStatementBinderContext(createMetaData(), "foo_db", new HintValueContext(), 
mock(SQLStatement.class));
         ColumnSegment boundNameColumn = new ColumnSegment(7, 13, new 
IdentifierValue("user_id"));
         boundNameColumn.setColumnBoundInfo(new ColumnSegmentBoundInfo(new 
TableSegmentBoundInfo(
                 new IdentifierValue("foo_db"), new IdentifierValue("foo_db")), 
new IdentifierValue("t_order_item"), new IdentifierValue("user_id")));
diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/JoinTableSegmentBinderTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/JoinTableSegmentBinderTest.java
index 785990cce8e..7829fcb95ba 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/JoinTableSegmentBinderTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/JoinTableSegmentBinderTest.java
@@ -23,6 +23,7 @@ import com.google.common.collect.Multimap;
 import 
org.apache.shardingsphere.infra.binder.engine.segment.from.context.TableSegmentBinderContext;
 import 
org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext;
 import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereColumn;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
@@ -70,7 +71,8 @@ class JoinTableSegmentBinderTest {
         Multimap<CaseInsensitiveString, TableSegmentBinderContext> 
tableBinderContexts = LinkedHashMultimap.create();
         SelectStatement selectStatement = mock(SelectStatement.class);
         when(selectStatement.getDatabaseType()).thenReturn(databaseType);
-        JoinTableSegment actual = 
JoinTableSegmentBinder.bind(joinTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", selectStatement), 
tableBinderContexts, LinkedHashMultimap.create());
+        JoinTableSegment actual = 
JoinTableSegmentBinder.bind(joinTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", new HintValueContext(), 
selectStatement), tableBinderContexts,
+                LinkedHashMultimap.create());
         assertThat(actual.getLeft(), instanceOf(SimpleTableSegment.class));
         assertThat(actual.getRight(), instanceOf(SimpleTableSegment.class));
         
assertJoinTableProjectionSegments(actual.getDerivedJoinTableProjectionSegments());
@@ -109,7 +111,8 @@ class JoinTableSegmentBinderTest {
         Multimap<CaseInsensitiveString, TableSegmentBinderContext> 
tableBinderContexts = LinkedHashMultimap.create();
         SelectStatement selectStatement = mock(SelectStatement.class);
         when(selectStatement.getDatabaseType()).thenReturn(databaseType);
-        JoinTableSegment actual = 
JoinTableSegmentBinder.bind(joinTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", selectStatement), 
tableBinderContexts, LinkedHashMultimap.create());
+        JoinTableSegment actual = 
JoinTableSegmentBinder.bind(joinTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", new HintValueContext(), 
selectStatement), tableBinderContexts,
+                LinkedHashMultimap.create());
         assertThat(actual.getLeft(), instanceOf(SimpleTableSegment.class));
         assertThat(actual.getRight(), instanceOf(SimpleTableSegment.class));
         
assertJoinTableProjectionSegments(actual.getDerivedJoinTableProjectionSegments());
@@ -132,7 +135,8 @@ class JoinTableSegmentBinderTest {
         Multimap<CaseInsensitiveString, TableSegmentBinderContext> 
tableBinderContexts = LinkedHashMultimap.create();
         SelectStatement selectStatement = mock(SelectStatement.class);
         when(selectStatement.getDatabaseType()).thenReturn(databaseType);
-        JoinTableSegment actual = 
JoinTableSegmentBinder.bind(joinTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", selectStatement), 
tableBinderContexts, LinkedHashMultimap.create());
+        JoinTableSegment actual = 
JoinTableSegmentBinder.bind(joinTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", new HintValueContext(), 
selectStatement), tableBinderContexts,
+                LinkedHashMultimap.create());
         assertThat(actual.getLeft(), instanceOf(SimpleTableSegment.class));
         assertThat(actual.getRight(), instanceOf(SimpleTableSegment.class));
         
assertJoinTableProjectionSegmentsWithNaturalJoin(actual.getDerivedJoinTableProjectionSegments());
@@ -169,7 +173,8 @@ class JoinTableSegmentBinderTest {
         Multimap<CaseInsensitiveString, TableSegmentBinderContext> 
tableBinderContexts = LinkedHashMultimap.create();
         SelectStatement selectStatement = mock(SelectStatement.class);
         when(selectStatement.getDatabaseType()).thenReturn(databaseType);
-        JoinTableSegment actual = 
JoinTableSegmentBinder.bind(joinTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", selectStatement), 
tableBinderContexts, LinkedHashMultimap.create());
+        JoinTableSegment actual = 
JoinTableSegmentBinder.bind(joinTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", new HintValueContext(), 
selectStatement), tableBinderContexts,
+                LinkedHashMultimap.create());
         assertThat(actual.getLeft(), instanceOf(SimpleTableSegment.class));
         assertThat(actual.getRight(), instanceOf(SimpleTableSegment.class));
         
assertJoinTableProjectionSegmentsWithUsing(actual.getDerivedJoinTableProjectionSegments());
@@ -205,7 +210,8 @@ class JoinTableSegmentBinderTest {
         Multimap<CaseInsensitiveString, TableSegmentBinderContext> 
tableBinderContexts = LinkedHashMultimap.create();
         SelectStatement selectStatement = mock(SelectStatement.class);
         when(selectStatement.getDatabaseType()).thenReturn(databaseType);
-        JoinTableSegment actual = 
JoinTableSegmentBinder.bind(joinTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", selectStatement), 
tableBinderContexts, LinkedHashMultimap.create());
+        JoinTableSegment actual = 
JoinTableSegmentBinder.bind(joinTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", new HintValueContext(), 
selectStatement), tableBinderContexts,
+                LinkedHashMultimap.create());
         assertThat(actual.getLeft(), instanceOf(JoinTableSegment.class));
         assertThat(((JoinTableSegment) actual.getLeft()).getLeft(), 
instanceOf(SimpleTableSegment.class));
         assertThat(((JoinTableSegment) actual.getLeft()).getRight(), 
instanceOf(SimpleTableSegment.class));
diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SimpleTableSegmentBinderTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SimpleTableSegmentBinderTest.java
index f49fa42d257..408d70f8466 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SimpleTableSegmentBinderTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SimpleTableSegmentBinderTest.java
@@ -24,6 +24,7 @@ import 
org.apache.shardingsphere.infra.binder.engine.segment.from.context.TableS
 import 
org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext;
 import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
 import 
org.apache.shardingsphere.infra.exception.kernel.metadata.TableNotFoundException;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereColumn;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
@@ -53,7 +54,8 @@ class SimpleTableSegmentBinderTest {
         Multimap<CaseInsensitiveString, TableSegmentBinderContext> 
tableBinderContexts = LinkedHashMultimap.create();
         SelectStatement selectStatement = mock(SelectStatement.class);
         when(selectStatement.getDatabaseType()).thenReturn(databaseType);
-        assertThrows(TableNotFoundException.class, () -> 
SimpleTableSegmentBinder.bind(simpleTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", selectStatement), 
tableBinderContexts));
+        assertThrows(TableNotFoundException.class,
+                () -> SimpleTableSegmentBinder.bind(simpleTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", new HintValueContext(), 
selectStatement), tableBinderContexts));
     }
     
     private ShardingSphereMetaData createMetaData() {
diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SubqueryTableSegmentBinderTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SubqueryTableSegmentBinderTest.java
index 8cacd05fe76..62b74650288 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SubqueryTableSegmentBinderTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/SubqueryTableSegmentBinderTest.java
@@ -23,6 +23,7 @@ import com.google.common.collect.Multimap;
 import 
org.apache.shardingsphere.infra.binder.engine.segment.from.context.TableSegmentBinderContext;
 import 
org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext;
 import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereColumn;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
@@ -73,7 +74,8 @@ class SubqueryTableSegmentBinderTest {
         ShardingSphereMetaData metaData = createMetaData();
         Multimap<CaseInsensitiveString, TableSegmentBinderContext> 
tableBinderContexts = LinkedHashMultimap.create();
         SubqueryTableSegment actual =
-                SubqueryTableSegmentBinder.bind(subqueryTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", selectStatement), 
tableBinderContexts, LinkedHashMultimap.create());
+                SubqueryTableSegmentBinder.bind(subqueryTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", new HintValueContext(), 
selectStatement), tableBinderContexts,
+                        LinkedHashMultimap.create());
         assertTrue(actual.getAlias().isPresent());
         assertTrue(tableBinderContexts.containsKey(new 
CaseInsensitiveString("temp")));
         List<ProjectionSegment> projectionSegments = new 
ArrayList<>(tableBinderContexts.get(new 
CaseInsensitiveString("temp")).iterator().next().getProjectionSegments());
@@ -107,7 +109,8 @@ class SubqueryTableSegmentBinderTest {
         ShardingSphereMetaData metaData = createMetaData();
         Multimap<CaseInsensitiveString, TableSegmentBinderContext> 
tableBinderContexts = LinkedHashMultimap.create();
         SubqueryTableSegment actual =
-                SubqueryTableSegmentBinder.bind(subqueryTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", selectStatement), 
tableBinderContexts, LinkedHashMultimap.create());
+                SubqueryTableSegmentBinder.bind(subqueryTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", new HintValueContext(), 
selectStatement), tableBinderContexts,
+                        LinkedHashMultimap.create());
         assertTrue(actual.getAlias().isPresent());
         assertTrue(tableBinderContexts.containsKey(new 
CaseInsensitiveString("temp")));
         List<ProjectionSegment> projectionSegments = new 
ArrayList<>(tableBinderContexts.get(new 
CaseInsensitiveString("temp")).iterator().next().getProjectionSegments());
@@ -130,7 +133,8 @@ class SubqueryTableSegmentBinderTest {
         ShardingSphereMetaData metaData = createMetaData();
         Multimap<CaseInsensitiveString, TableSegmentBinderContext> 
tableBinderContexts = LinkedHashMultimap.create();
         SubqueryTableSegment actual =
-                SubqueryTableSegmentBinder.bind(subqueryTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", selectStatement), 
tableBinderContexts, LinkedHashMultimap.create());
+                SubqueryTableSegmentBinder.bind(subqueryTableSegment, new 
SQLStatementBinderContext(metaData, "foo_db", new HintValueContext(), 
selectStatement), tableBinderContexts,
+                        LinkedHashMultimap.create());
         assertFalse(actual.getAlias().isPresent());
         assertTrue(tableBinderContexts.containsKey(new 
CaseInsensitiveString("")));
     }
diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/DeleteStatementBinderTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/DeleteStatementBinderTest.java
index 8f3dd0b0728..da79a6e1695 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/DeleteStatementBinderTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/DeleteStatementBinderTest.java
@@ -18,6 +18,7 @@
 package org.apache.shardingsphere.infra.binder.engine.statement.dml;
 
 import 
org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereColumn;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
@@ -53,7 +54,7 @@ class DeleteStatementBinderTest {
         deleteStatement.setTable(simpleTableSegment);
         deleteStatement.setWhere(new WhereSegment(0, 0, new 
BinaryOperationExpression(0, 0, new ColumnSegment(0, 0, new 
IdentifierValue("status")),
                 new LiteralExpressionSegment(0, 0, 0), "=", "status = 1")));
-        DeleteStatement actual = new 
DeleteStatementBinder().bind(deleteStatement, new 
SQLStatementBinderContext(createMetaData(), "foo_db", deleteStatement));
+        DeleteStatement actual = new 
DeleteStatementBinder().bind(deleteStatement, new 
SQLStatementBinderContext(createMetaData(), "foo_db", new HintValueContext(), 
deleteStatement));
         assertThat(actual, not(deleteStatement));
         assertThat(actual.getTable(), not(deleteStatement.getTable()));
         assertThat(actual.getTable(), instanceOf(SimpleTableSegment.class));
diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/InsertStatementBinderTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/InsertStatementBinderTest.java
index afd30cf7975..b2c2463fd5f 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/InsertStatementBinderTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/InsertStatementBinderTest.java
@@ -18,6 +18,7 @@
 package org.apache.shardingsphere.infra.binder.engine.statement.dml;
 
 import 
org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereColumn;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
@@ -61,7 +62,7 @@ class InsertStatementBinderTest {
                 new ColumnSegment(0, 0, new IdentifierValue("user_id")), new 
ColumnSegment(0, 0, new IdentifierValue("status")))));
         insertStatement.getValues().add(new InsertValuesSegment(0, 0, 
Arrays.asList(new LiteralExpressionSegment(0, 0, 1),
                 new LiteralExpressionSegment(0, 0, 1), new 
LiteralExpressionSegment(0, 0, "OK"))));
-        InsertStatement actual = new 
InsertStatementBinder().bind(insertStatement, new 
SQLStatementBinderContext(createMetaData(), "foo_db", insertStatement));
+        InsertStatement actual = new 
InsertStatementBinder().bind(insertStatement, new 
SQLStatementBinderContext(createMetaData(), "foo_db", new HintValueContext(), 
insertStatement));
         assertThat(actual, not(insertStatement));
         assertTrue(actual.getTable().isPresent());
         assertTrue(insertStatement.getTable().isPresent());
@@ -106,7 +107,7 @@ class InsertStatementBinderTest {
         insertStatement.setInsertSelect(new SubquerySegment(0, 0, 
subSelectStatement, ""));
         insertStatement.getValues().add(new InsertValuesSegment(0, 0, 
Arrays.asList(new LiteralExpressionSegment(0, 0, 1),
                 new LiteralExpressionSegment(0, 0, 1), new 
LiteralExpressionSegment(0, 0, "OK"))));
-        InsertStatement actual = new 
InsertStatementBinder().bind(insertStatement, new 
SQLStatementBinderContext(createMetaData(), "foo_db", insertStatement));
+        InsertStatement actual = new 
InsertStatementBinder().bind(insertStatement, new 
SQLStatementBinderContext(createMetaData(), "foo_db", new HintValueContext(), 
insertStatement));
         assertThat(actual, not(insertStatement));
         assertTrue(actual.getTable().isPresent());
         assertTrue(insertStatement.getTable().isPresent());
@@ -130,7 +131,7 @@ class InsertStatementBinderTest {
         insertStatement.setInsertSelect(new SubquerySegment(0, 0, 
subSelectStatement, ""));
         insertStatement.getValues().add(new InsertValuesSegment(0, 0, 
Arrays.asList(new LiteralExpressionSegment(0, 0, 1),
                 new LiteralExpressionSegment(0, 0, 1), new 
LiteralExpressionSegment(0, 0, "OK"))));
-        InsertStatement actual = new 
InsertStatementBinder().bind(insertStatement, new 
SQLStatementBinderContext(createMetaData(), "foo_db", insertStatement));
+        InsertStatement actual = new 
InsertStatementBinder().bind(insertStatement, new 
SQLStatementBinderContext(createMetaData(), "foo_db", new HintValueContext(), 
insertStatement));
         assertThat(actual, not(insertStatement));
         assertTrue(actual.getTable().isPresent());
         assertTrue(insertStatement.getTable().isPresent());
diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/SelectStatementBinderTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/SelectStatementBinderTest.java
index b1c7d2fa2a6..c415b0ca0e4 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/SelectStatementBinderTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/SelectStatementBinderTest.java
@@ -18,6 +18,7 @@
 package org.apache.shardingsphere.infra.binder.engine.statement.dml;
 
 import 
org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereColumn;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
@@ -66,7 +67,7 @@ class SelectStatementBinderTest {
         SimpleTableSegment simpleTableSegment = new SimpleTableSegment(new 
TableNameSegment(0, 0, new IdentifierValue("t_order")));
         selectStatement.setFrom(simpleTableSegment);
         selectStatement.setWhere(mockWhereSegment());
-        SelectStatement actual = new 
SelectStatementBinder().bind(selectStatement, new 
SQLStatementBinderContext(createMetaData(), "foo_db", selectStatement));
+        SelectStatement actual = new 
SelectStatementBinder().bind(selectStatement, new 
SQLStatementBinderContext(createMetaData(), "foo_db", new HintValueContext(), 
selectStatement));
         assertThat(actual, not(selectStatement));
         assertTrue(actual.getFrom().isPresent());
         assertThat(actual.getFrom().get(), not(simpleTableSegment));
diff --git 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/UpdateStatementBinderTest.java
 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/UpdateStatementBinderTest.java
index d0eddea62c5..c83fcb32b88 100644
--- 
a/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/UpdateStatementBinderTest.java
+++ 
b/infra/binder/src/test/java/org/apache/shardingsphere/infra/binder/engine/statement/dml/UpdateStatementBinderTest.java
@@ -18,6 +18,7 @@
 package org.apache.shardingsphere.infra.binder.engine.statement.dml;
 
 import 
org.apache.shardingsphere.infra.binder.engine.statement.SQLStatementBinderContext;
+import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereColumn;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
@@ -53,7 +54,7 @@ class UpdateStatementBinderTest {
         updateStatement.setTable(simpleTableSegment);
         updateStatement.setWhere(new WhereSegment(0, 0, new 
BinaryOperationExpression(0, 0, new ColumnSegment(0, 0, new 
IdentifierValue("status")),
                 new LiteralExpressionSegment(0, 0, 0), "=", "status = 1")));
-        UpdateStatement actual = new 
UpdateStatementBinder().bind(updateStatement, new 
SQLStatementBinderContext(createMetaData(), "foo_db", updateStatement));
+        UpdateStatement actual = new 
UpdateStatementBinder().bind(updateStatement, new 
SQLStatementBinderContext(createMetaData(), "foo_db", new HintValueContext(), 
updateStatement));
         assertThat(actual, not(updateStatement));
         assertThat(actual.getTable(), not(updateStatement.getTable()));
         assertThat(actual.getTable(), instanceOf(SimpleTableSegment.class));

Reply via email to