You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by bu...@apache.org on 2016/07/06 07:04:10 UTC

[2/2] asterixdb git commit: Support LIKE, NOT LIKE, IN, NOT IN.

Support LIKE, NOT LIKE, IN, NOT IN.

Change-Id: I497c4420431460bc461937dd5fc58956e1fad6ea
Reviewed-on: https://asterix-gerrit.ics.uci.edu/974
Reviewed-by: Till Westmann <ti...@apache.org>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/a8baf6df
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/a8baf6df
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/a8baf6df

Branch: refs/heads/master
Commit: a8baf6df709a79b0e0a356ac946c3fe84cf1778c
Parents: b7551d1
Author: Yingyi Bu <yi...@couchbase.com>
Authored: Tue Jul 5 21:40:44 2016 -0700
Committer: Yingyi Bu <bu...@gmail.com>
Committed: Wed Jul 6 00:03:45 2016 -0700

----------------------------------------------------------------------
 .../LangExpressionToPlanTranslator.java         |  38 ++-----
 .../optimizerts/queries/subquery/in.sqlpp       |  44 ++++++++
 .../queries/subquery/in_correlated.sqlpp        |  46 ++++++++
 .../results/aggregate/constant-gby-agg.plan     |   6 +-
 .../resources/optimizerts/results/loj-core.plan |  10 +-
 .../optimizerts/results/loj-sugar.plan          |  10 +-
 .../optimizerts/results/subquery/in.plan        |  35 ++++++
 .../results/subquery/in_correlated.plan         |  33 ++++++
 .../string/like_01/like_01.3.query.sqlpp        |   2 +-
 .../string/like_null/like_null.3.query.sqlpp    |   2 +-
 .../queries_sqlpp/subquery/in/in.1.ddl.sqlpp    |  55 +++++++++
 .../queries_sqlpp/subquery/in/in.2.update.sqlpp |  18 +++
 .../queries_sqlpp/subquery/in/in.3.query.sqlpp  |  28 +++++
 .../in_correlated/in_correlated.1.ddl.sqlpp     |  55 +++++++++
 .../in_correlated/in_correlated.2.update.sqlpp  |  18 +++
 .../in_correlated/in_correlated.3.query.sqlpp   |  29 +++++
 .../subquery/not_in/not_in.1.ddl.sqlpp          |  55 +++++++++
 .../subquery/not_in/not_in.2.update.sqlpp       |  18 +++
 .../subquery/not_in/not_in.3.query.sqlpp        |  28 +++++
 .../q02_minimum_cost_supplier.3.query.sqlpp     |   4 +-
 .../q13_customer_distribution.3.query.sqlpp     |   2 +-
 .../q14_promotion_effect.3.query.sqlpp          |   2 +-
 ...16_parts_supplier_relationship.3.query.sqlpp |   4 +-
 .../q02_minimum_cost_supplier.3.query.sqlpp     |   2 +-
 .../q13_customer_distribution.3.query.sqlpp     |   2 +-
 .../q14_promotion_effect.3.query.sqlpp          |   2 +-
 ...16_parts_supplier_relationship.3.query.sqlpp |   4 +-
 .../q02_minimum_cost_supplier.3.query.sqlpp     |   2 +-
 .../q13_customer_distribution.3.query.sqlpp     |   2 +-
 .../q14_promotion_effect.3.query.sqlpp          |   2 +-
 ...16_parts_supplier_relationship.3.query.sqlpp |   4 +-
 .../q02_minimum_cost_supplier.3.query.sqlpp     |   4 +-
 .../q13_customer_distribution.3.query.sqlpp     |   2 +-
 .../q14_promotion_effect.3.query.sqlpp          |   2 +-
 ...16_parts_supplier_relationship.3.query.sqlpp |   4 +-
 .../q02_minimum_cost_supplier.3.query.sqlpp     |   4 +-
 .../q13_customer_distribution.3.query.sqlpp     |   2 +-
 .../q14_promotion_effect.3.query.sqlpp          |   2 +-
 ...16_parts_supplier_relationship.3.query.sqlpp |   4 +-
 .../runtimets/results/subquery/in/in.1.adm      |   2 +
 .../results/subquery/not_in/not_in.1.adm        |   4 +
 .../string/like_01/like_01.3.ast                |   6 +-
 .../string/like_null/like_null.3.ast            |   6 +-
 .../q02_minimum_cost_supplier.3.ast             |   6 +-
 .../q13_customer_distribution.3.ast             |  13 +--
 .../q14_promotion_effect.3.ast                  |   3 +-
 .../q16_parts_supplier_relationship.3.ast       |  26 ++---
 .../q02_minimum_cost_supplier.3.ast             |   6 +-
 .../q13_customer_distribution.3.ast             |  13 +--
 .../q14_promotion_effect.3.ast                  |   3 +-
 .../q16_parts_supplier_relationship.3.ast       |  26 ++---
 .../resources/runtimets/testsuite_sqlpp.xml     |  15 +++
 .../lang/common/expression/OperatorExpr.java    | 111 ++++++++++++-------
 .../common/rewrites/LangRewritingContext.java   |  11 +-
 .../lang/common/struct/OperatorType.java        |   6 +-
 .../rewrites/SqlppFunctionBodyRewriter.java     |   3 +
 .../lang/sqlpp/rewrites/SqlppQueryRewriter.java |  21 ++++
 .../visitor/OperatorExpressionVisitor.java      |  98 ++++++++++++++++
 .../asterix-lang-sqlpp/src/main/javacc/SQLPP.jj |  25 +++--
 59 files changed, 818 insertions(+), 172 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
