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 0e7d3da Add new function (#9530)
0e7d3da is described below
commit 0e7d3da967cc3c0b4ffd72bb975cad068bf3a35e
Author: Juan Pan(Trista) <[email protected]>
AuthorDate: Mon Mar 1 11:11:38 2021 +0800
Add new function (#9530)
---
.../infra/binder/statement/dml/SelectStatementContext.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git
a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/SelectStatementContext.java
b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/SelectStatementContext.java
index 5989067..45e5b47 100644
---
a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/SelectStatementContext.java
+++
b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/SelectStatementContext.java
@@ -41,6 +41,7 @@ import
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.order.item.Ex
import
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.order.item.IndexOrderByItemSegment;
import
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.order.item.TextOrderByItemSegment;
import
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.predicate.WhereSegment;
+import
org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.JoinTableSegment;
import
org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.dml.SelectStatement;
import org.apache.shardingsphere.sql.parser.sql.common.util.SQLUtil;
@@ -102,6 +103,15 @@ public final class SelectStatementContext extends
CommonSQLStatementContext<Sele
}
/**
+ * Contains join query.
+ *
+ * @return contains join query or not
+ */
+ public boolean containsJoinQuery() {
+ return getSqlStatement().getFrom() instanceof JoinTableSegment;
+ }
+
+ /**
* Set indexes.
*
* @param columnLabelIndexMap map for column label and index