asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wangs...@apache.org
Subject [2/6] incubator-asterixdb git commit: Fixed ASTERIXDB-1249 and ASTERIXDB-1250: self index-nested-loop join correctly identifies the outer and the inner branch.
Date Sat, 06 Feb 2016 01:25:19 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-check_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-check_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-check_03.plan
index 56b5df4..ed62b15 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-check_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-check_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$21][$$14]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$21][$$13]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$14]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$13]  |PARTITIONED|
                 -- UNION_ALL  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- STREAM_PROJECT  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-check_inline_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-check_inline_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-check_inline_03.plan
index 4c8419d..c827d8f 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-check_inline_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-check_inline_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$26][$$16]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$26][$$15]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$16]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
                 -- UNION_ALL  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- STREAM_PROJECT  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-contains.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-contains.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-contains.plan
index 6e7f514..e736998 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-contains.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance-contains.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$21][$$14]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$21][$$13]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$14]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$13]  |PARTITIONED|
                 -- UNION_ALL  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- STREAM_PROJECT  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_01.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_01.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_01.plan
index 56b5df4..ed62b15 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_01.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$21][$$14]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$21][$$13]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$14]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$13]  |PARTITIONED|
                 -- UNION_ALL  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- STREAM_PROJECT  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_03.plan
index 56b5df4..ed62b15 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$21][$$14]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$21][$$13]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$14]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$13]  |PARTITIONED|
                 -- UNION_ALL  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- STREAM_PROJECT  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_inline_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_inline_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_inline_03.plan
index ec9b837..add232f 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_inline_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-edit-distance_inline_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$26][$$15]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$26][$$14]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$14]  |PARTITIONED|
                 -- UNION_ALL  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- STREAM_PROJECT  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_02.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_02.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_02.plan
index b506ee6..57b9a51 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_02.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$20][$$13]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$20][$$12]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$13]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$12]  |PARTITIONED|
                 -- UNION_ALL  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- STREAM_PROJECT  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_03.plan
index b506ee6..57b9a51 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$20][$$13]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$20][$$12]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$13]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$12]  |PARTITIONED|
                 -- UNION_ALL  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- STREAM_PROJECT  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_01.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_01.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_01.plan
index 10b34a3..420d3ea 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_01.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$24][$$15]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$24][$$14]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$14]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_03.plan
index 10b34a3..420d3ea 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$24][$$15]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$24][$$14]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$14]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_01.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_01.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_01.plan
index 27e8085..5b169eb 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_01.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$25][$$16]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$25][$$15]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$16]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_03.plan
index 27e8085..5b169eb 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$25][$$16]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$25][$$15]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$16]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_inline_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_inline_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_inline_03.plan
index 1bad88a..3b0a3c9 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_inline_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard-check_inline_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$29][$$18]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$29][$$17]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$18]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$17]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_01.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_01.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_01.plan
index 27e8085..5b169eb 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_01.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$25][$$16]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$25][$$15]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$16]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_03.plan
index 27e8085..5b169eb 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$25][$$16]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$25][$$15]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$16]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_inline_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_inline_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_inline_03.plan
index 3b0a3c9..443e560 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_inline_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/ngram-jaccard_inline_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$29][$$17]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$29][$$16]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$17]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$16]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_01.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_01.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_01.plan
index 10b34a3..420d3ea 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_01.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$24][$$15]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$24][$$14]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$14]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_03.plan
index 10b34a3..420d3ea 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$24][$$15]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$24][$$14]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$14]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_01.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_01.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_01.plan
index 27e8085..5b169eb 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_01.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$25][$$16]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$25][$$15]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$16]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_03.plan
index 27e8085..5b169eb 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$25][$$16]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$25][$$15]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$16]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_inline_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_inline_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_inline_03.plan
index 1bad88a..3b0a3c9 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_inline_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard-check_inline_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$29][$$18]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$29][$$17]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$18]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$17]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_01.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_01.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_01.plan
index 27e8085..5b169eb 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_01.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$25][$$16]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$25][$$15]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$16]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_03.plan
index 27e8085..5b169eb 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$25][$$16]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$25][$$15]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$16]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$15]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_inline_03.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_inline_03.plan b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_inline_03.plan
index 3b0a3c9..443e560 100644
--- a/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_inline_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/open-index-enforced/inverted-index-join/word-jaccard_inline_03.plan
@@ -4,12 +4,12 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_PROJECT  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-            -- HYBRID_HASH_JOIN [$$29][$$17]  |PARTITIONED|
+            -- HYBRID_HASH_JOIN [$$29][$$16]  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- DATASOURCE_SCAN  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-              -- HASH_PARTITION_EXCHANGE [$$17]  |PARTITIONED|
+              -- HASH_PARTITION_EXCHANGE [$$16]  |PARTITIONED|
                 -- STREAM_PROJECT  |PARTITIONED|
                   -- STREAM_SELECT  |PARTITIONED|
                     -- ASSIGN  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/optimizerts/results/rtree-index-join/spatial-self-intersect-point.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/rtree-index-join/spatial-self-intersect-point.plan b/asterix-app/src/test/resources/optimizerts/results/rtree-index-join/spatial-self-intersect-point.plan
