Took care of Vinayak's review comments.

git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_fuzzy_perf@987 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-edit-distance-inline.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-edit-distance-inline.plan
index e03d6ed..32b0ea8 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-edit-distance-inline.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-edit-distance-inline.plan
@@ -12,19 +12,19 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$30(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$31(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
             -- STREAM_PROJECT  |UNPARTITIONED|
               -- ASSIGN  |PARTITIONED|
@@ -33,18 +33,18 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join-noeqjoin/ngram-edit-distance.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-edit-distance.plan
index ec30398..42c6136 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-edit-distance.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-edit-distance.plan
@@ -11,37 +11,37 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- BTREE_SEARCH  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                          -- STABLE_SORT [$$27(ASC)]  |LOCAL|
+                          -- STABLE_SORT [$$28(ASC)]  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                 -- BROADCAST_EXCHANGE  |PARTITIONED|
                                   -- STREAM_SELECT  |LOCAL|
                                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                       -- SPLIT  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- ASSIGN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- ASSIGN  |PARTITIONED|
+                                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
             -- STREAM_PROJECT  |UNPARTITIONED|
               -- ASSIGN  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                   -- NESTED_LOOP  |PARTITIONED|
                     -- BROADCAST_EXCHANGE  |PARTITIONED|
-                      -- ASSIGN  |UNPARTITIONED|
-                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                          -- DATASOURCE_SCAN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                      -- ASSIGN  |PARTITIONED|
+                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                          -- DATASOURCE_SCAN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                       -- STREAM_SELECT  |LOCAL|
                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                           -- SPLIT  |PARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- ASSIGN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- ASSIGN  |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/inverted-index-join-noeqjoin/ngram-fuzzyeq-edit-distance.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-fuzzyeq-edit-distance.plan
index 1205702..15b5575 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-fuzzyeq-edit-distance.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-fuzzyeq-edit-distance.plan
@@ -11,37 +11,37 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- BTREE_SEARCH  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                          -- STABLE_SORT [$$26(ASC)]  |LOCAL|
+                          -- STABLE_SORT [$$27(ASC)]  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                 -- BROADCAST_EXCHANGE  |PARTITIONED|
                                   -- STREAM_SELECT  |LOCAL|
                                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                       -- SPLIT  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- ASSIGN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- ASSIGN  |PARTITIONED|
+                                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
             -- STREAM_PROJECT  |UNPARTITIONED|
               -- ASSIGN  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                   -- NESTED_LOOP  |PARTITIONED|
                     -- BROADCAST_EXCHANGE  |PARTITIONED|
-                      -- ASSIGN  |UNPARTITIONED|
-                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                          -- DATASOURCE_SCAN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                      -- ASSIGN  |PARTITIONED|
+                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                          -- DATASOURCE_SCAN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                       -- STREAM_SELECT  |LOCAL|
                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                           -- SPLIT  |PARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- ASSIGN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- ASSIGN  |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/inverted-index-join-noeqjoin/ngram-fuzzyeq-jaccard.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-fuzzyeq-jaccard.plan
index c1f4e85..0401785 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-fuzzyeq-jaccard.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-fuzzyeq-jaccard.plan
@@ -7,14 +7,14 @@
             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
               -- BTREE_SEARCH  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                  -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                  -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- STREAM_PROJECT  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                           -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                             -- BROADCAST_EXCHANGE  |PARTITIONED|
-                              -- ASSIGN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                              -- ASSIGN  |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/inverted-index-join-noeqjoin/ngram-jaccard-inline.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-jaccard-inline.plan
index b373666..40967a9 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-jaccard-inline.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-jaccard-inline.plan
@@ -8,14 +8,14 @@
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- BTREE_SEARCH  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                    -- STABLE_SORT [$$29(ASC)]  |LOCAL|
+                    -- STABLE_SORT [$$30(ASC)]  |LOCAL|
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- STREAM_PROJECT  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                               -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                -- ASSIGN  |UNPARTITIONED|
-                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                    -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ASSIGN  |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/inverted-index-join-noeqjoin/ngram-jaccard.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-jaccard.plan
index 5841837..30c69d0 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-jaccard.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ngram-jaccard.plan
@@ -7,14 +7,14 @@
             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
               -- BTREE_SEARCH  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                  -- STABLE_SORT [$$26(ASC)]  |LOCAL|
+                  -- STABLE_SORT [$$27(ASC)]  |LOCAL|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- STREAM_PROJECT  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                           -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                             -- BROADCAST_EXCHANGE  |PARTITIONED|
-                              -- ASSIGN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                              -- ASSIGN  |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/inverted-index-join-noeqjoin/olist-edit-distance-inline.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-edit-distance-inline.plan
index e03d6ed..32b0ea8 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-edit-distance-inline.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-edit-distance-inline.plan
@@ -12,19 +12,19 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$30(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$31(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
             -- STREAM_PROJECT  |UNPARTITIONED|
               -- ASSIGN  |PARTITIONED|
@@ -33,18 +33,18 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join-noeqjoin/olist-edit-distance.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-edit-distance.plan
index ec30398..42c6136 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-edit-distance.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-edit-distance.plan
@@ -11,37 +11,37 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- BTREE_SEARCH  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                          -- STABLE_SORT [$$27(ASC)]  |LOCAL|
+                          -- STABLE_SORT [$$28(ASC)]  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                 -- BROADCAST_EXCHANGE  |PARTITIONED|
                                   -- STREAM_SELECT  |LOCAL|
                                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                       -- SPLIT  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- ASSIGN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- ASSIGN  |PARTITIONED|
+                                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
             -- STREAM_PROJECT  |UNPARTITIONED|
               -- ASSIGN  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                   -- NESTED_LOOP  |PARTITIONED|
                     -- BROADCAST_EXCHANGE  |PARTITIONED|
-                      -- ASSIGN  |UNPARTITIONED|
-                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                          -- DATASOURCE_SCAN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                      -- ASSIGN  |PARTITIONED|
+                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                          -- DATASOURCE_SCAN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                       -- STREAM_SELECT  |LOCAL|
                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                           -- SPLIT  |PARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- ASSIGN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- ASSIGN  |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/inverted-index-join-noeqjoin/olist-fuzzyeq-edit-distance.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-fuzzyeq-edit-distance.plan
index 1205702..15b5575 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-fuzzyeq-edit-distance.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-fuzzyeq-edit-distance.plan
@@ -11,37 +11,37 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- BTREE_SEARCH  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                          -- STABLE_SORT [$$26(ASC)]  |LOCAL|
+                          -- STABLE_SORT [$$27(ASC)]  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                 -- BROADCAST_EXCHANGE  |PARTITIONED|
                                   -- STREAM_SELECT  |LOCAL|
                                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                       -- SPLIT  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- ASSIGN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- ASSIGN  |PARTITIONED|
+                                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
           -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
             -- STREAM_PROJECT  |UNPARTITIONED|
               -- ASSIGN  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                   -- NESTED_LOOP  |PARTITIONED|
                     -- BROADCAST_EXCHANGE  |PARTITIONED|
-                      -- ASSIGN  |UNPARTITIONED|
-                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                          -- DATASOURCE_SCAN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                      -- ASSIGN  |PARTITIONED|
+                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                          -- DATASOURCE_SCAN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                       -- STREAM_SELECT  |LOCAL|
                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                           -- SPLIT  |PARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- ASSIGN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- ASSIGN  |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/inverted-index-join-noeqjoin/olist-fuzzyeq-jaccard.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-fuzzyeq-jaccard.plan
index d26119f..9d57e49 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-fuzzyeq-jaccard.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-fuzzyeq-jaccard.plan
@@ -7,14 +7,14 @@
             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
               -- BTREE_SEARCH  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                  -- STABLE_SORT [$$23(ASC)]  |LOCAL|
+                  -- STABLE_SORT [$$24(ASC)]  |LOCAL|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- STREAM_PROJECT  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                           -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                             -- BROADCAST_EXCHANGE  |PARTITIONED|
-                              -- ASSIGN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                              -- ASSIGN  |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/inverted-index-join-noeqjoin/olist-jaccard-inline.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-jaccard-inline.plan
index 37ee340..e24f034 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-jaccard-inline.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-jaccard-inline.plan
@@ -8,14 +8,14 @@
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- BTREE_SEARCH  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                    -- STABLE_SORT [$$27(ASC)]  |LOCAL|
+                    -- STABLE_SORT [$$28(ASC)]  |LOCAL|
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- STREAM_PROJECT  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                               -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                -- ASSIGN  |UNPARTITIONED|
-                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                    -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ASSIGN  |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/inverted-index-join-noeqjoin/olist-jaccard.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-jaccard.plan
index b8abe74..5fb0b58 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-jaccard.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/olist-jaccard.plan
@@ -7,14 +7,14 @@
             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
               -- BTREE_SEARCH  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                  -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                  -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- STREAM_PROJECT  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                           -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                             -- BROADCAST_EXCHANGE  |PARTITIONED|
-                              -- ASSIGN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                              -- ASSIGN  |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/inverted-index-join-noeqjoin/ulist-fuzzyeq-jaccard.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ulist-fuzzyeq-jaccard.plan
index d26119f..9d57e49 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ulist-fuzzyeq-jaccard.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ulist-fuzzyeq-jaccard.plan
@@ -7,14 +7,14 @@
             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
               -- BTREE_SEARCH  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                  -- STABLE_SORT [$$23(ASC)]  |LOCAL|
+                  -- STABLE_SORT [$$24(ASC)]  |LOCAL|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- STREAM_PROJECT  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                           -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                             -- BROADCAST_EXCHANGE  |PARTITIONED|
-                              -- ASSIGN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                              -- ASSIGN  |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/inverted-index-join-noeqjoin/ulist-jaccard-inline.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ulist-jaccard-inline.plan
index 37ee340..e24f034 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ulist-jaccard-inline.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ulist-jaccard-inline.plan
@@ -8,14 +8,14 @@
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- BTREE_SEARCH  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                    -- STABLE_SORT [$$27(ASC)]  |LOCAL|
+                    -- STABLE_SORT [$$28(ASC)]  |LOCAL|
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- STREAM_PROJECT  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                               -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                -- ASSIGN  |UNPARTITIONED|
-                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                    -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ASSIGN  |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/inverted-index-join-noeqjoin/ulist-jaccard.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ulist-jaccard.plan
index b8abe74..5fb0b58 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ulist-jaccard.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/ulist-jaccard.plan
@@ -7,14 +7,14 @@
             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
               -- BTREE_SEARCH  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                  -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                  -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- STREAM_PROJECT  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                           -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                             -- BROADCAST_EXCHANGE  |PARTITIONED|
-                              -- ASSIGN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                              -- ASSIGN  |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/inverted-index-join-noeqjoin/word-fuzzyeq-jaccard.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/word-fuzzyeq-jaccard.plan
index c1f4e85..0401785 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/word-fuzzyeq-jaccard.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/word-fuzzyeq-jaccard.plan
@@ -7,14 +7,14 @@
             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
               -- BTREE_SEARCH  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                  -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                  -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- STREAM_PROJECT  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                           -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                             -- BROADCAST_EXCHANGE  |PARTITIONED|
-                              -- ASSIGN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                              -- ASSIGN  |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/inverted-index-join-noeqjoin/word-jaccard-inline.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/word-jaccard-inline.plan
index b373666..40967a9 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/word-jaccard-inline.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/word-jaccard-inline.plan
@@ -8,14 +8,14 @@
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- BTREE_SEARCH  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                    -- STABLE_SORT [$$29(ASC)]  |LOCAL|
+                    -- STABLE_SORT [$$30(ASC)]  |LOCAL|
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- STREAM_PROJECT  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                               -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                -- ASSIGN  |UNPARTITIONED|
-                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                    -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ASSIGN  |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/inverted-index-join-noeqjoin/word-jaccard.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/word-jaccard.plan
index 5841837..30c69d0 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/word-jaccard.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join-noeqjoin/word-jaccard.plan
@@ -7,14 +7,14 @@
             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
               -- BTREE_SEARCH  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                  -- STABLE_SORT [$$26(ASC)]  |LOCAL|
+                  -- STABLE_SORT [$$27(ASC)]  |LOCAL|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- STREAM_PROJECT  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                           -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                             -- BROADCAST_EXCHANGE  |PARTITIONED|
-                              -- ASSIGN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                              -- ASSIGN  |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/inverted-index-join/ngram-edit-distance-check_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance-check_01.plan
index d23aad0..6439994 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance-check_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance-check_01.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/ngram-edit-distance-check_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance-check_02.plan
index f096b43..6731e33 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance-check_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance-check_02.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/ngram-edit-distance-check_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance-check_03.plan
index d23aad0..6439994 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance-check_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance-check_03.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/ngram-edit-distance-check_04.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance-check_04.plan
index b849eaf..9f46c2c 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance-check_04.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance-check_04.plan
@@ -19,19 +19,19 @@
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- BTREE_SEARCH  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                                  -- STABLE_SORT [$$30(ASC)]  |LOCAL|
+                                  -- STABLE_SORT [$$31(ASC)]  |LOCAL|
                                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                       -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                         -- BROADCAST_EXCHANGE  |PARTITIONED|
                                           -- STREAM_SELECT  |LOCAL|
                                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                               -- SPLIT  |PARTITIONED|
-                                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                  -- ASSIGN  |UNPARTITIONED|
-                                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                  -- ASSIGN  |PARTITIONED|
+                                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                      -- DATASOURCE_SCAN  |PARTITIONED|
+                                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                       -- STREAM_PROJECT  |UNPARTITIONED|
                         -- STREAM_SELECT  |UNPARTITIONED|
@@ -39,16 +39,16 @@
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- NESTED_LOOP  |PARTITIONED|
                                 -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                  -- DATASOURCE_SCAN  |PARTITIONED|
+                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                      -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                                   -- STREAM_SELECT  |LOCAL|
                                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                       -- SPLIT  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- ASSIGN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- ASSIGN  |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/inverted-index-join/ngram-edit-distance_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance_01.plan
index d23aad0..6439994 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance_01.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/ngram-edit-distance_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance_02.plan
index f096b43..6731e33 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance_02.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/ngram-edit-distance_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance_03.plan
index d23aad0..6439994 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance_03.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/ngram-edit-distance_04.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance_04.plan
index d99a5da..ecea305 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance_04.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-edit-distance_04.plan
@@ -19,19 +19,19 @@
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- BTREE_SEARCH  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                                  -- STABLE_SORT [$$30(ASC)]  |LOCAL|
+                                  -- STABLE_SORT [$$31(ASC)]  |LOCAL|
                                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                       -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                         -- BROADCAST_EXCHANGE  |PARTITIONED|
                                           -- STREAM_SELECT  |LOCAL|
                                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                               -- SPLIT  |PARTITIONED|
-                                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                  -- ASSIGN  |UNPARTITIONED|
-                                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                  -- ASSIGN  |PARTITIONED|
+                                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                      -- DATASOURCE_SCAN  |PARTITIONED|
+                                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                       -- STREAM_PROJECT  |UNPARTITIONED|
                         -- STREAM_SELECT  |UNPARTITIONED|
@@ -39,16 +39,16 @@
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- NESTED_LOOP  |PARTITIONED|
                                 -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                  -- DATASOURCE_SCAN  |PARTITIONED|
+                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                      -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                                   -- STREAM_SELECT  |LOCAL|
                                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                       -- SPLIT  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- ASSIGN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- ASSIGN  |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/inverted-index-join/ngram-fuzzyeq-edit-distance_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-edit-distance_01.plan
index 6c90b91..1215aef 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-edit-distance_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-edit-distance_01.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/ngram-fuzzyeq-edit-distance_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-edit-distance_02.plan
index 956ea15..b61f25f 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-edit-distance_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-edit-distance_02.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/ngram-fuzzyeq-edit-distance_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-edit-distance_03.plan
index 956ea15..b61f25f 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-edit-distance_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-edit-distance_03.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/ngram-fuzzyeq-jaccard_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-jaccard_01.plan
index 72d3bbf..43a994d 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-jaccard_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-jaccard_01.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ngram-fuzzyeq-jaccard_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-jaccard_02.plan
index fbdd088..8a4d94a 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-jaccard_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-jaccard_02.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ngram-fuzzyeq-jaccard_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-jaccard_03.plan
index 72d3bbf..43a994d 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-jaccard_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-fuzzyeq-jaccard_03.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ngram-jaccard-check_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_01.plan
index 5fb5cce..ecd5df2 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_01.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ngram-jaccard-check_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_02.plan
index b8adc2d..14c6700 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_02.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ngram-jaccard-check_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_03.plan
index 5fb5cce..ecd5df2 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_03.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ngram-jaccard-check_04.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_04.plan
index a7dcf8d..d7c0f9c 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_04.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_04.plan
@@ -15,14 +15,14 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- BTREE_SEARCH  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                          -- STABLE_SORT [$$29(ASC)]  |LOCAL|
+                          -- STABLE_SORT [$$30(ASC)]  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- STREAM_PROJECT  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                   -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                     -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                      -- ASSIGN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                      -- ASSIGN  |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/inverted-index-join/ngram-jaccard_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_01.plan
index 5fb5cce..ecd5df2 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_01.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ngram-jaccard_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_02.plan
index b8adc2d..14c6700 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_02.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ngram-jaccard_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_03.plan
index 5fb5cce..ecd5df2 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_03.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ngram-jaccard_04.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_04.plan
index 1326c1b..40c3151 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_04.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_04.plan
@@ -15,14 +15,14 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- BTREE_SEARCH  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                          -- STABLE_SORT [$$29(ASC)]  |LOCAL|
+                          -- STABLE_SORT [$$30(ASC)]  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- STREAM_PROJECT  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                   -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                     -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                      -- ASSIGN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                      -- ASSIGN  |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/inverted-index-join/olist-edit-distance-check_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance-check_01.plan
index d23aad0..6439994 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance-check_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance-check_01.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/olist-edit-distance-check_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance-check_02.plan
index f096b43..6731e33 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance-check_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance-check_02.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/olist-edit-distance-check_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance-check_03.plan
index d23aad0..6439994 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance-check_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance-check_03.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/olist-edit-distance-check_04.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance-check_04.plan
index b849eaf..9f46c2c 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance-check_04.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance-check_04.plan
@@ -19,19 +19,19 @@
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- BTREE_SEARCH  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                                  -- STABLE_SORT [$$30(ASC)]  |LOCAL|
+                                  -- STABLE_SORT [$$31(ASC)]  |LOCAL|
                                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                       -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                         -- BROADCAST_EXCHANGE  |PARTITIONED|
                                           -- STREAM_SELECT  |LOCAL|
                                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                               -- SPLIT  |PARTITIONED|
-                                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                  -- ASSIGN  |UNPARTITIONED|
-                                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                  -- ASSIGN  |PARTITIONED|
+                                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                      -- DATASOURCE_SCAN  |PARTITIONED|
+                                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                       -- STREAM_PROJECT  |UNPARTITIONED|
                         -- STREAM_SELECT  |UNPARTITIONED|
@@ -39,16 +39,16 @@
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- NESTED_LOOP  |PARTITIONED|
                                 -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                  -- DATASOURCE_SCAN  |PARTITIONED|
+                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                      -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                                   -- STREAM_SELECT  |LOCAL|
                                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                       -- SPLIT  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- ASSIGN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- ASSIGN  |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/inverted-index-join/olist-edit-distance_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance_01.plan
index d23aad0..6439994 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance_01.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/olist-edit-distance_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance_02.plan
index f096b43..6731e33 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance_02.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/olist-edit-distance_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance_03.plan
index d23aad0..6439994 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance_03.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$26(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/olist-edit-distance_04.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance_04.plan
index d99a5da..ecea305 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance_04.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-edit-distance_04.plan
@@ -19,19 +19,19 @@
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- BTREE_SEARCH  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                                  -- STABLE_SORT [$$30(ASC)]  |LOCAL|
+                                  -- STABLE_SORT [$$31(ASC)]  |LOCAL|
                                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                       -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                         -- BROADCAST_EXCHANGE  |PARTITIONED|
                                           -- STREAM_SELECT  |LOCAL|
                                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                               -- SPLIT  |PARTITIONED|
-                                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                  -- ASSIGN  |UNPARTITIONED|
-                                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                  -- ASSIGN  |PARTITIONED|
+                                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                      -- DATASOURCE_SCAN  |PARTITIONED|
+                                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                       -- STREAM_PROJECT  |UNPARTITIONED|
                         -- STREAM_SELECT  |UNPARTITIONED|
@@ -39,16 +39,16 @@
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- NESTED_LOOP  |PARTITIONED|
                                 -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                  -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                  -- DATASOURCE_SCAN  |PARTITIONED|
+                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                      -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                                   -- STREAM_SELECT  |LOCAL|
                                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                       -- SPLIT  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- ASSIGN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- ASSIGN  |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/inverted-index-join/olist-fuzzyeq-edit-distance_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-edit-distance_01.plan
index 956ea15..b61f25f 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-edit-distance_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-edit-distance_01.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/olist-fuzzyeq-edit-distance_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-edit-distance_02.plan
index 6c90b91..1215aef 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-edit-distance_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-edit-distance_02.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/olist-fuzzyeq-edit-distance_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-edit-distance_03.plan
index 956ea15..b61f25f 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-edit-distance_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-edit-distance_03.plan
@@ -16,36 +16,36 @@
                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                         -- BTREE_SEARCH  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                            -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                            -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
                                     -- STREAM_SELECT  |LOCAL|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- SPLIT  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- ASSIGN  |UNPARTITIONED|
-                                              -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                                    -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- ASSIGN  |PARTITIONED|
+                                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                -- DATASOURCE_SCAN  |PARTITIONED|
+                                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                   -- STREAM_PROJECT  |UNPARTITIONED|
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- NESTED_LOOP  |PARTITIONED|
                         -- BROADCAST_EXCHANGE  |PARTITIONED|
-                          -- ASSIGN  |UNPARTITIONED|
-                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                              -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
+                          -- ASSIGN  |PARTITIONED|
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              -- DATASOURCE_SCAN  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
                           -- STREAM_SELECT  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- SPLIT  |PARTITIONED|
-                                -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                  -- ASSIGN  |UNPARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                      -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- ASSIGN  |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/inverted-index-join/olist-fuzzyeq-jaccard_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-jaccard_01.plan
index f500413..8e4525f 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-jaccard_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-jaccard_01.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$21(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/olist-fuzzyeq-jaccard_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-jaccard_02.plan
index 56b01a7..6af20b1 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-jaccard_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-jaccard_02.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$21(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/olist-fuzzyeq-jaccard_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-jaccard_03.plan
index f500413..8e4525f 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-jaccard_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-fuzzyeq-jaccard_03.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$21(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/olist-jaccard-check_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard-check_01.plan
index 5472569..86ad849 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard-check_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard-check_01.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/olist-jaccard-check_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard-check_02.plan
index 3262589..7f94245 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard-check_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard-check_02.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/olist-jaccard-check_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard-check_03.plan
index 5472569..86ad849 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard-check_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard-check_03.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/olist-jaccard-check_04.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard-check_04.plan
index 75581f4..9c3253d 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard-check_04.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard-check_04.plan
@@ -15,14 +15,14 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- BTREE_SEARCH  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                          -- STABLE_SORT [$$27(ASC)]  |LOCAL|
+                          -- STABLE_SORT [$$28(ASC)]  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- STREAM_PROJECT  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                   -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                     -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                      -- ASSIGN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                      -- ASSIGN  |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/inverted-index-join/olist-jaccard_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard_01.plan
index 5472569..86ad849 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard_01.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/olist-jaccard_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard_02.plan
index 3262589..7f94245 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard_02.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/olist-jaccard_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard_03.plan
index 5472569..86ad849 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard_03.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/olist-jaccard_04.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard_04.plan
index e243c63..c2065ae 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard_04.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/olist-jaccard_04.plan
@@ -15,14 +15,14 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- BTREE_SEARCH  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                          -- STABLE_SORT [$$27(ASC)]  |LOCAL|
+                          -- STABLE_SORT [$$28(ASC)]  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- STREAM_PROJECT  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                   -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                     -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                      -- ASSIGN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                      -- ASSIGN  |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/inverted-index-join/ulist-fuzzyeq-jaccard_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-fuzzyeq-jaccard_01.plan
index f500413..8e4525f 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-fuzzyeq-jaccard_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-fuzzyeq-jaccard_01.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$21(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ulist-fuzzyeq-jaccard_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-fuzzyeq-jaccard_02.plan
index 56b01a7..6af20b1 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-fuzzyeq-jaccard_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-fuzzyeq-jaccard_02.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$21(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ulist-fuzzyeq-jaccard_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-fuzzyeq-jaccard_03.plan
index f500413..8e4525f 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-fuzzyeq-jaccard_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-fuzzyeq-jaccard_03.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$21(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ulist-jaccard-check_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard-check_01.plan
index 5472569..86ad849 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard-check_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard-check_01.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ulist-jaccard-check_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard-check_02.plan
index 3262589..7f94245 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard-check_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard-check_02.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ulist-jaccard-check_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard-check_03.plan
index 5472569..86ad849 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard-check_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard-check_03.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ulist-jaccard-check_04.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard-check_04.plan
index 75581f4..9c3253d 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard-check_04.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard-check_04.plan
@@ -15,14 +15,14 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- BTREE_SEARCH  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                          -- STABLE_SORT [$$27(ASC)]  |LOCAL|
+                          -- STABLE_SORT [$$28(ASC)]  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- STREAM_PROJECT  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                   -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                     -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                      -- ASSIGN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                      -- ASSIGN  |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/inverted-index-join/ulist-jaccard_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard_01.plan
index 5472569..86ad849 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard_01.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ulist-jaccard_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard_02.plan
index 3262589..7f94245 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard_02.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ulist-jaccard_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard_03.plan
index 5472569..86ad849 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard_03.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$22(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/ulist-jaccard_04.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard_04.plan
index e243c63..c2065ae 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard_04.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ulist-jaccard_04.plan
@@ -15,14 +15,14 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- BTREE_SEARCH  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                          -- STABLE_SORT [$$27(ASC)]  |LOCAL|
+                          -- STABLE_SORT [$$28(ASC)]  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- STREAM_PROJECT  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                   -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                     -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                      -- ASSIGN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                      -- ASSIGN  |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/inverted-index-join/word-fuzzyeq-jaccard_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-fuzzyeq-jaccard_01.plan
index 72d3bbf..43a994d 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-fuzzyeq-jaccard_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-fuzzyeq-jaccard_01.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/word-fuzzyeq-jaccard_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-fuzzyeq-jaccard_02.plan
index fbdd088..8a4d94a 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-fuzzyeq-jaccard_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-fuzzyeq-jaccard_02.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/word-fuzzyeq-jaccard_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-fuzzyeq-jaccard_03.plan
index 72d3bbf..43a994d 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-fuzzyeq-jaccard_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-fuzzyeq-jaccard_03.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$23(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/word-jaccard-check_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_01.plan
index 5fb5cce..ecd5df2 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_01.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/word-jaccard-check_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_02.plan
index b8adc2d..14c6700 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_02.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/word-jaccard-check_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_03.plan
index 5fb5cce..ecd5df2 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_03.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/word-jaccard-check_04.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_04.plan
index a7dcf8d..d7c0f9c 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_04.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_04.plan
@@ -15,14 +15,14 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- BTREE_SEARCH  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                          -- STABLE_SORT [$$29(ASC)]  |LOCAL|
+                          -- STABLE_SORT [$$30(ASC)]  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- STREAM_PROJECT  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                   -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                     -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                      -- ASSIGN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                      -- ASSIGN  |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/inverted-index-join/word-jaccard_01.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_01.plan
index 5fb5cce..ecd5df2 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_01.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_01.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/word-jaccard_02.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_02.plan
index b8adc2d..14c6700 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_02.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_02.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/word-jaccard_03.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_03.plan
index 5fb5cce..ecd5df2 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_03.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_03.plan
@@ -14,14 +14,14 @@
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- BTREE_SEARCH  |PARTITIONED|
                       -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                        -- STABLE_SORT [$$24(ASC)]  |LOCAL|
+                        -- STABLE_SORT [$$25(ASC)]  |LOCAL|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- STREAM_PROJECT  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                   -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                    -- ASSIGN  |UNPARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                        -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                    -- ASSIGN  |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/inverted-index-join/word-jaccard_04.plan b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_04.plan
index 1326c1b..40c3151 100644
--- a/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_04.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_04.plan
@@ -15,14 +15,14 @@
                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                       -- BTREE_SEARCH  |PARTITIONED|
                         -- ONE_TO_ONE_EXCHANGE  |LOCAL|
-                          -- STABLE_SORT [$$29(ASC)]  |LOCAL|
+                          -- STABLE_SORT [$$30(ASC)]  |LOCAL|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                               -- STREAM_PROJECT  |PARTITIONED|
                                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                   -- INVERTED_INDEX_SEARCH  |PARTITIONED|
                                     -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                      -- ASSIGN  |UNPARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                          -- DATASOURCE_SCAN  |UNPARTITIONED|
-                                            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
-                                              -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file
+                                      -- ASSIGN  |PARTITIONED|
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- DATASOURCE_SCAN  |PARTITIONED|
+                                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                              -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
\ No newline at end of file