Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6C82D200D1A for ; Fri, 1 Sep 2017 04:54:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6B28116C675; Fri, 1 Sep 2017 02:54:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B9AC216C670 for ; Fri, 1 Sep 2017 04:54:42 +0200 (CEST) Received: (qmail 93087 invoked by uid 500); 1 Sep 2017 02:54:41 -0000 Mailing-List: contact commits-help@kylin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kylin.apache.org Delivered-To: mailing list commits@kylin.apache.org Received: (qmail 91615 invoked by uid 99); 1 Sep 2017 02:54:38 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2017 02:54:38 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B9AE8F5626; Fri, 1 Sep 2017 02:54:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: liyang@apache.org To: commits@kylin.apache.org Date: Fri, 01 Sep 2017 02:54:58 -0000 Message-Id: <4069b53d0e454ce0b60fe8476b360d36@git.apache.org> In-Reply-To: <5896f3604aff4e5096c09f20eb48fed1@git.apache.org> References: <5896f3604aff4e5096c09f20eb48fed1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [22/50] [abbrv] kylin git commit: KYLIN-2803 allow non-select query when pushdown is enabled archived-at: Fri, 01 Sep 2017 02:54:43 -0000 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 Authored: Tue Aug 22 17:09:13 2017 +0800 Committer: Hongbin Ma 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()); }