You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by jn...@apache.org on 2015/09/11 07:20:16 UTC
[6/6] drill git commit: DRILL-3280, DRILL-3360, DRILL-3601,
DRILL-3649: Add test cases
DRILL-3280, DRILL-3360, DRILL-3601, DRILL-3649: Add test cases
Fix is in CALCITE-820
Close apache/drill#152
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/b525692e
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/b525692e
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/b525692e
Branch: refs/heads/master
Commit: b525692e05c2a562a664093abd46bf68137b4a3b
Parents: 1b33367
Author: Hsuan-Yi Chu <hs...@usc.edu>
Authored: Wed Sep 9 16:21:54 2015 -0700
Committer: Jinfeng Ni <jn...@apache.org>
Committed: Thu Sep 10 17:52:25 2015 -0700
----------------------------------------------------------------------
.../apache/drill/exec/TestWindowFunctions.java | 35 ++++++++++++++++++++
1 file changed, 35 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/b525692e/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 9a3bc7b..b60f188 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
@@ -211,6 +211,41 @@ public class TestWindowFunctions extends BaseTestQuery {
}
}
+ @Test // DRILL-3360
+ public void testWindowInWindow() throws Exception {
+ thrownException.expect(new UserExceptionMatcher(UserBitShared.DrillPBError.ErrorType.VALIDATION));
+ String query = "select rank() over(order by row_number() over(order by n_nationkey)) \n" +
+ "from cp.`tpch/nation.parquet`";
+
+ test(query);
+ }
+
+ @Test // DRILL-3280
+ public void testMissingOverWithWindowClause() throws Exception {
+ thrownException.expect(new UserExceptionMatcher(UserBitShared.DrillPBError.ErrorType.VALIDATION));
+ String query = "select rank(), cume_dist() over w \n" +
+ "from cp.`tpch/nation.parquet` \n" +
+ "window w as (partition by n_name order by n_nationkey)";
+
+ test(query);
+ }
+
+ @Test // DRILL-3601
+ public void testLeadMissingOver() throws Exception {
+ thrownException.expect(new UserExceptionMatcher(UserBitShared.DrillPBError.ErrorType.VALIDATION));
+ String query = "select lead(n_nationkey) from cp.`tpch/nation.parquet`";
+
+ test(query);
+ }
+
+ @Test // DRILL-3649
+ public void testMissingOverWithConstant() throws Exception {
+ thrownException.expect(new UserExceptionMatcher(UserBitShared.DrillPBError.ErrorType.VALIDATION));
+ String query = "select NTILE(1) from cp.`tpch/nation.parquet`";
+
+ test(query);
+ }
+
@Test // DRILL-3344
public void testWindowGroupBy() throws Exception {
thrownException.expect(new UserExceptionMatcher(UserBitShared.DrillPBError.ErrorType.VALIDATION));