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 21:10:15 UTC
[8/8] 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/82470e32
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/82470e32
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/82470e32
Branch: refs/heads/master
Commit: 82470e32de3d42125ab89ce9c5cbad97f5833df1
Parents: 409fd3a
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 12:32:01 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/82470e32/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