asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [11/51] [partial] incubator-asterixdb git commit: SQL++ parser: 1. refactored asterix-aql to become asterix-lang-common and asterix-lang-aql, where the former is the common part for different languages; 2. added asterix-lang-sqlpp on top of asterix-lang-
Date Fri, 30 Oct 2015 23:16:19 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/ngram-jaccard-check-let.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/ngram-jaccard-check-let.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/ngram-jaccard-check-let.ast
new file mode 100644
index 0000000..2289a82
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/ngram-jaccard-check-let.ast
@@ -0,0 +1,53 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-complex_ngram-jaccard-check-let.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=o ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=o ]
+]
+LetVariable [ Name=jacc ]
+  :=
+  FunctionCall test.similarity-jaccard-check@3[
+    FunctionCall test.gram-tokens@3[
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=o ]
+          Field=nested
+        ]
+        Field=title
+      ]
+      LiteralExpr [LONG] [3]
+      LiteralExpr [FALSE]
+    ]
+    FunctionCall test.gram-tokens@3[
+      LiteralExpr [STRING] [Transactions for Cooperative Environments]
+      LiteralExpr [LONG] [3]
+      LiteralExpr [FALSE]
+    ]
+    LiteralExpr [FLOAT] [0.5]
+  ]
+Where
+  IndexAccessor [
+    Variable [ Name=jacc ]
+    Index:     Variable [ Name=jacc ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/ngram-jaccard-check-multi-let.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/ngram-jaccard-check-multi-let.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/ngram-jaccard-check-multi-let.ast
new file mode 100644
index 0000000..2c41290
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/ngram-jaccard-check-multi-let.ast
@@ -0,0 +1,70 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-complex_ngram-jaccard-check-multi-let.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [Paper]
+    :
+    Variable [ Name=paper_tokens ]
+  )
+  (
+    LiteralExpr [STRING] [Query]
+    :
+    Variable [ Name=query_tokens ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=paper ]
+]
+LetVariable [ Name=paper_tokens ]
+  :=
+  FunctionCall test.gram-tokens@3[
+    FieldAccessor [
+      FieldAccessor [
+        Variable [ Name=paper ]
+        Field=nested
+      ]
+      Field=title
+    ]
+    LiteralExpr [LONG] [3]
+    LiteralExpr [FALSE]
+  ]
+LetVariable [ Name=query_tokens ]
+  :=
+  FunctionCall test.gram-tokens@3[
+    LiteralExpr [STRING] [Transactions for Cooperative Environments]
+    LiteralExpr [LONG] [3]
+    LiteralExpr [FALSE]
+  ]
+LetVariable [ Name=jacc ]
+  :=
+  FunctionCall test.similarity-jaccard-check@3[
+    Variable [ Name=paper_tokens ]
+    Variable [ Name=query_tokens ]
+    LiteralExpr [FLOAT] [0.5]
+  ]
+Where
+  IndexAccessor [
+    Variable [ Name=jacc ]
+    Index:     Variable [ Name=jacc ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/word-jaccard-check-let.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/word-jaccard-check-let.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/word-jaccard-check-let.ast
new file mode 100644
index 0000000..e2d7abe
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/word-jaccard-check-let.ast
@@ -0,0 +1,48 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-complex_word-jaccard-check-let.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=o ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=o ]
+]
+LetVariable [ Name=jacc ]
+  :=
+  FunctionCall test.similarity-jaccard-check@3[
+    FunctionCall test.word-tokens@1[
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=o ]
+          Field=nested
+        ]
+        Field=title
+      ]
+    ]
+    FunctionCall test.word-tokens@1[
+      LiteralExpr [STRING] [Transactions for Cooperative Environments]
+    ]
+    LiteralExpr [FLOAT] [0.5]
+  ]
+Where
+  IndexAccessor [
+    Variable [ Name=jacc ]
+    Index:     Variable [ Name=jacc ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/word-jaccard-check-multi-let.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/word-jaccard-check-multi-let.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/word-jaccard-check-multi-let.ast
new file mode 100644
index 0000000..37d4ee0
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-complex/word-jaccard-check-multi-let.ast
@@ -0,0 +1,65 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-complex_word-jaccard-check-multi-let.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [Paper]
+    :
+    Variable [ Name=paper_tokens ]
+  )
+  (
+    LiteralExpr [STRING] [Query]
+    :
+    Variable [ Name=query_tokens ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=paper ]
+]
+LetVariable [ Name=paper_tokens ]
+  :=
+  FunctionCall test.word-tokens@1[
+    FieldAccessor [
+      FieldAccessor [
+        Variable [ Name=paper ]
+        Field=nested
+      ]
+      Field=title
+    ]
+  ]
+LetVariable [ Name=query_tokens ]
+  :=
+  FunctionCall test.word-tokens@1[
+    LiteralExpr [STRING] [Transactions for Cooperative Environments]
+  ]
+LetVariable [ Name=jacc ]
+  :=
+  FunctionCall test.similarity-jaccard-check@3[
+    Variable [ Name=paper_tokens ]
+    Variable [ Name=query_tokens ]
+    LiteralExpr [FLOAT] [0.8]
+  ]
+Where
+  IndexAccessor [
+    Variable [ Name=jacc ]
+    Index:     Variable [ Name=jacc ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/leftouterjoin-probe-pidx-with-join-edit-distance-check-idx_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/leftouterjoin-probe-pidx-with-join-edit-distance-check-idx_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/leftouterjoin-probe-pidx-with-join-edit-distance-check-idx_01.ast
new file mode 100644
index 0000000..6bac05c
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/leftouterjoin-probe-pidx-with-join-edit-distance-check-idx_01.ast
@@ -0,0 +1,185 @@
+DataverseUse test
+TypeDecl TwitterUserType [
+  closed RecordType {
+    screen-name : string,
+    lang : string,
+    friends-count : int32,
+    statuses-count : int32,
+    name : string,
+    followers-count : int32
+  }
+]
+TypeDecl TweetMessageNestedType [
+  open RecordType {
+    tweetid : int64,
+    user : TwitterUserType,
+    sender-location : point,
+    send-time : datetime,
+    referred-topics : UnorderedList <string>
+,
+    countA : int32,
+    countB : int32
+  }
+]
+TypeDecl TweetMessageType [
+  open RecordType {
+    nested : TweetMessageNestedType
+  }
+]
+DatasetDecl TweetMessages(TweetMessageType) partitioned by [[nested, tweetid]]
+WriteOutputTo nc1:rttest/inverted-index-join_leftouterjoin-probe-pidx-with-join-edit-distance-check_idx_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [tweet]
+    :
+    RecordConstructor [
+      (
+        LiteralExpr [STRING] [id]
+        :
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=t1 ]
+            Field=nested
+          ]
+          Field=tweetid
+        ]
+      )
+      (
+        LiteralExpr [STRING] [topics]
+        :
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=t1 ]
+            Field=nested
+          ]
+          Field=message-text
+        ]
+      )
+    ]
+  )
+  (
+    LiteralExpr [STRING] [similar-tweets]
+    :
+    (
+      SELECT ELEMENT [
+      RecordConstructor [
+        (
+          LiteralExpr [STRING] [id]
+          :
+          FieldAccessor [
+            FieldAccessor [
+              Variable [ Name=t2 ]
+              Field=nested
+            ]
+            Field=tweetid
+          ]
+        )
+        (
+          LiteralExpr [STRING] [topics]
+          :
+          FieldAccessor [
+            FieldAccessor [
+              Variable [ Name=t2 ]
+              Field=nested
+            ]
+            Field=message-text
+          ]
+        )
+      ]
+      ]
+      FROM [        FunctionCall Metadata.dataset@1[
+          LiteralExpr [STRING] [TweetMessages]
+        ]
+        AS
+        Variable [ Name=t2 ]
+      ]
+      LetVariable [ Name=sim ]
+        :=
+        FunctionCall test.edit-distance-check@3[
+          FieldAccessor [
+            FieldAccessor [
+              Variable [ Name=t1 ]
+              Field=nested
+            ]
+            Field=message-text
+          ]
+          FieldAccessor [
+            FieldAccessor [
+              Variable [ Name=t2 ]
+              Field=nested
+            ]
+            Field=message-text
+          ]
+          LiteralExpr [LONG] [7]
+        ]
+      Where
+        OperatorExpr [
+          IndexAccessor [
+            Variable [ Name=sim ]
+            Index:             Variable [ Name=sim ]
+          ]
+          and
+          OperatorExpr [
+            FieldAccessor [
+              FieldAccessor [
+                Variable [ Name=t2 ]
+                Field=nested
+              ]
+              Field=tweetid
+            ]
+            !=
+            FieldAccessor [
+              FieldAccessor [
+                Variable [ Name=t1 ]
+                Field=nested
+              ]
+              Field=tweetid
+            ]
+          ]
+        ]
+      Orderby
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=nested
+          ]
+          Field=tweetid
+        ]
+        ASC
+
+    )
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [TweetMessages]
+  ]
+  AS
+  Variable [ Name=t1 ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      FieldAccessor [
+        Variable [ Name=t1 ]
+        Field=nested
+      ]
+      Field=tweetid
+    ]
+    >
+    FunctionCall test.int64@1[
+      LiteralExpr [STRING] [240]
+    ]
+  ]
+Orderby
+  FieldAccessor [
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=nested
+    ]
+    Field=tweetid
+  ]
+  ASC
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_01.ast
new file mode 100644
index 0000000..5f185e0
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_01.ast
@@ -0,0 +1,90 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    misc : string
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+DatasetDecl CSX(CSXType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-contains-01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [title1]
+    :
+    FieldAccessor [
+      Variable [ Name=o1 ]
+      Field=title
+    ]
+  )
+  (
+    LiteralExpr [STRING] [title2]
+    :
+    FieldAccessor [
+      Variable [ Name=o2 ]
+      Field=title
+    ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=o1 ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=o2 ]
+]
+Where
+  OperatorExpr [
+    FunctionCall test.contains@2[
+      FieldAccessor [
+        Variable [ Name=o1 ]
+        Field=title
+      ]
+      FieldAccessor [
+        Variable [ Name=o2 ]
+        Field=title
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=o1 ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=o2 ]
+        Field=id
+      ]
+    ]
+  ]
+Orderby
+  FieldAccessor [
+    Variable [ Name=o1 ]
+    Field=id
+  ]
+  ASC
+  FieldAccessor [
+    Variable [ Name=o2 ]
+    Field=id
+  ]
+  ASC
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_02.ast
new file mode 100644
index 0000000..9199cad
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_02.ast
@@ -0,0 +1,90 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXType [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+DatasetDecl CSX(CSXType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-contains-02.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [title1]
+    :
+    FieldAccessor [
+      Variable [ Name=o1 ]
+      Field=title
+    ]
+  )
+  (
+    LiteralExpr [STRING] [title2]
+    :
+    FieldAccessor [
+      Variable [ Name=o2 ]
+      Field=title
+    ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=o1 ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=o2 ]
+]
+Where
+  OperatorExpr [
+    FunctionCall test.contains@2[
+      FieldAccessor [
+        Variable [ Name=o1 ]
+        Field=title
+      ]
+      FieldAccessor [
+        Variable [ Name=o2 ]
+        Field=title
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=o1 ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=o2 ]
+        Field=id
+      ]
+    ]
+  ]
+Orderby
+  FieldAccessor [
+    Variable [ Name=o1 ]
+    Field=id
+  ]
+  ASC
+  FieldAccessor [
+    Variable [ Name=o2 ]
+    Field=id
+  ]
+  ASC
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_03.ast
new file mode 100644
index 0000000..f0f75b2
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_03.ast
@@ -0,0 +1,81 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-contains-03.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [title1]
+    :
+    FieldAccessor [
+      Variable [ Name=o1 ]
+      Field=title
+    ]
+  )
+  (
+    LiteralExpr [STRING] [title2]
+    :
+    FieldAccessor [
+      Variable [ Name=o2 ]
+      Field=title
+    ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=o1 ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=o2 ]
+]
+Where
+  OperatorExpr [
+    FunctionCall test.contains@2[
+      FieldAccessor [
+        Variable [ Name=o1 ]
+        Field=title
+      ]
+      FieldAccessor [
+        Variable [ Name=o2 ]
+        Field=title
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=o1 ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=o2 ]
+        Field=id
+      ]
+    ]
+  ]
+Orderby
+  FieldAccessor [
+    Variable [ Name=o1 ]
+    Field=id
+  ]
+  ASC
+  FieldAccessor [
+    Variable [ Name=o2 ]
+    Field=id
+  ]
+  ASC
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_04.ast
new file mode 100644
index 0000000..de0a51f
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-contains_04.ast
@@ -0,0 +1,89 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    misc : string
+  }
+]
+TypeDecl CSXType [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+DatasetDecl CSX(CSXType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-contains-04.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [title1]
+    :
+    FieldAccessor [
+      Variable [ Name=o1 ]
+      Field=title
+    ]
+  )
+  (
+    LiteralExpr [STRING] [title2]
+    :
+    FieldAccessor [
+      Variable [ Name=o2 ]
+      Field=title
+    ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=o1 ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=o2 ]
+]
+Where
+  OperatorExpr [
+    FunctionCall test.contains@2[
+      FieldAccessor [
+        Variable [ Name=o1 ]
+        Field=title
+      ]
+      FieldAccessor [
+        Variable [ Name=o2 ]
+        Field=title
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=o1 ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=o2 ]
+        Field=id
+      ]
+    ]
+  ]
+Orderby
+  FieldAccessor [
+    Variable [ Name=o1 ]
+    Field=id
+  ]
+  ASC
+  FieldAccessor [
+    Variable [ Name=o2 ]
+    Field=id
+  ]
+  ASC
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_01.ast
new file mode 100644
index 0000000..a9c2373
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_01.ast
@@ -0,0 +1,115 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  closed RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance-check_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    IndexAccessor [
+      FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+      Index:       FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_02.ast
new file mode 100644
index 0000000..6c615b2
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_02.ast
@@ -0,0 +1,115 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance-check_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    IndexAccessor [
+      FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+      Index:       FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_03.ast
new file mode 100644
index 0000000..567cac1
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_03.ast
@@ -0,0 +1,100 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance-check_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    IndexAccessor [
+      FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+      Index:       FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_04.ast
new file mode 100644
index 0000000..b4e0ea6
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_04.ast
@@ -0,0 +1,114 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance-check_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    IndexAccessor [
+      FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+      Index:       FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_05.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_05.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_05.ast
new file mode 100644
index 0000000..b4e0ea6
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-check_05.ast
@@ -0,0 +1,114 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance-check_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    IndexAccessor [
+      FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+      Index:       FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-contains.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-contains.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-contains.ast
new file mode 100644
index 0000000..ec7ea04
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-contains.ast
@@ -0,0 +1,115 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  closed RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance-contains.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    IndexAccessor [
+      FunctionCall test.edit-distance-contains@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+      Index:       FunctionCall test.edit-distance-contains@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-inline.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-inline.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-inline.ast
new file mode 100644
index 0000000..6f919c6
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance-inline.ast
@@ -0,0 +1,104 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join-noeqjoin_ngram-edit-distance-inline.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [aauthors]
+    :
+    FieldAccessor [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=nested
+      ]
+      Field=authors
+    ]
+  )
+  (
+    LiteralExpr [STRING] [bauthors]
+    :
+    FieldAccessor [
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=nested
+      ]
+      Field=authors
+    ]
+  )
+  (
+    LiteralExpr [STRING] [ed]
+    :
+    Variable [ Name=ed ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+LetVariable [ Name=ed ]
+  :=
+  FunctionCall test.edit-distance@2[
+    FieldAccessor [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=nested
+      ]
+      Field=authors
+    ]
+    FieldAccessor [
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=nested
+      ]
+      Field=authors
+    ]
+  ]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      Variable [ Name=ed ]
+      <
+      LiteralExpr [LONG] [3]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_01.ast
new file mode 100644
index 0000000..aef0e68
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_01.ast
@@ -0,0 +1,99 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  closed RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FunctionCall test.edit-distance@2[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+      ]
+      <
+      LiteralExpr [LONG] [3]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_02.ast
new file mode 100644
index 0000000..c612f1d
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_02.ast
@@ -0,0 +1,99 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FunctionCall test.edit-distance@2[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+      ]
+      <
+      LiteralExpr [LONG] [3]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_03.ast
new file mode 100644
index 0000000..5f02579
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_03.ast
@@ -0,0 +1,84 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FunctionCall test.edit-distance@2[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+      ]
+      <
+      LiteralExpr [LONG] [3]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_04.ast
new file mode 100644
index 0000000..4c0e321
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_04.ast
@@ -0,0 +1,98 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FunctionCall test.edit-distance@2[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+      ]
+      <
+      LiteralExpr [LONG] [3]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_05.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_05.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_05.ast
new file mode 100644
index 0000000..4c0e321
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-edit-distance_05.ast
@@ -0,0 +1,98 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FunctionCall test.edit-distance@2[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=authors
+        ]
+      ]
+      <
+      LiteralExpr [LONG] [3]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_01.ast
new file mode 100644
index 0000000..d9997c1
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_01.ast
@@ -0,0 +1,98 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  closed RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-fuzzyeq-edit-distance_01.adm
+Set simfunction=edit-distance
+Set simthreshold=3
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=authors
+      ]
+      ~=
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=authors
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_02.ast
new file mode 100644
index 0000000..0e70327
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_02.ast
@@ -0,0 +1,98 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-fuzzyeq-edit-distance_01.adm
+Set simfunction=edit-distance
+Set simthreshold=3
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=authors
+      ]
+      ~=
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=authors
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_03.ast
new file mode 100644
index 0000000..f788eb4
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_03.ast
@@ -0,0 +1,83 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-fuzzyeq-edit-distance_01.adm
+Set simfunction=edit-distance
+Set simthreshold=3
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=authors
+      ]
+      ~=
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=authors
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_04.ast
new file mode 100644
index 0000000..64bafa2
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_04.ast
@@ -0,0 +1,97 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-fuzzyeq-edit-distance_01.adm
+Set simfunction=edit-distance
+Set simthreshold=3
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=authors
+      ]
+      ~=
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=authors
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_05.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_05.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_05.ast
new file mode 100644
index 0000000..64bafa2
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-edit-distance_05.ast
@@ -0,0 +1,97 @@
+DataverseUse test
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-fuzzyeq-edit-distance_01.adm
+Set simfunction=edit-distance
+Set simthreshold=3
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=authors
+      ]
+      ~=
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=authors
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_01.ast
new file mode 100644
index 0000000..7dc305b
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_01.ast
@@ -0,0 +1,107 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  closed RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-fuzzyeq-jaccard_01.adm
+Set simfunction=jaccard
+Set simthreshold=0.5f
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FunctionCall test.gram-tokens@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+      ~=
+      FunctionCall test.gram-tokens@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_02.ast
new file mode 100644
index 0000000..14f8baf
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_02.ast
@@ -0,0 +1,107 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPTypetmp [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-fuzzyeq-jaccard_01.adm
+Set simfunction=jaccard
+Set simthreshold=0.5f
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FunctionCall test.gram-tokens@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+      ~=
+      FunctionCall test.gram-tokens@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_03.ast
new file mode 100644
index 0000000..f36d189
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_03.ast
@@ -0,0 +1,92 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-fuzzyeq-jaccard_01.adm
+Set simfunction=jaccard
+Set simthreshold=0.5f
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FunctionCall test.gram-tokens@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+      ~=
+      FunctionCall test.gram-tokens@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_04.ast
new file mode 100644
index 0000000..de88875
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-fuzzyeq-jaccard_04.ast
@@ -0,0 +1,106 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-fuzzyeq-jaccard_01.adm
+Set simfunction=jaccard
+Set simthreshold=0.5f
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FunctionCall test.gram-tokens@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=nested
+          ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+      ~=
+      FunctionCall test.gram-tokens@3[
+        FieldAccessor [
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=nested
+          ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-jaccard-check_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-jaccard-check_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-jaccard-check_01.ast
new file mode 100644
index 0000000..680f1a4
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-jaccard-check_01.ast
@@ -0,0 +1,132 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPTypetmp [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  closed RecordType {
+    id : int32,
+    csxid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-jaccard-check_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    IndexAccessor [
+      FunctionCall test.similarity-jaccard-check@3[
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            FieldAccessor [
+              Variable [ Name=a ]
+              Field=nested
+            ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            FieldAccessor [
+              Variable [ Name=b ]
+              Field=nested
+            ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+      Index:       FunctionCall test.similarity-jaccard-check@3[
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            FieldAccessor [
+              Variable [ Name=a ]
+              Field=nested
+            ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            FieldAccessor [
+              Variable [ Name=b ]
+              Field=nested
+            ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-jaccard-check_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-jaccard-check_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-jaccard-check_02.ast
new file mode 100644
index 0000000..c8c76ed
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/nested-open-index/inverted-index-join/ngram-jaccard-check_02.ast
@@ -0,0 +1,132 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPTypetmp [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl CSXTypetmp [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    authors : string,
+    misc : string
+  }
+]
+TypeDecl DBLPType [
+  closed RecordType {
+    nested : DBLPTypetmp
+  }
+]
+TypeDecl CSXType [
+  closed RecordType {
+    nested : CSXTypetmp
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[nested, id]]
+DatasetDecl CSX(CSXType) partitioned by [[nested, id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-jaccard-check_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CSX]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [DBLP]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    IndexAccessor [
+      FunctionCall test.similarity-jaccard-check@3[
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            FieldAccessor [
+              Variable [ Name=a ]
+              Field=nested
+            ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            FieldAccessor [
+              Variable [ Name=b ]
+              Field=nested
+            ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+      Index:       FunctionCall test.similarity-jaccard-check@3[
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            FieldAccessor [
+              Variable [ Name=a ]
+              Field=nested
+            ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            FieldAccessor [
+              Variable [ Name=b ]
+              Field=nested
+            ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=nested
+        ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=nested
+        ]
+        Field=id
+      ]
+    ]
+  ]


Mime
View raw message