new file mode 100644
index 0000000..8b52d22
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results/rtree-index-join/spatial-self-intersect-point.plan
@@ -0,0 +1,27 @@
+-- DISTRIBUTE_RESULT  |PARTITIONED|
+  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+    -- STREAM_PROJECT  |PARTITIONED|
+      -- ASSIGN  |PARTITIONED|
+        -- SORT_MERGE_EXCHANGE [$$15(ASC) ]  |PARTITIONED|
+          -- STREAM_PROJECT  |PARTITIONED|
+            -- STREAM_SELECT  |PARTITIONED|
+              -- STREAM_PROJECT  |PARTITIONED|
+                -- ASSIGN  |PARTITIONED|
+                  -- STREAM_PROJECT  |PARTITIONED|
+                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                      -- BTREE_SEARCH  |PARTITIONED|
+                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                          -- STABLE_SORT [$$27(ASC)]  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- STREAM_PROJECT  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- RTREE_SEARCH  |PARTITIONED|
+                                    -- BROADCAST_EXCHANGE  |PARTITIONED|
+                                      -- ASSIGN  |PARTITIONED|
+                                        -- STREAM_PROJECT  |PARTITIONED|
+                                          -- ASSIGN  |PARTITIONED|
+                                            -- STREAM_PROJECT  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.1.ddl.aql
new file mode 100644
index 0000000..2cf6f34
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.1.ddl.aql
@@ -0,0 +1,57 @@
+/*
+ * 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    : We try to do a self-equi join on a dataset.
+ *                  We expect the join to be transformed into an indexed nested-loop join.
+ * Issue          : ASTERIXDB-1250
+ * Success        : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type TwitterUserType as closed {
+    screen-name: string,
+    lang: string,
+    friends-count: int64,
+    statuses-count: int64,
+    name: string,
+    followers-count: int64
+}
+
+create type TweetMessageType as closed {
+    tweetid: int64,
+        user: TwitterUserType,
+        sender-location: point,
+    send-time: datetime,
+        referred-topics: {{ string }},
+    message-text: string,
+    countA: int64,
+    countB: int64
+}
+
+create dataset TweetMessages(TweetMessageType)
+primary key tweetid;
+
+create index twmSndLocIx on TweetMessages(sender-location) type rtree;
+create index msgCountAIx on TweetMessages(countA) type btree;
+create index msgCountBIx on TweetMessages(countB) type btree;
+create index msgTextIx on TweetMessages(message-text) type keyword;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.2.update.aql
new file mode 100644
index 0000000..e069b25
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.2.update.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    : We try to do a self-equi join on a dataset.
+ *                  We expect the join to be transformed into an indexed nested-loop join.
+ * Issue          : ASTERIXDB-1250
+ * Success        : Yes
+ */
+
+use dataverse test;
+
+load dataset TweetMessages
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/twitter/tw_for_indexleftouterjoin.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.3.query.aql
new file mode 100644
index 0000000..8bd0e64
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.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    : We try to do a self-equi join on a dataset.
+ *                  We expect the join to be transformed into an indexed nested-loop join.
+ * Issue          : ASTERIXDB-1250
+ * Success        : Yes
+ */
+
+use dataverse test;
+
+for $t1 in dataset('TweetMessages')
+for $t2 in dataset('TweetMessages')
+let $c := $t1.countA + 20
+where $c /* +indexnl */= $t2.countB
+order by $t2.tweetid
+return {"tweetid2": $t2.tweetid, "count2":$t2.countB};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries/index-join/rtree-spatial-self-intersect-point/rtree-spatial-self-intersect-point.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/rtree-spatial-self-intersect-point/rtree-spatial-self-intersect-point.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/index-join/rtree-spatial-self-intersect-point/rtree-spatial-self-intersect-point.1.ddl.aql
new file mode 100644
index 0000000..25bfd38
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/index-join/rtree-spatial-self-intersect-point/rtree-spatial-self-intersect-point.1.ddl.aql
@@ -0,0 +1,58 @@
+/*
+ * 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    : We try to do a self-equi join on a dataset.
+ *                  We expect the join to be transformed into an indexed nested-loop join.
+ * Issue          : ASTERIXDB-1249
+ * Success        : Yes
+ */
+
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type TwitterUserType as closed {
+    screen-name: string,
+    lang: string,
+    friends-count: int64,
+    statuses-count: int64,
+    name: string,
+    followers-count: int64
+}
+
+create type TweetMessageType as closed {
+    tweetid: int64,
+        user: TwitterUserType,
+        sender-location: point,
+    send-time: datetime,
+        referred-topics: {{ string }},
+    message-text: string,
+    countA: int64,
+    countB: int64
+}
+
+create dataset TweetMessages(TweetMessageType)
+primary key tweetid;
+
+create index twmSndLocIx on TweetMessages(sender-location) type rtree;
+create index msgCountAIx on TweetMessages(countA) type btree;
+create index msgCountBIx on TweetMessages(countB) type btree;
+create index msgTextIx on TweetMessages(message-text) type keyword;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries/index-join/rtree-spatial-self-intersect-point/rtree-spatial-self-intersect-point.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/rtree-spatial-self-intersect-point/rtree-spatial-self-intersect-point.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/index-join/rtree-spatial-self-intersect-point/rtree-spatial-self-intersect-point.2.update.aql
new file mode 100644
index 0000000..a752589
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/index-join/rtree-spatial-self-intersect-point/rtree-spatial-self-intersect-point.2.update.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    : We try to do a self-equi join on a dataset.
+ *                  We expect the join to be transformed into an indexed nested-loop join.
+ * Issue          : ASTERIXDB-1249
+ * Success        : Yes
+ */
+
+use dataverse test;
+
+load dataset TweetMessages
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/twitter/tw_for_indexleftouterjoin.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries/index-join/rtree-spatial-self-intersect-point/rtree-spatial-self-intersect-point.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/rtree-spatial-self-intersect-point/rtree-spatial-self-intersect-point.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/index-join/rtree-spatial-self-intersect-point/rtree-spatial-self-intersect-point.3.query.aql
new file mode 100644
index 0000000..7b6c044
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/index-join/rtree-spatial-self-intersect-point/rtree-spatial-self-intersect-point.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    : We try to do a self-equi join on a dataset.
+ *                  We expect the join to be transformed into an indexed nested-loop join.
+ * Issue          : ASTERIXDB-1249
+ * Success        : Yes
+ */
+
+use dataverse test;
+
+for $t1 in dataset('TweetMessages')
+for $t2 in dataset('TweetMessages')
+let $n :=  create-circle($t1.sender-location, 0.5)
+where spatial-intersect($t2.sender-location, $n)
+order by $t2.tweetid
+return {"tweetid2":$t2.tweetid, "loc2":$t2.sender-location};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries/nested-open-index/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/nested-open-index/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql b/asterix-app/src/test/resources/runtimets/queries/nested-open-index/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql
index 25474d6..797f14f 100644
--- a/asterix-app/src/test/resources/runtimets/queries/nested-open-index/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/nested-open-index/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql
@@ -26,9 +26,9 @@
 use dataverse test;
 set import-private-functions 'true';
 
