asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [09/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:17 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/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_01_1.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_01_1.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_01_1.ast
new file mode 100644
index 0000000..9533c68
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_01_1.ast
@@ -0,0 +1,121 @@
+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>
+,
+    message-text : string,
+    countA : int32
+  }
+]
+DatasetDecl TweetMessages(TweetMessageType) partitioned by [[tweetid]]
+WriteOutputTo nc1:rttest/btree-index-join_leftouterjoin-probe-pidx-with-join-btree-sidx_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [tweetid1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=tweetid
+    ]
+  )
+  (
+    LiteralExpr [STRING] [count1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=countA
+    ]
+  )
+  (
+    LiteralExpr [STRING] [t2info]
+    :
+    (
+      SELECT ELEMENT [
+      RecordConstructor [
+        (
+          LiteralExpr [STRING] [tweetid2]
+          :
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=tweetid
+          ]
+        )
+        (
+          LiteralExpr [STRING] [count2]
+          :
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=countB
+          ]
+        )
+      ]
+      ]
+      FROM [        FunctionCall Metadata.dataset@1[
+          LiteralExpr [STRING] [TweetMessages]
+        ]
+        AS
+        Variable [ Name=t2 ]
+      ]
+      Where
+        OperatorExpr [
+          FieldAccessor [
+            Variable [ Name=t1 ]
+            Field=countA
+          ]
+          =
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=countB
+          ]
+        ]
+      Orderby
+        FieldAccessor [
+          Variable [ Name=t2 ]
+          Field=tweetid
+        ]
+        ASC
+
+    )
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [TweetMessages]
+  ]
+  AS
+  Variable [ Name=t1 ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=tweetid
+    ]
+    <
+    FunctionCall test.int64@1[
+      LiteralExpr [STRING] [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/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_01_2.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_01_2.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_01_2.ast
new file mode 100644
index 0000000..2beceaa
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_01_2.ast
@@ -0,0 +1,120 @@
+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>
+,
+    message-text : string
+  }
+]
+DatasetDecl TweetMessages(TweetMessageType) partitioned by [[tweetid]]
+WriteOutputTo nc1:rttest/btree-index-join_leftouterjoin-probe-pidx-with-join-btree-sidx_01.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [tweetid1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=tweetid
+    ]
+  )
+  (
+    LiteralExpr [STRING] [count1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=countA
+    ]
+  )
+  (
+    LiteralExpr [STRING] [t2info]
+    :
+    (
+      SELECT ELEMENT [
+      RecordConstructor [
+        (
+          LiteralExpr [STRING] [tweetid2]
+          :
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=tweetid
+          ]
+        )
+        (
+          LiteralExpr [STRING] [count2]
+          :
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=countB
+          ]
+        )
+      ]
+      ]
+      FROM [        FunctionCall Metadata.dataset@1[
+          LiteralExpr [STRING] [TweetMessages]
+        ]
+        AS
+        Variable [ Name=t2 ]
+      ]
+      Where
+        OperatorExpr [
+          FieldAccessor [
+            Variable [ Name=t1 ]
+            Field=countA
+          ]
+          =
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=countB
+          ]
+        ]
+      Orderby
+        FieldAccessor [
+          Variable [ Name=t2 ]
+          Field=tweetid
+        ]
+        ASC
+
+    )
+  )
+]
+]
+FROM [  FunctionCall Metadata.dataset@1[
+    LiteralExpr [STRING] [TweetMessages]
+  ]
+  AS
+  Variable [ Name=t1 ]
+]
+Where
+  OperatorExpr [
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=tweetid
+    ]
+    <
+    FunctionCall test.int64@1[
+      LiteralExpr [STRING] [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/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02_1.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02_1.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02_1.ast
new file mode 100644
index 0000000..7318652
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02_1.ast
@@ -0,0 +1,135 @@
+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>
+,
+    message-text : string,
+    countA : int32
+  }
+]
+DatasetDecl TweetMessages(TweetMessageType) partitioned by [[tweetid]]
+WriteOutputTo nc1:rttest/btree-index-join_leftouterjoin-probe-pidx-with-join-btree-sidx_02.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [tweetid1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=tweetid
+    ]
+  )
+  (
+    LiteralExpr [STRING] [count1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=countA
+    ]
+  )
+  (
+    LiteralExpr [STRING] [t2info]
+    :
+    (
+      SELECT ELEMENT [
+      RecordConstructor [
+        (
+          LiteralExpr [STRING] [tweetid2]
+          :
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=tweetid
+          ]
+        )
+        (
+          LiteralExpr [STRING] [count2]
+          :
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=countB
+          ]
+        )
+      ]
+      ]
+      FROM [        FunctionCall Metadata.dataset@1[
+          LiteralExpr [STRING] [TweetMessages]
+        ]
+        AS
+        Variable [ Name=t2 ]
+      ]
+      Where
+        OperatorExpr [
+          OperatorExpr [
+            FieldAccessor [
+              Variable [ Name=t1 ]
+              Field=countA
+            ]
+            =
+            FieldAccessor [
+              Variable [ Name=t2 ]
+              Field=countB
+            ]
+          ]
+          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 ]
+]
+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/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02_2.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02_2.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02_2.ast
new file mode 100644
index 0000000..616417b
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/leftouterjoin-probe-pidx-with-join-btree-sidx_02_2.ast
@@ -0,0 +1,134 @@
+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>
+,
+    message-text : string
+  }
+]
+DatasetDecl TweetMessages(TweetMessageType) partitioned by [[tweetid]]
+WriteOutputTo nc1:rttest/btree-index-join_leftouterjoin-probe-pidx-with-join-btree-sidx_02.adm
+Query:
+SELECT ELEMENT [
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [tweetid1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=tweetid
+    ]
+  )
+  (
+    LiteralExpr [STRING] [count1]
+    :
+    FieldAccessor [
+      Variable [ Name=t1 ]
+      Field=countA
+    ]
+  )
+  (
+    LiteralExpr [STRING] [t2info]
+    :
+    (
+      SELECT ELEMENT [
+      RecordConstructor [
+        (
+          LiteralExpr [STRING] [tweetid2]
+          :
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=tweetid
+          ]
+        )
+        (
+          LiteralExpr [STRING] [count2]
+          :
+          FieldAccessor [
+            Variable [ Name=t2 ]
+            Field=countB
+          ]
+        )
+      ]
+      ]
+      FROM [        FunctionCall Metadata.dataset@1[
+          LiteralExpr [STRING] [TweetMessages]
+        ]
+        AS
+        Variable [ Name=t2 ]
+      ]
+      Where
+        OperatorExpr [
+          OperatorExpr [
+            FieldAccessor [
+              Variable [ Name=t1 ]
+              Field=countA
+            ]
+            =
+            FieldAccessor [
+              Variable [ Name=t2 ]
+              Field=countB
+            ]
+          ]
+          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 ]
+]
+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/btree-index-join/secondary-composite-key-join_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-join_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-join_01.ast
new file mode 100644
index 0000000..53c81c4
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-join_01.ast
@@ -0,0 +1,61 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl Names(Name) partitioned by [[id]]
+WriteOutputTo nc1:rttest/btree-index-join_secondary-composite-key-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/open-index-enforced/btree-index-join/secondary-composite-key-join_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-join_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-join_02.ast
new file mode 100644
index 0000000..fe9fdcc
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-join_02.ast
@@ -0,0 +1,61 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl Names(Name) partitioned by [[id]]
+WriteOutputTo nc1:rttest/btree-index-join_secondary-composite-key-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/open-index-enforced/btree-index-join/secondary-composite-key-join_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-join_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-join_03.ast
new file mode 100644
index 0000000..28f154b
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-join_03.ast
@@ -0,0 +1,61 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl Names(Name) partitioned by [[id]]
+WriteOutputTo nc1:rttest/btree-index-join_secondary-composite-key-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/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_01.ast
new file mode 100644
index 0000000..c10a1ab
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_01.ast
@@ -0,0 +1,61 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl Names(Name) partitioned by [[id]]
+WriteOutputTo nc1:rttest/btree-index-join_secondary-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/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_02.ast
new file mode 100644
index 0000000..f5a0c73
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_02.ast
@@ -0,0 +1,61 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl Names(Name) partitioned by [[id]]
+WriteOutputTo nc1:rttest/btree-index-join_secondary-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/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_03.ast
new file mode 100644
index 0000000..36f07af
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_03.ast
@@ -0,0 +1,61 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl Names(Name) partitioned by [[id]]
+WriteOutputTo nc1:rttest/btree-index-join_secondary-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/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_04.ast
new file mode 100644
index 0000000..6125bf0
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_04.ast
@@ -0,0 +1,61 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl Names(Name) partitioned by [[id]]
+WriteOutputTo nc1:rttest/btree-index-join_secondary-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/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_05.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_05.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_05.ast
new file mode 100644
index 0000000..dfee5dd
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_05.ast
@@ -0,0 +1,61 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl Names(Name) partitioned by [[id]]
+WriteOutputTo nc1:rttest/btree-index-join_secondary-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/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_06.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_06.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_06.ast
new file mode 100644
index 0000000..15b8be3
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-composite-key-prefix-join_06.ast
@@ -0,0 +1,61 @@
+DataverseUse test
+TypeDecl Name [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl Names(Name) partitioned by [[id]]
+WriteOutputTo nc1:rttest/btree-index-join_secondary-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/open-index-enforced/btree-index-join/secondary-equi-join-multiindex.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join-multiindex.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join-multiindex.ast
new file mode 100644
index 0000000..3e51567
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join-multiindex.ast
@@ -0,0 +1,116 @@
+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 [
+  open RecordType {
+    message-id : int32,
+    message-id-copy : int32,
+    author-id : 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/open-index-enforced/btree-index-join/secondary-equi-join-multipred.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join-multipred.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join-multipred.ast
new file mode 100644
index 0000000..6752e08
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join-multipred.ast
@@ -0,0 +1,86 @@
+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/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/open-index-enforced/btree-index-join/secondary-equi-join_01.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_01.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_01.ast
new file mode 100644
index 0000000..3362470
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_01.ast
@@ -0,0 +1,60 @@
+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/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/open-index-enforced/btree-index-join/secondary-equi-join_02.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_02.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_02.ast
new file mode 100644
index 0000000..e27d9e1
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_02.ast
@@ -0,0 +1,60 @@
+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/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/open-index-enforced/btree-index-join/secondary-equi-join_03.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_03.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_03.ast
new file mode 100644
index 0000000..4d02d7a
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_03.ast
@@ -0,0 +1,50 @@
+DataverseUse test
+TypeDecl DBLPType [
+  open RecordType {
+    id : int32,
+    dblpid : 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/open-index-enforced/btree-index-join/secondary-equi-join_04.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_04.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_04.ast
new file mode 100644
index 0000000..6b634ef
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_04.ast
@@ -0,0 +1,59 @@
+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/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/open-index-enforced/btree-index-join/secondary-equi-join_05.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_05.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_05.ast
new file mode 100644
index 0000000..6b634ef
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index-join/secondary-equi-join_05.ast
@@ -0,0 +1,59 @@
+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/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/open-index-enforced/btree-index/btree-secondary-33.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-33.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-33.ast
new file mode 100644
index 0000000..7dcd4ad
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-33.ast
@@ -0,0 +1,27 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-31.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-34.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-34.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-34.ast
new file mode 100644
index 0000000..b225f70
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-34.ast
@@ -0,0 +1,27 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-32.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-35.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-35.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-35.ast
new file mode 100644
index 0000000..6a965d0
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-35.ast
@@ -0,0 +1,27 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-33.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-36.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-36.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-36.ast
new file mode 100644
index 0000000..4c1d734
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-36.ast
@@ -0,0 +1,27 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-34.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-37.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-37.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-37.ast
new file mode 100644
index 0000000..63d6979
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-37.ast
@@ -0,0 +1,27 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-35.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-38.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-38.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-38.ast
new file mode 100644
index 0000000..63ef2cc
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-38.ast
@@ -0,0 +1,27 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-36.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-39.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-39.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-39.ast
new file mode 100644
index 0000000..95e84b5
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-39.ast
@@ -0,0 +1,27 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-37.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-40.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-40.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-40.ast
new file mode 100644
index 0000000..4a6fa80
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-40.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-38.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-41.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-41.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-41.ast
new file mode 100644
index 0000000..3cf7f65
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-41.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-39.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-42.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-42.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-42.ast
new file mode 100644
index 0000000..1ca10d7
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-42.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-40.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-43.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-43.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-43.ast
new file mode 100644
index 0000000..b6490b1
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-43.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-41.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-44.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-44.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-44.ast
new file mode 100644
index 0000000..e3c929e
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-44.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-42.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-45.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-45.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-45.ast
new file mode 100644
index 0000000..5d1f248
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-45.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-43.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-46.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-46.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-46.ast
new file mode 100644
index 0000000..7d5f869
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-46.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-44.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-47.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-47.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-47.ast
new file mode 100644
index 0000000..0005394
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-47.ast
@@ -0,0 +1,56 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-45.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-48.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-48.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-48.ast
new file mode 100644
index 0000000..55d0226
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-48.ast
@@ -0,0 +1,56 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-46.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-49.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-49.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-49.ast
new file mode 100644
index 0000000..862fd86
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-49.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-47.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-50.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-50.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-50.ast
new file mode 100644
index 0000000..6f0be75
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-50.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-48.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-51.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-51.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-51.ast
new file mode 100644
index 0000000..f8f11de
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-51.ast
@@ -0,0 +1,56 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-49.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-52.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-52.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-52.ast
new file mode 100644
index 0000000..f83b0ce
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-52.ast
@@ -0,0 +1,56 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-50.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-53.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-53.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-53.ast
new file mode 100644
index 0000000..533ceab
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-53.ast
@@ -0,0 +1,56 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-51.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-54.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-54.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-54.ast
new file mode 100644
index 0000000..4e1882c
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-54.ast
@@ -0,0 +1,27 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-52.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-55.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-55.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-55.ast
new file mode 100644
index 0000000..6589f96
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-55.ast
@@ -0,0 +1,27 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-53.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-56.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-56.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-56.ast
new file mode 100644
index 0000000..4df6b32
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-56.ast
@@ -0,0 +1,27 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-54.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-57.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-57.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-57.ast
new file mode 100644
index 0000000..6b792e1
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-57.ast
@@ -0,0 +1,27 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-55.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-58.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-58.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-58.ast
new file mode 100644
index 0000000..acafd98
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-58.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-primary-56.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-59.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-59.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-59.ast
new file mode 100644
index 0000000..30c882a
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-59.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-57.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-60.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-60.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-60.ast
new file mode 100644
index 0000000..c6e4b34
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-60.ast
@@ -0,0 +1,27 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-58.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-61.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-61.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-61.ast
new file mode 100644
index 0000000..277fb24
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-61.ast
@@ -0,0 +1,56 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-49.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-62.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-62.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-62.ast
new file mode 100644
index 0000000..6bef5dc
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-62.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-62.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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/open-index-enforced/btree-index/btree-secondary-63.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-63.ast b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-63.ast
new file mode 100644
index 0000000..44b7ee8
--- /dev/null
+++ b/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/open-index-enforced/btree-index/btree-secondary-63.ast
@@ -0,0 +1,38 @@
+DataverseUse test
+WriteOutputTo nc1:rttest/btree-index_btree-secondary-63.adm
+TypeDecl TestType [
+  open RecordType {
+    id : int32
+  }
+]
+DatasetDecl testdst(TestType) partitioned by [[id]]
+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]
+    ]
+  ]



Mime
View raw message