You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2016/03/17 23:17:06 UTC

[2/2] calcite git commit: Add test case for [DRILL-4407] GROUP BY subquery causes Java NPE

Add test case for [DRILL-4407] GROUP BY subquery causes Java NPE


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

Branch: refs/heads/master
Commit: 0ad58ed624dfad43bfcd26881588a9d3482397c1
Parents: 3a54e54
Author: Julian Hyde <jh...@apache.org>
Authored: Wed Feb 17 13:33:09 2016 -0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Thu Mar 17 15:15:42 2016 -0700

----------------------------------------------------------------------
 core/src/test/resources/sql/subquery.iq | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/0ad58ed6/core/src/test/resources/sql/subquery.iq
----------------------------------------------------------------------
diff --git a/core/src/test/resources/sql/subquery.iq b/core/src/test/resources/sql/subquery.iq
index 8f0eb70..d4f3a10 100644
--- a/core/src/test/resources/sql/subquery.iq
+++ b/core/src/test/resources/sql/subquery.iq
@@ -274,6 +274,17 @@ GROUP BY emp.deptno;
 
 !ok
 
+# [DRILL-4407] Group by subquery causes Java NPE
+select count(*) as c
+from "scott".emp
+group by (select deptno from "scott".emp where empno = 10);
+ C
+----
+ 14
+(1 row)
+
+!ok
+
 !if (fixed.calcite1045) {
 # Correlated IN sub-query in WHERE clause of JOIN
 select empno from "scott".emp as e