index 13eb399..03b530b 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
@@ -930,7 +930,6 @@ class LangExpressionToPlanTranslator
                     }
                 } else {
                     AbstractFunctionCallExpression f = createFunctionCallExpressionForBuiltinOperator(ops.get(i));
-
                     if (i == 0) {
                         f.getArguments().add(new MutableObject<>(e));
                         currExpr = f;
@@ -1182,53 +1181,40 @@ class LangExpressionToPlanTranslator
 
     protected AbstractFunctionCallExpression createFunctionCallExpressionForBuiltinOperator(OperatorType t)
             throws AsterixException {
-
-        FunctionIdentifier fid = null;
+        FunctionIdentifier fid;
         switch (t) {
-            case PLUS: {
+            case PLUS:
                 fid = AlgebricksBuiltinFunctions.NUMERIC_ADD;
                 break;
-            }
-            case MINUS: {
+            case MINUS:
                 fid = AsterixBuiltinFunctions.NUMERIC_SUBTRACT;
                 break;
-            }
-            case MUL: {
+            case MUL:
                 fid = AsterixBuiltinFunctions.NUMERIC_MULTIPLY;
                 break;
-            }
-            case DIV: {
+            case DIV:
                 fid = AsterixBuiltinFunctions.NUMERIC_DIVIDE;
                 break;
-            }
-            case MOD: {
+            case MOD:
                 fid = AsterixBuiltinFunctions.NUMERIC_MOD;
                 break;
-            }
-            case IDIV: {
+            case IDIV:
                 fid = AsterixBuiltinFunctions.NUMERIC_IDIV;
                 break;
-            }
-            case CARET: {
+            case CARET:
                 fid = AsterixBuiltinFunctions.CARET;
                 break;
-            }
-            case AND: {
+            case AND:
                 fid = AlgebricksBuiltinFunctions.AND;
                 break;
-            }
-            case OR: {
+            case OR:
                 fid = AlgebricksBuiltinFunctions.OR;
                 break;
-            }
-            case FUZZY_EQ: {
+            case FUZZY_EQ:
                 fid = AsterixBuiltinFunctions.FUZZY_EQ;
                 break;
-            }
-
-            default: {
+            default:
                 throw new NotImplementedException("Operator " + t + " is not yet implemented");
-            }
         }
         return new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(fid));
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/optimizerts/queries/subquery/in.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/subquery/in.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/subquery/in.sqlpp
new file mode 100644
index 0000000..0920d6d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/subquery/in.sqlpp
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATABASE test IF EXISTS;
+CREATE DATABASE test;
+USE test;
+
+
+CREATE TYPE OrderType AS {
+  o_orderkey: int32
+}
+
+CREATE TYPE CustomerType AS {
+  c_custkey: int32
+}
+
+
+CREATE COLLECTION Customers(CustomerType) PRIMARY KEY c_custkey;
+
+CREATE COLLECTION Orders(OrderType) PRIMARY KEY o_orderkey;
+
+SELECT c.c_custkey customer_name
+FROM Customers c
+WHERE c.c_custkey IN (
+    SELECT VALUE o.o_custkey
+    FROM Orders o
+  )  AND c.c_nationkey = 5
+ORDER BY customer_name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/optimizerts/queries/subquery/in_correlated.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/subquery/in_correlated.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/subquery/in_correlated.sqlpp
new file mode 100644
index 0000000..df1a526
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/subquery/in_correlated.sqlpp
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+DROP DATABASE test IF EXISTS;
+CREATE DATABASE test;
+USE test;
+
+
+CREATE TYPE OrderType AS {
+  o_orderkey: int32
+}
+
+CREATE TYPE CustomerType AS {
+  c_custkey: int32
+}
+
+
+CREATE COLLECTION Customers(CustomerType) PRIMARY KEY c_custkey;
+
+CREATE COLLECTION Orders(OrderType) PRIMARY KEY o_orderkey;
+
+SELECT c.c_custkey customer_name
+FROM Customers c
+WHERE c.c_custkey IN (
+    SELECT VALUE o.o_custkey
+    FROM Orders o
+    WHERE c.c_custkey = o.o_custkey
+  )  AND c.c_nationkey = 5
+ORDER BY customer_name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/optimizerts/results/aggregate/constant-gby-agg.plan
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/aggregate/constant-gby-agg.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/aggregate/constant-gby-agg.plan
index 37dcce2..4495551 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/aggregate/constant-gby-agg.plan
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/aggregate/constant-gby-agg.plan
@@ -3,13 +3,13 @@
     -- STREAM_PROJECT  |PARTITIONED|
       -- ASSIGN  |PARTITIONED|
         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-          -- PRE_CLUSTERED_GROUP_BY[$$28]  |PARTITIONED|
+          -- PRE_CLUSTERED_GROUP_BY[$$19]  |PARTITIONED|
                   {
                     -- AGGREGATE  |LOCAL|
                       -- NESTED_TUPLE_SOURCE  |LOCAL|
                   }
-            -- HASH_PARTITION_MERGE_EXCHANGE MERGE:[$$28(ASC)] HASH:[$$28]  |PARTITIONED|
-              -- SORT_GROUP_BY[$$24]  |PARTITIONED|
+            -- HASH_PARTITION_MERGE_EXCHANGE MERGE:[$$19(ASC)] HASH:[$$19]  |PARTITIONED|
+              -- SORT_GROUP_BY[$$15]  |PARTITIONED|
                       {
                         -- AGGREGATE  |LOCAL|
                           -- NESTED_TUPLE_SOURCE  |LOCAL|

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/optimizerts/results/loj-core.plan
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/loj-core.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/loj-core.plan
index b0b5a88..1d34c95 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/loj-core.plan
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/loj-core.plan
@@ -2,20 +2,20 @@
   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
     -- STREAM_PROJECT  |PARTITIONED|
       -- ASSIGN  |PARTITIONED|
-        -- SORT_MERGE_EXCHANGE [$$21(ASC) ]  |PARTITIONED|
-          -- STABLE_SORT [$$21(ASC)]  |PARTITIONED|
+        -- SORT_MERGE_EXCHANGE [$$15(ASC) ]  |PARTITIONED|
+          -- STABLE_SORT [$$15(ASC)]  |PARTITIONED|
             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
               -- STREAM_PROJECT  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                  -- HYBRID_HASH_JOIN [$$23][$$24]  |PARTITIONED|
-                    -- HASH_PARTITION_EXCHANGE [$$23]  |PARTITIONED|
+                  -- HYBRID_HASH_JOIN [$$17][$$18]  |PARTITIONED|
+                    -- HASH_PARTITION_EXCHANGE [$$17]  |PARTITIONED|
                       -- STREAM_PROJECT  |PARTITIONED|
                         -- ASSIGN  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- DATASOURCE_SCAN  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-                    -- HASH_PARTITION_EXCHANGE [$$24]  |PARTITIONED|
+                    -- HASH_PARTITION_EXCHANGE [$$18]  |PARTITIONED|
                       -- ASSIGN  |PARTITIONED|
                         -- STREAM_PROJECT  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/optimizerts/results/loj-sugar.plan
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/loj-sugar.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/loj-sugar.plan
index f600468..1d34c95 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/loj-sugar.plan
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/loj-sugar.plan
@@ -2,20 +2,20 @@
   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
     -- STREAM_PROJECT  |PARTITIONED|
       -- ASSIGN  |PARTITIONED|
-        -- SORT_MERGE_EXCHANGE [$$19(ASC) ]  |PARTITIONED|
-          -- STABLE_SORT [$$19(ASC)]  |PARTITIONED|
+        -- SORT_MERGE_EXCHANGE [$$15(ASC) ]  |PARTITIONED|
+          -- STABLE_SORT [$$15(ASC)]  |PARTITIONED|
             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
               -- STREAM_PROJECT  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                  -- HYBRID_HASH_JOIN [$$21][$$22]  |PARTITIONED|
-                    -- HASH_PARTITION_EXCHANGE [$$21]  |PARTITIONED|
+                  -- HYBRID_HASH_JOIN [$$17][$$18]  |PARTITIONED|
+                    -- HASH_PARTITION_EXCHANGE [$$17]  |PARTITIONED|
                       -- STREAM_PROJECT  |PARTITIONED|
                         -- ASSIGN  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                             -- DATASOURCE_SCAN  |PARTITIONED|
                               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                 -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-                    -- HASH_PARTITION_EXCHANGE [$$22]  |PARTITIONED|
+                    -- HASH_PARTITION_EXCHANGE [$$18]  |PARTITIONED|
                       -- ASSIGN  |PARTITIONED|
                         -- STREAM_PROJECT  |PARTITIONED|
                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/optimizerts/results/subquery/in.plan
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/subquery/in.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/subquery/in.plan
new file mode 100644
index 0000000..8276df2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/subquery/in.plan
@@ -0,0 +1,35 @@
+-- DISTRIBUTE_RESULT  |PARTITIONED|
+  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+    -- STREAM_PROJECT  |PARTITIONED|
+      -- ASSIGN  |PARTITIONED|
+        -- SORT_MERGE_EXCHANGE [$$26(ASC) ]  |PARTITIONED|
+          -- STABLE_SORT [$$26(ASC)]  |PARTITIONED|
+            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+              -- STREAM_PROJECT  |PARTITIONED|
+                -- STREAM_SELECT  |PARTITIONED|
+                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                    -- PRE_CLUSTERED_GROUP_BY[$$19]  |PARTITIONED|
+                            {
+                              -- AGGREGATE  |LOCAL|
+                                -- STREAM_SELECT  |LOCAL|
+                                  -- NESTED_TUPLE_SOURCE  |LOCAL|
+                            }
+                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                        -- STREAM_PROJECT  |PARTITIONED|
+                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                            -- HYBRID_HASH_JOIN [$$19][$$7]  |PARTITIONED|
+                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                -- STREAM_PROJECT  |PARTITIONED|
+                                  -- STREAM_SELECT  |PARTITIONED|
+                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                      -- DATASOURCE_SCAN  |PARTITIONED|
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
+                              -- HASH_PARTITION_EXCHANGE [$$7]  |PARTITIONED|
+                                -- STREAM_PROJECT  |PARTITIONED|
+                                  -- ASSIGN  |PARTITIONED|
+                                    -- STREAM_PROJECT  |PARTITIONED|
+                                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                        -- DATASOURCE_SCAN  |PARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- EMPTY_TUPLE_SOURCE  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/optimizerts/results/subquery/in_correlated.plan
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/subquery/in_correlated.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/subquery/in_correlated.plan
new file mode 100644
index 0000000..e0b4473
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/subquery/in_correlated.plan
@@ -0,0 +1,33 @@
+-- DISTRIBUTE_RESULT  |PARTITIONED|
+  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+    -- STREAM_PROJECT  |PARTITIONED|
+      -- ASSIGN  |PARTITIONED|
+        -- SORT_MERGE_EXCHANGE [$$31(ASC) ]  |PARTITIONED|
+          -- STABLE_SORT [$$31(ASC)]  |PARTITIONED|
+            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+              -- STREAM_PROJECT  |PARTITIONED|
+                -- STREAM_SELECT  |PARTITIONED|
+                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                    -- PRE_CLUSTERED_GROUP_BY[$$23]  |PARTITIONED|
+                            {
+                              -- AGGREGATE  |LOCAL|
+                                -- STREAM_SELECT  |LOCAL|
+                                  -- NESTED_TUPLE_SOURCE  |LOCAL|
+                            }
+                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                        -- HYBRID_HASH_JOIN [$$23][$$22]  |PARTITIONED|
+                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                            -- STREAM_PROJECT  |PARTITIONED|
+                              -- STREAM_SELECT  |PARTITIONED|
+                                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                  -- DATASOURCE_SCAN  |PARTITIONED|
+                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                      -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
+                          -- HASH_PARTITION_EXCHANGE [$$22]  |PARTITIONED|
+                            -- STREAM_PROJECT  |PARTITIONED|
+                              -- ASSIGN  |PARTITIONED|
+                                -- STREAM_PROJECT  |PARTITIONED|
+                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                    -- DATASOURCE_SCAN  |PARTITIONED|
+                                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                        -- EMPTY_TUPLE_SOURCE  |PARTITIONED|

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/like_01/like_01.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/like_01/like_01.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/like_01/like_01.3.query.sqlpp
index c5ebc10..fa4a4e0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/like_01/like_01.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/like_01/like_01.3.query.sqlpp
@@ -20,4 +20,4 @@
 use test;
 
 
-select element [test.like('A6BBB','_6%'),test.like('A8BBB','_6%')];
+select element ['A6BBB' LIKE '_6%', 'A8BBB' LIKE '_6%' ];

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/like_null/like_null.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/like_null/like_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/like_null/like_null.3.query.sqlpp
index caa1618..3251659 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/like_null/like_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/like_null/like_null.3.query.sqlpp
@@ -20,4 +20,4 @@
 use test;
 
 
-{'field1':test.like('A8BBB',null),'field2':test.like(null,'_6%')};
+{'field1': 'A8BBB' LIKE null,'field2': null LIKE '_6%'};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in/in.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in/in.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in/in.1.ddl.sqlpp
new file mode 100644
index 0000000..733ae9c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in/in.1.ddl.sqlpp
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATABASE test IF EXISTS;
+CREATE DATABASE test;
+USE test;
+
+
+CREATE TYPE OrderType AS CLOSED {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+CREATE TYPE CustomerType AS CLOSED {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+
+CREATE EXTERNAL TABLE Customers(CustomerType) USING `localfs`
+((`path`=`asterix_nc1://data/tpch0.001/customer.tbl`),
+(`input-format`=`text-input-format`),(`format`=`delimited-text`),(`delimiter`=`|`));
+
+CREATE EXTERNAL TABLE Orders(OrderType) USING `localfs`
+((`path`=`asterix_nc1://data/tpch0.001/orders.tbl`),
+(`input-format`=`text-input-format`),(`format`=`delimited-text`),(`delimiter`=`|`));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in/in.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in/in.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in/in.2.update.sqlpp
new file mode 100644
index 0000000..7220975
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in/in.2.update.sqlpp
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in/in.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in/in.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in/in.3.query.sqlpp
new file mode 100644
index 0000000..12985e1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in/in.3.query.sqlpp
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+SELECT c.c_custkey customer_name
+FROM Customers c
+WHERE c.c_custkey IN (
+    SELECT VALUE o.o_custkey
+    FROM Orders o
+  )  AND c.c_nationkey = 5
+ORDER BY customer_name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in_correlated/in_correlated.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in_correlated/in_correlated.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in_correlated/in_correlated.1.ddl.sqlpp
new file mode 100644
index 0000000..733ae9c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in_correlated/in_correlated.1.ddl.sqlpp
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATABASE test IF EXISTS;
+CREATE DATABASE test;
+USE test;
+
+
+CREATE TYPE OrderType AS CLOSED {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+CREATE TYPE CustomerType AS CLOSED {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+
+CREATE EXTERNAL TABLE Customers(CustomerType) USING `localfs`
+((`path`=`asterix_nc1://data/tpch0.001/customer.tbl`),
+(`input-format`=`text-input-format`),(`format`=`delimited-text`),(`delimiter`=`|`));
+
+CREATE EXTERNAL TABLE Orders(OrderType) USING `localfs`
+((`path`=`asterix_nc1://data/tpch0.001/orders.tbl`),
+(`input-format`=`text-input-format`),(`format`=`delimited-text`),(`delimiter`=`|`));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in_correlated/in_correlated.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in_correlated/in_correlated.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in_correlated/in_correlated.2.update.sqlpp
new file mode 100644
index 0000000..7220975
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in_correlated/in_correlated.2.update.sqlpp
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in_correlated/in_correlated.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in_correlated/in_correlated.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in_correlated/in_correlated.3.query.sqlpp
new file mode 100644
index 0000000..4e05644
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/in_correlated/in_correlated.3.query.sqlpp
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+SELECT c.c_custkey customer_name
+FROM Customers c
+WHERE c.c_custkey IN (
+    SELECT VALUE o.o_custkey
+    FROM Orders o
+    WHERE c.c_custkey = o.o_custkey
+  )  AND c.c_nationkey = 5
+ORDER BY customer_name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/not_in/not_in.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/not_in/not_in.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/not_in/not_in.1.ddl.sqlpp
new file mode 100644
index 0000000..733ae9c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/not_in/not_in.1.ddl.sqlpp
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATABASE test IF EXISTS;
+CREATE DATABASE test;
+USE test;
+
+
+CREATE TYPE OrderType AS CLOSED {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+CREATE TYPE CustomerType AS CLOSED {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+
+CREATE EXTERNAL TABLE Customers(CustomerType) USING `localfs`
+((`path`=`asterix_nc1://data/tpch0.001/customer.tbl`),
+(`input-format`=`text-input-format`),(`format`=`delimited-text`),(`delimiter`=`|`));
+
+CREATE EXTERNAL TABLE Orders(OrderType) USING `localfs`
+((`path`=`asterix_nc1://data/tpch0.001/orders.tbl`),
+(`input-format`=`text-input-format`),(`format`=`delimited-text`),(`delimiter`=`|`));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/not_in/not_in.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/not_in/not_in.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/not_in/not_in.2.update.sqlpp
new file mode 100644
index 0000000..7220975
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/not_in/not_in.2.update.sqlpp
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/not_in/not_in.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/not_in/not_in.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/not_in/not_in.3.query.sqlpp
new file mode 100644
index 0000000..36819df
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/subquery/not_in/not_in.3.query.sqlpp
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+SELECT c.c_custkey customer_name
+FROM Customers c
+WHERE c.c_custkey NOT IN (
+    SELECT VALUE o.o_custkey
+    FROM Orders o
+  )  AND c.c_nationkey = 5
+ORDER BY customer_name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
index 499899d..cbb55c4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
@@ -40,7 +40,7 @@ declare function tmp1() {
         ) as srn
         where (srn.s_suppkey = ps.ps_suppkey)
     ) as pssrn
-    where ((p.p_partkey = pssrn.p_partkey) and tpch.like(p.p_type,'%BRASS'))
+    where p.p_partkey = pssrn.p_partkey and p.p_type like '%BRASS'
 )
 };
 declare function tmp2() {
@@ -66,7 +66,7 @@ declare function tmp2() {
         ) as srn
         where (srn.s_suppkey = ps.ps_suppkey)
     ) as pssrn
-    where ((p.p_partkey = pssrn.p_partkey) and tpch.like(p.p_type,'%BRASS'))
+    where p.p_partkey = pssrn.p_partkey and p.p_type like '%BRASS'
     /* +hash */
     group by pssrn.p_partkey as p_partkey
 )

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
index 45888f3..24f4f46 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
@@ -32,7 +32,7 @@ from  (
         select element {'c_custkey':c.c_custkey,'o_orderkey_count':coll_count((
                 select element o.o_orderkey
                 from  Orders as o
-                where c.c_custkey = o.o_custkey and NOT like(o.o_comment,'%special%requests%')
+                where c.c_custkey = o.o_custkey and o.o_comment not like '%special%requests%'
             ))}
         from  Customer as c
     ) as co

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
index 6c4e330..eb556b1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
@@ -21,7 +21,7 @@ use tpch;
 
 
 select element (100.0 * tpch.coll_sum((
-      select element tpch.`switch-case`(tpch.like(i.p_type,'PROMO%'),true,(i.l_extendedprice * (1 - i.l_discount)),false,0.0)
+      select element tpch.`switch-case`(i.p_type like 'PROMO%',true,(i.l_extendedprice * (1 - i.l_discount)),false,0.0)
       from  lp as i
   )) / tpch.coll_sum((
       select element (i.l_extendedprice * (1 - i.l_discount))

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
index a6a53bb..131c8a0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
@@ -27,10 +27,10 @@ declare function tmp() {
         select element {'p_brand':p.p_brand,'p_type':p.p_type,'p_size':p.p_size,'ps_suppkey':ps.ps_suppkey}
         from  Partsupp as ps,
               Part as p
-        where p.p_partkey = ps.ps_partkey and p.p_brand != 'Brand#45' and not like(p.p_type,'MEDIUM POLISHED%')
+        where p.p_partkey = ps.ps_partkey and p.p_brand != 'Brand#45' and p.p_type not like 'MEDIUM POLISHED%'
     ) as psp,
           Supplier as s
-    where psp.ps_suppkey = s.s_suppkey and not like(s.s_comment,'%Customer%Complaints%')
+    where psp.ps_suppkey = s.s_suppkey and s.s_comment not like '%Customer%Complaints%'
 )
 };
 select element {'p_brand':p_brand,'p_type':p_type,'p_size':p_size,'supplier_cnt':supplier_cnt}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
index b13a11a..e1704fe 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
@@ -26,7 +26,7 @@ WITH q2_minimum_cost_supplier_tmp1 AS
  FROM Nation JOIN Region ON n_regionkey = r_regionkey and r_name = 'EUROPE'
  JOIN Supplier ON s_nationkey = n_nationkey
  JOIN Partsupp ON s_suppkey = ps_suppkey
- JOIN Part ON p_partkey = ps_partkey AND like(p_type, '%BRASS')
+ JOIN Part ON p_partkey = ps_partkey AND p_type LIKE '%BRASS'
 ),
 q2_minimum_cost_supplier_tmp2 AS
 (

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
index 31d4dbc..bd5f431 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
@@ -28,7 +28,7 @@ FROM  (
                            (
                             select element o_orderkey
                             from  Orders
-                            where c_custkey = o_custkey and not(like(o_comment,'%special%requests%'))
+                            where c_custkey = o_custkey and o_comment NOT LIKE '%special%requests%'
                            )
                          ) AS o_orderkey_count
                 from  Customer

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
index 56d7637..1c10baf 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
@@ -21,7 +21,7 @@ use tpch;
 
 
 select element 100.0 *
-     sum(`switch-case`(like(p_type,'PROMO%'),true,(l_extendedprice * (1 - l_discount)),false,0.0))
+     sum(`switch-case`(p_type LIKE 'PROMO%',true, l_extendedprice * (1 - l_discount), false, 0.0))
      / sum(l_extendedprice * (1 - l_discount))
 FROM  LineItem,
       Part

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
index 2b56eab..5d9eef3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
@@ -28,10 +28,10 @@ WITH tmp AS
             FROM  Partsupp,
                   Part
             WHERE p_partkey = ps_partkey AND p_brand != 'Brand#45' AND
-              not(like(p_type,'MEDIUM POLISHED%'))
+                  p_type NOT LIKE 'MEDIUM POLISHED%'
            ) AS psp,
            Supplier
-    WHERE ps_suppkey = s_suppkey AND not(like(s_comment,'%Customer%Complaints%'))
+    WHERE ps_suppkey = s_suppkey AND s_comment NOT LIKE '%Customer%Complaints%'
 )
 
 SELECT p_brand, p_type, p_size, count(ps_suppkey) supplier_cnt

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
index 636fb04..8f84f62 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
@@ -39,7 +39,7 @@ FROM
   JOIN Partsupp ps
   ON s.s_suppkey = ps.ps_suppkey
   JOIN Part p
-  ON p.p_partkey = ps.ps_partkey AND like(p.p_type, '%BRASS')
+  ON p.p_partkey = ps.ps_partkey AND p.p_type LIKE '%BRASS'
 ),
 q2_minimum_cost_supplier_tmp2 AS
 (SELECT

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
index 3124fdc..fb3e8e7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
@@ -28,7 +28,7 @@ FROM  (
                            (
                             select element o.o_orderkey
                             from  Orders as o
-                            where c.c_custkey = o.o_custkey and NOT like(o.o_comment,'%special%requests%')
+                            where c.c_custkey = o.o_custkey and o.o_comment NOT LIKE '%special%requests%'
                            )
                          ) AS o_orderkey_count
                 from  Customer c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
index 57dde0d..dc26e42 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
@@ -21,7 +21,7 @@ use tpch;
 
 
 select element 100.0 *
-     sum(`switch-case`(like(p.p_type,'PROMO%'),true,(l.l_extendedprice * (1 - l.l_discount)),false,0.0))
+     sum(`switch-case`(p.p_type like 'PROMO%',true,(l.l_extendedprice * (1 - l.l_discount)),false,0.0))
      / sum(l.l_extendedprice * (1 - l.l_discount))
 FROM  LineItem l,
       Part p

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
index c96b23b..18a4d43 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
@@ -27,10 +27,10 @@ declare function tmp() {
             SELECT p.p_brand p_brand, p.p_type p_type, p.p_size p_size, ps.ps_suppkey ps_suppkey
             FROM  Partsupp AS ps,
                   Part AS p
-            WHERE p.p_partkey = ps.ps_partkey AND p.p_brand != 'Brand#45' AND NOT like(p.p_type,'MEDIUM POLISHED%')
+            WHERE p.p_partkey = ps.ps_partkey AND p.p_brand != 'Brand#45' AND p.p_type not like 'MEDIUM POLISHED%'
            ) AS psp,
            Supplier AS s
-    WHERE psp.ps_suppkey = s.s_suppkey AND NOT like(s.s_comment,'%Customer%Complaints%')
+    WHERE psp.ps_suppkey = s.s_suppkey AND s.s_comment not like '%Customer%Complaints%'
 )
 };
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
index 499899d..cbb55c4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
@@ -40,7 +40,7 @@ declare function tmp1() {
         ) as srn
         where (srn.s_suppkey = ps.ps_suppkey)
     ) as pssrn
-    where ((p.p_partkey = pssrn.p_partkey) and tpch.like(p.p_type,'%BRASS'))
+    where p.p_partkey = pssrn.p_partkey and p.p_type like '%BRASS'
 )
 };
 declare function tmp2() {
@@ -66,7 +66,7 @@ declare function tmp2() {
         ) as srn
         where (srn.s_suppkey = ps.ps_suppkey)
     ) as pssrn