-for $a in dataset('DBLP')
-for $b in dataset('CSX')
-let $jacc := similarity-jaccard(gram-tokens($a.nested.title, 3, false), gram-tokens($b.nested.title, 3, false))
-where $jacc >= 0.5f and $a.nested.id < $b.nested.id
-order by $jacc, $a.nested.id, $b.nested.id
-return { "arec": $a.nested, "brec": $b.nested, "jacc": $jacc }
+for $csx in dataset('CSX')
+for $dblp in dataset('DBLP')
+let $jacc := similarity-jaccard(gram-tokens($dblp.nested.title, 3, false), gram-tokens($csx.nested.title, 3, false))
+where $jacc >= 0.5f and $dblp.nested.id < $csx.nested.id
+order by $jacc, $dblp.nested.id, $csx.nested.id
+return { "arec": $dblp.nested, "brec": $csx.nested, "jacc": $jacc }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries/nested-open-index/index-join/ngram-jaccard/ngram-jaccard.4.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/nested-open-index/index-join/ngram-jaccard/ngram-jaccard.4.query.aql b/asterix-app/src/test/resources/runtimets/queries/nested-open-index/index-join/ngram-jaccard/ngram-jaccard.4.query.aql
index 852d1e2..1cb7e58 100644
--- a/asterix-app/src/test/resources/runtimets/queries/nested-open-index/index-join/ngram-jaccard/ngram-jaccard.4.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/nested-open-index/index-join/ngram-jaccard/ngram-jaccard.4.query.aql
@@ -25,9 +25,9 @@
 use dataverse test;
 set import-private-functions 'true';
 
