db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r832423 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/RestrictedVTITest.java
Date Tue, 03 Nov 2009 14:15:20 GMT
Author: rhillegas
Date: Tue Nov  3 14:15:19 2009
New Revision: 832423

URL: http://svn.apache.org/viewvc?rev=832423&view=rev
Log:
DERBY-4357: A couple more tests for restricted vtis.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/RestrictedVTITest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/RestrictedVTITest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/RestrictedVTITest.java?rev=832423&r1=832422&r2=832423&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/RestrictedVTITest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/RestrictedVTITest.java
Tue Nov  3 14:15:19 2009
@@ -587,6 +587,47 @@
              );
     }
 
+    /**
+     * <p>
+     * Test subqueries.
+     * </p>
+     */
+    public void test_07_subqueries() throws Exception
+    {
+        Connection conn = getConnection();
+
+        // table function in subquery
+        assertPR
+            (
+             conn,
+             "select * from t_4357_1 where exists ( select x from table( nullableIntegerList()
) as s( w, x, y, z ) where a = w )\n",
+             new String[][]
+             {
+                 { "100"  },
+                 { "1000"  },
+                 { "10000"  },
+             },
+             "[S_R, S_NR, null, null]",
+             null
+             );
+
+        // table function in inner and outer query blocks
+        assertPR
+            (
+             conn,
+             "select * from table( nullableIntegerList() ) as t( a, b, c, d ) where exists
( select x from table( nullableIntegerList() ) as s( w, x, y, z ) where a = w )\n",
+             new String[][]
+             {
+                 { "100", null, "300", "400"  },
+                 { "1000", "2000", null, "4000"  },
+                 { "10000", "20000", "30000", null  },
+             },
+             "[S_R, S_NR, null, null]",
+             null
+             );
+
+    }
+    
     ///////////////////////////////////////////////////////////////////////////////////
     //
     // SQL ROUTINES



Mime
View raw message