http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q07_volume_shipping/q07_volume_shipping.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q07_volume_shipping/q07_volume_shipping.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q07_volume_shipping/q07_volume_shipping.3.query.sqlpp
index eacf03d..8d0b9f2 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q07_volume_shipping/q07_volume_shipping.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q07_volume_shipping/q07_volume_shipping.3.query.sqlpp
@@ -49,7 +49,7 @@ from  (
 with  l_year0 as tpch.`get-year`(locs.l_shipdate)
 where ((locs.c_nationkey = t.c_nationkey) and (locs.s_nationkey = 
t.s_nationkey))
 group by t.supp_nation as supp_nation,t.cust_nation as cust_nation,l_year0 as 
l_year
-with  revenue as COLL_SUM((
+with  revenue as ARRAY_SUM((
       select element (i.l_extendedprice * (1 - i.l_discount))
       from  locs as i
   ))

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q08_national_market_share/q08_national_market_share.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q08_national_market_share/q08_national_market_share.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q08_national_market_share/q08_national_market_share.1.ddl.sqlpp
index 1871e19..0db8d36 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q08_national_market_share/q08_national_market_share.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q08_national_market_share/q08_national_market_share.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int32,
-  l_partkey : int32,
-  l_suppkey : int32,
-  l_linenumber : int32,
-  l_quantity : int32,
+  l_orderkey : integer,
+  l_partkey : integer,
+  l_suppkey : integer,
+  l_linenumber : integer,
+  l_quantity : integer,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int32,
-  o_custkey : int32,
+  o_orderkey : integer,
+  o_custkey : integer,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int32,
+  o_shippriority : integer,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int32,
+  c_custkey : integer,
   c_name : string,
   c_address : string,
-  c_nationkey : int32,
+  c_nationkey : integer,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int32,
+  s_suppkey : integer,
   s_name : string,
   s_address : string,
-  s_nationkey : int32,
+  s_nationkey : integer,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int32,
+  n_nationkey : integer,
   n_name : string,
-  n_regionkey : int32,
+  n_regionkey : integer,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int32,
+  r_regionkey : integer,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int32,
+  p_partkey : integer,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int32,
+  p_size : integer,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int32,
-  ps_suppkey : int32,
-  ps_availqty : int32,
+  ps_partkey : integer,
+  ps_suppkey : integer,
+  ps_availqty : integer,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.query.sqlpp
index 70b59e0..e605b50 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.query.sqlpp
@@ -20,10 +20,10 @@
 use tpch;
 
 
-select element {'year':year,'mkt_share':(COLL_SUM((
+select element {'year':year,'mkt_share':(ARRAY_SUM((
           select element case i.s_name = 'BRAZIL' when true then i.revenue 
when false then 0.0 end
           from  t as i
-      )) / COLL_SUM((
+      )) / ARRAY_SUM((
           select element i.revenue
           from  t as i
       )))}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.1.ddl.sqlpp
index 1871e19..0db8d36 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int32,
-  l_partkey : int32,
-  l_suppkey : int32,
-  l_linenumber : int32,
-  l_quantity : int32,
+  l_orderkey : integer,
+  l_partkey : integer,
+  l_suppkey : integer,
+  l_linenumber : integer,
+  l_quantity : integer,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int32,
-  o_custkey : int32,
+  o_orderkey : integer,
+  o_custkey : integer,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int32,
+  o_shippriority : integer,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int32,
+  c_custkey : integer,
   c_name : string,
   c_address : string,
-  c_nationkey : int32,
+  c_nationkey : integer,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int32,
+  s_suppkey : integer,
   s_name : string,
   s_address : string,
-  s_nationkey : int32,
+  s_nationkey : integer,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int32,
+  n_nationkey : integer,
   n_name : string,
-  n_regionkey : int32,
+  n_regionkey : integer,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int32,
+  r_regionkey : integer,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int32,
+  p_partkey : integer,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int32,
+  p_size : integer,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int32,
-  ps_suppkey : int32,
-  ps_availqty : int32,
+  ps_partkey : integer,
+  ps_suppkey : integer,
+  ps_availqty : integer,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.3.query.sqlpp
index 0f56186..69dc01a 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.3.query.sqlpp
@@ -20,7 +20,7 @@
 use tpch;
 
 
-select element {'nation':nation,'o_year':o_year,'sum_profit':tpch.coll_sum((
+select element {'nation':nation,'o_year':o_year,'sum_profit':tpch.array_sum((
         select element pr.amount
         from  profit as pr
     ))}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item/q10_returned_item.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item/q10_returned_item.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item/q10_returned_item.1.ddl.sqlpp
index 1871e19..0db8d36 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item/q10_returned_item.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item/q10_returned_item.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int32,
-  l_partkey : int32,
-  l_suppkey : int32,
-  l_linenumber : int32,
-  l_quantity : int32,
+  l_orderkey : integer,
+  l_partkey : integer,
+  l_suppkey : integer,
+  l_linenumber : integer,
+  l_quantity : integer,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int32,
-  o_custkey : int32,
+  o_orderkey : integer,
+  o_custkey : integer,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int32,
+  o_shippriority : integer,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int32,
+  c_custkey : integer,
   c_name : string,
   c_address : string,
-  c_nationkey : int32,
+  c_nationkey : integer,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int32,
+  s_suppkey : integer,
   s_name : string,
   s_address : string,
-  s_nationkey : int32,
+  s_nationkey : integer,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int32,
+  n_nationkey : integer,
   n_name : string,
-  n_regionkey : int32,
+  n_regionkey : integer,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int32,
+  r_regionkey : integer,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int32,
+  p_partkey : integer,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int32,
+  p_size : integer,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int32,
-  ps_suppkey : int32,
-  ps_availqty : int32,
+  ps_partkey : integer,
+  ps_suppkey : integer,
+  ps_availqty : integer,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item/q10_returned_item.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item/q10_returned_item.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item/q10_returned_item.3.query.sqlpp
index 7278f81..8a66067 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item/q10_returned_item.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item/q10_returned_item.3.query.sqlpp
@@ -34,7 +34,7 @@ from  (
     where ((l.l_orderkey = ocn.o_orderkey) and (l.l_returnflag = 'R'))
 ) as locn
 group by locn.c_custkey as c_custkey,locn.c_name as c_name,locn.c_acctbal as 
c_acctbal,locn.c_phone as c_phone,locn.n_name as n_name,locn.c_address as 
c_address,locn.c_comment as c_comment
-with  revenue as tpch.coll_sum((
+with  revenue as tpch.array_sum((
       select element (i.l_extendedprice * (1 - i.l_discount))
       from  locn as i
   ))

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item_int64/q10_returned_item_int64.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item_int64/q10_returned_item_int64.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item_int64/q10_returned_item_int64.1.ddl.sqlpp
index 3e3f696..6cbdf11 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item_int64/q10_returned_item_int64.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item_int64/q10_returned_item_int64.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int64,
-  l_partkey : int64,
-  l_suppkey : int64,
-  l_linenumber : int64,
-  l_quantity : int64,
+  l_orderkey : bigint,
+  l_partkey : bigint,
+  l_suppkey : bigint,
+  l_linenumber : bigint,
+  l_quantity : bigint,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int64,
-  o_custkey : int64,
+  o_orderkey : bigint,
+  o_custkey : bigint,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int64,
+  o_shippriority : bigint,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int64,
+  c_custkey : bigint,
   c_name : string,
   c_address : string,
-  c_nationkey : int64,
+  c_nationkey : bigint,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int64,
+  s_suppkey : bigint,
   s_name : string,
   s_address : string,
-  s_nationkey : int64,
+  s_nationkey : bigint,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int64,
+  n_nationkey : bigint,
   n_name : string,
-  n_regionkey : int64,
+  n_regionkey : bigint,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int64,
+  r_regionkey : bigint,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int64,
+  p_partkey : bigint,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int64,
+  p_size : bigint,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int64,
-  ps_suppkey : int64,
-  ps_availqty : int64,
+  ps_partkey : bigint,
+  ps_suppkey : bigint,
+  ps_availqty : bigint,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item_int64/q10_returned_item_int64.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item_int64/q10_returned_item_int64.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item_int64/q10_returned_item_int64.3.query.sqlpp
index 7278f81..8a66067 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item_int64/q10_returned_item_int64.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q10_returned_item_int64/q10_returned_item_int64.3.query.sqlpp
@@ -34,7 +34,7 @@ from  (
     where ((l.l_orderkey = ocn.o_orderkey) and (l.l_returnflag = 'R'))
 ) as locn
 group by locn.c_custkey as c_custkey,locn.c_name as c_name,locn.c_acctbal as 
c_acctbal,locn.c_phone as c_phone,locn.n_name as n_name,locn.c_address as 
c_address,locn.c_comment as c_comment
-with  revenue as tpch.coll_sum((
+with  revenue as tpch.array_sum((
       select element (i.l_extendedprice * (1 - i.l_discount))
       from  locn as i
   ))

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q11_important_stock/q11_important_stock.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q11_important_stock/q11_important_stock.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q11_important_stock/q11_important_stock.1.ddl.sqlpp
index 3e3f696..6cbdf11 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q11_important_stock/q11_important_stock.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q11_important_stock/q11_important_stock.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int64,
-  l_partkey : int64,
-  l_suppkey : int64,
-  l_linenumber : int64,
-  l_quantity : int64,
+  l_orderkey : bigint,
+  l_partkey : bigint,
+  l_suppkey : bigint,
+  l_linenumber : bigint,
+  l_quantity : bigint,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int64,
-  o_custkey : int64,
+  o_orderkey : bigint,
+  o_custkey : bigint,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int64,
+  o_shippriority : bigint,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int64,
+  c_custkey : bigint,
   c_name : string,
   c_address : string,
-  c_nationkey : int64,
+  c_nationkey : bigint,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int64,
+  s_suppkey : bigint,
   s_name : string,
   s_address : string,
-  s_nationkey : int64,
+  s_nationkey : bigint,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int64,
+  n_nationkey : bigint,
   n_name : string,
-  n_regionkey : int64,
+  n_regionkey : bigint,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int64,
+  r_regionkey : bigint,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int64,
+  p_partkey : bigint,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int64,
+  p_size : bigint,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int64,
-  ps_suppkey : int64,
-  ps_availqty : int64,
+  ps_partkey : bigint,
+  ps_suppkey : bigint,
+  ps_availqty : bigint,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q11_important_stock/q11_important_stock.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q11_important_stock/q11_important_stock.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q11_important_stock/q11_important_stock.3.query.sqlpp
index 6956c4b..8fc6720 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q11_important_stock/q11_important_stock.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q11_important_stock/q11_important_stock.3.query.sqlpp
@@ -20,7 +20,7 @@
 use tpch;
 
 
-with  sum as COLL_SUM((
+with  sum as ARRAY_SUM((
       select element (ps.ps_supplycost * ps.ps_availqty)
       from  Partsupp as ps,
             (
@@ -33,7 +33,7 @@ with  sum as COLL_SUM((
   ))
 select element {'partkey':t1.ps_partkey,'part_value':t1.part_value}
 from  (
-    select element {'ps_partkey':ps_partkey,'part_value':COLL_SUM((
+    select element {'ps_partkey':ps_partkey,'part_value':ARRAY_SUM((
             select element (i.ps_supplycost * i.ps_availqty)
             from  ps as i
         ))}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q12_shipping/q12_shipping.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q12_shipping/q12_shipping.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q12_shipping/q12_shipping.1.ddl.sqlpp
index 1871e19..0db8d36 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q12_shipping/q12_shipping.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q12_shipping/q12_shipping.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int32,
-  l_partkey : int32,
-  l_suppkey : int32,
-  l_linenumber : int32,
-  l_quantity : int32,
+  l_orderkey : integer,
+  l_partkey : integer,
+  l_suppkey : integer,
+  l_linenumber : integer,
+  l_quantity : integer,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int32,
-  o_custkey : int32,
+  o_orderkey : integer,
+  o_custkey : integer,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int32,
+  o_shippriority : integer,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int32,
+  c_custkey : integer,
   c_name : string,
   c_address : string,
-  c_nationkey : int32,
+  c_nationkey : integer,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int32,
+  s_suppkey : integer,
   s_name : string,
   s_address : string,
-  s_nationkey : int32,
+  s_nationkey : integer,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int32,
+  n_nationkey : integer,
   n_name : string,
-  n_regionkey : int32,
+  n_regionkey : integer,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int32,
+  r_regionkey : integer,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int32,
+  p_partkey : integer,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int32,
+  p_size : integer,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int32,
-  ps_suppkey : int32,
-  ps_availqty : int32,
+  ps_partkey : integer,
+  ps_suppkey : integer,
+  ps_availqty : integer,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q12_shipping/q12_shipping.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q12_shipping/q12_shipping.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q12_shipping/q12_shipping.3.query.sqlpp
index 58d0c9e..a9b1ccf 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q12_shipping/q12_shipping.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q12_shipping/q12_shipping.3.query.sqlpp
@@ -20,11 +20,11 @@
 use tpch;
 
 
-select element {'l_shipmode':l_shipmode,'high_line_count':COLL_SUM((
+select element {'l_shipmode':l_shipmode,'high_line_count':ARRAY_SUM((
         select element 
             CASE i.o_orderpriority = '1-URGENT' OR i.o_orderpriority = 
'2-HIGH' WHEN true THEN 1 WHEN false THEN 0 END
         from  o as i
-    )),'low_line_count':COLL_SUM((
+    )),'low_line_count':ARRAY_SUM((
         select element case when i.o_orderpriority = '1-URGENT' OR 
i.o_orderpriority = '2-HIGH' then 0 else 1 end
         from  o as i
     ))}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.1.ddl.sqlpp
index 3e3f696..6cbdf11 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int64,
-  l_partkey : int64,
-  l_suppkey : int64,
-  l_linenumber : int64,
-  l_quantity : int64,
+  l_orderkey : bigint,
+  l_partkey : bigint,
+  l_suppkey : bigint,
+  l_linenumber : bigint,
+  l_quantity : bigint,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int64,
-  o_custkey : int64,
+  o_orderkey : bigint,
+  o_custkey : bigint,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int64,
+  o_shippriority : bigint,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int64,
+  c_custkey : bigint,
   c_name : string,
   c_address : string,
-  c_nationkey : int64,
+  c_nationkey : bigint,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int64,
+  s_suppkey : bigint,
   s_name : string,
   s_address : string,
-  s_nationkey : int64,
+  s_nationkey : bigint,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int64,
+  n_nationkey : bigint,
   n_name : string,
-  n_regionkey : int64,
+  n_regionkey : bigint,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int64,
+  r_regionkey : bigint,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int64,
+  p_partkey : bigint,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int64,
+  p_size : bigint,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int64,
-  ps_suppkey : int64,
-  ps_availqty : int64,
+  ps_partkey : bigint,
+  ps_suppkey : bigint,
+  ps_availqty : bigint,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/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 e68fcc4..22b740f 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
@@ -24,12 +24,12 @@ set `import-private-functions` `true`;
 
 select element {'c_count':c_count,'custdist':custdist}
 from  (
-    select element {'c_custkey':c_custkey,'c_count':COLL_SUM((
+    select element {'c_custkey':c_custkey,'c_count':ARRAY_SUM((
             select element i.o_orderkey_count
             from  co as i
         ))}
     from  (
-        select element {'c_custkey':c.c_custkey,'o_orderkey_count':coll_count((
+        select element 
{'c_custkey':c.c_custkey,'o_orderkey_count':array_count((
                 select element o.o_orderkey
                 from  Orders as o
                 where c.c_custkey = o.o_custkey and o.o_comment not like 
'%special%requests%'

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.1.ddl.sqlpp
index 1871e19..0db8d36 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int32,
-  l_partkey : int32,
-  l_suppkey : int32,
-  l_linenumber : int32,
-  l_quantity : int32,
+  l_orderkey : integer,
+  l_partkey : integer,
+  l_suppkey : integer,
+  l_linenumber : integer,
+  l_quantity : integer,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int32,
-  o_custkey : int32,
+  o_orderkey : integer,
+  o_custkey : integer,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int32,
+  o_shippriority : integer,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int32,
+  c_custkey : integer,
   c_name : string,
   c_address : string,
-  c_nationkey : int32,
+  c_nationkey : integer,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int32,
+  s_suppkey : integer,
   s_name : string,
   s_address : string,
-  s_nationkey : int32,
+  s_nationkey : integer,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int32,
+  n_nationkey : integer,
   n_name : string,
-  n_regionkey : int32,
+  n_regionkey : integer,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int32,
+  r_regionkey : integer,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int32,
+  p_partkey : integer,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int32,
+  p_size : integer,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int32,
-  ps_suppkey : int32,
-  ps_availqty : int32,
+  ps_partkey : integer,
+  ps_suppkey : integer,
+  ps_availqty : integer,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/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 89ade9d..842cc17 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
@@ -20,10 +20,10 @@
 use tpch;
 
 
-select element (100.0 * COLL_SUM((
+select element (100.0 * ARRAY_SUM((
       select element case i.p_type like 'PROMO%' when true then 
i.l_extendedprice * (1 - i.l_discount) else 0.0 end
       from  lp as i
-  )) / COLL_SUM((
+  )) / ARRAY_SUM((
       select element (i.l_extendedprice * (1 - i.l_discount))
       from  lp as i
   )))

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q15_top_supplier/q15_top_supplier.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q15_top_supplier/q15_top_supplier.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q15_top_supplier/q15_top_supplier.1.ddl.sqlpp
index 3e3f696..6cbdf11 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q15_top_supplier/q15_top_supplier.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q15_top_supplier/q15_top_supplier.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int64,
-  l_partkey : int64,
-  l_suppkey : int64,
-  l_linenumber : int64,
-  l_quantity : int64,
+  l_orderkey : bigint,
+  l_partkey : bigint,
+  l_suppkey : bigint,
+  l_linenumber : bigint,
+  l_quantity : bigint,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int64,
-  o_custkey : int64,
+  o_orderkey : bigint,
+  o_custkey : bigint,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int64,
+  o_shippriority : bigint,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int64,
+  c_custkey : bigint,
   c_name : string,
   c_address : string,
-  c_nationkey : int64,
+  c_nationkey : bigint,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int64,
+  s_suppkey : bigint,
   s_name : string,
   s_address : string,
-  s_nationkey : int64,
+  s_nationkey : bigint,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int64,
+  n_nationkey : bigint,
   n_name : string,
-  n_regionkey : int64,
+  n_regionkey : bigint,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int64,
+  r_regionkey : bigint,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int64,
+  p_partkey : bigint,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int64,
+  p_size : bigint,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int64,
-  ps_suppkey : int64,
-  ps_availqty : int64,
+  ps_partkey : bigint,
+  ps_suppkey : bigint,
+  ps_availqty : bigint,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q15_top_supplier/q15_top_supplier.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q15_top_supplier/q15_top_supplier.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q15_top_supplier/q15_top_supplier.3.query.sqlpp
index 70b5d38..d55575e 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q15_top_supplier/q15_top_supplier.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q15_top_supplier/q15_top_supplier.3.query.sqlpp
@@ -22,7 +22,7 @@ use tpch;
 
 declare function revenue() {
 (
-    select element {'supplier_no':l_suppkey,'total_revenue':COLL_SUM((
+    select element {'supplier_no':l_suppkey,'total_revenue':ARRAY_SUM((
             select element (i.l_extendedprice * (1 - i.l_discount))
             from  l as i
         ))}
@@ -31,7 +31,7 @@ declare function revenue() {
     group by l.l_suppkey as l_suppkey
 )
 };
-with  m as COLL_MAX((
+with  m as ARRAY_MAX((
       select element r2.total_revenue
       from  tpch.revenue() as r2
   ))

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.ddl.sqlpp
index 3e3f696..6cbdf11 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int64,
-  l_partkey : int64,
-  l_suppkey : int64,
-  l_linenumber : int64,
-  l_quantity : int64,
+  l_orderkey : bigint,
+  l_partkey : bigint,
+  l_suppkey : bigint,
+  l_linenumber : bigint,
+  l_quantity : bigint,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int64,
-  o_custkey : int64,
+  o_orderkey : bigint,
+  o_custkey : bigint,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int64,
+  o_shippriority : bigint,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int64,
+  c_custkey : bigint,
   c_name : string,
   c_address : string,
-  c_nationkey : int64,
+  c_nationkey : bigint,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int64,
+  s_suppkey : bigint,
   s_name : string,
   s_address : string,
-  s_nationkey : int64,
+  s_nationkey : bigint,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int64,
+  n_nationkey : bigint,
   n_name : string,
-  n_regionkey : int64,
+  n_regionkey : bigint,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int64,
+  r_regionkey : bigint,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int64,
+  p_partkey : bigint,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int64,
+  p_size : bigint,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int64,
-  ps_suppkey : int64,
-  ps_availqty : int64,
+  ps_partkey : bigint,
+  ps_suppkey : bigint,
+  ps_availqty : bigint,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/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 0cdbcfd..279e692 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
@@ -41,7 +41,7 @@ from  (
     group by t.p_brand as p_brand1,t.p_type as p_type1,t.p_size as 
p_size1,t.ps_suppkey as ps_suppkey1
 ) as t2
 group by t2.p_brand as p_brand,t2.p_type as p_type,t2.p_size as p_size
-with  supplier_cnt as COLL_COUNT((
+with  supplier_cnt as ARRAY_COUNT((
       select element i.ps_suppkey
       from  t2 as i
   ))

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.1.ddl.sqlpp
index 3e3f696..6cbdf11 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int64,
-  l_partkey : int64,
-  l_suppkey : int64,
-  l_linenumber : int64,
-  l_quantity : int64,
+  l_orderkey : bigint,
+  l_partkey : bigint,
+  l_suppkey : bigint,
+  l_linenumber : bigint,
+  l_quantity : bigint,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int64,
-  o_custkey : int64,
+  o_orderkey : bigint,
+  o_custkey : bigint,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int64,
+  o_shippriority : bigint,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int64,
+  c_custkey : bigint,
   c_name : string,
   c_address : string,
-  c_nationkey : int64,
+  c_nationkey : bigint,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int64,
+  s_suppkey : bigint,
   s_name : string,
   s_address : string,
-  s_nationkey : int64,
+  s_nationkey : bigint,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int64,
+  n_nationkey : bigint,
   n_name : string,
-  n_regionkey : int64,
+  n_regionkey : bigint,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int64,
+  r_regionkey : bigint,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int64,
+  p_partkey : bigint,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int64,
+  p_size : bigint,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int64,
-  ps_suppkey : int64,
-  ps_availqty : int64,
+  ps_partkey : bigint,
+  ps_suppkey : bigint,
+  ps_availqty : bigint,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.3.query.sqlpp
index d39c75a..80416d7 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.3.query.sqlpp
@@ -20,34 +20,34 @@
 use tpch;
 
 
-select element 
{'t_partkey':l_partkey,'t_count':COLL_COUNT(l),'t_avg_quantity':(0.2 * 
COLL_AVG((
+select element 
{'t_partkey':l_partkey,'t_count':ARRAY_COUNT(l),'t_avg_quantity':(0.2 * 
ARRAY_AVG((
           select element i.l_quantity
           from  l as i
-      ))),'t_max_suppkey':COLL_MAX((
+      ))),'t_max_suppkey':ARRAY_MAX((
         select element i.l_suppkey
         from  l as i
-    )),'t_max_linenumber':COLL_MAX((
+    )),'t_max_linenumber':ARRAY_MAX((
         select element i.l_linenumber
         from  l as i
-    )),'t_avg_extendedprice':COLL_AVG((
+    )),'t_avg_extendedprice':ARRAY_AVG((
         select element i.l_extendedprice
         from  l as i
-    )),'t_avg_discount':COLL_AVG((
+    )),'t_avg_discount':ARRAY_AVG((
         select element i.l_discount
         from  l as i
-    )),'t_avg_tax':COLL_AVG((
+    )),'t_avg_tax':ARRAY_AVG((
         select element i.l_tax
         from  l as i
-    )),'t_max_shipdate':COLL_MAX((
+    )),'t_max_shipdate':ARRAY_MAX((
         select element i.l_shipdate
         from  l as i
-    )),'t_min_commitdate':COLL_MIN((
+    )),'t_min_commitdate':ARRAY_MIN((
         select element i.l_commitdate
         from  l as i
-    )),'t_min_receiptdate':COLL_MIN((
+    )),'t_min_receiptdate':ARRAY_MIN((
         select element i.l_receiptdate
         from  l as i
-    )),'t_max_comment':COLL_MAX((
+    )),'t_max_comment':ARRAY_MAX((
         select element i.l_comment
         from  l as i
     ))}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.1.ddl.sqlpp
index 1871e19..0db8d36 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int32,
-  l_partkey : int32,
-  l_suppkey : int32,
-  l_linenumber : int32,
-  l_quantity : int32,
+  l_orderkey : integer,
+  l_partkey : integer,
+  l_suppkey : integer,
+  l_linenumber : integer,
+  l_quantity : integer,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int32,
-  o_custkey : int32,
+  o_orderkey : integer,
+  o_custkey : integer,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int32,
+  o_shippriority : integer,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int32,
+  c_custkey : integer,
   c_name : string,
   c_address : string,
-  c_nationkey : int32,
+  c_nationkey : integer,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int32,
+  s_suppkey : integer,
   s_name : string,
   s_address : string,
-  s_nationkey : int32,
+  s_nationkey : integer,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int32,
+  n_nationkey : integer,
   n_name : string,
-  n_regionkey : int32,
+  n_regionkey : integer,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int32,
+  r_regionkey : integer,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int32,
+  p_partkey : integer,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int32,
+  p_size : integer,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int32,
-  ps_suppkey : int32,
-  ps_availqty : int32,
+  ps_partkey : integer,
+  ps_suppkey : integer,
+  ps_availqty : integer,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.3.query.sqlpp
index ddbbecc..7cce670 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.3.query.sqlpp
@@ -22,7 +22,7 @@ use tpch;
 
 declare function tmp() {
 (
-    select element {'t_partkey':l_partkey,'t_avg_quantity':(0.2 * 
tpch.coll_avg((
+    select element {'t_partkey':l_partkey,'t_avg_quantity':(0.2 * 
tpch.array_avg((
               select element i.l_quantity
               from  l as i
           )))}
@@ -31,7 +31,7 @@ declare function tmp() {
 )
 };
 
-select element (tpch.coll_sum((
+select element (tpch.array_sum((
       select element l.l_extendedprice
       from  tpch.tmp() as t,
             LineItem as l,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.1.ddl.sqlpp
index 3e3f696..6cbdf11 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int64,
-  l_partkey : int64,
-  l_suppkey : int64,
-  l_linenumber : int64,
-  l_quantity : int64,
+  l_orderkey : bigint,
+  l_partkey : bigint,
+  l_suppkey : bigint,
+  l_linenumber : bigint,
+  l_quantity : bigint,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int64,
-  o_custkey : int64,
+  o_orderkey : bigint,
+  o_custkey : bigint,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int64,
+  o_shippriority : bigint,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int64,
+  c_custkey : bigint,
   c_name : string,
   c_address : string,
-  c_nationkey : int64,
+  c_nationkey : bigint,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int64,
+  s_suppkey : bigint,
   s_name : string,
   s_address : string,
-  s_nationkey : int64,
+  s_nationkey : bigint,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int64,
+  n_nationkey : bigint,
   n_name : string,
-  n_regionkey : int64,
+  n_regionkey : bigint,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int64,
+  r_regionkey : bigint,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int64,
+  p_partkey : bigint,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int64,
+  p_size : bigint,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int64,
-  ps_suppkey : int64,
-  ps_availqty : int64,
+  ps_partkey : bigint,
+  ps_suppkey : bigint,
+  ps_availqty : bigint,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.3.query.sqlpp
index e0976a0..10ffa01 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.3.query.sqlpp
@@ -20,14 +20,14 @@
 use tpch;
 
 
-select element 
{'c_name':c_name,'c_custkey':c_custkey,'o_orderkey':o_orderkey,'o_orderdate':o_orderdate,'o_totalprice':o_totalprice,'sum_quantity':tpch.coll_sum((
+select element 
{'c_name':c_name,'c_custkey':c_custkey,'o_orderkey':o_orderkey,'o_orderdate':o_orderdate,'o_totalprice':o_totalprice,'sum_quantity':tpch.array_sum((
         select element j.l_quantity
         from  l as j
     ))}
 from  Customer as c,
       Orders as o,
       (
-    select element {'l_orderkey':l_orderkey,'t_sum_quantity':tpch.coll_sum((
+    select element {'l_orderkey':l_orderkey,'t_sum_quantity':tpch.array_sum((
             select element i.l_quantity
             from  l as i
         ))}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.1.ddl.sqlpp
index 1871e19..0db8d36 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int32,
-  l_partkey : int32,
-  l_suppkey : int32,
-  l_linenumber : int32,
-  l_quantity : int32,
+  l_orderkey : integer,
+  l_partkey : integer,
+  l_suppkey : integer,
+  l_linenumber : integer,
+  l_quantity : integer,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int32,
-  o_custkey : int32,
+  o_orderkey : integer,
+  o_custkey : integer,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int32,
+  o_shippriority : integer,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int32,
+  c_custkey : integer,
   c_name : string,
   c_address : string,
-  c_nationkey : int32,
+  c_nationkey : integer,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int32,
+  s_suppkey : integer,
   s_name : string,
   s_address : string,
-  s_nationkey : int32,
+  s_nationkey : integer,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int32,
+  n_nationkey : integer,
   n_name : string,
-  n_regionkey : int32,
+  n_regionkey : integer,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int32,
+  r_regionkey : integer,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int32,
+  p_partkey : integer,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int32,
+  p_size : integer,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int32,
-  ps_suppkey : int32,
-  ps_availqty : int32,
+  ps_partkey : integer,
+  ps_suppkey : integer,
+  ps_availqty : integer,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
index df4e276..485530d 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
@@ -22,7 +22,7 @@ use tpch;
 
 set `import-private-functions` `true`;
 
-select element COLL_SUM((
+select element ARRAY_SUM((
     select element (l.l_extendedprice * (1 - l.l_discount))
     from  LineItem as l,
           Part as p

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.1.ddl.sqlpp
index 1871e19..0db8d36 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int32,
-  l_partkey : int32,
-  l_suppkey : int32,
-  l_linenumber : int32,
-  l_quantity : int32,
+  l_orderkey : integer,
+  l_partkey : integer,
+  l_suppkey : integer,
+  l_linenumber : integer,
+  l_quantity : integer,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int32,
-  o_custkey : int32,
+  o_orderkey : integer,
+  o_custkey : integer,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int32,
+  o_shippriority : integer,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int32,
+  c_custkey : integer,
   c_name : string,
   c_address : string,
-  c_nationkey : int32,
+  c_nationkey : integer,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int32,
+  s_suppkey : integer,
   s_name : string,
   s_address : string,
-  s_nationkey : int32,
+  s_nationkey : integer,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int32,
+  n_nationkey : integer,
   n_name : string,
-  n_regionkey : int32,
+  n_regionkey : integer,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int32,
+  r_regionkey : integer,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int32,
+  p_partkey : integer,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int32,
+  p_size : integer,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int32,
-  ps_suppkey : int32,
-  ps_availqty : int32,
+  ps_partkey : integer,
+  ps_suppkey : integer,
+  ps_availqty : integer,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.3.query.sqlpp
index 2bc3b25..7b22b70 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.3.query.sqlpp
@@ -24,7 +24,7 @@ select element {'s_name':t4.s_name,'s_address':t4.s_address}
 from  (
     select distinct element {'ps_suppkey':pst1.ps_suppkey}
     from  (
-        select element 
{'l_partkey':l_partkey,'l_suppkey':l_suppkey,'sum_quantity':(0.5 * COLL_SUM((
+        select element 
{'l_partkey':l_partkey,'l_suppkey':l_suppkey,'sum_quantity':(0.5 * ARRAY_SUM((
                   select element i.l_quantity
                   from  l as i
               )))}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.ddl.sqlpp
index 3e3f696..6cbdf11 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int64,
-  l_partkey : int64,
-  l_suppkey : int64,
-  l_linenumber : int64,
-  l_quantity : int64,
+  l_orderkey : bigint,
+  l_partkey : bigint,
+  l_suppkey : bigint,
+  l_linenumber : bigint,
+  l_quantity : bigint,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int64,
-  o_custkey : int64,
+  o_orderkey : bigint,
+  o_custkey : bigint,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int64,
+  o_shippriority : bigint,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int64,
+  c_custkey : bigint,
   c_name : string,
   c_address : string,
-  c_nationkey : int64,
+  c_nationkey : bigint,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int64,
+  s_suppkey : bigint,
   s_name : string,
   s_address : string,
-  s_nationkey : int64,
+  s_nationkey : bigint,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int64,
+  n_nationkey : bigint,
   n_name : string,
-  n_regionkey : int64,
+  n_regionkey : bigint,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int64,
+  r_regionkey : bigint,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int64,
+  p_partkey : bigint,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int64,
+  p_size : bigint,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int64,
-  ps_suppkey : int64,
-  ps_availqty : int64,
+  ps_partkey : bigint,
+  ps_suppkey : bigint,
+  ps_availqty : bigint,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.query.sqlpp
index 3ccb9b8..50de6f3 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.query.sqlpp
@@ -22,10 +22,10 @@ use tpch;
 
 declare function tmp1() {
 (
-    select element {'l_orderkey':l_orderkey,'count_suppkey':coll_count((
+    select element {'l_orderkey':l_orderkey,'count_suppkey':array_count((
             select element i.l_suppkey
             from  l2 as i
-        )),'max_suppkey':tpch.coll_max((
+        )),'max_suppkey':tpch.array_max((
             select element i.l_suppkey
             from  l2 as i
         ))}
@@ -39,10 +39,10 @@ declare function tmp1() {
 };
 declare function tmp2() {
 (
-    select element {'l_orderkey':l_orderkey,'count_suppkey':coll_count((
+    select element {'l_orderkey':l_orderkey,'count_suppkey':array_count((
             select element i.l_suppkey
             from  l2 as i
-        )),'max_suppkey':tpch.coll_max((
+        )),'max_suppkey':tpch.array_max((
             select element i.l_suppkey
             from  l2 as i
         ))}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.1.ddl.sqlpp
index 1871e19..0db8d36 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.1.ddl.sqlpp
@@ -25,11 +25,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int32,
-  l_partkey : int32,
-  l_suppkey : int32,
-  l_linenumber : int32,
-  l_quantity : int32,
+  l_orderkey : integer,
+  l_partkey : integer,
+  l_suppkey : integer,
+  l_linenumber : integer,
+  l_quantity : integer,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -45,23 +45,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int32,
-  o_custkey : int32,
+  o_orderkey : integer,
+  o_custkey : integer,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int32,
+  o_shippriority : integer,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int32,
+  c_custkey : integer,
   c_name : string,
   c_address : string,
-  c_nationkey : int32,
+  c_nationkey : integer,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -70,10 +70,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int32,
+  s_suppkey : integer,
   s_name : string,
   s_address : string,
-  s_nationkey : int32,
+  s_nationkey : integer,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -81,27 +81,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int32,
+  n_nationkey : integer,
   n_name : string,
-  n_regionkey : int32,
+  n_regionkey : integer,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int32,
+  r_regionkey : integer,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int32,
+  p_partkey : integer,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int32,
+  p_size : integer,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -109,9 +109,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int32,
-  ps_suppkey : int32,
-  ps_availqty : int32,
+  ps_partkey : integer,
+  ps_suppkey : integer,
+  ps_availqty : integer,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.3.query.sqlpp
index 274adbc..a7c96db 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.3.query.sqlpp
@@ -26,12 +26,12 @@ declare function q22_customer_tmp() {
     from  Customer as c
 )
 };
-with  avg as tpch.coll_avg((
+with  avg as tpch.array_avg((
       select element c.c_acctbal
       from  Customer as c
       where (c.c_acctbal > 0.0)
   ))
-select element 
{'cntrycode':cntrycode,'numcust':COLL_COUNT(ct),'totacctbal':COLL_SUM((
+select element 
{'cntrycode':cntrycode,'numcust':ARRAY_COUNT(ct),'totacctbal':ARRAY_SUM((
         select element i.c_acctbal
         from  ct as i
     ))}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue562/query-issue562.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue562/query-issue562.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue562/query-issue562.1.ddl.sqlpp
index dc1e7e8..98ee9a2 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue562/query-issue562.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue562/query-issue562.1.ddl.sqlpp
@@ -31,11 +31,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int32,
-  l_partkey : int32,
-  l_suppkey : int32,
-  l_linenumber : int32,
-  l_quantity : int32,
+  l_orderkey : integer,
+  l_partkey : integer,
+  l_suppkey : integer,
+  l_linenumber : integer,
+  l_quantity : integer,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -51,23 +51,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int32,
-  o_custkey : int32,
+  o_orderkey : integer,
+  o_custkey : integer,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int32,
+  o_shippriority : integer,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int32,
+  c_custkey : integer,
   c_name : string,
   c_address : string,
-  c_nationkey : int32,
+  c_nationkey : integer,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -76,10 +76,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int32,
+  s_suppkey : integer,
   s_name : string,
   s_address : string,
-  s_nationkey : int32,
+  s_nationkey : integer,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -87,27 +87,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int32,
+  n_nationkey : integer,
   n_name : string,
-  n_regionkey : int32,
+  n_regionkey : integer,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int32,
+  r_regionkey : integer,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int32,
+  p_partkey : integer,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int32,
+  p_size : integer,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -115,9 +115,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int32,
-  ps_suppkey : int32,
-  ps_availqty : int32,
+  ps_partkey : integer,
+  ps_suppkey : integer,
+  ps_availqty : integer,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue562/query-issue562.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue562/query-issue562.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue562/query-issue562.3.query.sqlpp
index eaac9ce..6983fa7 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue562/query-issue562.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue562/query-issue562.3.query.sqlpp
@@ -34,18 +34,18 @@ declare function q22_customer_tmp() {
     where ((phone_substr = '13') or (phone_substr = '31') or (phone_substr = 
'23') or (phone_substr = '29') or (phone_substr = '30') or (phone_substr = 
'18') or (phone_substr = '17'))
 )
 };
-with  avg as tpch.coll_avg((
+with  avg as tpch.array_avg((
       select element c.c_acctbal
       from  Customer as c
       with  phone_substr as tpch.substring(c.c_phone,1,2)
       where ((c.c_acctbal > 0.0) and ((phone_substr = '13') or (phone_substr = 
'31') or (phone_substr = '23') or (phone_substr = '29') or (phone_substr = 
'30') or (phone_substr = '18') or (phone_substr = '17')))
   ))
-select element 
{'cntrycode':cntrycode,'numcust':tpch.count(ct),'totacctbal':tpch.coll_sum((
+select element 
{'cntrycode':cntrycode,'numcust':tpch.count(ct),'totacctbal':tpch.array_sum((
         select element i.c_acctbal
         from  ct as i
     ))}
 from  tpch.q22_customer_tmp() as ct
-where (coll_count((
+where (array_count((
     select element o
     from  Orders as o
     where (ct.c_custkey = o.o_custkey)

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue601/query-issue601.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue601/query-issue601.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue601/query-issue601.1.ddl.sqlpp
index 09db56b..b4d7fb4 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue601/query-issue601.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue601/query-issue601.1.ddl.sqlpp
@@ -31,10 +31,10 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int64,
-  l_partkey : int64,
-  l_suppkey : int64,
-  l_linenumber : int64,
+  l_orderkey : bigint,
+  l_partkey : bigint,
+  l_suppkey : bigint,
+  l_linenumber : bigint,
   l_quantity : double,
   l_extendedprice : double,
   l_discount : double,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue638/query-issue638.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue638/query-issue638.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue638/query-issue638.1.ddl.sqlpp
index 88957d2..84121b9 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue638/query-issue638.1.ddl.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue638/query-issue638.1.ddl.sqlpp
@@ -31,11 +31,11 @@ use tpch;
 
 create type tpch.LineItemType as
  closed {
-  l_orderkey : int32,
-  l_partkey : int32,
-  l_suppkey : int32,
-  l_linenumber : int32,
-  l_quantity : int32,
+  l_orderkey : integer,
+  l_partkey : integer,
+  l_suppkey : integer,
+  l_linenumber : integer,
+  l_quantity : integer,
   l_extendedprice : double,
   l_discount : double,
   l_tax : double,
@@ -51,23 +51,23 @@ create type tpch.LineItemType as
 
 create type tpch.OrderType as
  closed {
-  o_orderkey : int32,
-  o_custkey : int32,
+  o_orderkey : integer,
+  o_custkey : integer,
   o_orderstatus : string,
   o_totalprice : double,
   o_orderdate : string,
   o_orderpriority : string,
   o_clerk : string,
-  o_shippriority : int32,
+  o_shippriority : integer,
   o_comment : string
 }
 
 create type tpch.CustomerType as
  closed {
-  c_custkey : int32,
+  c_custkey : integer,
   c_name : string,
   c_address : string,
-  c_nationkey : int32,
+  c_nationkey : integer,
   c_phone : string,
   c_acctbal : double,
   c_mktsegment : string,
@@ -76,10 +76,10 @@ create type tpch.CustomerType as
 
 create type tpch.SupplierType as
  closed {
-  s_suppkey : int32,
+  s_suppkey : integer,
   s_name : string,
   s_address : string,
-  s_nationkey : int32,
+  s_nationkey : integer,
   s_phone : string,
   s_acctbal : double,
   s_comment : string
@@ -87,27 +87,27 @@ create type tpch.SupplierType as
 
 create type tpch.NationType as
  closed {
-  n_nationkey : int32,
+  n_nationkey : integer,
   n_name : string,
-  n_regionkey : int32,
+  n_regionkey : integer,
   n_comment : string
 }
 
 create type tpch.RegionType as
  closed {
-  r_regionkey : int32,
+  r_regionkey : integer,
   r_name : string,
   r_comment : string
 }
 
 create type tpch.PartType as
  closed {
-  p_partkey : int32,
+  p_partkey : integer,
   p_name : string,
   p_mfgr : string,
   p_brand : string,
   p_type : string,
-  p_size : int32,
+  p_size : integer,
   p_container : string,
   p_retailprice : double,
   p_comment : string
@@ -115,9 +115,9 @@ create type tpch.PartType as
 
 create type tpch.PartSuppType as
  closed {
-  ps_partkey : int32,
-  ps_suppkey : int32,
-  ps_availqty : int32,
+  ps_partkey : integer,
+  ps_suppkey : integer,
+  ps_availqty : integer,
   ps_supplycost : double,
   ps_comment : string
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b063f06/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue638/query-issue638.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue638/query-issue638.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue638/query-issue638.3.query.sqlpp
index 6da0192..90e699a 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue638/query-issue638.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/query-issue638/query-issue638.3.query.sqlpp
@@ -26,7 +26,7 @@
 use tpch;
 
 
-select element {'nation':nation,'o_year':o_year,'sum_profit':tpch.coll_sum((
+select element {'nation':nation,'o_year':o_year,'sum_profit':tpch.array_sum((
         select element pr.amount
         from  profit as pr
     ))}

Reply via email to