-    where ((p.p_partkey = pssrn.p_partkey) and tpch.like(p.p_type,'%BRASS'))
+    where p.p_partkey = pssrn.p_partkey and p.p_type like '%BRASS'
     /* +hash */
     group by pssrn.p_partkey as p_partkey
 )

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
index 45888f3..24f4f46 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
@@ -32,7 +32,7 @@ from  (
         select element {'c_custkey':c.c_custkey,'o_orderkey_count':coll_count((
                 select element o.o_orderkey
                 from  Orders as o
-                where c.c_custkey = o.o_custkey and NOT like(o.o_comment,'%special%requests%')
+                where c.c_custkey = o.o_custkey and o.o_comment not like '%special%requests%'
             ))}
         from  Customer as c
     ) as co

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
index 6c4e330..eb556b1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
@@ -21,7 +21,7 @@ use tpch;
 
 
 select element (100.0 * tpch.coll_sum((
-      select element tpch.`switch-case`(tpch.like(i.p_type,'PROMO%'),true,(i.l_extendedprice * (1 - i.l_discount)),false,0.0)
+      select element tpch.`switch-case`(i.p_type like 'PROMO%',true,(i.l_extendedprice * (1 - i.l_discount)),false,0.0)
       from  lp as i
   )) / tpch.coll_sum((
       select element (i.l_extendedprice * (1 - i.l_discount))

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
index a6a53bb..131c8a0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
@@ -27,10 +27,10 @@ declare function tmp() {
         select element {'p_brand':p.p_brand,'p_type':p.p_type,'p_size':p.p_size,'ps_suppkey':ps.ps_suppkey}
         from  Partsupp as ps,
               Part as p
-        where p.p_partkey = ps.ps_partkey and p.p_brand != 'Brand#45' and not like(p.p_type,'MEDIUM POLISHED%')
+        where p.p_partkey = ps.ps_partkey and p.p_brand != 'Brand#45' and p.p_type not like 'MEDIUM POLISHED%'
     ) as psp,
           Supplier as s
-    where psp.ps_suppkey = s.s_suppkey and not like(s.s_comment,'%Customer%Complaints%')
+    where psp.ps_suppkey = s.s_suppkey and s.s_comment not like '%Customer%Complaints%'
 )
 };
 select element {'p_brand':p_brand,'p_type':p_type,'p_size':p_size,'supplier_cnt':supplier_cnt}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
index edae05b..f6ad005 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.sqlpp
@@ -40,7 +40,7 @@ declare function tmp1() {
         ) as srn
         where (srn.s_suppkey = ps.ps_suppkey)
     ) as pssrn
