You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by am...@apache.org on 2015/06/29 23:34:33 UTC
[1/2] drill git commit: DRILL-3344: Bump Drill-Calcite version to
1.1.0-drill-r13; Added unit tests
Repository: drill
Updated Branches:
refs/heads/master dbd8925a4 -> e923ac54d
DRILL-3344: Bump Drill-Calcite version to 1.1.0-drill-r13; Added unit tests
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/fdfb1b26
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/fdfb1b26
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/fdfb1b26
Branch: refs/heads/master
Commit: fdfb1b26c42e90bb07eb74f687b4a7328e750edb
Parents: dbd8925
Author: Hsuan-Yi Chu <hs...@usc.edu>
Authored: Mon Jun 29 10:33:16 2015 -0700
Committer: Aman Sinha <as...@maprtech.com>
Committed: Mon Jun 29 14:05:06 2015 -0700
----------------------------------------------------------------------
.../java/org/apache/drill/BaseTestQuery.java | 11 +++++++++
.../apache/drill/exec/TestWindowFunctions.java | 26 ++++++++++++++++++++
pom.xml | 2 +-
3 files changed, 38 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/fdfb1b26/exec/java-exec/src/test/java/org/apache/drill/BaseTestQuery.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/BaseTestQuery.java b/exec/java-exec/src/test/java/org/apache/drill/BaseTestQuery.java
index 46186df..d428920 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/BaseTestQuery.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/BaseTestQuery.java
@@ -35,6 +35,7 @@ import org.apache.drill.exec.client.DrillClient;
import org.apache.drill.exec.exception.SchemaChangeException;
import org.apache.drill.exec.memory.BufferAllocator;
import org.apache.drill.exec.memory.TopLevelAllocator;
+import org.apache.drill.exec.proto.UserBitShared;
import org.apache.drill.exec.proto.UserBitShared.QueryId;
import org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState;
import org.apache.drill.exec.proto.UserBitShared.QueryType;
@@ -354,6 +355,16 @@ public class BaseTestQuery extends ExecTest {
assertThat(expException.getMessage(), containsString(expectedErrorMsg));
}
+ /**
+ * Utility method which tests given query produces a {@link UserException}
+ * with {@link org.apache.drill.exec.proto.UserBitShared.DrillPBError.ErrorType} being DrillPBError.ErrorType.PARSE
+ * the given message.
+ * @param testSqlQuery Test query
+ */
+ protected static void parseErrorHelper(final String testSqlQuery) throws Exception {
+ errorMsgTestHelper(testSqlQuery, UserBitShared.DrillPBError.ErrorType.PARSE.name());
+ }
+
public static String getFile(String resource) throws IOException{
URL url = Resources.getResource(resource);
if (url == null) {
http://git-wip-us.apache.org/repos/asf/drill/blob/fdfb1b26/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 7f75771..24c1f4c 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,32 @@ public class TestWindowFunctions extends BaseTestQuery {
}
}
+ @Test // DRILL-3344
+ public void testWindowGroupBy() throws Exception {
+ String query = "explain plan for SELECT max(n_nationkey) OVER (), n_name as col2 \n" +
+ "from cp.`tpch/nation.parquet` \n" +
+ "group by n_name";
+
+ parseErrorHelper(query);
+ }
+
+ @Test // DRILL-3346
+ public void testWindowGroupByOnView() throws Exception {
+ try {
+ String createView = "create view testWindowGroupByOnView(a, b) as \n" +
+ "select n_nationkey, n_name from cp.`tpch/nation.parquet`";
+ String query = "explain plan for SELECT max(a) OVER (), b as col2 \n" +
+ "from testWindowGroupByOnView \n" +
+ "group by b";
+
+ test("use dfs_test.tmp");
+ test(createView);
+ parseErrorHelper(query);
+ } finally {
+ test("drop view testWindowGroupByOnView");
+ }
+ }
+
@Test // DRILL-3188
public void testWindowFrameEquivalentToDefault() throws Exception {
final String query1 = "explain plan for select sum(n_nationKey) over(partition by n_nationKey order by n_nationKey) \n" +
http://git-wip-us.apache.org/repos/asf/drill/blob/fdfb1b26/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ba7047f..9d40d09 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1226,7 +1226,7 @@
<dependency>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-core</artifactId>
- <version>1.1.0-drill-r12</version>
+ <version>1.1.0-drill-r13</version>
<exclusions>
<exclusion>
<groupId>org.jgrapht</groupId>
[2/2] drill git commit: DRILL-3120: Windows startup throws NPE
Posted by am...@apache.org.
DRILL-3120: Windows startup throws NPE
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/e923ac54
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/e923ac54
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/e923ac54
Branch: refs/heads/master
Commit: e923ac54db6abddcae0d18fc7ed37f4b737b22b2
Parents: fdfb1b2
Author: Aditya Kishore <ad...@apache.org>
Authored: Mon Jun 29 11:57:09 2015 -0700
Committer: Aman Sinha <as...@maprtech.com>
Committed: Mon Jun 29 14:21:14 2015 -0700
----------------------------------------------------------------------
distribution/src/resources/sqlline.bat | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/e923ac54/distribution/src/resources/sqlline.bat
----------------------------------------------------------------------
diff --git a/distribution/src/resources/sqlline.bat b/distribution/src/resources/sqlline.bat
index 3451b0e..05132e4 100755
--- a/distribution/src/resources/sqlline.bat
+++ b/distribution/src/resources/sqlline.bat
@@ -171,7 +171,7 @@ if NOT "test%DRILL_CLASSPATH%"=="test" set DRILL_CP=!DRILL_CP!;%DRILL_CLASSPATH%
rem Override SQLLine's default initial transaction isolation level. (SQLLine
rem sets an initial level instead of leaving it at whatever the Driver's default
-rem is.)
+rem is.)
rem Put our property specification before previous value of DRILL_SHELL_JAVA_OPTS
rem so that it can still be overridden via DRILL_SHELL_JAVA_OPTS.
set DRILL_SHELL_JAVA_OPTS=-Dsqlline.isolation=TRANSACTION_NONE %DRILL_SHELL_JAVA_OPTS%