kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [22/50] [abbrv] kylin git commit: KYLIN-2803 allow non-select query when pushdown is enabled
Date Fri, 01 Sep 2017 02:54:58 GMT
KYLIN-2803 allow non-select query when pushdown is enabled


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/f26b1abf
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/f26b1abf
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/f26b1abf

Branch: refs/heads/master
Commit: f26b1abf7cc3052dae937713f2ebec083e185ae2
Parents: a637d2a
Author: shaofengshi <shaofengshi@apache.org>
Authored: Tue Aug 22 17:09:13 2017 +0800
Committer: Hongbin Ma <ma@kyligence.io>
Committed: Tue Aug 22 17:39:02 2017 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kylin/rest/service/QueryService.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/f26b1abf/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
----------------------------------------------------------------------
diff --git a/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java b/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
index 75b968b..24ac5a0 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
@@ -366,7 +366,8 @@ public class QueryService extends BasicService {
             logger.info("Using project: " + project);
             logger.info("The original query:  " + sql);
 
-            if (!sql.toLowerCase().contains("select")) {
+            if (!sql.toLowerCase().contains("select")
+                    && KylinConfig.getInstanceFromEnv().isPushDownEnabled() == false)
{
                 logger.debug("Directly return exception as not supported");
                 throw new BadRequestException(msg.getNOT_SUPPORTED_SQL());
             }


Mime
View raw message