-for $a in dataset('DBLP')
-for $b in dataset('CSX')
-where similarity-jaccard(gram-tokens($a.nested.title, 3, false), gram-tokens($b.nested.title, 3, false)) >= 0.5f
-      and $a.nested.id < $b.nested.id
-order by $a.nested.id, $b.nested.id
-return { "arec": $a.nested, "brec": $b.nested }
+for $csx in dataset('CSX')
+for $dblp in dataset('DBLP')
+where similarity-jaccard(gram-tokens($dblp.nested.title, 3, false), gram-tokens($csx.nested.title, 3, false)) >= 0.5f
+      and $dblp.nested.id < $csx.nested.id
+order by $dblp.nested.id, $csx.nested.id
+return { "arec": $dblp.nested, "brec": $csx.nested }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries/open-index-enforced/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/open-index-enforced/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql b/asterix-app/src/test/resources/runtimets/queries/open-index-enforced/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql
index 5317a5e..0c98ea4 100644
--- a/asterix-app/src/test/resources/runtimets/queries/open-index-enforced/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/open-index-enforced/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql
@@ -26,9 +26,9 @@
 use dataverse test;
 set import-private-functions 'true';
 
-for $a in dataset('DBLPOpen')
-for $b in dataset('CSX')
-let $jacc := similarity-jaccard(gram-tokens($a.title, 3, false), gram-tokens($b.title, 3, false))
-where $jacc >= 0.5f and $a.id < $b.id
-order by $jacc, $a.id, $b.id
-return { "arec": $a, "brec": $b, "jacc": $jacc }
+for $csx in dataset('CSX')
+for $dblp in dataset('DBLPOpen')
+let $jacc := similarity-jaccard(gram-tokens($dblp.title, 3, false), gram-tokens($csx.title, 3, false))
+where $jacc >= 0.5f and $dblp.id < $csx.id
+order by $jacc, $dblp.id, $csx.id
+return { "arec": $dblp, "brec": $csx, "jacc": $jacc }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries/open-index-enforced/index-join/ngram-jaccard/ngram-jaccard.4.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/open-index-enforced/index-join/ngram-jaccard/ngram-jaccard.4.query.aql b/asterix-app/src/test/resources/runtimets/queries/open-index-enforced/index-join/ngram-jaccard/ngram-jaccard.4.query.aql
index 349e22d..2470026 100644
--- a/asterix-app/src/test/resources/runtimets/queries/open-index-enforced/index-join/ngram-jaccard/ngram-jaccard.4.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/open-index-enforced/index-join/ngram-jaccard/ngram-jaccard.4.query.aql
@@ -25,9 +25,9 @@
 use dataverse test;
 set import-private-functions 'true';
 
