You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by im...@apache.org on 2018/10/19 16:18:01 UTC

[29/51] [partial] asterixdb git commit: Revert "[ASTERIXDB-2454] Remove non-unique AQL tests"

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv08/cross-dv08.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv08/cross-dv08.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv08/cross-dv08.2.update.aql
new file mode 100644
index 0000000..5fc15c2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv08/cross-dv08.2.update.aql
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create two UDFs in two different dataverses and create datasets in tose dvs
+ *              : access the datasets from the UDF defined in the other dataverse and invoke one of the UDF
+ * Expected Res : Success
+ * Date         : Sep 7th 2012
+ */
+
+// dv1 - udf1 - dataset1
+// dv2 - udf2 - dataset2
+
+insert into dataset test.t1({"id":24});
+insert into dataset test.t1({"id":23});
+insert into dataset test.t1({"id":21});
+insert into dataset test.t1({"id":44});
+insert into dataset test.t1({"id":64});
+
+insert into dataset fest.t1({"id":24});
+insert into dataset fest.t1({"id":23});
+insert into dataset fest.t1({"id":21});
+insert into dataset fest.t1({"id":44});
+insert into dataset fest.t1({"id":64});
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv08/cross-dv08.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv08/cross-dv08.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv08/cross-dv08.3.query.aql
new file mode 100644
index 0000000..557ea69
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv08/cross-dv08.3.query.aql
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create two UDFs in two different dataverses and create datasets in tose dvs
+ *              : access the datasets from the UDF defined in the other dataverse and invoke one of the UDF
+ * Expected Res : Success
+ * Date         : Sep 7th 2012
+ */
+
+// dv1 - udf1 - dataset1
+// dv2 - udf2 - dataset2
+
+let $a := test.f1()
+let $b := fest.f1()
+return { "a" : $a, "b" : $b }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv09/cross-dv09.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv09/cross-dv09.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv09/cross-dv09.1.ddl.aql
new file mode 100644
index 0000000..0552b96
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv09/cross-dv09.1.ddl.aql
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create user defined funs. in two different dataverses
+ *              : and invoke one of them.
+ *              : In this test we use fully qualified names to access and create the UDFs.
+ * Expected Res : Success
+ * Date         : 31st Aug 2012
+ */
+
+drop dataverse testdv1 if exists;
+drop dataverse testdv2 if exists;
+create dataverse testdv1;
+create dataverse testdv2;
+
+create function testdv1.fun01(){
+"function 01"
+}
+
+create function testdv2.fun02(){
+"function 02"
+}
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv09/cross-dv09.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv09/cross-dv09.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv09/cross-dv09.2.update.aql
new file mode 100644
index 0000000..59958b9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv09/cross-dv09.2.update.aql
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create user defined funs. in two different dataverses
+ *              : and invoke one of them.
+ *              : In this test we use fully qualified names to access and create the UDFs.
+ * Expected Res : Success
+ * Date         : 31st Aug 2012
+ */
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv09/cross-dv09.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv09/cross-dv09.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv09/cross-dv09.3.query.aql
new file mode 100644
index 0000000..28e8a57
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv09/cross-dv09.3.query.aql
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create user defined funs. in two different dataverses
+ *              : and invoke one of them.
+ *              : In this test we use fully qualified names to access and create the UDFs.
+ * Expected Res : Success
+ * Date         : 31st Aug 2012
+ */
+
+use dataverse testdv1;
+
+testdv1.fun01()

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv11/cross-dv11.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv11/cross-dv11.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv11/cross-dv11.1.ddl.aql
new file mode 100644
index 0000000..5a7b7b2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv11/cross-dv11.1.ddl.aql
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* 
+ * Description  : Create two UDFs in two different dataverses
+ *              : Invoke one UDF from the body of the other UDF.
+ * Expected Res : Success
+ * Date         : 31st Aug 2012
+ */
+
+drop dataverse testdv1 if exists;
+drop dataverse testdv2 if exists;
+create dataverse testdv1;
+create dataverse testdv2;
+
+create function testdv2.fun02(){
+"function 02"
+}
+
+create function testdv1.fun01(){
+testdv2.fun02()
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv11/cross-dv11.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv11/cross-dv11.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv11/cross-dv11.2.update.aql
new file mode 100644
index 0000000..89a6884
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv11/cross-dv11.2.update.aql
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* 
+ * Description  : Create two UDFs in two different dataverses
+ *              : Invoke one UDF from the body of the other UDF.
+ * Expected Res : Success
+ * Date         : 31st Aug 2012
+ */
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv11/cross-dv11.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv11/cross-dv11.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv11/cross-dv11.3.query.aql
new file mode 100644
index 0000000..a4b9a5c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv11/cross-dv11.3.query.aql
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* 
+ * Description  : Create two UDFs in two different dataverses
+ *              : Invoke one UDF from the body of the other UDF.
+ * Expected Res : Success
+ * Date         : 31st Aug 2012
+ */
+
+use dataverse testdv1;
+
+testdv1.fun01()

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv12/cross-dv12.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv12/cross-dv12.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv12/cross-dv12.1.ddl.aql
new file mode 100644
index 0000000..7cee27c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv12/cross-dv12.1.ddl.aql
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* 
+ * Description  : Create two UDFs in two different dataverses
+ *              : Bind the results returned by each UDF to a variable and return those variables
+ * Expected Res : Success
+ * Date         : 31st Aug 2012
+ */
+
+drop dataverse testdv1 if exists;
+drop dataverse testdv2 if exists;
+create dataverse testdv1;
+create dataverse testdv2;
+
+create function testdv1.fun01(){
+"function 01"
+}
+
+create function testdv2.fun02(){
+"function 02"
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv12/cross-dv12.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv12/cross-dv12.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv12/cross-dv12.2.update.aql
new file mode 100644
index 0000000..9862c5f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv12/cross-dv12.2.update.aql
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* 
+ * Description  : Create two UDFs in two different dataverses
+ *              : Bind the results returned by each UDF to a variable and return those variables
+ * Expected Res : Success
+ * Date         : 31st Aug 2012
+ */
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv12/cross-dv12.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv12/cross-dv12.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv12/cross-dv12.3.query.aql
new file mode 100644
index 0000000..e2269c7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv12/cross-dv12.3.query.aql
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* 
+ * Description  : Create two UDFs in two different dataverses
+ *              : Bind the results returned by each UDF to a variable and return those variables
+ * Expected Res : Success
+ * Date         : 31st Aug 2012
+ */
+
+
+use dataverse testdv1;
+use dataverse testdv2;
+
+let $a := testdv1.fun01()
+let $b := testdv2.fun02()
+return {"fun-01":$a,"fun-02":$b}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv14/cross-dv14.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv14/cross-dv14.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv14/cross-dv14.1.ddl.aql
new file mode 100644
index 0000000..6d6ae30
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv14/cross-dv14.1.ddl.aql
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create UDF and invoke UDF in return clause of FLWOR expression
+ * Expected Res : Success
+ * Date         : 31st Aug 2012
+ */
+
+drop dataverse testdv1 if exists;
+create dataverse testdv1;
+
+create function testdv1.fun01(){
+100
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv14/cross-dv14.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv14/cross-dv14.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv14/cross-dv14.2.update.aql
new file mode 100644
index 0000000..7f66209
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv14/cross-dv14.2.update.aql
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create UDF and invoke UDF in return clause of FLWOR expression
+ * Expected Res : Success
+ * Date         : 31st Aug 2012
+ */

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv14/cross-dv14.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv14/cross-dv14.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv14/cross-dv14.3.query.aql
new file mode 100644
index 0000000..b5aaf10
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv14/cross-dv14.3.query.aql
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create UDF and invoke UDF in return clause of FLWOR expression
+ * Expected Res : Success
+ * Date         : 31st Aug 2012
+ */
+
+
+use dataverse testdv1;
+
+let $a := true
+return testdv1.fun01();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv15/cross-dv15.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv15/cross-dv15.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv15/cross-dv15.1.ddl.aql
new file mode 100644
index 0000000..a4eca7d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv15/cross-dv15.1.ddl.aql
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create user defined functions using fully qualified names
+ *              : verify their details in Function dataset in Metadata dataverse.
+ * Expected Res :
+ * Date         : 30th Aug 2012
+ */
+
+drop dataverse testdv1 if exists;
+create dataverse testdv1;
+
+// UDF with no inputs
+create function testdv1.fun01(){
+100
+}
+
+// UDF with one input
+create function testdv1.fun02($a){
+"function 02"
+}
+
+// UDF with two inputs
+create function testdv1.fun03($b,$c){
+$b+$c
+}
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv15/cross-dv15.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv15/cross-dv15.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv15/cross-dv15.2.update.aql
new file mode 100644
index 0000000..8e48045
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv15/cross-dv15.2.update.aql
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create user defined functions using fully qualified names
+ *              : verify their details in Function dataset in Metadata dataverse.
+ * Expected Res :
+ * Date         : 30th Aug 2012
+ */
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv15/cross-dv15.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv15/cross-dv15.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv15/cross-dv15.3.query.aql
new file mode 100644
index 0000000..2dc595b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv15/cross-dv15.3.query.aql
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create user defined functions using fully qualified names
+ *              : verify their details in Function dataset in Metadata dataverse.
+ * Expected Res :
+ * Date         : 30th Aug 2012
+ */
+
+
+for $l in dataset('Metadata.Function')
+where $l.DataverseName='testdv1'
+return {
+"DataverseName": $l.DataverseName,
+"Name": $l.Name,
+"Arity": $l.Arity,
+"ReturnType": $l.ReturnType
+};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17/cross-dv17.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17/cross-dv17.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17/cross-dv17.1.ddl.aql
new file mode 100644
index 0000000..65ce417
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17/cross-dv17.1.ddl.aql
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Decription   : Create UDF to query two different datasets that are in tow different dataverses.
+ * Expected Res : Success
+ * Date         : Sep 7 2012
+ */
+
+// this test currently gives ParseException
+
+drop dataverse test if exists;
+drop dataverse fest if exists;
+
+create dataverse test;
+create dataverse fest;
+
+create type test.testtype as open {
+id : int32
+}
+
+create type fest.testtype as open {
+id : int32
+}
+
+create dataset test.t1(testtype) primary key id;
+create dataset fest.t1(testtype) primary key id;
+
+create function fest.f1(){
+for $m in dataset('test.t1')
+for $l in dataset('fest.t1')
+order by $m,$l
+return { "l":$l,"m":$m }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17/cross-dv17.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17/cross-dv17.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17/cross-dv17.2.update.aql
new file mode 100644
index 0000000..22de905
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17/cross-dv17.2.update.aql
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Decription   : Create UDF to query two different datasets that are in tow different dataverses.
+ * Expected Res : Success
+ * Date         : Sep 7 2012
+ */
+
+// this test currently gives ParseException
+
+insert into dataset test.t1({"id":24});
+insert into dataset test.t1({"id":23});
+insert into dataset test.t1({"id":21});
+insert into dataset test.t1({"id":44});
+insert into dataset test.t1({"id":64});
+
+insert into dataset fest.t1({"id":24});
+insert into dataset fest.t1({"id":23});
+insert into dataset fest.t1({"id":21});
+insert into dataset fest.t1({"id":44});
+insert into dataset fest.t1({"id":64});
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17/cross-dv17.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17/cross-dv17.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17/cross-dv17.3.query.aql
new file mode 100644
index 0000000..c090e58
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17/cross-dv17.3.query.aql
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Decription   : Create UDF to query two different datasets that are in tow different dataverses.
+ * Expected Res : Success
+ * Date         : Sep 7 2012
+ */
+
+// this test currently gives ParseException
+
+use dataverse fest;
+
+fest.f1();
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18/cross-dv18.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18/cross-dv18.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18/cross-dv18.1.ddl.aql
new file mode 100644
index 0000000..825f049
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18/cross-dv18.1.ddl.aql
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create two dataverses and one dataset in each of the dataverse
+ *              : insert data and query using the datasets using fully qualified names and return results.
+ * Expected Res : Success
+ * Date         : Sep 7th 2012
+ * Ignored      : Not part of the current test build because of Issue 199
+ */
+
+
+drop dataverse test if exists;
+drop dataverse fest if exists;
+
+create dataverse test;
+create dataverse fest;
+
+create type test.testtype as open {
+id : int32
+}
+
+create type fest.testtype as open {
+id : int32
+}
+
+create dataset test.t1(testtype) primary key id;
+create dataset fest.t1(testtype) primary key id;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18/cross-dv18.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18/cross-dv18.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18/cross-dv18.2.update.aql
new file mode 100644
index 0000000..1a716aa
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18/cross-dv18.2.update.aql
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create two dataverses and one dataset in each of the dataverse
+ *              : insert data and query using the datasets using fully qualified names and return results.
+ * Expected Res : Success
+ * Date         : Sep 7th 2012
+ * Ignored      : Not part of the current test build because of Issue 199
+ */
+
+
+insert into dataset test.t1({"id":24});
+insert into dataset test.t1({"id":23});
+insert into dataset test.t1({"id":21});
+insert into dataset test.t1({"id":44});
+insert into dataset test.t1({"id":64});
+
+insert into dataset fest.t1({"id":24});
+insert into dataset fest.t1({"id":23});
+insert into dataset fest.t1({"id":21});
+insert into dataset fest.t1({"id":44});
+insert into dataset fest.t1({"id":64});
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18/cross-dv18.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18/cross-dv18.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18/cross-dv18.3.query.aql
new file mode 100644
index 0000000..e28718a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18/cross-dv18.3.query.aql
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create two dataverses and one dataset in each of the dataverse
+ *              : insert data and query using the datasets using fully qualified names and return results.
+ * Expected Res : Success
+ * Date         : Sep 7th 2012
+ * Ignored      : Not part of the current test build because of Issue 199
+ */
+
+
+let $a := (for $l in dataset('fest.t1') return $l)
+let $b := (for $m in dataset('test.t1') return $m)
+return {"a":$a,"b":$b}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19/cross-dv19.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19/cross-dv19.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19/cross-dv19.1.ddl.aql
new file mode 100644
index 0000000..245159a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19/cross-dv19.1.ddl.aql
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create internal and external datasets in more than one dataverse and query metadata to verify entries in Metadata.
+ * Expected Res : Success
+ * Date         : Sep 20 2012
+ */
+
+drop dataverse test1 if exists;
+drop dataverse test2 if exists;
+create dataverse test1;
+create dataverse test2;
+
+create type test1.testtype as open {
+id : int32,
+name : string,
+loc: point,
+time: datetime
+}
+
+create type test2.testtype as open {
+id : int32,
+name : string?,
+loc: point,
+time: datetime
+}
+
+create type test1.Tweet as open {
+  id: int32,
+  tweetid: int64,
+  loc: point,
+  time: datetime,
+  text: string
+}
+
+create dataset test1.t1(testtype) primary key id;
+
+create dataset test2.t2(testtype) primary key id;
+
+create dataset test2.t3(testtype) primary key id;
+
+create dataset test1.t2(testtype) primary key id;
+
+create dataset test1.t3(testtype) primary key id;
+
+create dataset test2.t4(testtype) primary key id;
+
+create external dataset test1.TwitterData(Tweet)
+using localfs
+(("path"="asterix_nc1://data/twitter/extrasmalltweets.txt"),("format"="adm"));
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19/cross-dv19.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19/cross-dv19.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19/cross-dv19.2.update.aql
new file mode 100644
index 0000000..0f84ea2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19/cross-dv19.2.update.aql
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create internal and external datasets in more than one dataverse and query metadata to verify entries in Metadata.
+ * Expected Res : Success
+ * Date         : Sep 20 2012
+ */
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19/cross-dv19.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19/cross-dv19.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19/cross-dv19.3.query.aql
new file mode 100644
index 0000000..2017742
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19/cross-dv19.3.query.aql
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create internal and external datasets in more than one dataverse and query metadata to verify entries in Metadata.
+ * Expected Res : Success
+ * Date         : Sep 20 2012
+ */
+
+for $l in dataset('Metadata.Dataset')
+where $l.DataverseName='test1' or $l.DataverseName='test2' or $l.DataverseName='TwitterData'
+order by $l.DataverseName, $l.DatasetName, $l.DatatypeDataverseName
+return $l
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.1.ddl.aql
new file mode 100644
index 0000000..afc8050
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.1.ddl.aql
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Test various syntax for dataset access
+ *              : Using parentheses for dataset access is now optional
+ *              : New syntax can use fully qualified names to access datasets.
+ * Expected Res : Success
+ * Date         : 6th March 2013
+ */
+
+drop dataverse student if exists;
+drop dataverse teacher if exists;
+
+create dataverse student;
+create dataverse teacher;
+
+create type student.stdType as open {
+id : int64,
+name : string,
+age : int64,
+sex : string,
+dept : string
+}
+
+create type teacher.tchrType as open {
+id : int64,
+name : string,
+age : int64,
+sex : string,
+dept : string
+}
+
+create dataset student.ugdstd(stdType) primary key id;
+create dataset student.gdstd(stdType) primary key id;
+create dataset teacher.prof(tchrType) primary key id;
+create dataset teacher.pstdoc(tchrType) primary key id;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.2.update.aql
new file mode 100644
index 0000000..9a7067f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.2.update.aql
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+insert into dataset student.ugdstd({"id":457,"name":"John Doe","age":22,"sex":"M","dept":"Dance"});
+
+insert into dataset student.gdstd({"id":418,"name":"John Smith","age":26,"sex":"M","dept":"Economics"});
+
+insert into dataset teacher.prof({"id":152,"name":"John Meyer","age":42,"sex":"M","dept":"History"});
+
+insert into dataset teacher.pstdoc({"id":259,"name":"Sophia Reece","age":36,"sex":"F","dept":"Anthropology"});
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.3.query.aql
new file mode 100644
index 0000000..5df3c58
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.3.query.aql
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+for $s in dataset student.ugdstd
+for $p in dataset('teacher.prof')
+for $a in dataset("student.gdstd")
+for $b in dataset teacher.pstdoc
+return {"ug-student":$s,"prof":$p,"grd-student":$a,"postdoc":$b}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset/drop_dataset.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset/drop_dataset.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset/drop_dataset.1.ddl.aql
new file mode 100644
index 0000000..1b7c8da
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset/drop_dataset.1.ddl.aql
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type test.AddressType as open {
+  number: int32,
+  street: string,
+  city: string
+};
+
+create type test.CustomerType as closed {
+  cid: int32,
+  name: string,
+  cashBack: int32,
+  age: int32?,
+  address: AddressType?,
+  lastorder: {
+    oid: int32,
+    total: float
+  }
+};
+
+create dataset test.Customers(CustomerType) primary key cid;
+
+drop dataset test.Customers;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset/drop_dataset.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset/drop_dataset.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset/drop_dataset.2.update.aql
new file mode 100644
index 0000000..7cae9fa
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset/drop_dataset.2.update.aql
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+// no inserts, deletes

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset/drop_dataset.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset/drop_dataset.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset/drop_dataset.3.query.aql
new file mode 100644
index 0000000..7eec151
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset/drop_dataset.3.query.aql
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+for $x in dataset('Metadata.Dataset')
+where $x.DataverseName='test' and $x.DatasetName='Customers'
+return $x

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.1.ddl.aql
new file mode 100644
index 0000000..bc4506d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.1.ddl.aql
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+//***** Test to read from a dataset and insert into another dataset when the datasets belong to different dataverses*****//
+drop dataverse test1 if exists;
+drop dataverse test2 if exists;
+
+create dataverse test1;
+create dataverse test2;
+
+create type test1.AddressType as open {
+  number: int64,
+  street: string,
+  city: string
+};
+
+create type test1.CustomerType as closed {
+  cid: int64,
+  name: string,
+  cashBack: int64,
+  age: int64?,
+  address: AddressType?,
+  lastorder: {
+    oid: int64,
+    total: float
+  }
+};
+
+create type test2.AddressType as open {
+  number: int64,
+  street: string,
+  city: string
+};
+
+create type test2.CustomerType as closed {
+  cid: int64,
+  name: string,
+  cashBack: int64,
+  age: int64?,
+  address: AddressType?,
+  lastorder: {
+    oid: int64,
+    total: float
+  }
+};
+
+create dataset test1.Customers(CustomerType) primary key cid;
+
+create dataset test2.Customers(CustomerType) primary key cid;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.2.update.aql
new file mode 100644
index 0000000..40c7c4d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.2.update.aql
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+//***** Test to read from a dataset and insert into another dataset when the datasets belong to different dataverses*****//
+
+load dataset test1.Customers
+using localfs
+(("path"="asterix_nc1://data/nontagged/customerData.json"),("format"="adm"));
+
+insert into dataset test2.Customers(
+for $x in dataset('test1.Customers')
+return $x
+);
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.3.query.aql
new file mode 100644
index 0000000..954b6e8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.3.query.aql
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+//***** Test to read from a dataset and insert into another dataset when the datasets belong to different dataverses*****//
+
+use dataverse test2;
+
+for $c in dataset('test2.Customers')
+order by $c.cid
+return $c
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset/insert_from_source_dataset.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset/insert_from_source_dataset.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset/insert_from_source_dataset.1.ddl.aql
new file mode 100644
index 0000000..41cccd9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset/insert_from_source_dataset.1.ddl.aql
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Use fully qualified dataset names to insert into target dataset by doing a select on source dataset.
+ * Expected Res : Success
+ * Date         : Sep 19 2012
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type test.testtype as open {
+id : int32,
+name : string
+}
+
+create dataset test.t1(testtype) primary key id;
+
+create dataset test.t2(testtype) primary key id;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset/insert_from_source_dataset.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset/insert_from_source_dataset.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset/insert_from_source_dataset.2.update.aql
new file mode 100644
index 0000000..b89c079
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset/insert_from_source_dataset.2.update.aql
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Use fully qualified dataset names to insert into target dataset by doing a select on source dataset.
+ * Expected Res : Success
+ * Date         : Sep 19 2012
+ */
+
+
+insert into dataset test.t1({"id":456,"name":"Roger"});
+insert into dataset test.t1({"id":351,"name":"Bob"});
+insert into dataset test.t1({"id":257,"name":"Sammy"});
+insert into dataset test.t1({"id":926,"name":"Richard"});
+insert into dataset test.t1({"id":482,"name":"Kevin"});
+
+insert into dataset test.t2({"id":438,"name":"Ravi"});
+insert into dataset test.t2({"id":321,"name":"Bobby"});
+insert into dataset test.t2({"id":219,"name":"Sam"});
+insert into dataset test.t2({"id":851,"name":"Ricardo"});
+insert into dataset test.t2({"id":201,"name":"Kelvin"});
+
+insert into dataset test.t1(for $l in dataset('test.t2') return $l);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset/insert_from_source_dataset.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset/insert_from_source_dataset.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset/insert_from_source_dataset.3.query.aql
new file mode 100644
index 0000000..a07ea5f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset/insert_from_source_dataset.3.query.aql
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Use fully qualified dataset names to insert into target dataset by doing a select on source dataset.
+ * Expected Res : Success
+ * Date         : Sep 19 2012
+ */
+
+use dataverse test;
+
+for $l in dataset('test.t1')
+order by $l.id
+return $l;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses/join_across_dataverses.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses/join_across_dataverses.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses/join_across_dataverses.1.ddl.aql
new file mode 100644
index 0000000..d87c906
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses/join_across_dataverses.1.ddl.aql
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+//***** Test to conduct a join between datasets belonging to different dataverses*****//
+
+drop dataverse test1 if exists;
+drop dataverse test2 if exists;
+
+create dataverse test1;
+create dataverse test2;
+
+create type test1.AddressType as open {
+  number: int64,
+  street: string,
+  city: string
+};
+
+create type test1.CustomerType as closed {
+  cid: int64,
+  name: string,
+  cashBack: int64,
+  age: int64?,
+  address: AddressType?,
+  lastorder: {
+    oid: int64,
+    total: float
+  }
+};
+
+create dataset test1.Customers(CustomerType)
+primary key cid;
+
+
+create type test2.OrderType as open {
+  oid: int64,
+  cid: int64,
+  orderstatus: string,
+  orderpriority: string,
+  clerk: string,
+  total: float,
+  items: [int64]
+}
+
+create dataset test2.Orders(OrderType)
+primary key oid;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses/join_across_dataverses.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses/join_across_dataverses.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses/join_across_dataverses.2.update.aql
new file mode 100644
index 0000000..264571b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses/join_across_dataverses.2.update.aql
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+//***** Test to conduct a join between datasets belonging to different dataverses*****//
+
+use dataverse test1;
+use dataverse test2;
+
+load dataset test1.Customers
+using localfs
+(("path"="asterix_nc1://data/nontagged/customerData.json"),
+("format"="adm"));
+
+load dataset test2.Orders
+using localfs
+(("path"="asterix_nc1://data/nontagged/orderData.json"),("format"="adm"));
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses/join_across_dataverses.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses/join_across_dataverses.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses/join_across_dataverses.3.query.aql
new file mode 100644
index 0000000..1d300f5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses/join_across_dataverses.3.query.aql
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+//***** Test to conduct a join between datasets belonging to different dataverses*****//
+
+
+use dataverse test1;
+use dataverse test2;
+
+for $c in dataset('test1.Customers')
+for $o in dataset('test2.Orders')
+where $c.cid = $o.cid
+order by $c.name, $o.total
+return {"cust_name":$c.name, "cust_age": $c.age, "order_total":$o.total, "orderList":[$o.oid, $o.cid]}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/metadata_dataset/metadata_dataset.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/metadata_dataset/metadata_dataset.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/metadata_dataset/metadata_dataset.1.ddl.aql
new file mode 100644
index 0000000..0c277d4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/metadata_dataset/metadata_dataset.1.ddl.aql
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+// no DDLs

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/metadata_dataset/metadata_dataset.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/metadata_dataset/metadata_dataset.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/metadata_dataset/metadata_dataset.2.update.aql
new file mode 100644
index 0000000..7cae9fa
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/metadata_dataset/metadata_dataset.2.update.aql
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+// no inserts, deletes

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/metadata_dataset/metadata_dataset.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/metadata_dataset/metadata_dataset.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/metadata_dataset/metadata_dataset.3.query.aql
new file mode 100644
index 0000000..83b2c4e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/metadata_dataset/metadata_dataset.3.query.aql
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+//Query metadata dataset
+
+for $c in dataset('Metadata.Dataset')
+where $c.DataverseName='Metadata'
+return $c
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/csv/basic-types/basic-types.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/csv/basic-types/basic-types.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/csv/basic-types/basic-types.1.ddl.aql
new file mode 100644
index 0000000..6af0413
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/csv/basic-types/basic-types.1.ddl.aql
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type AllType as open {
+  id: int64,
+  string: string,
+  float: float,
+  double: double,
+  boolean: boolean,
+  int8: int8,
+  int16: int16,
+  int32: int32,
+  int64: int64,
+  date: date,
+  time: time,
+  datetime: datetime,
+  duration: duration,
+  point: point,
+  point3d: point3d,
+  line: line,
+  rectangle: rectangle,
+  polygon: polygon,
+  circle: circle,
+  binary: binary,
+  uuid: uuid
+  // union
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/csv/basic-types/basic-types.2.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/csv/basic-types/basic-types.2.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/csv/basic-types/basic-types.2.query.aql
new file mode 100644
index 0000000..f3c44ea
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/csv/basic-types/basic-types.2.query.aql
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use dataverse "test";
+set output-record-type "AllType";
+
+{ "id": 10,
+"string": string("Nancy"),
+"float": 32.5f,
+"double" : double("-2013.5938237483274"),
+"boolean" : true,
+"int8": int8("125"),
+"int16": int16("32765"),
+"int32": int32("294967295"),
+"int64": int64("1700000000000000000"),
+"date": date("-2011-01-27"),
+"time": time("12:20:30Z"),
+"datetime": datetime("-1951-12-27T12:20:30"),
+"duration": duration("P10Y11M12DT10H50M30S"),
+"point": point("41.00,44.00"),
+"point3d": point3d("44.00,13.00,41.00"),
+"line" : line("10.1,11.1 10.2,11.2"),
+"rectangle" : rectangle("5.1,11.8 87.6,15.6548"),
+"polygon" : polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"),
+"circle" : circle("10.1,11.1 10.2"),
+"binary" : hex("ABCDEF0123456789"),
+"uuid" : uuid("5c848e5c-6b6a-498f-8452-8847a2957421")
+}