asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [19/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:27 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-edit-distance-inline.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-edit-distance-inline.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-edit-distance-inline.ast
new file mode 100644
index 0000000..df3ec56
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-edit-distance-inline.ast
@@ -0,0 +1,96 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    interests : OrderedList [string]
+,
+    children : OrderedList [          open RecordType {
+            name : string,
+            age : int32?
+          }
+]
+
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+WriteOutputTo nc1:rttest/inverted-index-join-noeqjoin_olist-edit-distance-inline.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [ainterests]
+    :
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=interests
+    ]
+  )
+  (
+    LiteralExpr [STRING] [binterests]
+    :
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=interests
+    ]
+  )
+  (
+    LiteralExpr [STRING] [ed]
+    :
+    Variable [ Name=ed ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+LetVariable [ Name=ed ]
+  :=
+  FunctionCall test.edit-distance@2[
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=interests
+    ]
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=interests
+    ]
+  ]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      Variable [ Name=ed ]
+      <=
+      LiteralExpr [LONG] [2]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=cid
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=cid
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-edit-distance.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-edit-distance.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-edit-distance.ast
new file mode 100644
index 0000000..109ff0e
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-edit-distance.ast
@@ -0,0 +1,89 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    interests : OrderedList [string]
+,
+    children : OrderedList [          open RecordType {
+            name : string,
+            age : int32?
+          }
+]
+
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+DatasetDecl Customers2(CustomerType) partitioned by [[cid]]
+WriteOutputTo nc1:rttest/inverted-index-join-noeqjoin_olist-edit-distance.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [ainterests]
+    :
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=interests
+    ]
+  )
+  (
+    LiteralExpr [STRING] [binterests]
+    :
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=interests
+    ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers2]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FunctionCall test.edit-distance@2[
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=interests
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=interests
+        ]
+      ]
+      <=
+      LiteralExpr [LONG] [2]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=cid
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=cid
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-fuzzyeq-edit-distance.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-fuzzyeq-edit-distance.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-fuzzyeq-edit-distance.ast
new file mode 100644
index 0000000..e7b7618
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-fuzzyeq-edit-distance.ast
@@ -0,0 +1,88 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    interests : OrderedList [string]
+,
+    children : OrderedList [          open RecordType {
+            name : string,
+            age : int32?
+          }
+]
+
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+DatasetDecl Customers2(CustomerType) partitioned by [[cid]]
+WriteOutputTo nc1:rttest/inverted-index-join-noeqjoin_olist-fuzzyeq-edit-distance.adm
+Set simfunction=edit-distance
+Set simthreshold=3
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [ainterests]
+    :
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=interests
+    ]
+  )
+  (
+    LiteralExpr [STRING] [binterests]
+    :
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=interests
+    ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers2]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=interests
+      ]
+      ~=
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=interests
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=cid
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=cid
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-fuzzyeq-jaccard.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-fuzzyeq-jaccard.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-fuzzyeq-jaccard.ast
new file mode 100644
index 0000000..72546e5
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-fuzzyeq-jaccard.ast
@@ -0,0 +1,88 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    interests : OrderedList [string]
+,
+    children : OrderedList [          open RecordType {
+            name : string,
+            age : int32?
+          }
+]
+
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+DatasetDecl Customers2(CustomerType) partitioned by [[cid]]
+WriteOutputTo nc1:rttest/inverted-index-join-noeqjoin_olist-fuzzyeq-jaccard.adm
+Set simfunction=jaccard
+Set simthreshold=0.7f
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [ainterests]
+    :
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=interests
+    ]
+  )
+  (
+    LiteralExpr [STRING] [binterests]
+    :
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=interests
+    ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers2]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=interests
+      ]
+      ~=
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=interests
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=cid
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=cid
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-jaccard-inline.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-jaccard-inline.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-jaccard-inline.ast
new file mode 100644
index 0000000..0979b76
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-jaccard-inline.ast
@@ -0,0 +1,96 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    interests : OrderedList [string]
+,
+    children : OrderedList [          open RecordType {
+            name : string,
+            age : int32?
+          }
+]
+
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+WriteOutputTo nc1:rttest/inverted-index-join-noeqjoin_olist-jaccard-inline.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [ainterests]
+    :
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=interests
+    ]
+  )
+  (
+    LiteralExpr [STRING] [binterests]
+    :
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=interests
+    ]
+  )
+  (
+    LiteralExpr [STRING] [jacc]
+    :
+    Variable [ Name=jacc ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+LetVariable [ Name=jacc ]
+  :=
+  FunctionCall test.similarity-jaccard@2[
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=interests
+    ]
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=interests
+    ]
+  ]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      Variable [ Name=jacc ]
+      >=
+      LiteralExpr [FLOAT] [0.7]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=cid
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=cid
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-jaccard.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-jaccard.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-jaccard.ast
new file mode 100644
index 0000000..df0821c
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/olist-jaccard.ast
@@ -0,0 +1,89 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    interests : OrderedList [string]
+,
+    children : OrderedList [          open RecordType {
+            name : string,
+            age : int32?
+          }
+]
+
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+DatasetDecl Customers2(CustomerType) partitioned by [[cid]]
+WriteOutputTo nc1:rttest/inverted-index-join-noeqjoin_olist-jaccard.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [ainterests]
+    :
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=interests
+    ]
+  )
+  (
+    LiteralExpr [STRING] [binterests]
+    :
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=interests
+    ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers2]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FunctionCall test.similarity-jaccard@2[
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=interests
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=interests
+        ]
+      ]
+      >=
+      LiteralExpr [FLOAT] [0.7]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=cid
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=cid
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/ulist-fuzzyeq-jaccard.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/ulist-fuzzyeq-jaccard.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/ulist-fuzzyeq-jaccard.ast
new file mode 100644
index 0000000..9030aa4
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/ulist-fuzzyeq-jaccard.ast
@@ -0,0 +1,88 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    interests : UnorderedList <string>
+,
+    children : OrderedList [          open RecordType {
+            name : string,
+            age : int32?
+          }
+]
+
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+DatasetDecl Customers2(CustomerType) partitioned by [[cid]]
+WriteOutputTo nc1:rttest/inverted-index-join-noeqjoin_ulist-fuzzyeq-jaccard.adm
+Set simfunction=jaccard
+Set simthreshold=0.7f
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [ainterests]
+    :
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=interests
+    ]
+  )
+  (
+    LiteralExpr [STRING] [binterests]
+    :
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=interests
+    ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers2]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=interests
+      ]
+      ~=
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=interests
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=cid
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=cid
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/ulist-jaccard-inline.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/ulist-jaccard-inline.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/ulist-jaccard-inline.ast
new file mode 100644
index 0000000..3a54439
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/ulist-jaccard-inline.ast
@@ -0,0 +1,96 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    interests : UnorderedList <string>
+,
+    children : OrderedList [          open RecordType {
+            name : string,
+            age : int32?
+          }
+]
+
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+WriteOutputTo nc1:rttest/inverted-index-join-noeqjoin_ulist-jaccard-inline.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [ainterests]
+    :
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=interests
+    ]
+  )
+  (
+    LiteralExpr [STRING] [binterests]
+    :
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=interests
+    ]
+  )
+  (
+    LiteralExpr [STRING] [jacc]
+    :
+    Variable [ Name=jacc ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+LetVariable [ Name=jacc ]
+  :=
+  FunctionCall test.similarity-jaccard@2[
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=interests
+    ]
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=interests
+    ]
+  ]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      Variable [ Name=jacc ]
+      >=
+      LiteralExpr [FLOAT] [0.7]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=cid
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=cid
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/ulist-jaccard.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/ulist-jaccard.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/ulist-jaccard.ast
new file mode 100644
index 0000000..b5cd01b
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/ulist-jaccard.ast
@@ -0,0 +1,89 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    interests : UnorderedList <string>
+,
+    children : OrderedList [          open RecordType {
+            name : string,
+            age : int32?
+          }
+]
+
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+DatasetDecl Customers2(CustomerType) partitioned by [[cid]]
+WriteOutputTo nc1:rttest/inverted-index-join-noeqjoin_ulist-jaccard.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [ainterests]
+    :
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=interests
+    ]
+  )
+  (
+    LiteralExpr [STRING] [binterests]
+    :
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=interests
+    ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers2]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FunctionCall test.similarity-jaccard@2[
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=interests
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=interests
+        ]
+      ]
+      >=
+      LiteralExpr [FLOAT] [0.7]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=cid
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=cid
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/word-fuzzyeq-jaccard.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/word-fuzzyeq-jaccard.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/word-fuzzyeq-jaccard.ast
new file mode 100644
index 0000000..2bbfbba
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/word-fuzzyeq-jaccard.ast
@@ -0,0 +1,87 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-noeqjoin_word-fuzzyeq-jaccard.adm
+Set simfunction=jaccard
+Set simthreshold=0.5f
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [atitle]
+    :
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=title
+    ]
+  )
+  (
+    LiteralExpr [STRING] [btitle]
+    :
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=title
+    ]
+  )
+]
+]
+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.word-tokens@1[
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=title
+        ]
+      ]
+      ~=
+      FunctionCall test.word-tokens@1[
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=title
+        ]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/word-jaccard-inline.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/word-jaccard-inline.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/word-jaccard-inline.ast
new file mode 100644
index 0000000..15c16da
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/word-jaccard-inline.ast
@@ -0,0 +1,86 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join-noeqjoin_word-jaccard-inline.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [atitle]
+    :
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=title
+    ]
+  )
+  (
+    LiteralExpr [STRING] [btitle]
+    :
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=title
+    ]
+  )
+  (
+    LiteralExpr [STRING] [jacc]
+    :
+    Variable [ Name=jacc ]
+  )
+]
+]
+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=jacc ]
+  :=
+  FunctionCall test.similarity-jaccard@2[
+    FunctionCall test.word-tokens@1[
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=title
+      ]
+    ]
+    FunctionCall test.word-tokens@1[
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=title
+      ]
+    ]
+  ]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      Variable [ Name=jacc ]
+      >=
+      LiteralExpr [FLOAT] [0.5]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/word-jaccard.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/word-jaccard.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/word-jaccard.ast
new file mode 100644
index 0000000..5c5083b
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join-noeqjoin/word-jaccard.ast
@@ -0,0 +1,88 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-noeqjoin_word-jaccard.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [atitle]
+    :
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=title
+    ]
+  )
+  (
+    LiteralExpr [STRING] [btitle]
+    :
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=title
+    ]
+  )
+]
+]
+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.similarity-jaccard@2[
+        FunctionCall test.word-tokens@1[
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=title
+          ]
+        ]
+        FunctionCall test.word-tokens@1[
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=title
+          ]
+        ]
+      ]
+      >=
+      LiteralExpr [FLOAT] [0.5]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/issue741.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/issue741.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/issue741.ast
new file mode 100644
index 0000000..25459dc
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/issue741.ast
@@ -0,0 +1,117 @@
+DataverseUse test
+TypeDecl TwitterUserType [
+  open RecordType {
+    screen_name : string,
+    lang : string,
+    friends_count : int32,
+    statuses_count : int32,
+    name : string,
+    followers_count : int32
+  }
+]
+TypeDecl TweetMessageType [
+  open RecordType {
+    tweetid : int64,
+    user : TwitterUserType,
+    sender_location : point?,
+    send_time : datetime,
+    referred_topics : UnorderedList <string>
+,
+    message_text : string
+  }
+]
+DatasetDecl TweetMessages(TweetMessageType) partitioned by [[tweetid]]
+WriteOutputTo nc1:rttest/inverted-index-join_issue741.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [tweet]
+    :
+    FieldAccessor [
+      Variable [ Name=t ]
+      Field=tweetid
+    ]
+  )
+  (
+    LiteralExpr [STRING] [similar-tweets]
+    :
+    (
+      SELECT ELEMENT [
+      FieldAccessor [
+        Variable [ Name=t2 ]
+        Field=tweetid
+      ]
+      ]
+      FROM [        FunctionCall Metadata.dataset@1[
+          LiteralExpr [STRING] [TweetMessages]
+        ]
+        AS
+        Variable [ Name=t2 ]
+      ]
+      LetVariable [ Name=sim ]
+        :=
+        FunctionCall test.similarity-jaccard-check@3[
+          FieldAccessor [
+            Variable [ Name=t ]
+            Field=referred_topics
+          ]
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=referred_topics
+          ]
+          LiteralExpr [FLOAT] [0.6]
+        ]
+      Where
+        OperatorExpr [
+          IndexAccessor [
+            Variable [ Name=sim ]
+            Index:             Variable [ Name=sim ]
+          ]
+          and
+          OperatorExpr [
+            FieldAccessor [
+              Variable [ Name=t2 ]
+              Field=tweetid
+            ]
+            !=
+            FieldAccessor [
+              Variable [ Name=t ]
+              Field=tweetid
+            ]
+          ]
+        ]
+    )
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [TweetMessages]
+  ]
+  AS
+  Variable [ Name=t ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=t ]
+        Field=send_time
+      ]
+      >=
+      FunctionCall test.datetime@1[
+        LiteralExpr [STRING] [2011-06-18T14:10:17]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=t ]
+        Field=send_time
+      ]
+      <
+      FunctionCall test.datetime@1[
+        LiteralExpr [STRING] [2011-06-18T15:10:17]
+      ]
+    ]
+  ]

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

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

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-contains.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-contains.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-contains.ast
new file mode 100644
index 0000000..a704add
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-contains.ast
@@ -0,0 +1,82 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-contains.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/inverted-index-join/ngram-edit-distance-check_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_01.ast
new file mode 100644
index 0000000..fe0a5ae
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_01.ast
@@ -0,0 +1,88 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-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 [
+          Variable [ Name=a ]
+          Field=authors
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+      Index:       FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=authors
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_02.ast
new file mode 100644
index 0000000..226ef2d
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_02.ast
@@ -0,0 +1,88 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-edit-distance-check_02.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 [
+          Variable [ Name=a ]
+          Field=authors
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+      Index:       FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=authors
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_03.ast
new file mode 100644
index 0000000..22a1b5c
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_03.ast
@@ -0,0 +1,78 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance-check_03.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 [
+          Variable [ Name=a ]
+          Field=authors
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+      Index:       FunctionCall test.edit-distance-check@3[
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=authors
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_04.ast
new file mode 100644
index 0000000..5dd91f7
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-check_04.ast
@@ -0,0 +1,79 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance-check_04.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+  (
+    LiteralExpr [STRING] [ed]
+    :
+    IndexAccessor [
+      Variable [ Name=ed ]
+      Index:       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-check@3[
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=authors
+    ]
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=authors
+    ]
+    LiteralExpr [LONG] [3]
+  ]
+Where
+  OperatorExpr [
+    IndexAccessor [
+      Variable [ Name=ed ]
+      Index:       Variable [ Name=ed ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-contains.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-contains.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-contains.ast
new file mode 100644
index 0000000..2f33777
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance-contains.ast
@@ -0,0 +1,88 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-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 [
+          Variable [ Name=a ]
+          Field=authors
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+      Index:       FunctionCall test.edit-distance-contains@3[
+        FieldAccessor [
+          Variable [ Name=a ]
+          Field=authors
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=authors
+        ]
+        LiteralExpr [LONG] [3]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_01.ast
new file mode 100644
index 0000000..0bb1cc1
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_01.ast
@@ -0,0 +1,78 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-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 [
+          Variable [ Name=a ]
+          Field=authors
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=authors
+        ]
+      ]
+      <
+      LiteralExpr [LONG] [3]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_02.ast
new file mode 100644
index 0000000..c558c56
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_02.ast
@@ -0,0 +1,78 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-edit-distance_02.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 [
+          Variable [ Name=a ]
+          Field=authors
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=authors
+        ]
+      ]
+      <
+      LiteralExpr [LONG] [3]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_03.ast
new file mode 100644
index 0000000..cbe7ead
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_03.ast
@@ -0,0 +1,68 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance_03.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 [
+          Variable [ Name=a ]
+          Field=authors
+        ]
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=authors
+        ]
+      ]
+      <
+      LiteralExpr [LONG] [3]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_04.ast
new file mode 100644
index 0000000..1b28c62
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-edit-distance_04.ast
@@ -0,0 +1,76 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-edit-distance_03.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+  (
+    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 [
+      Variable [ Name=a ]
+      Field=authors
+    ]
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=authors
+    ]
+  ]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      Variable [ Name=ed ]
+      <
+      LiteralExpr [LONG] [3]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-edit-distance_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-edit-distance_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-edit-distance_01.ast
new file mode 100644
index 0000000..d9572ab
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-edit-distance_01.ast
@@ -0,0 +1,77 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-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 [
+        Variable [ Name=a ]
+        Field=authors
+      ]
+      ~=
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=authors
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-edit-distance_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-edit-distance_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-edit-distance_02.ast
new file mode 100644
index 0000000..d9572ab
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-edit-distance_02.ast
@@ -0,0 +1,77 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-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 [
+        Variable [ Name=a ]
+        Field=authors
+      ]
+      ~=
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=authors
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-edit-distance_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-edit-distance_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-edit-distance_03.ast
new file mode 100644
index 0000000..c8abd1e
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-edit-distance_03.ast
@@ -0,0 +1,67 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-fuzzyeq-edit-distance_03.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 [
+        Variable [ Name=a ]
+        Field=authors
+      ]
+      ~=
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=authors
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-jaccard_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-jaccard_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-jaccard_01.ast
new file mode 100644
index 0000000..6acee19
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-jaccard_01.ast
@@ -0,0 +1,86 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-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 [
+          Variable [ Name=a ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+      ~=
+      FunctionCall test.gram-tokens@3[
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-jaccard_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-jaccard_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-jaccard_02.ast
new file mode 100644
index 0000000..23cc11f
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-jaccard_02.ast
@@ -0,0 +1,86 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-fuzzyeq-jaccard_02.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 [
+          Variable [ Name=a ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+      ~=
+      FunctionCall test.gram-tokens@3[
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-jaccard_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-jaccard_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-jaccard_03.ast
new file mode 100644
index 0000000..ba8bc3a
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-fuzzyeq-jaccard_03.ast
@@ -0,0 +1,76 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-fuzzyeq-jaccard_03.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 [
+          Variable [ Name=a ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+      ~=
+      FunctionCall test.gram-tokens@3[
+        FieldAccessor [
+          Variable [ Name=b ]
+          Field=title
+        ]
+        LiteralExpr [LONG] [3]
+        LiteralExpr [FALSE]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard-check_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard-check_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard-check_01.ast
new file mode 100644
index 0000000..d0217af
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard-check_01.ast
@@ -0,0 +1,105 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-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 [
+            Variable [ Name=a ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+      Index:       FunctionCall test.similarity-jaccard-check@3[
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard-check_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard-check_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard-check_02.ast
new file mode 100644
index 0000000..0fd14a4
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard-check_02.ast
@@ -0,0 +1,105 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-jaccard-check_02.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 [
+            Variable [ Name=a ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+      Index:       FunctionCall test.similarity-jaccard-check@3[
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard-check_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard-check_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard-check_03.ast
new file mode 100644
index 0000000..b816313
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard-check_03.ast
@@ -0,0 +1,95 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : string,
+    misc : string
+  }
+]
+DatasetDecl DBLP(DBLPType) partitioned by [[id]]
+WriteOutputTo nc1:rttest/inverted-index-join_ngram-jaccard-check_03.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.similarity-jaccard-check@3[
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+      Index:       FunctionCall test.similarity-jaccard-check@3[
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]

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

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard_01.ast
new file mode 100644
index 0000000..c20a176
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/inverted-index-join/ngram-jaccard_01.ast
@@ -0,0 +1,87 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-jaccard_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.similarity-jaccard@2[
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+        FunctionCall test.gram-tokens@3[
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=title
+          ]
+          LiteralExpr [LONG] [3]
+          LiteralExpr [FALSE]
+        ]
+      ]
+      >=
+      LiteralExpr [FLOAT] [0.5]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=id
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=id
+      ]
+    ]
+  ]



Mime
View raw message