-    where ((p.p_partkey = pssrn.p_partkey) and tpch.like(p.p_type,'%BRASS'))
+    where p.p_partkey = pssrn.p_partkey and p.p_type like '%BRASS'
 )
 };
 declare function tmp2() {
@@ -66,7 +66,7 @@ declare function tmp2() {
         ) as srn
         where (srn.s_suppkey = ps.ps_suppkey)
     ) as pssrn
-    where ((p.p_partkey = pssrn.p_partkey) and tpch.like(p.p_type,'%BRASS'))
+    where p.p_partkey = pssrn.p_partkey and p.p_type like '%BRASS'
     /* +hash */
     group by pssrn.p_partkey as p_partkey
 )

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
index c5ae516..e68fcc4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
@@ -32,7 +32,7 @@ from  (
         select element {'c_custkey':c.c_custkey,'o_orderkey_count':coll_count((
                 select element o.o_orderkey
                 from  Orders as o
-                where c.c_custkey = o.o_custkey and NOT like(o.o_comment,'%special%requests%')
+                where c.c_custkey = o.o_custkey and o.o_comment not like '%special%requests%'
             ))}
         from  Customer as c
     ) as co

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
index bcb5d55..ba7de7d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.query.sqlpp
@@ -21,7 +21,7 @@ use tpch;
 
 
 select element (100.0 * COLL_SUM((
-      select element tpch.`switch-case`(LIKE(i.p_type,'PROMO%'),true,(i.l_extendedprice * (1 - i.l_discount)),false,0.0)
+      select element tpch.`switch-case`(i.p_type like 'PROMO%',true,(i.l_extendedprice * (1 - i.l_discount)),false,0.0)
       from  lp as i
   )) / COLL_SUM((
       select element (i.l_extendedprice * (1 - i.l_discount))

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
index 481d4d1..0cdbcfd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
@@ -27,10 +27,10 @@ declare function tmp() {
         select element {'p_brand':p.p_brand,'p_type':p.p_type,'p_size':p.p_size,'ps_suppkey':ps.ps_suppkey}
         from  Partsupp as ps,
               Part as p
-        where p.p_partkey = ps.ps_partkey and p.p_brand != 'Brand#45' and not like(p.p_type,'MEDIUM POLISHED%')
+        where p.p_partkey = ps.ps_partkey and p.p_brand != 'Brand#45' and p.p_type not like 'MEDIUM POLISHED%'
     ) as psp,
           Supplier as s
-    where psp.ps_suppkey = s.s_suppkey and NOT LIKE(s.s_comment,'%Customer%Complaints%')
+    where psp.ps_suppkey = s.s_suppkey and s.s_comment not like '%Customer%Complaints%'
 )
 };
 select element {'p_brand':p_brand,'p_type':p_type,'p_size':p_size,'supplier_cnt':supplier_cnt}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/in/in.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/in/in.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/in/in.1.adm
new file mode 100644
index 0000000..c9e9c6d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/in/in.1.adm
@@ -0,0 +1,2 @@
+{ "customer_name": 10 }
+{ "customer_name": 85 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/not_in/not_in.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/not_in/not_in.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/not_in/not_in.1.adm
new file mode 100644
index 0000000..b01a98a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/subquery/not_in/not_in.1.adm
@@ -0,0 +1,4 @@
+{ "customer_name": 42 }
+{ "customer_name": 108 }
+{ "customer_name": 123 }
+{ "customer_name": 138 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/string/like_01/like_01.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/string/like_01/like_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/string/like_01/like_01.3.ast
index ca602eb..ee361dd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/string/like_01/like_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/string/like_01/like_01.3.ast
@@ -2,12 +2,14 @@ DataverseUse test
 Query:
 SELECT ELEMENT [
 OrderedListConstructor [
-  FunctionCall test.like@2[
+  OperatorExpr [
     LiteralExpr [STRING] [A6BBB]
+    like
     LiteralExpr [STRING] [_6%]
   ]
-  FunctionCall test.like@2[
+  OperatorExpr [
     LiteralExpr [STRING] [A8BBB]
+    like
     LiteralExpr [STRING] [_6%]
   ]
 ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/string/like_null/like_null.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/string/like_null/like_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/string/like_null/like_null.3.ast
index 6cf5fca..a829f6b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/string/like_null/like_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/string/like_null/like_null.3.ast
@@ -4,16 +4,18 @@ RecordConstructor [
   (
     LiteralExpr [STRING] [field1]
     :
-    FunctionCall test.like@2[
+    OperatorExpr [
       LiteralExpr [STRING] [A8BBB]
+      like
       LiteralExpr [NULL]
     ]
   )
   (
     LiteralExpr [STRING] [field2]
     :
-    FunctionCall test.like@2[
+    OperatorExpr [
       LiteralExpr [NULL]
+      like
       LiteralExpr [STRING] [_6%]
     ]
   )

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast
index 0fa04eb..72ac671 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast
@@ -313,11 +313,12 @@ FunctionDecl tmp1([]) {
           ]
         ]
         and
-        FunctionCall tpch.like@2[
+        OperatorExpr [
           FieldAccessor [
             Variable [ Name=$p ]
             Field=p_type
           ]
+          like
           LiteralExpr [STRING] [%BRASS]
         ]
       ]
@@ -588,11 +589,12 @@ FunctionDecl tmp2([]) {
           ]
         ]
         and
-        FunctionCall tpch.like@2[
+        OperatorExpr [
           FieldAccessor [
             Variable [ Name=$p ]
             Field=p_type
           ]
+          like
           LiteralExpr [STRING] [%BRASS]
         ]
       ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast
index 38af625..4ab59b1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast
@@ -83,14 +83,13 @@ FROM [  (
                       ]
                     ]
                     and
-                    FunctionCall null.not@1[
-                      FunctionCall tpch.like@2[
-                        FieldAccessor [
-                          Variable [ Name=$o ]
-                          Field=o_comment
-                        ]
-                        LiteralExpr [STRING] [%special%requests%]
+                    OperatorExpr [
+                      FieldAccessor [
+                        Variable [ Name=$o ]
+                        Field=o_comment
                       ]
+                      not_like
+                      LiteralExpr [STRING] [%special%requests%]
                     ]
                   ]
               )

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.ast
index 1f8c630..f9f5c62 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.ast
@@ -8,11 +8,12 @@ OperatorExpr [
     (
       SELECT ELEMENT [
       FunctionCall tpch.switch-case@5[
-        FunctionCall tpch.like@2[
+        OperatorExpr [
           FieldAccessor [
             Variable [ Name=$i ]
             Field=p_type
           ]
+          like
           LiteralExpr [STRING] [PROMO%]
         ]
         LiteralExpr [TRUE]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
index e00c9c7..aef4422 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
@@ -103,14 +103,13 @@ FunctionDecl tmp([]) {
               LiteralExpr [STRING] [Brand#45]
             ]
             and
-            FunctionCall null.not@1[
-              FunctionCall tpch.like@2[
-                FieldAccessor [
-                  Variable [ Name=$p ]
-                  Field=p_type
-                ]
-                LiteralExpr [STRING] [MEDIUM POLISHED%]
+            OperatorExpr [
+              FieldAccessor [
+                Variable [ Name=$p ]
+                Field=p_type
               ]
+              not_like
+              LiteralExpr [STRING] [MEDIUM POLISHED%]
             ]
           ]
       )
@@ -133,14 +132,13 @@ FunctionDecl tmp([]) {
           ]
         ]
         and
-        FunctionCall null.not@1[
-          FunctionCall tpch.like@2[
-            FieldAccessor [
-              Variable [ Name=$s ]
-              Field=s_comment
-            ]
-            LiteralExpr [STRING] [%Customer%Complaints%]
+        OperatorExpr [
+          FieldAccessor [
+            Variable [ Name=$s ]
+            Field=s_comment
           ]
+          not_like
+          LiteralExpr [STRING] [%Customer%Complaints%]
         ]
       ]
   )

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast
index 0fa04eb..72ac671 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast
@@ -313,11 +313,12 @@ FunctionDecl tmp1([]) {
           ]
         ]
         and
-        FunctionCall tpch.like@2[
+        OperatorExpr [
           FieldAccessor [
             Variable [ Name=$p ]
             Field=p_type
           ]
+          like
           LiteralExpr [STRING] [%BRASS]
         ]
       ]
@@ -588,11 +589,12 @@ FunctionDecl tmp2([]) {
           ]
         ]
         and
-        FunctionCall tpch.like@2[
+        OperatorExpr [
           FieldAccessor [
             Variable [ Name=$p ]
             Field=p_type
           ]
+          like
           LiteralExpr [STRING] [%BRASS]
         ]
       ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast
index 38af625..4ab59b1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast
@@ -83,14 +83,13 @@ FROM [  (
                       ]
                     ]
                     and
-                    FunctionCall null.not@1[
-                      FunctionCall tpch.like@2[
-                        FieldAccessor [
-                          Variable [ Name=$o ]
-                          Field=o_comment
-                        ]
-                        LiteralExpr [STRING] [%special%requests%]
+                    OperatorExpr [
+                      FieldAccessor [
+                        Variable [ Name=$o ]
+                        Field=o_comment
                       ]
+                      not_like
+                      LiteralExpr [STRING] [%special%requests%]
                     ]
                   ]
               )

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.ast
index 1f8c630..f9f5c62 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.ast
@@ -8,11 +8,12 @@ OperatorExpr [
     (
       SELECT ELEMENT [
       FunctionCall tpch.switch-case@5[
-        FunctionCall tpch.like@2[
+        OperatorExpr [
           FieldAccessor [
             Variable [ Name=$i ]
             Field=p_type
           ]
+          like
           LiteralExpr [STRING] [PROMO%]
         ]
         LiteralExpr [TRUE]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
index e00c9c7..aef4422 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
@@ -103,14 +103,13 @@ FunctionDecl tmp([]) {
               LiteralExpr [STRING] [Brand#45]
             ]
             and
-            FunctionCall null.not@1[
-              FunctionCall tpch.like@2[
-                FieldAccessor [
-                  Variable [ Name=$p ]
-                  Field=p_type
-                ]
-                LiteralExpr [STRING] [MEDIUM POLISHED%]
+            OperatorExpr [
+              FieldAccessor [
+                Variable [ Name=$p ]
+                Field=p_type
               ]
+              not_like
+              LiteralExpr [STRING] [MEDIUM POLISHED%]
             ]
           ]
       )
@@ -133,14 +132,13 @@ FunctionDecl tmp([]) {
           ]
         ]
         and
-        FunctionCall null.not@1[
-          FunctionCall tpch.like@2[
-            FieldAccessor [
-              Variable [ Name=$s ]
-              Field=s_comment
-            ]
-            LiteralExpr [STRING] [%Customer%Complaints%]
+        OperatorExpr [
+          FieldAccessor [
+            Variable [ Name=$s ]
+            Field=s_comment
           ]
+          not_like
+          LiteralExpr [STRING] [%Customer%Complaints%]
         ]
       ]
   )

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a8baf6df/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index f2d5704..944565c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -5230,6 +5230,21 @@
         <output-dir compare="Text">decorrelate_with_unique_id_2</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="subquery">
+      <compilation-unit name="in">
+        <output-dir compare="Text">in</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="subquery">
+      <compilation-unit name="in_correlated">
+        <output-dir compare="Text">in</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="subquery">
+      <compilation-unit name="not_in">
+        <output-dir compare="Text">not_in</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
   <test-group name="subset-collection">
     <test-case FilePath="subset-collection">