-for $a in dataset('DBLPOpen')
-for $b in dataset('CSX')
-where similarity-jaccard(gram-tokens($a.title, 3, false), gram-tokens($b.title, 3, false)) >= 0.5f
-      and $a.id < $b.id
-order by $a.id, $b.id
-return { "arec": $a, "brec": $b }
+for $csx in dataset('CSX')
+for $dblp in dataset('DBLPOpen')
+where similarity-jaccard(gram-tokens($dblp.title, 3, false), gram-tokens($csx.title, 3, false)) >= 0.5f
+      and $dblp.id < $csx.id
+order by $dblp.id, $csx.id
+return { "arec": $dblp, "brec": $csx }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries_sqlpp/nested-open-index/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/nested-open-index/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.sqlpp b/asterix-app/src/test/resources/runtimets/queries_sqlpp/nested-open-index/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.sqlpp
index 12c6c62..f6a3cda 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/nested-open-index/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/nested-open-index/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.sqlpp
@@ -29,8 +29,7 @@ use test;
 set "import-private-functions" "true";
 
 select element {'arec':a.nested,'brec':b.nested,'jacc':jacc}
-from  DBLP as a,
-      CSX as b
+from  CSX as b, DBLP as a
 with  jacc as test."similarity-jaccard"(test."gram-tokens"(a.nested.title,3,false),test."gram-tokens"(b.nested.title,3,false))
 where ((jacc >= 0.500000f) and (a.nested.id < b.nested.id))
 order by jacc,a.nested.id,b.nested.id

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries_sqlpp/nested-open-index/index-join/ngram-jaccard/ngram-jaccard.4.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/nested-open-index/index-join/ngram-jaccard/ngram-jaccard.4.query.sqlpp b/asterix-app/src/test/resources/runtimets/queries_sqlpp/nested-open-index/index-join/ngram-jaccard/ngram-jaccard.4.query.sqlpp
index 3c82687..927f430 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/nested-open-index/index-join/ngram-jaccard/ngram-jaccard.4.query.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/nested-open-index/index-join/ngram-jaccard/ngram-jaccard.4.query.sqlpp
@@ -28,8 +28,7 @@ use test;
 set "import-private-functions" "true";
 
 select element {'arec':a.nested,'brec':b.nested}
-from  DBLP as a,
-      CSX as b
+from  CSX as b, DBLP as a
 where ((test."similarity-jaccard"(test."gram-tokens"(a.nested.title,3,false),test."gram-tokens"(b.nested.title,3,false)) >= 0.500000f) and (a.nested.id < b.nested.id))
 order by a.nested.id,b.nested.id
 ;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-enforced/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-enforced/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.sqlpp b/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-enforced/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.sqlpp
index 68a5fd2..f183b88 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-enforced/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-enforced/index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.sqlpp
@@ -29,8 +29,7 @@ use test;
 set "import-private-functions" "true";
 
 select element {'arec':a,'brec':b,'jacc':jacc}
-from  DBLPOpen as a,
-      CSX as b
+from  CSX as b, DBLPOpen as a
 with  jacc as test."similarity-jaccard"(test."gram-tokens"(a.title,3,false),test."gram-tokens"(b.title,3,false))
 where ((jacc >= 0.500000f) and (a.id < b.id))
 order by jacc,a.id,b.id

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-enforced/index-join/ngram-jaccard/ngram-jaccard.4.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-enforced/index-join/ngram-jaccard/ngram-jaccard.4.query.sqlpp b/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-enforced/index-join/ngram-jaccard/ngram-jaccard.4.query.sqlpp
index f8dd194..de061d6 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-enforced/index-join/ngram-jaccard/ngram-jaccard.4.query.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-enforced/index-join/ngram-jaccard/ngram-jaccard.4.query.sqlpp
@@ -28,8 +28,7 @@ use test;
 set "import-private-functions" "true";
 
 select element {'arec':a,'brec':b}
-from  DBLPOpen as a,
-      CSX as b
+from  CSX as b, DBLPOpen as a
 where ((test."similarity-jaccard"(test."gram-tokens"(a.title,3,false),test."gram-tokens"(b.title,3,false)) >= 0.500000f) and (a.id < b.id))
 order by a.id,b.id
 ;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/d185e8ea/asterix-app/src/test/resources/runtimets/results/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.1.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.1.adm b/asterix-app/src/test/resources/runtimets/results/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.1.adm
