Fix for issue 813 - enabling prefix btree search with non-matching predicates
Change-Id: I59eb43afa7dbcabd7f43269566d75c9361c55386
Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/171
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: abdullah alamoudi <bamousaa@gmail.com>
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-join_01.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-join_01.aql
new file mode 100644
index 0000000..11d138c
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-join_01.aql
@@ -0,0 +1,24 @@
+/*
+ * Description : Notice the query hint to use an indexed nested-loops join plan in both predicates.
+ * : We expect a plan to have a self-join, which probes dataset Names’s primary index.
+ * Expected Res : Success
+ * Date : 11th November 2014
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type Name as open {
+ fname : string,
+ lname : string
+}
+
+create dataset Names(Name) primary key fname,lname;
+
+write output to nc1:"rttest/btree-index-join_primary-composite-key-prefix-join_01.adm";
+
+for $emp1 in dataset('Names')
+for $emp2 in dataset('Names')
+where $emp1.fname /*+ indexnl*/> $emp2.fname and $emp1.lname /*+ indexnl*/> $emp2.lname
+return {"emp1": $emp1, "emp2": $emp2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-join_02.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-join_02.aql
new file mode 100644
index 0000000..e1a314c
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-join_02.aql
@@ -0,0 +1,24 @@
+/*
+ * Description : Notice the query hint to use an indexed nested-loops join plan in both predicates.
+ * : We expect a plan to have a self-join, which probes dataset Names’s primary index.
+ * Expected Res : Success
+ * Date : 11th November 2014
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type Name as open {
+ fname : string,
+ lname : string
+}
+
+create dataset Names(Name) primary key fname,lname;
+
+write output to nc1:"rttest/btree-index-join_primary-composite-key-prefix-join_02.adm";
+
+for $emp1 in dataset('Names')
+for $emp2 in dataset('Names')
+where $emp1.fname /*+ indexnl*/< $emp2.fname and $emp1.lname /*+ indexnl*/< $emp2.lname
+return {"emp1": $emp1, "emp2": $emp2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-join_03.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-join_03.aql
new file mode 100644
index 0000000..f897db7
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-join_03.aql
@@ -0,0 +1,24 @@
+/*
+ * Description : Notice the query hint to use an indexed nested-loops join plan in both predicates.
+ * : We expect a plan to have a self-join, which probes dataset Names’s primary index.
+ * Expected Res : Success
+ * Date : 11th November 2014
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type Name as open {
+ fname : string,
+ lname : string
+}
+
+create dataset Names(Name) primary key fname,lname;
+
+write output to nc1:"rttest/btree-index-join_primary-composite-key-prefix-join_03.adm";
+
+for $emp1 in dataset('Names')
+for $emp2 in dataset('Names')
+where $emp1.fname /*+ indexnl*/= $emp2.fname and $emp1.lname /*+ indexnl*/= $emp2.lname
+return {"emp1": $emp1, "emp2": $emp2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_01.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_01.aql
new file mode 100644
index 0000000..9c9726d
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_01.aql
@@ -0,0 +1,24 @@
+/*
+ * Description : Notice the query hint to use an indexed nested-loops join plan in both predicates.
+ * : We expect a plan to have a self-join, which probes dataset Names’s with a prefix of its primary index.
+ * Expected Res : Success
+ * Date : 11th November 2014
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type Name as open {
+ fname : string,
+ lname : string
+}
+
+create dataset Names(Name) primary key fname,lname;
+
+write output to nc1:"rttest/btree-index-join_primary-composite-key-prefix-prefix-join_01.adm";
+
+for $emp1 in dataset('Names')
+for $emp2 in dataset('Names')
+where $emp1.fname /*+ indexnl*/< $emp2.fname and $emp1.lname /*+ indexnl*/> $emp2.lname
+return {"emp1": $emp1, "emp2": $emp2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_02.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_02.aql
new file mode 100644
index 0000000..f7f7006
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_02.aql
@@ -0,0 +1,24 @@
+/*
+ * Description : Notice the query hint to use an indexed nested-loops join plan in both predicates.
+ * : We expect a plan to have a self-join, which probes dataset Names’s with a prefix of its primary index.
+ * Expected Res : Success
+ * Date : 11th November 2014
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type Name as open {
+ fname : string,
+ lname : string
+}
+
+create dataset Names(Name) primary key fname,lname;
+
+write output to nc1:"rttest/btree-index-join_primary-composite-key-prefix-prefix-join_02.adm";
+
+for $emp1 in dataset('Names')
+for $emp2 in dataset('Names')
+where $emp1.fname /*+ indexnl*/> $emp2.fname and $emp1.lname /*+ indexnl*/< $emp2.lname
+return {"emp1": $emp1, "emp2": $emp2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_03.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_03.aql
new file mode 100644
index 0000000..c3e68e6
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_03.aql
@@ -0,0 +1,24 @@
+/*
+ * Description : Notice the query hint to use an indexed nested-loops join plan in both predicates.
+ * : We expect a plan to have a self-join, which probes dataset Names’s with a prefix of its primary index.
+ * Expected Res : Success
+ * Date : 11th November 2014
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type Name as open {
+ fname : string,
+ lname : string
+}
+
+create dataset Names(Name) primary key fname,lname;
+
+write output to nc1:"rttest/btree-index-join_primary-composite-key-prefix-prefix-join_03.adm";
+
+for $emp1 in dataset('Names')
+for $emp2 in dataset('Names')
+where $emp1.fname /*+ indexnl*/> $emp2.fname and $emp1.lname /*+ indexnl*/= $emp2.lname
+return {"emp1": $emp1, "emp2": $emp2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_04.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_04.aql
new file mode 100644
index 0000000..e167f28
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_04.aql
@@ -0,0 +1,24 @@
+/*
+ * Description : Notice the query hint to use an indexed nested-loops join plan in both predicates.
+ * : We expect a plan to have a self-join, which probes dataset Names’s with a prefix of its primary index.
+ * Expected Res : Success
+ * Date : 11th November 2014
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type Name as open {
+ fname : string,
+ lname : string
+}
+
+create dataset Names(Name) primary key fname,lname;
+
+write output to nc1:"rttest/btree-index-join_primary-composite-key-prefix-prefix-join_04.adm";
+
+for $emp1 in dataset('Names')
+for $emp2 in dataset('Names')
+where $emp1.fname /*+ indexnl*/< $emp2.fname and $emp1.lname /*+ indexnl*/= $emp2.lname
+return {"emp1": $emp1, "emp2": $emp2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_05.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_05.aql
new file mode 100644
index 0000000..47d37ec
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_05.aql
@@ -0,0 +1,24 @@
+/*
+ * Description : Notice the query hint to use an indexed nested-loops join plan in both predicates.
+ * : We expect a plan to have a self-join, which probes dataset Names’s with a prefix of its primary index.
+ * Expected Res : Success
+ * Date : 11th November 2014
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type Name as open {
+ fname : string,
+ lname : string
+}
+
+create dataset Names(Name) primary key fname,lname;
+
+write output to nc1:"rttest/btree-index-join_primary-composite-key-prefix-prefix-join_05.adm";
+
+for $emp1 in dataset('Names')
+for $emp2 in dataset('Names')
+where $emp1.fname /*+ indexnl*/= $emp2.fname and $emp1.lname /*+ indexnl*/> $emp2.lname
+return {"emp1": $emp1, "emp2": $emp2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_06.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_06.aql
new file mode 100644
index 0000000..62d4114
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index-join/primary-composite-key-prefix-join_06.aql
@@ -0,0 +1,24 @@
+/*
+ * Description : Notice the query hint to use an indexed nested-loops join plan in both predicates.
+ * : We expect a plan to have a self-join, which probes dataset Names’s with a prefix of its primary index.
+ * Expected Res : Success
+ * Date : 11th November 2014
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type Name as open {
+ fname : string,
+ lname : string
+}
+
+create dataset Names(Name) primary key fname,lname;
+
+write output to nc1:"rttest/btree-index-join_primary-composite-key-prefix-prefix-join_06.adm";
+
+for $emp1 in dataset('Names')
+for $emp2 in dataset('Names')
+where $emp1.fname /*+ indexnl*/= $emp2.fname and $emp1.lname /*+ indexnl*/< $emp2.lname
+return {"emp1": $emp1, "emp2": $emp2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-11.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-11.aql
index 164e49a..e688a9b 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-11.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-11.aql
@@ -1,6 +1,6 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the primary BTree index is NOT used
+ * : This test is intended to verify that the primary BTree index is used
* : in the optimized query plan for predicates.
* Expected Result : Success
* Date : 13th Aug 2012
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-12.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-12.aql
index 659d1ff..7453d41 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-12.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-12.aql
@@ -1,12 +1,12 @@
/*
* Description : BTree Index verification (usage) test
- * : This test is intended to verify that the primary BTree index is NOT used
+ * : This test is intended to verify that the primary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
*/
-// Negative test - prefix search
+// Positive test - prefix search
drop dataverse test if exists;
create dataverse test;
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-13.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-13.aql
index 3c49200..d98636c 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-13.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-13.aql
@@ -1,12 +1,12 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the primary BTree index is NOT used
+ * : This test is intended to verify that the primary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
*/
-// Negative test - prefix search
+// Positive test - prefix search
drop dataverse test if exists;
create dataverse test;
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-14.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-14.aql
index e93061f..fc4964e 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-14.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-14.aql
@@ -1,6 +1,6 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the primary BTree index is NOT used
+ * : This test is intended to verify that the primary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-17.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-17.aql
index db9c994..65b7086 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-17.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-17.aql
@@ -1,6 +1,6 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the primary BTree index is NOT used
+ * : This test is intended to verify that the primary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-31.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-31.aql
new file mode 100644
index 0000000..8cf4641
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-31.aql
@@ -0,0 +1,26 @@
+/*
+ * Description : BTree Index verification test
+ * : This test is intended to verify that the primary BTree index is used
+ * : in the optimized query plan.
+ * Expected Result : Success
+ * Date : 11th Nov 2014
+ */
+
+// Positive test - prefix search
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/btree-index_btree-primary-31.adm";
+
+create type TestType as open {
+ fname : string,
+ lname : string
+}
+
+create dataset testdst(TestType) primary key fname,lname;
+
+for $emp in dataset('testdst')
+where $emp.fname = "Julio" and $emp.lname > "Xu"
+return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-32.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-32.aql
new file mode 100644
index 0000000..0a6930b
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-primary-32.aql
@@ -0,0 +1,26 @@
+/*
+ * Description : BTree Index verification test
+ * : This test is intended to verify that the primary BTree index is used
+ * : in the optimized query plan.
+ * Expected Result : Success
+ * Date : 11th Nov 2014
+ */
+
+// Positive test - prefix search
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/btree-index_btree-primary-32.adm";
+
+create type TestType as open {
+ fname : string,
+ lname : string
+}
+
+create dataset testdst(TestType) primary key fname,lname;
+
+for $emp in dataset('testdst')
+where $emp.fname < "Julio" and $emp.lname = "Xu"
+return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-32.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-32.aql
deleted file mode 100644
index f2a12d6..0000000
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-32.aql
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is used
- * : in the optimized query plan.
- * Expected Result : Success
- * Date : 13th Aug 2012
- */
-
-// This is a Positive test - prefix search, BTree index should be used in the plan.
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-write output to nc1:"rttest/btree-index_btree-secondary-32.adm";
-
-create type TestType as open {
- id : int32,
- fname : string,
- lname : string
-}
-
-create dataset testdst(TestType) primary key id;
-
-create index sec_Idx on testdst(fname,lname);
-
-for $emp in dataset('testdst')
-where $emp.fname >= "Susan"
-return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-33.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-33.aql
index f73fe6d..dea4276 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-33.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-33.aql
@@ -1,18 +1,18 @@
/*
- * Description : BTree Index verification (usage) test
+ * Description : BTree Index verification test
* : This test is intended to verify that the secondary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
*/
-// Positive test - prefix search, BTree index should be used.
+// Please note this is a Positive test and the BTree index should be used in the plan.
drop dataverse test if exists;
create dataverse test;
use dataverse test;
-write output to nc1:"rttest/btree-index_btree-secondary-33.adm";
+write output to nc1:"rttest/btree-index_btree-primary-33.adm";
create type TestType as open {
id : int32,
@@ -25,5 +25,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname < "Isa"
+where $emp.fname > "Roger"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-34.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-34.aql
index c637649..a8a0f40 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-34.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-34.aql
@@ -6,7 +6,7 @@
* Date : 13th Aug 2012
*/
-// Positive test - prefix search, BTree index should be used in query plan
+// This is a Positive test - prefix search, BTree index should be used in the plan.
drop dataverse test if exists;
create dataverse test;
@@ -25,5 +25,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname <= "Vanpatten"
+where $emp.fname >= "Susan"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-35.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-35.aql
index dfc5017..7d003eb 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-35.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-35.aql
@@ -1,12 +1,12 @@
/*
- * Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is NOT used
+ * Description : BTree Index verification (usage) test
+ * : This test is intended to verify that the secondary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
*/
-// Negative test - BTree index should NOT be used in query plan
+// Positive test - prefix search, BTree index should be used.
drop dataverse test if exists;
create dataverse test;
@@ -25,5 +25,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname != "Max"
+where $emp.fname < "Isa"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-36.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-36.aql
index 894ba63..f9c070d 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-36.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-36.aql
@@ -6,7 +6,7 @@
* Date : 13th Aug 2012
*/
-// Positive test - prefix search, BTree index should be used in the query plan.
+// Positive test - prefix search, BTree index should be used in query plan
drop dataverse test if exists;
create dataverse test;
@@ -25,5 +25,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname = "Julio"
+where $emp.fname <= "Vanpatten"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-37.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-37.aql
index 7c155ce..a771083 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-37.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-37.aql
@@ -1,12 +1,12 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is NOT used in the optimized query plan.
+ * : This test is intended to verify that the secondary BTree index is NOT used
+ * : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
*/
-// THE BTREE INDEX IN THIS CASE SHOULD NOT BE PICKED UP!!!!
-// Verify that the optimized query plan does not have the BTree search
+// Negative test - BTree index should NOT be used in query plan
drop dataverse test if exists;
create dataverse test;
@@ -25,5 +25,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.lname = "Kim"
+where $emp.fname != "Max"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-38.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-38.aql
index dc63f05..ba47170 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-38.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-38.aql
@@ -1,10 +1,13 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is used in the optimized query plan
+ * : This test is intended to verify that the secondary BTree index is used
+ * : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
*/
+// Positive test - prefix search, BTree index should be used in the query plan.
+
drop dataverse test if exists;
create dataverse test;
use dataverse test;
@@ -22,5 +25,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname = "Young Seok" and $emp.lname = "Kim"
+where $emp.fname = "Julio"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-39.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-39.aql
index a9d32c3..a480186 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-39.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-39.aql
@@ -1,12 +1,12 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is NOT used
- * : in the optimized query plan.
+ * : This test is intended to verify that the secondary BTree index is NOT used in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
*/
-// Negative test
+// THE BTREE INDEX IN THIS CASE SHOULD NOT BE PICKED UP!!!!
+// Verify that the optimized query plan does not have the BTree search
drop dataverse test if exists;
create dataverse test;
@@ -25,5 +25,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname = "Julio" or $emp.lname = "Malaika"
+where $emp.lname = "Kim"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-40.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-40.aql
index 25c6dec..7301b1c 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-40.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-40.aql
@@ -1,7 +1,6 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is used
- * : in the optimized query plan.
+ * : This test is intended to verify that the secondary BTree index is used in the optimized query plan
* Expected Result : Success
* Date : 13th Aug 2012
*/
@@ -23,5 +22,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname > "Alex" and $emp.lname < "Zach"
+where $emp.fname = "Young Seok" and $emp.lname = "Kim"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-41.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-41.aql
index bc65009..950f5fd 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-41.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-41.aql
@@ -6,6 +6,8 @@
* Date : 13th Aug 2012
*/
+// Negative test
+
drop dataverse test if exists;
create dataverse test;
use dataverse test;
@@ -23,5 +25,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname > "Allan" and $emp.lname < "Zubi"
+where $emp.fname = "Julio" or $emp.lname = "Malaika"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-42.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-42.aql
index 289d1b4..e7a378b 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-42.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-42.aql
@@ -1,13 +1,11 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is NOT used
+ * : This test is intended to verify that the secondary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
*/
-// Negative test - prefix search
-
drop dataverse test if exists;
create dataverse test;
use dataverse test;
@@ -25,5 +23,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname > "Allan" and $emp.lname = "Xu"
+where $emp.fname > "Alex" and $emp.lname < "Zach"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-43.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-43.aql
index 86e5d67..5db96b2 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-43.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-43.aql
@@ -1,13 +1,11 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is NOT used
+ * : This test is intended to verify that the secondary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
*/
-// Negative test - prefix search
-
drop dataverse test if exists;
create dataverse test;
use dataverse test;
@@ -25,5 +23,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname = "Julio" and $emp.lname < "Xu"
+where $emp.fname > "Allan" and $emp.lname < "Zubi"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-44.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-44.aql
index 54e149e..7e8bcc6 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-44.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-44.aql
@@ -1,11 +1,13 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is NOT used
+ * : This test is intended to verify that the secondary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
*/
+// Positive test - prefix search
+
drop dataverse test if exists;
create dataverse test;
use dataverse test;
@@ -23,5 +25,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname >= "Michael" and $emp.lname <= "Xu"
+where $emp.fname > "Allan" and $emp.lname = "Xu"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-45.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-45.aql
index cc33e5a..62c30dc 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-45.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-45.aql
@@ -6,6 +6,8 @@
* Date : 13th Aug 2012
*/
+// Positive test - prefix search
+
drop dataverse test if exists;
create dataverse test;
use dataverse test;
@@ -23,5 +25,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname > "Craig" and $emp.lname > "Kevin" and $emp.fname < "Mary" and $emp.lname < "Tomes"
+where $emp.fname = "Julio" and $emp.lname < "Xu"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-46.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-46.aql
index f486e44..48e6112 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-46.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-46.aql
@@ -23,5 +23,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname >= "Craig" and $emp.lname >= "Kevin" and $emp.fname <= "Mary" and $emp.lname <= "Tomes"
+where $emp.fname >= "Michael" and $emp.lname <= "Xu"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-47.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-47.aql
index 5d06a51..ed0f145 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-47.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-47.aql
@@ -1,6 +1,6 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is NOT used
+ * : This test is intended to verify that the secondary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
@@ -23,5 +23,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname <= "Craig" and $emp.lname > "Kevin"
+where $emp.fname > "Craig" and $emp.lname > "Kevin" and $emp.fname < "Mary" and $emp.lname < "Tomes"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-48.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-48.aql
index 2dc1ab4..c1ec5bd 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-48.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-48.aql
@@ -1,7 +1,7 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is NOT used
- * : in the optimized query plan
+ * : This test is intended to verify that the secondary BTree index is used
+ * : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
*/
@@ -23,5 +23,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname != "Michael" and $emp.lname != "Carey"
+where $emp.fname >= "Craig" and $emp.lname >= "Kevin" and $emp.fname <= "Mary" and $emp.lname <= "Tomes"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-49.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-49.aql
index 6175ba6..09132fc 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-49.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-49.aql
@@ -18,11 +18,10 @@
lname : string
}
-// create internal dataset
create dataset testdst(TestType) primary key id;
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname > "Craig" and $emp.lname > "Kevin" and $emp.fname <= "Mary" and $emp.lname <= "Tomes"
+where $emp.fname <= "Craig" and $emp.lname > "Kevin"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-50.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-50.aql
index 04aefc3..89d12cd 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-50.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-50.aql
@@ -1,7 +1,7 @@
/*
* Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is used
- * : in the optimized query plan.
+ * : This test is intended to verify that the secondary BTree index is NOT used
+ * : in the optimized query plan
* Expected Result : Success
* Date : 13th Aug 2012
*/
@@ -23,5 +23,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname >= "Craig" and $emp.lname >= "Kevin" and $emp.fname < "Mary" and $emp.lname < "Tomes"
+where $emp.fname != "Michael" and $emp.lname != "Carey"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-51.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-51.aql
index 5ae63a9..d702d7d 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-51.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-51.aql
@@ -18,10 +18,11 @@
lname : string
}
+// create internal dataset
create dataset testdst(TestType) primary key id;
create index sec_Idx on testdst(fname,lname);
-for $emp in dataset('testdst')
-where $emp.fname >= "Craig" and $emp.lname <= "Kevin" and $emp.fname <= "Mary" and $emp.lname >= "Tomes"
+for $emp in dataset('testdst')
+where $emp.fname > "Craig" and $emp.lname > "Kevin" and $emp.fname <= "Mary" and $emp.lname <= "Tomes"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-52.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-52.aql
index e720742..cfc97c4 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-52.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-52.aql
@@ -1,5 +1,6 @@
/*
- * Description : This test is intended to verify that the secondary BTree index is used
+ * Description : BTree Index verification test
+ * : This test is intended to verify that the secondary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
@@ -16,11 +17,11 @@
fname : string,
lname : string
}
-
+
create dataset testdst(TestType) primary key id;
-create index sec_Idx on testdst(fname);
+create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname > "Max"
+where $emp.fname >= "Craig" and $emp.lname >= "Kevin" and $emp.fname < "Mary" and $emp.lname < "Tomes"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-53.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-53.aql
index 65a9b6d..d4e8381 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-53.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-53.aql
@@ -1,5 +1,6 @@
/*
- * Description : This test is intended to verify that the secondary BTree index is used
+ * Description : BTree Index verification test
+ * : This test is intended to verify that the secondary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
@@ -19,8 +20,8 @@
create dataset testdst(TestType) primary key id;
-create index sec_Idx on testdst(fname);
+create index sec_Idx on testdst(fname,lname);
-for $emp in dataset('testdst')
-where $emp.fname >= "Sofia"
+for $emp in dataset('testdst')
+where $emp.fname >= "Craig" and $emp.lname <= "Kevin" and $emp.fname <= "Mary" and $emp.lname >= "Tomes"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-54.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-54.aql
index a18975a..f06ba1b 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-54.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-54.aql
@@ -16,11 +16,11 @@
fname : string,
lname : string
}
-
+
create dataset testdst(TestType) primary key id;
create index sec_Idx on testdst(fname);
for $emp in dataset('testdst')
-where $emp.fname < "Chen"
+where $emp.fname > "Max"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-55.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-55.aql
index 94c1463..cb1b8b4 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-55.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-55.aql
@@ -22,5 +22,5 @@
create index sec_Idx on testdst(fname);
for $emp in dataset('testdst')
-where $emp.fname <= "Julio"
+where $emp.fname >= "Sofia"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-56.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-56.aql
index 53f8ca4..01b4735 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-56.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-56.aql
@@ -1,5 +1,5 @@
/*
- * Description : This test is intended to verify that the primary BTree index is used
+ * Description : This test is intended to verify that the secondary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
@@ -9,7 +9,7 @@
create dataverse test;
use dataverse test;
-write output to nc1:"rttest/btree-index_btree-primary-56.adm";
+write output to nc1:"rttest/btree-index_btree-secondary-56.adm";
create type TestType as open {
id : int32,
@@ -22,5 +22,5 @@
create index sec_Idx on testdst(fname);
for $emp in dataset('testdst')
-where $emp.fname > "Neil" and $emp.fname < "Roger"
+where $emp.fname < "Chen"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-57.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-57.aql
index 43cf54d..5d21013 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-57.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-57.aql
@@ -22,5 +22,5 @@
create index sec_Idx on testdst(fname);
for $emp in dataset('testdst')
-where $emp.fname >= "Max" and $emp.fname <= "Roger"
+where $emp.fname <= "Julio"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-58.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-58.aql
index aa18136..5113aca 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-58.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-58.aql
@@ -1,5 +1,5 @@
/*
- * Description : This test is intended to verify that the secondary BTree index is used
+ * Description : This test is intended to verify that the primary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
@@ -9,18 +9,18 @@
create dataverse test;
use dataverse test;
-write output to nc1:"rttest/btree-index_btree-secondary-58.adm";
+write output to nc1:"rttest/btree-index_btree-primary-58.adm";
create type TestType as open {
id : int32,
fname : string,
lname : string
}
-
+
create dataset testdst(TestType) primary key id;
create index sec_Idx on testdst(fname);
for $emp in dataset('testdst')
-where $emp.fname = "Max"
+where $emp.fname > "Neil" and $emp.fname < "Roger"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-59.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-59.aql
index 2b0a300..b5b7022 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-59.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-59.aql
@@ -1,6 +1,5 @@
/*
- * Description : BTree Index verification test
- * : This test is intended to verify that the secondary BTree index is used
+ * Description : This test is intended to verify that the secondary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
* Date : 13th Aug 2012
@@ -10,7 +9,7 @@
create dataverse test;
use dataverse test;
-write output to nc1:"rttest/btree-index_btree-secondary-49.adm";
+write output to nc1:"rttest/btree-index_btree-secondary-59.adm";
create type TestType as open {
id : int32,
@@ -18,11 +17,10 @@
lname : string
}
-// create internal dataset
-create dataset testdst(TestType) primary key id;
+create dataset testdst(TestType) primary key id;
-create index sec_Idx on testdst(fname,lname);
+create index sec_Idx on testdst(fname);
for $emp in dataset('testdst')
-where $emp.fname > "Craig" and $emp.lname > "Kevin" and $emp.fname <= "Mary" and $emp.lname < "Tomes"
+where $emp.fname >= "Max" and $emp.fname <= "Roger"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-60.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-60.aql
new file mode 100644
index 0000000..c32df0f
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-60.aql
@@ -0,0 +1,26 @@
+/*
+ * Description : This test is intended to verify that the secondary BTree index is used
+ * : in the optimized query plan.
+ * Expected Result : Success
+ * Date : 13th Aug 2012
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/btree-index_btree-secondary-60.adm";
+
+create type TestType as open {
+ id : int32,
+ fname : string,
+ lname : string
+}
+
+create dataset testdst(TestType) primary key id;
+
+create index sec_Idx on testdst(fname);
+
+for $emp in dataset('testdst')
+where $emp.fname = "Max"
+return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-31.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-61.aql
similarity index 68%
copy from asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-31.aql
copy to asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-61.aql
index 9f8ebc4..384a648 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-31.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-61.aql
@@ -6,13 +6,11 @@
* Date : 13th Aug 2012
*/
-// Please note this is a Positive test and the BTree index should be used in the plan.
-
drop dataverse test if exists;
create dataverse test;
use dataverse test;
-write output to nc1:"rttest/btree-index_btree-primary-31.adm";
+write output to nc1:"rttest/btree-index_btree-secondary-61.adm";
create type TestType as open {
id : int32,
@@ -20,10 +18,11 @@
lname : string
}
-create dataset testdst(TestType) primary key id;
+// create internal dataset
+create dataset testdst(TestType) primary key id;
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname > "Roger"
+where $emp.fname > "Craig" and $emp.lname > "Kevin" and $emp.fname <= "Mary" and $emp.lname < "Tomes"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-31.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-62.aql
similarity index 71%
copy from asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-31.aql
copy to asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-62.aql
index 9f8ebc4..4761469 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-31.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-62.aql
@@ -3,16 +3,16 @@
* : This test is intended to verify that the secondary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
- * Date : 13th Aug 2012
+ * Date : 11th Nov 2014
*/
-// Please note this is a Positive test and the BTree index should be used in the plan.
+// Positive test - prefix search
drop dataverse test if exists;
create dataverse test;
use dataverse test;
-write output to nc1:"rttest/btree-index_btree-primary-31.adm";
+write output to nc1:"rttest/btree-index_btree-secondary-62.adm";
create type TestType as open {
id : int32,
@@ -25,5 +25,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname > "Roger"
+where $emp.fname = "Julio" and $emp.lname > "Xu"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-31.aql b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-63.aql
similarity index 71%
rename from asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-31.aql
rename to asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-63.aql
index 9f8ebc4..46b2283 100644
--- a/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-31.aql
+++ b/asterix-app/src/test/resources/optimizerts/queries/btree-index/btree-secondary-63.aql
@@ -3,16 +3,16 @@
* : This test is intended to verify that the secondary BTree index is used
* : in the optimized query plan.
* Expected Result : Success
- * Date : 13th Aug 2012
+ * Date : 11th Nov 2014
*/
-// Please note this is a Positive test and the BTree index should be used in the plan.
+// Positive test - prefix search
drop dataverse test if exists;
create dataverse test;
use dataverse test;
-write output to nc1:"rttest/btree-index_btree-primary-31.adm";
+write output to nc1:"rttest/btree-index_btree-secondary-63.adm";
create type TestType as open {
id : int32,
@@ -25,5 +25,5 @@
create index sec_Idx on testdst(fname,lname);
for $emp in dataset('testdst')
-where $emp.fname > "Roger"
+where $emp.fname < "Julio" and $emp.lname = "Xu"
return $emp
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-join_01.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-join_01.plan
new file mode 100644
index 0000000..00b6d92
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-join_01.plan
@@ -0,0 +1,11 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- BROADCAST_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-join_02.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-join_02.plan
new file mode 100644
index 0000000..00b6d92
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-join_02.plan
@@ -0,0 +1,11 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- BROADCAST_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-join_03.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-join_03.plan
new file mode 100644
index 0000000..e046a95
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-join_03.plan
@@ -0,0 +1,11 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_01.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_01.plan
new file mode 100644
index 0000000..87b080d
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_01.plan
@@ -0,0 +1,12 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- BROADCAST_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_02.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_02.plan
new file mode 100644
index 0000000..87b080d
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_02.plan
@@ -0,0 +1,12 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- BROADCAST_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_03.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_03.plan
new file mode 100644
index 0000000..470ac42
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_03.plan
@@ -0,0 +1,12 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- HASH_PARTITION_MERGE_EXCHANGE MERGE:[$$14(ASC), $$15(ASC)] HASH:[$$14] |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_04.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_04.plan
new file mode 100644
index 0000000..470ac42
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_04.plan
@@ -0,0 +1,12 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- HASH_PARTITION_MERGE_EXCHANGE MERGE:[$$14(ASC), $$15(ASC)] HASH:[$$14] |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_05.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_05.plan
new file mode 100644
index 0000000..470ac42
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_05.plan
@@ -0,0 +1,12 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- HASH_PARTITION_MERGE_EXCHANGE MERGE:[$$14(ASC), $$15(ASC)] HASH:[$$14] |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_06.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_06.plan
new file mode 100644
index 0000000..470ac42
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index-join/primary-composite-key-prefix-join_06.plan
@@ -0,0 +1,12 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- HASH_PARTITION_MERGE_EXCHANGE MERGE:[$$14(ASC), $$15(ASC)] HASH:[$$14] |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-10.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-10.plan
index 011cf66..2d4e3ea 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-10.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-10.plan
@@ -3,6 +3,7 @@
-- STREAM_PROJECT |PARTITIONED|
-- STREAM_SELECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-11.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-11.plan
index 011cf66..2d4e3ea 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-11.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-11.plan
@@ -3,6 +3,7 @@
-- STREAM_PROJECT |PARTITIONED|
-- STREAM_SELECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-12.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-12.plan
index 011cf66..279cc83 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-12.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-12.plan
@@ -3,6 +3,7 @@
-- STREAM_PROJECT |PARTITIONED|
-- STREAM_SELECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-13.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-13.plan
index 011cf66..279cc83 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-13.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-13.plan
@@ -3,6 +3,7 @@
-- STREAM_PROJECT |PARTITIONED|
-- STREAM_SELECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-14.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-14.plan
index 011cf66..279cc83 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-14.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-14.plan
@@ -3,6 +3,7 @@
-- STREAM_PROJECT |PARTITIONED|
-- STREAM_SELECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-17.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-17.plan
index 011cf66..279cc83 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-17.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-17.plan
@@ -3,6 +3,7 @@
-- STREAM_PROJECT |PARTITIONED|
-- STREAM_SELECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-31.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-31.plan
new file mode 100644
index 0000000..279cc83
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-31.plan
@@ -0,0 +1,9 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-32.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-32.plan
new file mode 100644
index 0000000..279cc83
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-primary-32.plan
@@ -0,0 +1,9 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-35.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-35.plan
index 06194e4..d7667d6 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-35.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-35.plan
@@ -3,6 +3,13 @@
-- STREAM_SELECT |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- STABLE_SORT [$$9(ASC)] |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-36.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-36.plan
index caa0446..d7667d6 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-36.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-36.plan
@@ -5,11 +5,11 @@
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$10(ASC)] |PARTITIONED|
+ -- STABLE_SORT [$$9(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-38.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-38.plan
index ef8a923..caa0446 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-38.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-38.plan
@@ -5,11 +5,11 @@
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$16(ASC)] |PARTITIONED|
+ -- STABLE_SORT [$$10(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-40.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-40.plan
index 06194e4..ef8a923 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-40.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-40.plan
@@ -3,6 +3,13 @@
-- STREAM_SELECT |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- STABLE_SORT [$$16(ASC)] |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-42.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-42.plan
index 06194e4..faeb779 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-42.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-42.plan
@@ -3,6 +3,13 @@
-- STREAM_SELECT |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- STABLE_SORT [$$13(ASC)] |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-43.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-43.plan
index 06194e4..faeb779 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-43.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-43.plan
@@ -3,6 +3,13 @@
-- STREAM_SELECT |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- STABLE_SORT [$$13(ASC)] |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-44.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-44.plan
index 06194e4..faeb779 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-44.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-44.plan
@@ -3,6 +3,13 @@
-- STREAM_SELECT |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- STABLE_SORT [$$13(ASC)] |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-45.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-45.plan
index 4b4412e..efd83eee 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-45.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-45.plan
@@ -1,17 +1,15 @@
-- DISTRIBUTE_RESULT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
+ -- STABLE_SORT [$$14(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$20(ASC)] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-46.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-46.plan
index 4b4412e..faeb779 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-46.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-46.plan
@@ -1,17 +1,15 @@
-- DISTRIBUTE_RESULT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
+ -- STABLE_SORT [$$13(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$20(ASC)] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-47.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-47.plan
index 06194e4..4b4412e 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-47.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-47.plan
@@ -1,8 +1,17 @@
-- DISTRIBUTE_RESULT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STABLE_SORT [$$20(ASC)] |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-48.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-48.plan
index 06194e4..4b4412e 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-48.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-48.plan
@@ -1,8 +1,17 @@
-- DISTRIBUTE_RESULT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STABLE_SORT [$$20(ASC)] |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-49.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-49.plan
index 4b4412e..faeb779 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-49.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-49.plan
@@ -1,17 +1,15 @@
-- DISTRIBUTE_RESULT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
+ -- STABLE_SORT [$$13(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$20(ASC)] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-50.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-50.plan
index 4b4412e..06194e4 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-50.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-50.plan
@@ -1,17 +1,8 @@
-- DISTRIBUTE_RESULT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$20(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-52.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-52.plan
index 001e10b..4b4412e 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-52.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-52.plan
@@ -1,15 +1,17 @@
-- DISTRIBUTE_RESULT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$8(ASC)] |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- STABLE_SORT [$$20(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-53.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-53.plan
index 001e10b..4b4412e 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-53.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-53.plan
@@ -1,15 +1,17 @@
-- DISTRIBUTE_RESULT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$8(ASC)] |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- STABLE_SORT [$$20(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-56.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-56.plan
index e12cdd8..001e10b 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-56.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-56.plan
@@ -1,17 +1,15 @@
-- DISTRIBUTE_RESULT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
+ -- STABLE_SORT [$$8(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$12(ASC)] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-57.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-57.plan
index e12cdd8..001e10b 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-57.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-57.plan
@@ -1,17 +1,15 @@
-- DISTRIBUTE_RESULT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
+ -- STABLE_SORT [$$8(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$12(ASC)] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-58.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-58.plan
index d7667d6..e12cdd8 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-58.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-58.plan
@@ -1,15 +1,17 @@
-- DISTRIBUTE_RESULT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$9(ASC)] |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
+ -- STABLE_SORT [$$12(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-59.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-59.plan
index 4b4412e..e12cdd8 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-59.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-59.plan
@@ -7,7 +7,7 @@
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$20(ASC)] |PARTITIONED|
+ -- STABLE_SORT [$$12(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-31.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-60.plan
similarity index 100%
rename from asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-31.plan
rename to asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-60.plan
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-61.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-61.plan
new file mode 100644
index 0000000..4b4412e
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-61.plan
@@ -0,0 +1,17 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STABLE_SORT [$$20(ASC)] |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-32.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-62.plan
similarity index 92%
rename from asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-32.plan
rename to asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-62.plan
index d7667d6..efd83eee 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-32.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-62.plan
@@ -5,7 +5,7 @@
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$9(ASC)] |PARTITIONED|
+ -- STABLE_SORT [$$14(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
diff --git a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-32.plan b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-63.plan
similarity index 92%
copy from asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-32.plan
copy to asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-63.plan
index d7667d6..faeb779 100644
--- a/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-32.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/btree-index/btree-secondary-63.plan
@@ -5,7 +5,7 @@
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- BTREE_SEARCH |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$9(ASC)] |PARTITIONED|
+ -- STABLE_SORT [$$13(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|