Return-Path: X-Original-To: apmail-drill-commits-archive@www.apache.org Delivered-To: apmail-drill-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C47018530 for ; Mon, 13 Jul 2015 18:52:29 +0000 (UTC) Received: (qmail 6407 invoked by uid 500); 13 Jul 2015 18:52:29 -0000 Delivered-To: apmail-drill-commits-archive@drill.apache.org Received: (qmail 6376 invoked by uid 500); 13 Jul 2015 18:52:29 -0000 Mailing-List: contact commits-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: commits@drill.apache.org Delivered-To: mailing list commits@drill.apache.org Received: (qmail 6367 invoked by uid 99); 13 Jul 2015 18:52:29 -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; Mon, 13 Jul 2015 18:52:29 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 40D68E0523; Mon, 13 Jul 2015 18:52:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: amansinha@apache.org To: commits@drill.apache.org Message-Id: <0e8cde1d3ddc4d44a518fdc7c33fb824@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: drill git commit: DRILL-3189: Disable disallow partial in Over-Clause Date: Mon, 13 Jul 2015 18:52:29 +0000 (UTC) Repository: drill Updated Branches: refs/heads/master a2fc406c0 -> 7edddd65e DRILL-3189: Disable disallow partial in Over-Clause Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/7edddd65 Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/7edddd65 Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/7edddd65 Branch: refs/heads/master Commit: 7edddd65e9850a35f3cca6d226c98ea354dd40c4 Parents: a2fc406 Author: Hsuan-Yi Chu Authored: Mon Jul 6 13:49:22 2015 -0700 Committer: Aman Sinha Committed: Mon Jul 13 11:41:27 2015 -0700 ---------------------------------------------------------------------- .../sql/parser/UnsupportedOperatorsVisitor.java | 8 ++++++++ .../org/apache/drill/exec/TestWindowFunctions.java | 15 +++++++++++++++ 2 files changed, 23 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/7edddd65/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/UnsupportedOperatorsVisitor.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/UnsupportedOperatorsVisitor.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/UnsupportedOperatorsVisitor.java index 9bbd537..17689ad 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/UnsupportedOperatorsVisitor.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/UnsupportedOperatorsVisitor.java @@ -212,6 +212,14 @@ public class UnsupportedOperatorsVisitor extends SqlShuttle { "See Apache Drill JIRA: DRILL-3188"); throw new UnsupportedOperationException(); } + + // DRILL-3189: Disable DISALLOW PARTIAL + if(!window.isAllowPartial()) { + unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, + "Disallowing partial windows is currently not supported \n" + + "See Apache Drill JIRA: DRILL-3189"); + throw new UnsupportedOperationException(); + } } // Disable unsupported Intersect, Except http://git-wip-us.apache.org/repos/asf/drill/blob/7edddd65/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java index 7071bea..222c7b7 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java @@ -225,6 +225,21 @@ public class TestWindowFunctions extends BaseTestQuery { } } + @Test(expected = UnsupportedFunctionException.class) // DRILL-3189 + public void testWindowWithAllowDisallow() throws Exception { + try { + final String query = "select sum(n_nationKey) over(partition by n_nationKey \n" + + "rows between unbounded preceding and unbounded following disallow partial) \n" + + "from cp.`tpch/nation.parquet` \n" + + "order by n_nationKey"; + + test(query); + } catch(UserException ex) { + throwAsUnsupportedException(ex); + throw ex; + } + } + @Test // DRILL-3344 public void testWindowGroupBy() throws Exception { String query = "explain plan for SELECT max(n_nationkey) OVER (), n_name as col2 \n" +