new file mode 100644
index 0000000..dc7dd68
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/index-join/btree-secondary-self-equi-join_01/btree-secondary-self-equi-join_01.1.adm
@@ -0,0 +1,228 @@
+{ "tweetid2": 1, "count2": 26 }
+{ "tweetid2": 2, "count2": 131 }
+{ "tweetid2": 3, "count2": 187 }
+{ "tweetid2": 4, "count2": 52 }
+{ "tweetid2": 5, "count2": 35 }
+{ "tweetid2": 6, "count2": 61 }
+{ "tweetid2": 7, "count2": 47 }
+{ "tweetid2": 8, "count2": 98 }
+{ "tweetid2": 9, "count2": 69 }
+{ "tweetid2": 10, "count2": 75 }
+{ "tweetid2": 11, "count2": 28 }
+{ "tweetid2": 12, "count2": 159 }
+{ "tweetid2": 14, "count2": 74 }
+{ "tweetid2": 16, "count2": 27 }
+{ "tweetid2": 17, "count2": 55 }
+{ "tweetid2": 18, "count2": 199 }
+{ "tweetid2": 19, "count2": 68 }
+{ "tweetid2": 21, "count2": 64 }
+{ "tweetid2": 22, "count2": 126 }
+{ "tweetid2": 23, "count2": 74 }
+{ "tweetid2": 24, "count2": 70 }
+{ "tweetid2": 25, "count2": 86 }
+{ "tweetid2": 27, "count2": 125 }
+{ "tweetid2": 28, "count2": 123 }
+{ "tweetid2": 29, "count2": 115 }
+{ "tweetid2": 30, "count2": 36 }
+{ "tweetid2": 31, "count2": 59 }
+{ "tweetid2": 32, "count2": 38 }
+{ "tweetid2": 33, "count2": 105 }
+{ "tweetid2": 34, "count2": 185 }
+{ "tweetid2": 35, "count2": 176 }
+{ "tweetid2": 36, "count2": 147 }
+{ "tweetid2": 37, "count2": 55 }
+{ "tweetid2": 38, "count2": 89 }
+{ "tweetid2": 39, "count2": 97 }
+{ "tweetid2": 40, "count2": 193 }
+{ "tweetid2": 41, "count2": 169 }
+{ "tweetid2": 42, "count2": 130 }
+{ "tweetid2": 43, "count2": 153 }
+{ "tweetid2": 45, "count2": 151 }
+{ "tweetid2": 46, "count2": 37 }
+{ "tweetid2": 47, "count2": 27 }
+{ "tweetid2": 49, "count2": 28 }
+{ "tweetid2": 50, "count2": 123 }
+{ "tweetid2": 51, "count2": 94 }
+{ "tweetid2": 52, "count2": 156 }
+{ "tweetid2": 53, "count2": 174 }
+{ "tweetid2": 54, "count2": 128 }
+{ "tweetid2": 55, "count2": 30 }
+{ "tweetid2": 56, "count2": 50 }
+{ "tweetid2": 57, "count2": 61 }
+{ "tweetid2": 58, "count2": 35 }
+{ "tweetid2": 59, "count2": 95 }
+{ "tweetid2": 62, "count2": 47 }
+{ "tweetid2": 63, "count2": 149 }
+{ "tweetid2": 64, "count2": 158 }
+{ "tweetid2": 65, "count2": 77 }
+{ "tweetid2": 66, "count2": 73 }
+{ "tweetid2": 67, "count2": 47 }
+{ "tweetid2": 68, "count2": 21 }
+{ "tweetid2": 69, "count2": 153 }
+{ "tweetid2": 70, "count2": 133 }
+{ "tweetid2": 71, "count2": 185 }
+{ "tweetid2": 72, "count2": 31 }
+{ "tweetid2": 73, "count2": 61 }
+{ "tweetid2": 74, "count2": 32 }
+{ "tweetid2": 75, "count2": 185 }
+{ "tweetid2": 76, "count2": 146 }
+{ "tweetid2": 78, "count2": 140 }
+{ "tweetid2": 79, "count2": 193 }
+{ "tweetid2": 80, "count2": 39 }
+{ "tweetid2": 81, "count2": 105 }
+{ "tweetid2": 82, "count2": 140 }
+{ "tweetid2": 83, "count2": 163 }
+{ "tweetid2": 84, "count2": 172 }
+{ "tweetid2": 85, "count2": 77 }
+{ "tweetid2": 86, "count2": 156 }
+{ "tweetid2": 87, "count2": 155 }
+{ "tweetid2": 88, "count2": 95 }
+{ "tweetid2": 89, "count2": 85 }
+{ "tweetid2": 90, "count2": 139 }
+{ "tweetid2": 91, "count2": 198 }
+{ "tweetid2": 92, "count2": 59 }
+{ "tweetid2": 93, "count2": 55 }
+{ "tweetid2": 94, "count2": 128 }
+{ "tweetid2": 95, "count2": 144 }
+{ "tweetid2": 96, "count2": 66 }
+{ "tweetid2": 97, "count2": 83 }
+{ "tweetid2": 98, "count2": 78 }
+{ "tweetid2": 99, "count2": 51 }
+{ "tweetid2": 100, "count2": 184 }
+{ "tweetid2": 101, "count2": 142 }
+{ "tweetid2": 102, "count2": 190 }
+{ "tweetid2": 103, "count2": 27 }
+{ "tweetid2": 104, "count2": 55 }
+{ "tweetid2": 106, "count2": 127 }
+{ "tweetid2": 107, "count2": 31 }
+{ "tweetid2": 108, "count2": 148 }
+{ "tweetid2": 109, "count2": 29 }
+{ "tweetid2": 110, "count2": 157 }
+{ "tweetid2": 111, "count2": 50 }
+{ "tweetid2": 112, "count2": 30 }
+{ "tweetid2": 113, "count2": 177 }
+{ "tweetid2": 114, "count2": 59 }
+{ "tweetid2": 115, "count2": 175 }
+{ "tweetid2": 116, "count2": 70 }
+{ "tweetid2": 117, "count2": 168 }
+{ "tweetid2": 118, "count2": 70 }
+{ "tweetid2": 119, "count2": 155 }
+{ "tweetid2": 120, "count2": 63 }
+{ "tweetid2": 121, "count2": 163 }
+{ "tweetid2": 122, "count2": 23 }
+{ "tweetid2": 123, "count2": 44 }
+{ "tweetid2": 124, "count2": 44 }
+{ "tweetid2": 126, "count2": 76 }
+{ "tweetid2": 127, "count2": 184 }
+{ "tweetid2": 128, "count2": 24 }
+{ "tweetid2": 129, "count2": 80 }
+{ "tweetid2": 130, "count2": 157 }
+{ "tweetid2": 131, "count2": 192 }
+{ "tweetid2": 132, "count2": 142 }
+{ "tweetid2": 134, "count2": 86 }
+{ "tweetid2": 135, "count2": 171 }
+{ "tweetid2": 136, "count2": 77 }
+{ "tweetid2": 137, "count2": 25 }
+{ "tweetid2": 139, "count2": 175 }
+{ "tweetid2": 140, "count2": 192 }
+{ "tweetid2": 142, "count2": 130 }
+{ "tweetid2": 143, "count2": 50 }
+{ "tweetid2": 144, "count2": 184 }
+{ "tweetid2": 145, "count2": 162 }
+{ "tweetid2": 146, "count2": 102 }
+{ "tweetid2": 147, "count2": 174 }
+{ "tweetid2": 150, "count2": 145 }
+{ "tweetid2": 151, "count2": 43 }
+{ "tweetid2": 152, "count2": 56 }
+{ "tweetid2": 153, "count2": 154 }
+{ "tweetid2": 154, "count2": 124 }
+{ "tweetid2": 155, "count2": 39 }
+{ "tweetid2": 156, "count2": 23 }
+{ "tweetid2": 157, "count2": 153 }
+{ "tweetid2": 158, "count2": 96 }
+{ "tweetid2": 159, "count2": 113 }
+{ "tweetid2": 160, "count2": 163 }
+{ "tweetid2": 161, "count2": 62 }
+{ "tweetid2": 162, "count2": 57 }
+{ "tweetid2": 163, "count2": 115 }
+{ "tweetid2": 164, "count2": 148 }
+{ "tweetid2": 165, "count2": 127 }
+{ "tweetid2": 166, "count2": 162 }
+{ "tweetid2": 167, "count2": 93 }
+{ "tweetid2": 168, "count2": 174 }
+{ "tweetid2": 169, "count2": 129 }
+{ "tweetid2": 170, "count2": 174 }
+{ "tweetid2": 171, "count2": 69 }
+{ "tweetid2": 172, "count2": 127 }
+{ "tweetid2": 173, "count2": 41 }
+{ "tweetid2": 176, "count2": 89 }
+{ "tweetid2": 178, "count2": 64 }
+{ "tweetid2": 179, "count2": 141 }
+{ "tweetid2": 180, "count2": 191 }
+{ "tweetid2": 182, "count2": 59 }
+{ "tweetid2": 183, "count2": 199 }
+{ "tweetid2": 184, "count2": 141 }
+{ "tweetid2": 185, "count2": 189 }
+{ "tweetid2": 186, "count2": 149 }
+{ "tweetid2": 187, "count2": 98 }
+{ "tweetid2": 188, "count2": 48 }
+{ "tweetid2": 189, "count2": 160 }
+{ "tweetid2": 190, "count2": 86 }
+{ "tweetid2": 191, "count2": 150 }
+{ "tweetid2": 192, "count2": 199 }
+{ "tweetid2": 193, "count2": 147 }
+{ "tweetid2": 194, "count2": 142 }
+{ "tweetid2": 195, "count2": 126 }
+{ "tweetid2": 196, "count2": 197 }
+{ "tweetid2": 197, "count2": 195 }
+{ "tweetid2": 198, "count2": 94 }
+{ "tweetid2": 199, "count2": 172 }
+{ "tweetid2": 201, "count2": 65 }
+{ "tweetid2": 202, "count2": 117 }
+{ "tweetid2": 203, "count2": 182 }
+{ "tweetid2": 204, "count2": 104 }
+{ "tweetid2": 205, "count2": 57 }
+{ "tweetid2": 207, "count2": 110 }
+{ "tweetid2": 208, "count2": 149 }
+{ "tweetid2": 209, "count2": 164 }
+{ "tweetid2": 210, "count2": 70 }
+{ "tweetid2": 211, "count2": 95 }
+{ "tweetid2": 212, "count2": 189 }
+{ "tweetid2": 213, "count2": 190 }
+{ "tweetid2": 214, "count2": 142 }
+{ "tweetid2": 215, "count2": 67 }
+{ "tweetid2": 216, "count2": 50 }
+{ "tweetid2": 217, "count2": 154 }
+{ "tweetid2": 218, "count2": 135 }
+{ "tweetid2": 219, "count2": 170 }
+{ "tweetid2": 220, "count2": 188 }
+{ "tweetid2": 221, "count2": 185 }
+{ "tweetid2": 222, "count2": 51 }
+{ "tweetid2": 223, "count2": 84 }
+{ "tweetid2": 224, "count2": 192 }
+{ "tweetid2": 225, "count2": 65 }
+{ "tweetid2": 226, "count2": 73 }
+{ "tweetid2": 227, "count2": 184 }
+{ "tweetid2": 228, "count2": 38 }
+{ "tweetid2": 229, "count2": 26 }
+{ "tweetid2": 230, "count2": 46 }
+{ "tweetid2": 231, "count2": 77 }
+{ "tweetid2": 232, "count2": 85 }
+{ "tweetid2": 233, "count2": 28 }
+{ "tweetid2": 234, "count2": 94 }
+{ "tweetid2": 235, "count2": 53 }
+{ "tweetid2": 236, "count2": 133 }
+{ "tweetid2": 237, "count2": 100 }
+{ "tweetid2": 238, "count2": 47 }
+{ "tweetid2": 239, "count2": 114 }
+{ "tweetid2": 240, "count2": 104 }
+{ "tweetid2": 241, "count2": 45 }
+{ "tweetid2": 242, "count2": 179 }
+{ "tweetid2": 243, "count2": 176 }
+{ "tweetid2": 244, "count2": 150 }
+{ "tweetid2": 245, "count2": 83 }
+{ "tweetid2": 246, "count2": 128 }
+{ "tweetid2": 247, "count2": 194 }
+{ "tweetid2": 248, "count2": 123 }
+{ "tweetid2": 249, "count2": 163 }
+{ "tweetid2": 250, "count2": 125 }


Mime
View raw message