asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [07/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:15 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_03.ast
new file mode 100644
index 0000000..9f1edbf
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_03.ast
@@ -0,0 +1,66 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : 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/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_04.ast
new file mode 100644
index 0000000..d105d66
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_04.ast
@@ -0,0 +1,75 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXType [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    title : 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/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_05.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_05.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_05.ast
new file mode 100644
index 0000000..d105d66
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-edit-distance_05.ast
@@ -0,0 +1,75 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    misc : string
+  }
+]
+TypeDecl CSXType [
+  open RecordType {
+    id : int32,
+    csxid : string,
+    title : 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/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_01.ast
new file mode 100644
index 0000000..2d6fd8c
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_01.ast
@@ -0,0 +1,85 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : 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/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_02.ast
new file mode 100644
index 0000000..f54a688
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_02.ast
@@ -0,0 +1,85 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-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/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_03.ast
new file mode 100644
index 0000000..6afbdd9
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_03.ast
@@ -0,0 +1,75 @@
+DataverseUse test
+Set import-private-functions=true
+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-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/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_04.ast
new file mode 100644
index 0000000..3e1f2d1
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-fuzzyeq-jaccard_04.ast
@@ -0,0 +1,84 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : 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-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/open-index-enforced/inverted-index-join/ngram-jaccard-check_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_01.ast
new file mode 100644
index 0000000..36048d7
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_01.ast
@@ -0,0 +1,104 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : 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/open-index-enforced/inverted-index-join/ngram-jaccard-check_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_02.ast
new file mode 100644
index 0000000..6b235f1
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_02.ast
@@ -0,0 +1,104 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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-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/open-index-enforced/inverted-index-join/ngram-jaccard-check_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_03.ast
new file mode 100644
index 0000000..da9f690
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_03.ast
@@ -0,0 +1,94 @@
+DataverseUse test
+Set import-private-functions=true
+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-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/open-index-enforced/inverted-index-join/ngram-jaccard-check_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_04.ast
new file mode 100644
index 0000000..3410831
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_04.ast
@@ -0,0 +1,103 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : 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-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/open-index-enforced/inverted-index-join/ngram-jaccard-check_inline_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_inline_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_inline_03.ast
new file mode 100644
index 0000000..b17c189
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard-check_inline_03.ast
@@ -0,0 +1,87 @@
+DataverseUse test
+Set import-private-functions=true
+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-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/open-index-enforced/inverted-index-join/ngram-jaccard_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_01.ast
new file mode 100644
index 0000000..c9cae12
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_01.ast
@@ -0,0 +1,86 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : 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
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_02.ast
new file mode 100644
index 0000000..da9c748
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-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 [
+  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-jaccard_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.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
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_03.ast
new file mode 100644
index 0000000..6a20190
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_03.ast
@@ -0,0 +1,76 @@
+DataverseUse test
+Set import-private-functions=true
+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-jaccard_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.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
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_04.ast
new file mode 100644
index 0000000..86c04c2
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_04.ast
@@ -0,0 +1,85 @@
+DataverseUse test
+Set import-private-functions=true
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : 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-jaccard_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.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
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_inline_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_inline_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_inline_03.ast
new file mode 100644
index 0000000..95454f5
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/ngram-jaccard_inline_03.ast
@@ -0,0 +1,84 @@
+DataverseUse test
+Set import-private-functions=true
+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-jaccard_04.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+  (
+    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.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]
+    ]
+  ]
+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/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_01.ast
new file mode 100644
index 0000000..575738b
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_01.ast
@@ -0,0 +1,80 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : 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_word-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.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/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_02.ast
new file mode 100644
index 0000000..bc2ab3e
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_02.ast
@@ -0,0 +1,80 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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_word-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.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/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_03.ast
new file mode 100644
index 0000000..6b18e22
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_03.ast
@@ -0,0 +1,70 @@
+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_word-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.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/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_04.ast
new file mode 100644
index 0000000..c352aed
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-fuzzyeq-jaccard_04.ast
@@ -0,0 +1,79 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : 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_word-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.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/open-index-enforced/inverted-index-join/word-jaccard-check-after-btree-access.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check-after-btree-access.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check-after-btree-access.ast
new file mode 100644
index 0000000..4d96b4c
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check-after-btree-access.ast
@@ -0,0 +1,113 @@
+DataverseUse test
+TypeDecl TwitterUserType [
+  closed 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>
+,
+    countA : int32,
+    countB : int32
+  }
+]
+DatasetDecl TweetMessages(TweetMessageType) partitioned by [[tweetid]]
+WriteOutputTo nc1:rttest/inverted-index-join_word-jaccard-check-after-btree-access.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [t1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=tweetid
+    ]
+  )
+  (
+    LiteralExpr [STRING] [t2]
+    :
+    FieldAccessor [
+      Variable [ Name=t2 ]
+      Field=tweetid
+    ]
+  )
+  (
+    LiteralExpr [STRING] [sim]
+    :
+    IndexAccessor [
+      Variable [ Name=sim ]
+      Index:       Variable [ Name=sim ]
+    ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [TweetMessages]
+  ]
+  AS
+  Variable [ Name=t1 ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [TweetMessages]
+  ]
+  AS
+  Variable [ Name=t2 ]
+]
+LetVariable [ Name=sim ]
+  :=
+  FunctionCall test.similarity-jaccard-check@3[
+    FunctionCall test.word-tokens@1[
+      FieldAccessor [
+        Variable [ Name=t1 ]
+        Field=message-text
+      ]
+    ]
+    FunctionCall test.word-tokens@1[
+      FieldAccessor [
+        Variable [ Name=t2 ]
+        Field=message-text
+      ]
+    ]
+    LiteralExpr [FLOAT] [0.6]
+  ]
+Where
+  OperatorExpr [
+    IndexAccessor [
+      Variable [ Name=sim ]
+      Index:       Variable [ Name=sim ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=t1 ]
+        Field=tweetid
+      ]
+      <
+      FunctionCall test.int64@1[
+        LiteralExpr [STRING] [20]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=t2 ]
+        Field=tweetid
+      ]
+      !=
+      FieldAccessor [
+        Variable [ Name=t1 ]
+        Field=tweetid
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_01.ast
new file mode 100644
index 0000000..9312f4f
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_01.ast
@@ -0,0 +1,95 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : 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_word-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.word-tokens@1[
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=title
+          ]
+        ]
+        FunctionCall test.word-tokens@1[
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=title
+          ]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+      Index:       FunctionCall test.similarity-jaccard-check@3[
+        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/open-index-enforced/inverted-index-join/word-jaccard-check_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_02.ast
new file mode 100644
index 0000000..c522135
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_02.ast
@@ -0,0 +1,95 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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_word-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.word-tokens@1[
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=title
+          ]
+        ]
+        FunctionCall test.word-tokens@1[
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=title
+          ]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+      Index:       FunctionCall test.similarity-jaccard-check@3[
+        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/open-index-enforced/inverted-index-join/word-jaccard-check_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_03.ast
new file mode 100644
index 0000000..3b51a56
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_03.ast
@@ -0,0 +1,85 @@
+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_word-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.word-tokens@1[
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=title
+          ]
+        ]
+        FunctionCall test.word-tokens@1[
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=title
+          ]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+      Index:       FunctionCall test.similarity-jaccard-check@3[
+        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/open-index-enforced/inverted-index-join/word-jaccard-check_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_04.ast
new file mode 100644
index 0000000..ea0d477
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_04.ast
@@ -0,0 +1,94 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : 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_word-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.word-tokens@1[
+          FieldAccessor [
+            Variable [ Name=a ]
+            Field=title
+          ]
+        ]
+        FunctionCall test.word-tokens@1[
+          FieldAccessor [
+            Variable [ Name=b ]
+            Field=title
+          ]
+        ]
+        LiteralExpr [FLOAT] [0.5]
+      ]
+      Index:       FunctionCall test.similarity-jaccard-check@3[
+        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/open-index-enforced/inverted-index-join/word-jaccard-check_inline_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_inline_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_inline_03.ast
new file mode 100644
index 0000000..8c9a4b7
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard-check_inline_03.ast
@@ -0,0 +1,82 @@
+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_word-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.word-tokens@1[
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=title
+      ]
+    ]
+    FunctionCall test.word-tokens@1[
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=title
+      ]
+    ]
+    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/open-index-enforced/inverted-index-join/word-jaccard_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_01.ast
new file mode 100644
index 0000000..d506e1b
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_01.ast
@@ -0,0 +1,81 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : 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_word-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.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/open-index-enforced/inverted-index-join/word-jaccard_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_02.ast
new file mode 100644
index 0000000..4071847
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_02.ast
@@ -0,0 +1,81 @@
+DataverseUse test
+TypeDecl DBLPType [
+  closed RecordType {
+    id : int32,
+    dblpid : string,
+    title : string,
+    authors : 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_word-jaccard_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.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/open-index-enforced/inverted-index-join/word-jaccard_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_03.ast
new file mode 100644
index 0000000..8ea189a
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_03.ast
@@ -0,0 +1,71 @@
+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_word-jaccard_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.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/open-index-enforced/inverted-index-join/word-jaccard_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_04.ast
new file mode 100644
index 0000000..615ec68
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_04.ast
@@ -0,0 +1,80 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : string,
+    authors : 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_word-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.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/open-index-enforced/inverted-index-join/word-jaccard_inline_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_inline_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_inline_03.ast
new file mode 100644
index 0000000..42f995e
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/inverted-index-join/word-jaccard_inline_03.ast
@@ -0,0 +1,79 @@
+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_word-jaccard_04.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [arec]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [brec]
+    :
+    Variable [ Name=b ]
+  )
+  (
+    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/open-index-enforced/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_01.ast
new file mode 100644
index 0000000..b0f9288
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_01.ast
@@ -0,0 +1,126 @@
+DataverseUse test
+TypeDecl TwitterUserType [
+  closed 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,
+    send-time : datetime,
+    referred-topics : UnorderedList <string>
+,
+    message-text : string,
+    countA : int32,
+    countB : int32
+  }
+]
+DatasetDecl TweetMessages(TweetMessageType) partitioned by [[tweetid]]
+WriteOutputTo nc1:rttest/rtree-index-join_leftouterjoin-probe-pidx-with-join-rtree-sidx_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [tweetid1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=tweetid
+    ]
+  )
+  (
+    LiteralExpr [STRING] [loc1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=sender-location
+    ]
+  )
+  (
+    LiteralExpr [STRING] [nearby-message]
+    :
+    (
+      SELECT ELEMENT [
+      RecordConstructor [
+        (
+          LiteralExpr [STRING] [tweetid2]
+          :
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=tweetid
+          ]
+        )
+        (
+          LiteralExpr [STRING] [loc2]
+          :
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=sender-location
+          ]
+        )
+      ]
+      ]
+      FROM [        FunctionCall Metadata.dataset@1[
+          LiteralExpr [STRING] [TweetMessages]
+        ]
+        AS
+        Variable [ Name=t2 ]
+      ]
+      Where
+        FunctionCall test.spatial-intersect@2[
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=sender-location
+          ]
+          Variable [ Name=n ]
+        ]
+      Orderby
+        FieldAccessor [
+          Variable [ Name=t2 ]
+          Field=tweetid
+        ]
+        ASC
+
+    )
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [TweetMessages]
+  ]
+  AS
+  Variable [ Name=t1 ]
+]
+LetVariable [ Name=n ]
+  :=
+  FunctionCall test.create-circle@2[
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=sender-location
+    ]
+    LiteralExpr [DOUBLE] [0.5]
+  ]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=tweetid
+    ]
+    <
+    FunctionCall test.int64@1[
+      LiteralExpr [STRING] [10]
+    ]
+  ]
+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/open-index-enforced/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_02.ast
new file mode 100644
index 0000000..d37268a
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/leftouterjoin-probe-pidx-with-join-rtree-sidx_02.ast
@@ -0,0 +1,140 @@
+DataverseUse test
+TypeDecl TwitterUserType [
+  closed 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,
+    send-time : datetime,
+    referred-topics : UnorderedList <string>
+,
+    message-text : string,
+    countA : int32,
+    countB : int32
+  }
+]
+DatasetDecl TweetMessages(TweetMessageType) partitioned by [[tweetid]]
+WriteOutputTo nc1:rttest/rtree-index-join_leftouterjoin-probe-pidx-with-join-rtree-sidx_02.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [tweetid1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=tweetid
+    ]
+  )
+  (
+    LiteralExpr [STRING] [loc1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=sender-location
+    ]
+  )
+  (
+    LiteralExpr [STRING] [nearby-message]
+    :
+    (
+      SELECT ELEMENT [
+      RecordConstructor [
+        (
+          LiteralExpr [STRING] [tweetid2]
+          :
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=tweetid
+          ]
+        )
+        (
+          LiteralExpr [STRING] [loc2]
+          :
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=sender-location
+          ]
+        )
+      ]
+      ]
+      FROM [        FunctionCall Metadata.dataset@1[
+          LiteralExpr [STRING] [TweetMessages]
+        ]
+        AS
+        Variable [ Name=t2 ]
+      ]
+      Where
+        OperatorExpr [
+          FunctionCall test.spatial-intersect@2[
+            FieldAccessor [
+              Variable [ Name=t2 ]
+              Field=sender-location
+            ]
+            Variable [ Name=n ]
+          ]
+          and
+          OperatorExpr [
+            FieldAccessor [
+              Variable [ Name=t1 ]
+              Field=tweetid
+            ]
+            !=
+            FieldAccessor [
+              Variable [ Name=t2 ]
+              Field=tweetid
+            ]
+          ]
+        ]
+      Orderby
+        FieldAccessor [
+          Variable [ Name=t2 ]
+          Field=tweetid
+        ]
+        ASC
+
+    )
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [TweetMessages]
+  ]
+  AS
+  Variable [ Name=t1 ]
+]
+LetVariable [ Name=n ]
+  :=
+  FunctionCall test.create-circle@2[
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=sender-location
+    ]
+    LiteralExpr [DOUBLE] [0.5]
+  ]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=tweetid
+    ]
+    <
+    FunctionCall test.int64@1[
+      LiteralExpr [STRING] [10]
+    ]
+  ]
+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/open-index-enforced/rtree-index-join/spatial-intersect-point_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/spatial-intersect-point_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/spatial-intersect-point_01.ast
new file mode 100644
index 0000000..fc94123
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/spatial-intersect-point_01.ast
@@ -0,0 +1,65 @@
+DataverseUse test
+TypeDecl MyRecord [
+  closed RecordType {
+    id : int32,
+    point : point,
+    kwds : string,
+    line1 : line,
+    line2 : line,
+    poly1 : polygon,
+    poly2 : polygon,
+    rec : rectangle
+  }
+]
+TypeDecl MyRecordOpen [
+  open RecordType {
+    id : int32,
+    kwds : string,
+    line1 : line,
+    line2 : line,
+    poly1 : polygon,
+    poly2 : polygon,
+    rec : rectangle
+  }
+]
+DatasetDecl MyData1(MyRecordOpen) partitioned by [[id]]
+DatasetDecl MyData2(MyRecord) partitioned by [[id]]
+WriteOutputTo nc1:rttest/index-join_rtree-spatial-intersect-point.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [a]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [b]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [MyData1]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [MyData2]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  FunctionCall test.spatial-intersect@2[
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=point
+    ]
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=point
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/spatial-intersect-point_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/spatial-intersect-point_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/spatial-intersect-point_02.ast
new file mode 100644
index 0000000..13a1358
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/rtree-index-join/spatial-intersect-point_02.ast
@@ -0,0 +1,65 @@
+DataverseUse test
+TypeDecl MyRecord [
+  closed RecordType {
+    id : int32,
+    point : point,
+    kwds : string,
+    line1 : line,
+    line2 : line,
+    poly1 : polygon,
+    poly2 : polygon,
+    rec : rectangle
+  }
+]
+TypeDecl MyRecordOpen [
+  open RecordType {
+    id : int32,
+    kwds : string,
+    line1 : line,
+    line2 : line,
+    poly1 : polygon,
+    poly2 : polygon,
+    rec : rectangle
+  }
+]
+DatasetDecl MyData1(MyRecord) partitioned by [[id]]
+DatasetDecl MyData2(MyRecordOpen) partitioned by [[id]]
+WriteOutputTo nc1:rttest/rtree-index-join_spatial-intersect-point_02.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [a]
+    :
+    Variable [ Name=a ]
+  )
+  (
+    LiteralExpr [STRING] [b]
+    :
+    Variable [ Name=b ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [MyData1]
+  ]
+  AS
+  Variable [ Name=a ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [MyData2]
+  ]
+  AS
+  Variable [ Name=b ]
+]
+Where
+  FunctionCall test.spatial-intersect@2[
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=point
+    ]
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=point
+    ]
+  ]



Mime
View raw message