asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [22/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:30 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_01.ast
new file mode 100644
index 0000000..be04f55
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_01.ast
@@ -0,0 +1,62 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl Names(Name) partitioned by [[fname], [lname]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-composite-key-prefix-prefix-join_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [emp1]
+    :
+    Variable [ Name=emp1 ]
+  )
+  (
+    LiteralExpr [STRING] [emp2]
+    :
+    Variable [ Name=emp2 ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Names]
+  ]
+  AS
+  Variable [ Name=emp1 ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Names]
+  ]
+  AS
+  Variable [ Name=emp2 ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp1 ]
+        Field=fname
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=emp2 ]
+        Field=fname
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp1 ]
+        Field=lname
+      ]
+      >
+      FieldAccessor [
+        Variable [ Name=emp2 ]
+        Field=lname
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_02.ast
new file mode 100644
index 0000000..b648a3d
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_02.ast
@@ -0,0 +1,62 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl Names(Name) partitioned by [[fname], [lname]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-composite-key-prefix-prefix-join_02.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [emp1]
+    :
+    Variable [ Name=emp1 ]
+  )
+  (
+    LiteralExpr [STRING] [emp2]
+    :
+    Variable [ Name=emp2 ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Names]
+  ]
+  AS
+  Variable [ Name=emp1 ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Names]
+  ]
+  AS
+  Variable [ Name=emp2 ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp1 ]
+        Field=fname
+      ]
+      >
+      FieldAccessor [
+        Variable [ Name=emp2 ]
+        Field=fname
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp1 ]
+        Field=lname
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=emp2 ]
+        Field=lname
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_03.ast
new file mode 100644
index 0000000..09c0cf9
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_03.ast
@@ -0,0 +1,62 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl Names(Name) partitioned by [[fname], [lname]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-composite-key-prefix-prefix-join_03.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [emp1]
+    :
+    Variable [ Name=emp1 ]
+  )
+  (
+    LiteralExpr [STRING] [emp2]
+    :
+    Variable [ Name=emp2 ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Names]
+  ]
+  AS
+  Variable [ Name=emp1 ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Names]
+  ]
+  AS
+  Variable [ Name=emp2 ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp1 ]
+        Field=fname
+      ]
+      >
+      FieldAccessor [
+        Variable [ Name=emp2 ]
+        Field=fname
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp1 ]
+        Field=lname
+      ]
+      =
+      FieldAccessor [
+        Variable [ Name=emp2 ]
+        Field=lname
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_04.ast
new file mode 100644
index 0000000..fe0e3ef
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_04.ast
@@ -0,0 +1,62 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl Names(Name) partitioned by [[fname], [lname]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-composite-key-prefix-prefix-join_04.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [emp1]
+    :
+    Variable [ Name=emp1 ]
+  )
+  (
+    LiteralExpr [STRING] [emp2]
+    :
+    Variable [ Name=emp2 ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Names]
+  ]
+  AS
+  Variable [ Name=emp1 ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Names]
+  ]
+  AS
+  Variable [ Name=emp2 ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp1 ]
+        Field=fname
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=emp2 ]
+        Field=fname
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp1 ]
+        Field=lname
+      ]
+      =
+      FieldAccessor [
+        Variable [ Name=emp2 ]
+        Field=lname
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_05.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_05.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_05.ast
new file mode 100644
index 0000000..5b1bc19
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_05.ast
@@ -0,0 +1,62 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl Names(Name) partitioned by [[fname], [lname]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-composite-key-prefix-prefix-join_05.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [emp1]
+    :
+    Variable [ Name=emp1 ]
+  )
+  (
+    LiteralExpr [STRING] [emp2]
+    :
+    Variable [ Name=emp2 ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Names]
+  ]
+  AS
+  Variable [ Name=emp1 ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Names]
+  ]
+  AS
+  Variable [ Name=emp2 ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp1 ]
+        Field=fname
+      ]
+      =
+      FieldAccessor [
+        Variable [ Name=emp2 ]
+        Field=fname
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp1 ]
+        Field=lname
+      ]
+      >
+      FieldAccessor [
+        Variable [ Name=emp2 ]
+        Field=lname
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_06.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_06.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_06.ast
new file mode 100644
index 0000000..55abe5a
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-composite-key-prefix-join_06.ast
@@ -0,0 +1,62 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl Names(Name) partitioned by [[fname], [lname]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-composite-key-prefix-prefix-join_06.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [emp1]
+    :
+    Variable [ Name=emp1 ]
+  )
+  (
+    LiteralExpr [STRING] [emp2]
+    :
+    Variable [ Name=emp2 ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Names]
+  ]
+  AS
+  Variable [ Name=emp1 ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Names]
+  ]
+  AS
+  Variable [ Name=emp2 ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp1 ]
+        Field=fname
+      ]
+      =
+      FieldAccessor [
+        Variable [ Name=emp2 ]
+        Field=fname
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp1 ]
+        Field=lname
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=emp2 ]
+        Field=lname
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join-multipred.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join-multipred.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join-multipred.ast
new file mode 100644
index 0000000..95df3cf
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join-multipred.ast
@@ -0,0 +1,99 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    lastorder :       open RecordType {
+        oid : int32,
+        total : float
+      }
+
+  }
+]
+TypeDecl OrderType [
+  closed RecordType {
+    oid : int32,
+    cid : int32,
+    orderstatus : string,
+    orderpriority : string,
+    clerk : string,
+    total : float
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+DatasetDecl Orders(OrderType) partitioned by [[oid]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-equi-join-multipred.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [customer]
+    :
+    Variable [ Name=c ]
+  )
+  (
+    LiteralExpr [STRING] [order]
+    :
+    Variable [ Name=o ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=c ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Orders]
+  ]
+  AS
+  Variable [ Name=o ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=c ]
+        Field=cid
+      ]
+      =
+      FieldAccessor [
+        Variable [ Name=o ]
+        Field=cid
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=c ]
+        Field=name
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=o ]
+        Field=orderstatus
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=c ]
+        Field=age
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=o ]
+        Field=cid
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join-neg_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join-neg_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join-neg_01.ast
new file mode 100644
index 0000000..3043316
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join-neg_01.ast
@@ -0,0 +1,39 @@
+TypeDecl TestType [
+  open RecordType {
+    key1 : int32,
+    key2 : int32,
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl DsOne(TestType) partitioned by [[key1]]
+DatasetDecl DsTwo(TestType) partitioned by [[key1]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-equi-join-neg_01.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=x ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsOne]
+  ]
+  AS
+  Variable [ Name=x ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsTwo]
+  ]
+  AS
+  Variable [ Name=y ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=x ]
+      Field=key1
+    ]
+    =
+    FieldAccessor [
+      Variable [ Name=y ]
+      Field=key2
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join-neg_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join-neg_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join-neg_02.ast
new file mode 100644
index 0000000..85ef8e3
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join-neg_02.ast
@@ -0,0 +1,39 @@
+TypeDecl TestType [
+  open RecordType {
+    key1 : int32,
+    key2 : int32,
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl DsOne(TestType) partitioned by [[key1]]
+DatasetDecl DsTwo(TestType) partitioned by [[key1]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-equi-join-neg_02.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=x ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsOne]
+  ]
+  AS
+  Variable [ Name=x ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsTwo]
+  ]
+  AS
+  Variable [ Name=y ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=x ]
+      Field=key2
+    ]
+    =
+    FieldAccessor [
+      Variable [ Name=y ]
+      Field=key1
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_01.ast
new file mode 100644
index 0000000..b44716f
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_01.ast
@@ -0,0 +1,39 @@
+TypeDecl TestType [
+  open RecordType {
+    key1 : int32,
+    key2 : int32,
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl DsOne(TestType) partitioned by [[key1]]
+DatasetDecl DsTwo(TestType) partitioned by [[key1]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-equi-join_01.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=x ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsOne]
+  ]
+  AS
+  Variable [ Name=x ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsTwo]
+  ]
+  AS
+  Variable [ Name=y ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=x ]
+      Field=key1
+    ]
+    =
+    FieldAccessor [
+      Variable [ Name=y ]
+      Field=key2
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_02.ast
new file mode 100644
index 0000000..97549ca
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_02.ast
@@ -0,0 +1,39 @@
+TypeDecl TestType [
+  open RecordType {
+    key1 : int32,
+    key2 : int32,
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl DsOne(TestType) partitioned by [[key1]]
+DatasetDecl DsTwo(TestType) partitioned by [[key1]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-equi-join_02.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=x ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsOne]
+  ]
+  AS
+  Variable [ Name=x ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsTwo]
+  ]
+  AS
+  Variable [ Name=y ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=x ]
+      Field=key2
+    ]
+    =
+    FieldAccessor [
+      Variable [ Name=y ]
+      Field=key1
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_03.ast
new file mode 100644
index 0000000..b82bf03
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_03.ast
@@ -0,0 +1,73 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    lastorder :       open RecordType {
+        oid : int32,
+        total : float
+      }
+
+  }
+]
+TypeDecl OrderType [
+  closed RecordType {
+    oid : int32,
+    cid : int32,
+    orderstatus : string,
+    orderpriority : string,
+    clerk : string,
+    total : float
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+DatasetDecl Orders(OrderType) partitioned by [[oid]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-equi-join_04.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [customer]
+    :
+    Variable [ Name=c ]
+  )
+  (
+    LiteralExpr [STRING] [order]
+    :
+    Variable [ Name=o ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=c ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Orders]
+  ]
+  AS
+  Variable [ Name=o ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=c ]
+      Field=cid
+    ]
+    =
+    FieldAccessor [
+      Variable [ Name=o ]
+      Field=cid
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_04.ast
new file mode 100644
index 0000000..99e226d
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_04.ast
@@ -0,0 +1,73 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    lastorder :       open RecordType {
+        oid : int32,
+        total : float
+      }
+
+  }
+]
+TypeDecl OrderType [
+  closed RecordType {
+    oid : int32,
+    cid : int32,
+    orderstatus : string,
+    orderpriority : string,
+    clerk : string,
+    total : float
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+DatasetDecl Orders(OrderType) partitioned by [[oid]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-equi-join_05.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [customer]
+    :
+    Variable [ Name=c ]
+  )
+  (
+    LiteralExpr [STRING] [order]
+    :
+    Variable [ Name=o ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Orders]
+  ]
+  AS
+  Variable [ Name=o ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=c ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=o ]
+      Field=cid
+    ]
+    =
+    FieldAccessor [
+      Variable [ Name=c ]
+      Field=cid
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_05.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_05.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_05.ast
new file mode 100644
index 0000000..92e52c2
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-equi-join_05.ast
@@ -0,0 +1,62 @@
+DataverseUse test
+TypeDecl AddressType [
+  closed RecordType {
+    number : int32,
+    street : string,
+    city : string
+  }
+]
+TypeDecl CustomerType [
+  closed RecordType {
+    cid : int32,
+    name : string,
+    age : int32?,
+    address : AddressType?,
+    lastorder :       open RecordType {
+        oid : int32,
+        total : float
+      }
+
+  }
+]
+DatasetDecl Customers(CustomerType) partitioned by [[cid]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-equi-join_06.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [customer1]
+    :
+    Variable [ Name=c1 ]
+  )
+  (
+    LiteralExpr [STRING] [customer2]
+    :
+    Variable [ Name=c2 ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=c1 ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [Customers]
+  ]
+  AS
+  Variable [ Name=c2 ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=c1 ]
+      Field=cid
+    ]
+    =
+    FieldAccessor [
+      Variable [ Name=c2 ]
+      Field=cid
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-ge-join_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-ge-join_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-ge-join_01.ast
new file mode 100644
index 0000000..a266c98
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-ge-join_01.ast
@@ -0,0 +1,39 @@
+TypeDecl TestType [
+  open RecordType {
+    key1 : int32,
+    key2 : int32,
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl DsOne(TestType) partitioned by [[key1]]
+DatasetDecl DsTwo(TestType) partitioned by [[key1]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-ge-join_01.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=x ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsOne]
+  ]
+  AS
+  Variable [ Name=x ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsTwo]
+  ]
+  AS
+  Variable [ Name=y ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=x ]
+      Field=key1
+    ]
+    >=
+    FieldAccessor [
+      Variable [ Name=y ]
+      Field=key2
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-ge-join_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-ge-join_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-ge-join_02.ast
new file mode 100644
index 0000000..a09412a
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-ge-join_02.ast
@@ -0,0 +1,39 @@
+TypeDecl TestType [
+  open RecordType {
+    key1 : int32,
+    key2 : int32,
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl DsOne(TestType) partitioned by [[key1]]
+DatasetDecl DsTwo(TestType) partitioned by [[key1]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-ge-join_02.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=x ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsOne]
+  ]
+  AS
+  Variable [ Name=x ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsTwo]
+  ]
+  AS
+  Variable [ Name=y ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=x ]
+      Field=key2
+    ]
+    <=
+    FieldAccessor [
+      Variable [ Name=y ]
+      Field=key1
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-gt-join_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-gt-join_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-gt-join_01.ast
new file mode 100644
index 0000000..e9e3044
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-gt-join_01.ast
@@ -0,0 +1,39 @@
+TypeDecl TestType [
+  open RecordType {
+    key1 : int32,
+    key2 : int32,
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl DsOne(TestType) partitioned by [[key1]]
+DatasetDecl DsTwo(TestType) partitioned by [[key1]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-gt-join_01.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=x ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsOne]
+  ]
+  AS
+  Variable [ Name=x ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsTwo]
+  ]
+  AS
+  Variable [ Name=y ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=x ]
+      Field=key1
+    ]
+    >
+    FieldAccessor [
+      Variable [ Name=y ]
+      Field=key2
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-gt-join_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-gt-join_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-gt-join_02.ast
new file mode 100644
index 0000000..ab0f98d
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-gt-join_02.ast
@@ -0,0 +1,39 @@
+TypeDecl TestType [
+  open RecordType {
+    key1 : int32,
+    key2 : int32,
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl DsOne(TestType) partitioned by [[key1]]
+DatasetDecl DsTwo(TestType) partitioned by [[key1]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-gt-join_02.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=x ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsOne]
+  ]
+  AS
+  Variable [ Name=x ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsTwo]
+  ]
+  AS
+  Variable [ Name=y ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=x ]
+      Field=key2
+    ]
+    <
+    FieldAccessor [
+      Variable [ Name=y ]
+      Field=key1
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-le-join_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-le-join_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-le-join_01.ast
new file mode 100644
index 0000000..1db7da8
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-le-join_01.ast
@@ -0,0 +1,39 @@
+TypeDecl TestType [
+  open RecordType {
+    key1 : int32,
+    key2 : int32,
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl DsOne(TestType) partitioned by [[key1]]
+DatasetDecl DsTwo(TestType) partitioned by [[key1]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-le-join_01.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=x ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsOne]
+  ]
+  AS
+  Variable [ Name=x ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsTwo]
+  ]
+  AS
+  Variable [ Name=y ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=x ]
+      Field=key1
+    ]
+    <=
+    FieldAccessor [
+      Variable [ Name=y ]
+      Field=key2
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-le-join_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-le-join_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-le-join_02.ast
new file mode 100644
index 0000000..a185ca0
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-le-join_02.ast
@@ -0,0 +1,39 @@
+TypeDecl TestType [
+  open RecordType {
+    key1 : int32,
+    key2 : int32,
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl DsOne(TestType) partitioned by [[key1]]
+DatasetDecl DsTwo(TestType) partitioned by [[key1]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-le-join_02.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=x ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsOne]
+  ]
+  AS
+  Variable [ Name=x ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsTwo]
+  ]
+  AS
+  Variable [ Name=y ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=x ]
+      Field=key2
+    ]
+    >=
+    FieldAccessor [
+      Variable [ Name=y ]
+      Field=key1
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-lt-join_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-lt-join_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-lt-join_01.ast
new file mode 100644
index 0000000..4b6d4e1
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-lt-join_01.ast
@@ -0,0 +1,39 @@
+TypeDecl TestType [
+  open RecordType {
+    key1 : int32,
+    key2 : int32,
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl DsOne(TestType) partitioned by [[key1]]
+DatasetDecl DsTwo(TestType) partitioned by [[key1]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-lt-join_01.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=x ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsOne]
+  ]
+  AS
+  Variable [ Name=x ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsTwo]
+  ]
+  AS
+  Variable [ Name=y ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=x ]
+      Field=key1
+    ]
+    <
+    FieldAccessor [
+      Variable [ Name=y ]
+      Field=key2
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-lt-join_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-lt-join_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-lt-join_02.ast
new file mode 100644
index 0000000..58c261f
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/primary-lt-join_02.ast
@@ -0,0 +1,39 @@
+TypeDecl TestType [
+  open RecordType {
+    key1 : int32,
+    key2 : int32,
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl DsOne(TestType) partitioned by [[key1]]
+DatasetDecl DsTwo(TestType) partitioned by [[key1]]
+WriteOutputTo nc1:rttest/btree-index-join_primary-lt-join_02.adm
+Query:
+SELECT ELEMENT [
+Variable [ Name=x ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsOne]
+  ]
+  AS
+  Variable [ Name=x ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [test1.DsTwo]
+  ]
+  AS
+  Variable [ Name=y ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=x ]
+      Field=key2
+    ]
+    >
+    FieldAccessor [
+      Variable [ Name=y ]
+      Field=key1
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join-multiindex.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join-multiindex.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join-multiindex.ast
new file mode 100644
index 0000000..0b8f887
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join-multiindex.ast
@@ -0,0 +1,117 @@
+DataverseUse test
+TypeDecl EmploymentType [
+  closed RecordType {
+    organization-name : string,
+    start-date : date,
+    end-date : date?
+  }
+]
+TypeDecl FacebookUserType [
+  closed RecordType {
+    id : int32,
+    id-copy : int32,
+    alias : string,
+    name : string,
+    user-since : datetime,
+    user-since-copy : datetime,
+    friend-ids : UnorderedList <int32>
+,
+    employment : OrderedList [EmploymentType]
+
+  }
+]
+TypeDecl FacebookMessageType [
+  closed RecordType {
+    message-id : int32,
+    message-id-copy : int32,
+    author-id : int32,
+    author-id-copy : int32,
+    in-response-to : int32?,
+    sender-location : point?,
+    message : string
+  }
+]
+DatasetDecl FacebookUsers(FacebookUserType) partitioned by [[id]]
+DatasetDecl FacebookMessages(FacebookMessageType) partitioned by [[message-id]]
+WriteOutputTo nc1:rttest/btree-index-join_title-secondary-equi-join-multiindex.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [fbu-ID]
+    :
+    FieldAccessor [
+      Variable [ Name=user ]
+      Field=id
+    ]
+  )
+  (
+    LiteralExpr [STRING] [fbm-auth-ID]
+    :
+    FieldAccessor [
+      Variable [ Name=message ]
+      Field=author-id
+    ]
+  )
+  (
+    LiteralExpr [STRING] [uname]
+    :
+    FieldAccessor [
+      Variable [ Name=user ]
+      Field=name
+    ]
+  )
+  (
+    LiteralExpr [STRING] [message]
+    :
+    FieldAccessor [
+      Variable [ Name=message ]
+      Field=message
+    ]
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [FacebookUsers]
+  ]
+  AS
+  Variable [ Name=user ]
+,
+  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [FacebookMessages]
+  ]
+  AS
+  Variable [ Name=message ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=user ]
+        Field=id
+      ]
+      =
+      FieldAccessor [
+        Variable [ Name=message ]
+        Field=author-id-copy
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=user ]
+        Field=id
+      ]
+      >=
+      LiteralExpr [LONG] [11000]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=user ]
+        Field=id
+      ]
+      <=
+      LiteralExpr [LONG] [12000]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join-multipred.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join-multipred.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join-multipred.ast
new file mode 100644
index 0000000..76e06aa
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join-multipred.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/btree-index-join_title-secondary-equi-join-multipred.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 [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=title
+      ]
+      =
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=title
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=authors
+      ]
+      <
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=authors
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=a ]
+        Field=misc
+      ]
+      >
+      FieldAccessor [
+        Variable [ Name=b ]
+        Field=misc
+      ]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join_01.ast
new file mode 100644
index 0000000..61b4973
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join_01.ast
@@ -0,0 +1,61 @@
+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/btree-index-join_title-secondary-equi-join_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 [
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=title
+    ]
+    =
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=title
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join_02.ast
new file mode 100644
index 0000000..6193ed6
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join_02.ast
@@ -0,0 +1,61 @@
+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/btree-index-join_title-secondary-equi-join_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 [
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=title
+    ]
+    =
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=title
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join_03.ast
new file mode 100644
index 0000000..060dec8
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index-join/secondary-equi-join_03.ast
@@ -0,0 +1,51 @@
+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/btree-index-join_title-secondary-equi-join_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 [
+    FieldAccessor [
+      Variable [ Name=a ]
+      Field=title
+    ]
+    =
+    FieldAccessor [
+      Variable [ Name=b ]
+      Field=title
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-01.ast
new file mode 100644
index 0000000..129cf33
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-01.ast
@@ -0,0 +1,50 @@
+DataverseUse emergencyTest
+TypeDecl CHPReport [
+  open RecordType {
+    id : int64,
+    timestamp : datetime,
+    title : string,
+    message : string
+  }
+]
+DatasetDecl CHPReports(CHPReport) partitioned by [[timestamp]]
+Query:
+SELECT ELEMENT [
+FieldAccessor [
+  Variable [ Name=emergency ]
+  Field=message
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CHPReports]
+  ]
+  AS
+  Variable [ Name=emergency ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emergency ]
+        Field=timestamp
+      ]
+      >=
+      OperatorExpr [
+        FunctionCall emergencyTest.current-datetime@0[
+        ]
+        -
+        FunctionCall emergencyTest.day-time-duration@1[
+          LiteralExpr [STRING] [PT10H]
+        ]
+      ]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emergency ]
+        Field=title
+      ]
+      =
+      LiteralExpr [STRING] [ghost]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-02.ast
new file mode 100644
index 0000000..3197add
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-02.ast
@@ -0,0 +1,39 @@
+DataverseUse emergencyTest
+TypeDecl CHPReport [
+  open RecordType {
+    id : int64,
+    timestamp : datetime,
+    title : string,
+    message : string
+  }
+]
+DatasetDecl CHPReports(CHPReport) partitioned by [[timestamp]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emergency ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CHPReports]
+  ]
+  AS
+  Variable [ Name=emergency ]
+]
+LetVariable [ Name=time ]
+  :=
+  OperatorExpr [
+    FunctionCall emergencyTest.current-datetime@0[
+    ]
+    -
+    FunctionCall emergencyTest.day-time-duration@1[
+      LiteralExpr [STRING] [PT10H]
+    ]
+  ]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emergency ]
+      Field=timestamp
+    ]
+    >=
+    Variable [ Name=time ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-03.ast
new file mode 100644
index 0000000..7b7241a
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-03.ast
@@ -0,0 +1,30 @@
+DataverseUse emergencyTest
+TypeDecl CHPReport [
+  open RecordType {
+    id : int64,
+    timestamp : datetime,
+    title : string,
+    message : string
+  }
+]
+DatasetDecl CHPReports(CHPReport) partitioned by [[timestamp]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emergency ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CHPReports]
+  ]
+  AS
+  Variable [ Name=emergency ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emergency ]
+      Field=timestamp
+    ]
+    >=
+    FunctionCall emergencyTest.current-datetime@0[
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-04.ast
new file mode 100644
index 0000000..4abc056
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-datetime-04.ast
@@ -0,0 +1,30 @@
+DataverseUse emergencyTest
+TypeDecl CHPReport [
+  open RecordType {
+    id : int64,
+    timestamp : datetime,
+    title : string,
+    message : string
+  }
+]
+DatasetDecl CHPReports(CHPReport) partitioned by [[id]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emergency ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [CHPReports]
+  ]
+  AS
+  Variable [ Name=emergency ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emergency ]
+      Field=timestamp
+    ]
+    >=
+    FunctionCall emergencyTest.current-datetime@0[
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-01.ast
new file mode 100644
index 0000000..21fa932
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-01.ast
@@ -0,0 +1,28 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-01.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emp ]
+      Field=fname
+    ]
+    >
+    LiteralExpr [STRING] [Roger]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-02.ast
new file mode 100644
index 0000000..ca7d005
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-02.ast
@@ -0,0 +1,28 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-02.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emp ]
+      Field=fname
+    ]
+    >=
+    LiteralExpr [STRING] [Susan]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-03.ast
new file mode 100644
index 0000000..64b2ed0
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-03.ast
@@ -0,0 +1,28 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-03.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emp ]
+      Field=fname
+    ]
+    <
+    LiteralExpr [STRING] [Isa]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-04.ast
new file mode 100644
index 0000000..8994a2b
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-04.ast
@@ -0,0 +1,28 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-04.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emp ]
+      Field=fname
+    ]
+    <=
+    LiteralExpr [STRING] [Vanpatten]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-05.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-05.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-05.ast
new file mode 100644
index 0000000..47d7a34
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-05.ast
@@ -0,0 +1,28 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-05.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emp ]
+      Field=fname
+    ]
+    !=
+    LiteralExpr [STRING] [Max]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-06.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-06.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-06.ast
new file mode 100644
index 0000000..81b7977
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-06.ast
@@ -0,0 +1,28 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-06.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emp ]
+      Field=fname
+    ]
+    =
+    LiteralExpr [STRING] [Julio]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-07.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-07.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-07.ast
new file mode 100644
index 0000000..3b77aec
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-07.ast
@@ -0,0 +1,28 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-07.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emp ]
+      Field=lname
+    ]
+    =
+    LiteralExpr [STRING] [Kim]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-08.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-08.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-08.ast
new file mode 100644
index 0000000..4422ab2
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-08.ast
@@ -0,0 +1,39 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-08.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      =
+      LiteralExpr [STRING] [Young Seok]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      =
+      LiteralExpr [STRING] [Kim]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-09.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-09.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-09.ast
new file mode 100644
index 0000000..42348bf
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-09.ast
@@ -0,0 +1,39 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-09.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      =
+      LiteralExpr [STRING] [Julio]
+    ]
+    or
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      =
+      LiteralExpr [STRING] [Malaika]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-10.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-10.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-10.ast
new file mode 100644
index 0000000..6633379
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-10.ast
@@ -0,0 +1,39 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-10.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      >
+      LiteralExpr [STRING] [Alex]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      <
+      LiteralExpr [STRING] [Zach]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-11.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-11.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-11.ast
new file mode 100644
index 0000000..e1eee3f
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-11.ast
@@ -0,0 +1,39 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-11.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      >
+      LiteralExpr [STRING] [Allan]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      <
+      LiteralExpr [STRING] [Zubi]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-12.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-12.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-12.ast
new file mode 100644
index 0000000..dc69e6a
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-12.ast
@@ -0,0 +1,39 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-12.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      >
+      LiteralExpr [STRING] [Allan]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      =
+      LiteralExpr [STRING] [Xu]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-13.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-13.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-13.ast
new file mode 100644
index 0000000..4be9a71
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-13.ast
@@ -0,0 +1,39 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-13.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      =
+      LiteralExpr [STRING] [Julio]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      <
+      LiteralExpr [STRING] [Xu]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-14.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-14.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-14.ast
new file mode 100644
index 0000000..5db0d34
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-14.ast
@@ -0,0 +1,39 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-14.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      >=
+      LiteralExpr [STRING] [Michael]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      <=
+      LiteralExpr [STRING] [Xu]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-15.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-15.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-15.ast
new file mode 100644
index 0000000..ff4ac5a
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-15.ast
@@ -0,0 +1,57 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-15.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      >
+      LiteralExpr [STRING] [Craig]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      >
+      LiteralExpr [STRING] [Kevin]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      <
+      LiteralExpr [STRING] [Mary]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      <
+      LiteralExpr [STRING] [Tomes]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-16.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-16.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-16.ast
new file mode 100644
index 0000000..256f105
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-16.ast
@@ -0,0 +1,57 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-16.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      >=
+      LiteralExpr [STRING] [Craig]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      >=
+      LiteralExpr [STRING] [Kevin]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      <=
+      LiteralExpr [STRING] [Mary]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      <=
+      LiteralExpr [STRING] [Tomes]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-17.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-17.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-17.ast
new file mode 100644
index 0000000..f91833e
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-17.ast
@@ -0,0 +1,39 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-17.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      <=
+      LiteralExpr [STRING] [Craig]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      >
+      LiteralExpr [STRING] [Kevin]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-18.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-18.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-18.ast
new file mode 100644
index 0000000..5bf9d6c
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-18.ast
@@ -0,0 +1,39 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-18.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      !=
+      LiteralExpr [STRING] [Michael]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      !=
+      LiteralExpr [STRING] [Carey]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-19.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-19.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-19.ast
new file mode 100644
index 0000000..811a232
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-19.ast
@@ -0,0 +1,57 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-19.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      >
+      LiteralExpr [STRING] [Craig]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      >
+      LiteralExpr [STRING] [Kevin]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      <=
+      LiteralExpr [STRING] [Mary]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      <=
+      LiteralExpr [STRING] [Tomes]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-20.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-20.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-20.ast
new file mode 100644
index 0000000..90be7db
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-20.ast
@@ -0,0 +1,57 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-20.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      >=
+      LiteralExpr [STRING] [Craig]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      >=
+      LiteralExpr [STRING] [Kevin]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      <
+      LiteralExpr [STRING] [Mary]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      <
+      LiteralExpr [STRING] [Tomes]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-21.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-21.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-21.ast
new file mode 100644
index 0000000..abe26d6
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-21.ast
@@ -0,0 +1,28 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-21.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emp ]
+      Field=fname
+    ]
+    >
+    LiteralExpr [STRING] [Max]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-22.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-22.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-22.ast
new file mode 100644
index 0000000..97b8952
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-22.ast
@@ -0,0 +1,28 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-22.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emp ]
+      Field=fname
+    ]
+    >=
+    LiteralExpr [STRING] [Sofia]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-23.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-23.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-23.ast
new file mode 100644
index 0000000..7b62e30
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-23.ast
@@ -0,0 +1,28 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-23.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emp ]
+      Field=fname
+    ]
+    <
+    LiteralExpr [STRING] [Chen]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-24.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-24.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-24.ast
new file mode 100644
index 0000000..51ec059
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-24.ast
@@ -0,0 +1,28 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-24.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=emp ]
+      Field=fname
+    ]
+    <=
+    LiteralExpr [STRING] [Julio]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-25.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-25.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-25.ast
new file mode 100644
index 0000000..46f4398
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-25.ast
@@ -0,0 +1,39 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-25.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      >
+      LiteralExpr [STRING] [Neil]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      <
+      LiteralExpr [STRING] [Roger]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-26.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-26.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-26.ast
new file mode 100644
index 0000000..05d74fa
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-26.ast
@@ -0,0 +1,39 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-26.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      >=
+      LiteralExpr [STRING] [Max]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      <=
+      LiteralExpr [STRING] [Roger]
+    ]
+  ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/391f09e5/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-27.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-27.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-27.ast
new file mode 100644
index 0000000..b175895
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/btree-index/btree-primary-27.ast
@@ -0,0 +1,57 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-27.adm
+TypeDecl TestType [
+  open RecordType {
+    fname : string,
+    lname : string
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[fname], [lname]]
+Query:
+SELECT ELEMENT [
+Variable [ Name=emp ]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [testdst]
+  ]
+  AS
+  Variable [ Name=emp ]
+]
+Where
+  OperatorExpr [
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      >
+      LiteralExpr [STRING] [Craig]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      >
+      LiteralExpr [STRING] [Kevin]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=fname
+      ]
+      <=
+      LiteralExpr [STRING] [Mary]
+    ]
+    and
+    OperatorExpr [
+      FieldAccessor [
+        Variable [ Name=emp ]
+        Field=lname
+      ]
+      <
+      LiteralExpr [STRING] [Tomes]
+    ]
+  ]



Mime
View raw message