[ASTERIXDB-2459][FUN] Add skewness and kurtosis aggregate function
- user model changes: yes
- storage format changes: no
- interface changes: no
Details:
1. Add skewness and kurtosis function and test cases
2. Add skewness and kurtosis distinct functions
3. Add documentation for skewness and kurtosis
4. Cleaned up some files related to the stddev and var tests cases
5. Change stddev() to stddev_samp() and var() to var_samp()
Change-Id: Iae0d7fc9d5ab3676b23b27ad62a730598221d8a5
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3037
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/aggregate/serial-agg.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/aggregate/serial-agg.sqlpp
index 016921d..425902c 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/aggregate/serial-agg.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/aggregate/serial-agg.sqlpp
@@ -32,7 +32,7 @@
create dataset Test(TestType) primary key id;
-select gid, stddev(t.val) as stddev
+select gid, stddev_samp(t.val) as stddev
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_null/agg_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_null/agg_null.3.query.sqlpp
index bb5957a..7fb3c5c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_null/agg_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_null/agg_null.3.query.sqlpp
@@ -22,4 +22,4 @@
* Date : Feb 7th 2014
*/
-{'sql-count1':array_count([null]),'average1':array_avg([null]),'sql-sum1':array_sum([null]),'sql-min1':array_min([null]),'sql-max1':array_max([null]),'sql-stddev1':array_stddev([null]),'sql-stddev_pop1':array_stddev_pop([null]),'sql-var1':array_var([null]),'sql-var_pop1':array_var_pop([null]),'sql-count2':array_count({{null,null}}),'average2':array_avg({{null,null}}),'sql-sum2':array_sum({{null,null}}),'sql-min2':array_min({{null,null}}),'sql-max2':array_max({{null,null}}),'sql-stddev2':array_stddev({{null,null}}),'sql-stddev_pop2':array_stddev_pop({{null,null}}),'sql-var2':array_var({{null,null}}),'sql-var_pop2':array_var_pop({{null,null}})};
+{'sql-count1':array_count([null]),'average1':array_avg([null]),'sql-sum1':array_sum([null]),'sql-min1':array_min([null]),'sql-max1':array_max([null]),'sql-stddev_samp1':array_stddev_samp([null]),'sql-stddev_pop1':array_stddev_pop([null]),'sql-var_samp1':array_var_samp([null]),'sql-var_pop1':array_var_pop([null]),'sql-skewness1':array_skewness([null]),'sql-kurtosis1':array_kurtosis([null]),'sql-count2':array_count({{null,null}}),'average2':array_avg({{null,null}}),'sql-sum2':array_sum({{null,null}}),'sql-min2':array_min({{null,null}}),'sql-max2':array_max({{null,null}}),'sql-stddev_samp2':array_stddev_samp({{null,null}}),'sql-stddev_pop2':array_stddev_pop({{null,null}}),'sql-var_samp2':array_var_samp({{null,null}}),'sql-var_pop2':array_var_pop({{null,null}}),'sql-skewness2':array_skewness({{null,null}}),'sql-kurtosis2':array_kurtosis({{null,null}})};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_null_rec/agg_null_rec.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_null_rec/agg_null_rec.3.query.sqlpp
index 126209d..da1619a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_null_rec/agg_null_rec.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_null_rec/agg_null_rec.3.query.sqlpp
@@ -40,16 +40,22 @@
)),'sql-max':test.array_max((
select element t.valplus
from Test as t
-)),'sql-stddev':test.array_stddev((
+)),'sql-stddev_samp':test.array_stddev_samp((
select element t.valplus
from Test as t
)),'sql-stddev_pop':test.array_stddev_pop((
select element t.valplus
from Test as t
-)),'sql-var':test.array_var((
+)),'sql-var_samp':test.array_var_samp((
select element t.valplus
from Test as t
)),'sql-var_pop':test.array_var_pop((
select element t.valplus
from Test as t
+)),'sql-skewness':test.array_skewness((
+ select element t.valplus
+ from Test as t
+)),'sql-kurtosis':test.array_kurtosis((
+ select element t.valplus
+ from Test as t
))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_null_rec_1/agg_null_rec_1.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_null_rec_1/agg_null_rec_1.3.query.sqlpp
index 47df03f..8101238 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_null_rec_1/agg_null_rec_1.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_null_rec_1/agg_null_rec_1.3.query.sqlpp
@@ -52,7 +52,7 @@
select element t
from Test as t
) as i
-)),'sql-stddev':test.array_stddev((
+)),'sql-stddev_samp':test.array_stddev_samp((
select element i.valplus
from (
select element t
@@ -64,7 +64,7 @@
select element t
from Test as t
) as i
-)),'sql-var':test.array_var((
+)),'sql-var_samp':test.array_var_samp((
select element i.valplus
from (
select element t
@@ -76,4 +76,16 @@
select element t
from Test as t
) as i
+)),'sql-skewness':test.array_skewness((
+ select element i.valplus
+ from (
+ select element t
+ from Test as t
+ ) as i
+)),'sql-kurtosis':test.array_kurtosis((
+ select element i.valplus
+ from (
+ select element t
+ from Test as t
+ ) as i
))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_number/agg_number.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_number/agg_number.3.query.sqlpp
index 775e103..2393614 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_number/agg_number.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_number/agg_number.3.query.sqlpp
@@ -22,4 +22,4 @@
* Date : Feb 7th 2014
*/
-{'sql-count1':array_count([float('2.0'),double('3.0'),93847382783847382,1]),'average1':array_avg([float('2.0'),double('3.0'),93847382783847382,1]),'sql-sum1':array_sum([float('2.0'),double('3.0'),93847382783847382,1]),'sql-min1':array_min([float('2.0'),double('3.0'),93847382783847382,1]),'sql-max1':array_max([float('2.0'),double('3.0'),93847382783847382,1]),'sql-stddev1':array_stddev([float('2.0'),double('3.0'),93847382783847382,1]),'sql-stddev_pop1':array_stddev_pop([float('2.0'),double('3.0'),93847382783847382,1]),'sql-var1':array_var([float('2.0'),double('3.0'),93847382783847382,1]),'sql-var_pop1':array_var_pop([float('2.0'),double('3.0'),93847382783847382,1]),'sql-count2':array_count({{float('2.0'),double('3.0'),93847382783847382,1}}),'average2':array_avg({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-sum2':array_sum({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-min2':array_min({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-max2':array_max({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-stddev2':array_stddev({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-stddev_pop2':array_stddev_pop({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-var2':array_var({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-var_pop2':array_var_pop({{float('2.0'),double('3.0'),93847382783847382,1}})};
+{'sql-count1':array_count([float('2.0'),double('3.0'),93847382783847382,1]),'average1':array_avg([float('2.0'),double('3.0'),93847382783847382,1]),'sql-sum1':array_sum([float('2.0'),double('3.0'),93847382783847382,1]),'sql-min1':array_min([float('2.0'),double('3.0'),93847382783847382,1]),'sql-max1':array_max([float('2.0'),double('3.0'),93847382783847382,1]),'sql-stddev_samp1':array_stddev_samp([float('2.0'),double('3.0'),93847382783847382,1]),'sql-stddev_pop1':array_stddev_pop([float('2.0'),double('3.0'),93847382783847382,1]),'sql-var_samp1':array_var_samp([float('2.0'),double('3.0'),93847382783847382,1]),'sql-var_pop1':array_var_pop([float('2.0'),double('3.0'),93847382783847382,1]),'sql-skewness1':array_skewness([float('2.0'),double('3.0'),93847382783847382,1]),'sql-kurtosis1':array_kurtosis([float('2.0'),double('3.0'),93847382783847382,1]),'sql-count2':array_count({{float('2.0'),double('3.0'),93847382783847382,1}}),'average2':array_avg({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-sum2':array_sum({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-min2':array_min({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-max2':array_max({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-stddev_samp2':array_stddev_samp({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-stddev_pop2':array_stddev_pop({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-var_samp2':array_var_samp({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-var_pop2':array_var_pop({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-skewness2':array_skewness({{float('2.0'),double('3.0'),93847382783847382,1}}),'sql-kurtosis2':array_kurtosis({{float('2.0'),double('3.0'),93847382783847382,1}})};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_number_rec/agg_number_rec.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_number_rec/agg_number_rec.3.query.sqlpp
index d08777d..c437925 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_number_rec/agg_number_rec.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/agg_number_rec/agg_number_rec.3.query.sqlpp
@@ -40,16 +40,22 @@
)),'sql-max':test.array_max((
select element t.valplus
from Test as t
-)),'sql-stddev':test.array_stddev((
+)),'sql-stddev_samp':test.array_stddev_samp((
select element t.valplus
from Test as t
)),'sql-stddev_pop':test.array_stddev_pop((
select element t.valplus
from Test as t
-)),'sql-var':test.array_var((
+)),'sql-var_samp':test.array_var_samp((
select element t.valplus
from Test as t
)),'sql-var_pop':test.array_var_pop((
select element t.valplus
from Test as t
+)),'sql-skewness':test.array_skewness((
+ select element t.valplus
+ from Test as t
+)),'sql-kurtosis':test.array_kurtosis((
+ select element t.valplus
+ from Test as t
))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_distinct/kurtosis_distinct.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_distinct/kurtosis_distinct.1.query.sqlpp
new file mode 100644
index 0000000..a7596a8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_distinct/kurtosis_distinct.1.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+ {
+ 't1': to_bigint(array_kurtosis(distinct [10,20,30,10,20,30,10])),
+ 't2': to_bigint(array_kurtosis(distinct [null,missing,null,missing])),
+ 't3': to_bigint(array_kurtosis(distinct [40,null,missing,50,40,null,missing,50,40])),
+ 't4': to_bigint(array_kurtosis(distinct []))
+ }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_double/kurtosis_double.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_double/kurtosis_double.1.ddl.sqlpp
new file mode 100644
index 0000000..ad97753
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_double/kurtosis_double.1.ddl.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_double/kurtosis_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_double/kurtosis_double.3.query.sqlpp
new file mode 100644
index 0000000..4dc057f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_double/kurtosis_double.3.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+select element array_kurtosis((
+ select element x
+ from [1.0,2.0,double('3.0')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_double_null/kurtosis_double_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_double_null/kurtosis_double_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_double_null/kurtosis_double_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_double_null/kurtosis_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_double_null/kurtosis_double_null.3.query.sqlpp
new file mode 100644
index 0000000..fdfbff6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_double_null/kurtosis_double_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'kurtosis':test.array_kurtosis((
+ select element x.doubleField
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.1.ddl.sqlpp
new file mode 100644
index 0000000..fc97cef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.1.ddl.sqlpp
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that kurtosis aggregation correctly returns null for an empty stream,
+ * without an aggregate combiner.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.3.query.sqlpp
new file mode 100644
index 0000000..6b1ed5f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.3.query.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that array_kurtosis aggregation correctly returns null for an empty stream,
+ * without an aggregate combiner.
+ * Success : Yes
+ */
+
+use test;
+
+
+select element test.array_kurtosis((
+ select element x
+ from [1,2,3] as x
+ where (x > 10)
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.1.ddl.sqlpp
new file mode 100644
index 0000000..5f64188
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that kurtosis aggregation correctly returns null for an empty stream,
+ * with an aggregate combiner.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+ closed {
+ id : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.3.query.sqlpp
new file mode 100644
index 0000000..b9958ba
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.3.query.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that array_kurtosis aggregation correctly returns null for an empty stream,
+ * with an aggregate combiner.
+ * Success : Yes
+ */
+
+use test;
+
+
+select element test.array_kurtosis((
+ select element x.val
+ from Test as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_float/kurtosis_float.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_float/kurtosis_float.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_float/kurtosis_float.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_float/kurtosis_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_float/kurtosis_float.3.query.sqlpp
new file mode 100644
index 0000000..b288552
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_float/kurtosis_float.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.array_kurtosis((
+ select element x
+ from [test.float('1'),test.float('2'),test.float('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_float_null/kurtosis_float_null.1.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_float_null/kurtosis_float_null.1.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_float_null/kurtosis_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_float_null/kurtosis_float_null.3.query.sqlpp
new file mode 100644
index 0000000..b21cd00
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_float_null/kurtosis_float_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'kurtosis':test.array_kurtosis((
+ select element x.floatField
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int16/kurtosis_int16.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int16/kurtosis_int16.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int16/kurtosis_int16.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int16/kurtosis_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int16/kurtosis_int16.3.query.sqlpp
new file mode 100644
index 0000000..282ca8d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int16/kurtosis_int16.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.array_kurtosis((
+ select element x
+ from [test.smallint('1'),test.smallint('2'),test.smallint('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.1.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.1.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.3.query.sqlpp
new file mode 100644
index 0000000..b06c343
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'kurtosis':test.array_kurtosis((
+ select element x.int16Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int32/kurtosis_int32.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int32/kurtosis_int32.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int32/kurtosis_int32.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int32/kurtosis_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int32/kurtosis_int32.3.query.sqlpp
new file mode 100644
index 0000000..06bcc07
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int32/kurtosis_int32.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.array_kurtosis((
+ select element x
+ from [test.integer('1'),test.integer('2'),test.integer('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.1.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.1.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.3.query.sqlpp
new file mode 100644
index 0000000..45be3e1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'kurtosis':test.array_kurtosis((
+ select element x.int32Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int64/kurtosis_int64.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int64/kurtosis_int64.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int64/kurtosis_int64.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int64/kurtosis_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int64/kurtosis_int64.3.query.sqlpp
new file mode 100644
index 0000000..6d26557
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int64/kurtosis_int64.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.array_kurtosis((
+ select element x
+ from [test.bigint('1'),test.bigint('2'),test.bigint('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.1.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.1.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.3.query.sqlpp
new file mode 100644
index 0000000..6ddb9dc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'kurtosis':test.array_kurtosis((
+ select element x.int64Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int8/kurtosis_int8.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int8/kurtosis_int8.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int8/kurtosis_int8.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int8/kurtosis_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int8/kurtosis_int8.3.query.sqlpp
new file mode 100644
index 0000000..6e9e1f7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int8/kurtosis_int8.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.array_kurtosis((
+ select element x
+ from [test.tinyint('1'),test.tinyint('2'),test.tinyint('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.1.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.1.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.3.query.sqlpp
new file mode 100644
index 0000000..7ddd8dc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'kurtosis':test.array_kurtosis((
+ select element x.int8Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_mixed/kurtosis_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_mixed/kurtosis_mixed.3.query.sqlpp
new file mode 100644
index 0000000..638fb06
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/kurtosis_mixed/kurtosis_mixed.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.
+ */
+/*
+* Description : Run array_kurtosis over an multiset with mixed types
+* Expected Res : Failure
+* Date : Feb 7th 2014
+*/
+
+select element array_kurtosis((
+ select element x
+ from [float('2.0'),'hello world',93847382783847382,date('2013-01-01')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis/scalar_kurtosis.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis/scalar_kurtosis.1.ddl.sqlpp
new file mode 100644
index 0000000..37a6cc0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis/scalar_kurtosis.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of kurtosis without nulls.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis/scalar_kurtosis.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis/scalar_kurtosis.3.query.sqlpp
new file mode 100644
index 0000000..a7de548
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis/scalar_kurtosis.3.query.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of array_kurtosis without nulls.
+ * Success : Yes
+ */
+
+use test;
+
+
+with i8 as test.array_kurtosis([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
+ i16 as test.array_kurtosis([test.smallint('1'),test.smallint('2'),test.smallint('3')]),
+ i32 as test.array_kurtosis([test.integer('1'),test.integer('2'),test.integer('3')]),
+ i64 as test.array_kurtosis([test.bigint('1'),test.bigint('2'),test.bigint('3')]),
+ f as test.array_kurtosis([test.float('1'),test.float('2'),test.float('3')]),
+ d as test.array_kurtosis([test.double('1'),test.double('2'),test.double('3')])
+select element i
+from [i8,i16,i32,i64,f,d] as i
+;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.1.ddl.sqlpp
new file mode 100644
index 0000000..090d927
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of kurtosis with an empty list.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.3.query.sqlpp
new file mode 100644
index 0000000..1e97b5c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of array_kurtosis with an empty list.
+ * Success : Yes
+ */
+
+select element array_kurtosis([]);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.1.ddl.sqlpp
new file mode 100644
index 0000000..b7b457f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of kurtosis with nulls.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.3.query.sqlpp
new file mode 100644
index 0000000..6433170
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.3.query.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of array_kurtosis with nulls.
+ * Success : Yes
+ */
+
+use test;
+
+
+with i8 as test.array_kurtosis([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
+ i16 as test.array_kurtosis([test.smallint('1'),test.smallint('2'),test.smallint('3'),null]),
+ i32 as test.array_kurtosis([test.integer('1'),test.integer('2'),test.integer('3'),null]),
+ i64 as test.array_kurtosis([test.bigint('1'),test.bigint('2'),test.bigint('3'),null]),
+ f as test.array_kurtosis([test.float('1'),test.float('2'),test.float('3'),null]),
+ d as test.array_kurtosis([test.double('1'),test.double('2'),test.double('3'),null])
+select element i
+from [i8,i16,i32,i64,f,d] as i
+;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness/scalar_skewness.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness/scalar_skewness.1.ddl.sqlpp
new file mode 100644
index 0000000..cdc53b6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness/scalar_skewness.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of skewness without nulls.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness/scalar_skewness.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness/scalar_skewness.3.query.sqlpp
new file mode 100644
index 0000000..c5b0553
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness/scalar_skewness.3.query.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of array_skewness without nulls.
+ * Success : Yes
+ */
+
+use test;
+
+
+with i8 as test.array_skewness([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
+ i16 as test.array_skewness([test.smallint('1'),test.smallint('2'),test.smallint('3')]),
+ i32 as test.array_skewness([test.integer('1'),test.integer('2'),test.integer('3')]),
+ i64 as test.array_skewness([test.bigint('1'),test.bigint('2'),test.bigint('3')]),
+ f as test.array_skewness([test.float('1'),test.float('2'),test.float('3')]),
+ d as test.array_skewness([test.double('1'),test.double('2'),test.double('3')])
+select element i
+from [i8,i16,i32,i64,f,d] as i
+;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.1.ddl.sqlpp
new file mode 100644
index 0000000..94f1e08
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of skewness with an empty list.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.3.query.sqlpp
new file mode 100644
index 0000000..6620458
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of array_skewness with an empty list.
+ * Success : Yes
+ */
+
+select element array_skewness([]);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness_null/scalar_skewness_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness_null/scalar_skewness_null.1.ddl.sqlpp
new file mode 100644
index 0000000..f6d0e40
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness_null/scalar_skewness_null.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of skewness with nulls.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness_null/scalar_skewness_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness_null/scalar_skewness_null.3.query.sqlpp
new file mode 100644
index 0000000..0ad361d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_skewness_null/scalar_skewness_null.3.query.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of array_skewness with nulls.
+ * Success : Yes
+ */
+
+use test;
+
+
+with i8 as test.array_skewness([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
+ i16 as test.array_skewness([test.smallint('1'),test.smallint('2'),test.smallint('3'),null]),
+ i32 as test.array_skewness([test.integer('1'),test.integer('2'),test.integer('3'),null]),
+ i64 as test.array_skewness([test.bigint('1'),test.bigint('2'),test.bigint('3'),null]),
+ f as test.array_skewness([test.float('1'),test.float('2'),test.float('3'),null]),
+ d as test.array_skewness([test.double('1'),test.double('2'),test.double('3'),null])
+select element i
+from [i8,i16,i32,i64,f,d] as i
+;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev/scalar_stddev.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev/scalar_stddev.1.ddl.sqlpp
index 7049419..a49af36 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev/scalar_stddev.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev/scalar_stddev.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of stddev and stddev_pop without nulls.
+ * Description : Tests the scalar version of stddev_samp and stddev_pop without nulls.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev/scalar_stddev.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev/scalar_stddev.3.query.sqlpp
index 061da60..ac3cda1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev/scalar_stddev.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev/scalar_stddev.3.query.sqlpp
@@ -17,18 +17,18 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of stddev and stddev_pop without nulls.
+ * Description : Tests the scalar version of stddev_samp and stddev_pop without nulls.
* Success : Yes
*/
use test;
-{'stddev': (with i8 as test.array_stddev([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
- i16 as test.array_stddev([test.smallint('1'),test.smallint('2'),test.smallint('3')]),
- i32 as test.array_stddev([test.integer('1'),test.integer('2'),test.integer('3')]),
- i64 as test.array_stddev([test.bigint('1'),test.bigint('2'),test.bigint('3')]),
- f as test.array_stddev([test.float('1'),test.float('2'),test.float('3')]),
- d as test.array_stddev([test.double('1'),test.double('2'),test.double('3')])
+{'stddev_samp': (with i8 as test.array_stddev_samp([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
+ i16 as test.array_stddev_samp([test.smallint('1'),test.smallint('2'),test.smallint('3')]),
+ i32 as test.array_stddev_samp([test.integer('1'),test.integer('2'),test.integer('3')]),
+ i64 as test.array_stddev_samp([test.bigint('1'),test.bigint('2'),test.bigint('3')]),
+ f as test.array_stddev_samp([test.float('1'),test.float('2'),test.float('3')]),
+ d as test.array_stddev_samp([test.double('1'),test.double('2'),test.double('3')])
select element i
from [i8,i16,i32,i64,f,d] as i),
'stddev_pop': (with i8 as test.array_stddev_pop([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.1.ddl.sqlpp
index 63c85db..d89031c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of stddev and stddev_pop with an empty list.
+ * Description : Tests the scalar version of stddev_samp and stddev_pop with an empty list.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.3.query.sqlpp
index f29f59a..8c01f97 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.3.query.sqlpp
@@ -17,9 +17,9 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of stddev and stddev_pop with an empty list.
+ * Description : Tests the scalar version of stddev_samp and stddev_pop with an empty list.
* Success : Yes
*/
-{'stddev': (select element array_stddev([])),
+{'stddev_samp': (select element array_stddev_samp([])),
'stddev_pop': (select element array_stddev_pop([]))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_null/scalar_stddev_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_null/scalar_stddev_null.1.ddl.sqlpp
index 487d166..7df9f06 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_null/scalar_stddev_null.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_null/scalar_stddev_null.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of stddev and stddev_pop with nulls.
+ * Description : Tests the scalar version of stddev_samp and stddev_pop with nulls.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_null/scalar_stddev_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_null/scalar_stddev_null.3.query.sqlpp
index 8a2db99..bdc7fed 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_null/scalar_stddev_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_stddev_null/scalar_stddev_null.3.query.sqlpp
@@ -17,18 +17,18 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of stddev and stddev_pop with nulls.
+ * Description : Tests the scalar version of stddev_samp and stddev_pop with nulls.
* Success : Yes
*/
use test;
-{'stddev': (with i8 as test.array_stddev([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
- i16 as test.array_stddev([test.smallint('1'),test.smallint('2'),test.smallint('3'),null]),
- i32 as test.array_stddev([test.integer('1'),test.integer('2'),test.integer('3'),null]),
- i64 as test.array_stddev([test.bigint('1'),test.bigint('2'),test.bigint('3'),null]),
- f as test.array_stddev([test.float('1'),test.float('2'),test.float('3'),null]),
- d as test.array_stddev([test.double('1'),test.double('2'),test.double('3'),null])
+{'stddev_samp': (with i8 as test.array_stddev_samp([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
+ i16 as test.array_stddev_samp([test.smallint('1'),test.smallint('2'),test.smallint('3'),null]),
+ i32 as test.array_stddev_samp([test.integer('1'),test.integer('2'),test.integer('3'),null]),
+ i64 as test.array_stddev_samp([test.bigint('1'),test.bigint('2'),test.bigint('3'),null]),
+ f as test.array_stddev_samp([test.float('1'),test.float('2'),test.float('3'),null]),
+ d as test.array_stddev_samp([test.double('1'),test.double('2'),test.double('3'),null])
select element i
from [i8,i16,i32,i64,f,d] as i),
'stddev_pop': (with i8 as test.array_stddev_pop([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var/scalar_var.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var/scalar_var.1.ddl.sqlpp
index 3a3a45c..3c18f75 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var/scalar_var.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var/scalar_var.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of var and var_pop without nulls.
+ * Description : Tests the scalar version of var_samp and var_pop without nulls.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var/scalar_var.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var/scalar_var.3.query.sqlpp
index 25e0906..8820b13 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var/scalar_var.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var/scalar_var.3.query.sqlpp
@@ -17,18 +17,18 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of var and var_pop without nulls.
+ * Description : Tests the scalar version of var_samp and var_pop without nulls.
* Success : Yes
*/
use test;
-{'var': (with i8 as test.array_var([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
- i16 as test.array_var([test.smallint('1'),test.smallint('2'),test.smallint('3')]),
- i32 as test.array_var([test.integer('1'),test.integer('2'),test.integer('3')]),
- i64 as test.array_var([test.bigint('1'),test.bigint('2'),test.bigint('3')]),
- f as test.array_var([test.float('1'),test.float('2'),test.float('3')]),
- d as test.array_var([test.double('1'),test.double('2'),test.double('3')])
+{'var_samp': (with i8 as test.array_var_samp([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
+ i16 as test.array_var_samp([test.smallint('1'),test.smallint('2'),test.smallint('3')]),
+ i32 as test.array_var_samp([test.integer('1'),test.integer('2'),test.integer('3')]),
+ i64 as test.array_var_samp([test.bigint('1'),test.bigint('2'),test.bigint('3')]),
+ f as test.array_var_samp([test.float('1'),test.float('2'),test.float('3')]),
+ d as test.array_var_samp([test.double('1'),test.double('2'),test.double('3')])
select element i
from [i8,i16,i32,i64,f,d] as i),
'var_pop': (with i8 as test.array_var_pop([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_empty/scalar_var_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_empty/scalar_var_empty.1.ddl.sqlpp
index aceb0a1..6b21d18 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_empty/scalar_var_empty.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_empty/scalar_var_empty.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of var and var_pop with an empty list.
+ * Description : Tests the scalar version of var_samp and var_pop with an empty list.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_empty/scalar_var_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_empty/scalar_var_empty.3.query.sqlpp
index a9534b7..12f4afd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_empty/scalar_var_empty.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_empty/scalar_var_empty.3.query.sqlpp
@@ -17,9 +17,9 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of var and var_pop with an empty list.
+ * Description : Tests the scalar version of var_samp and var_pop with an empty list.
* Success : Yes
*/
-{'var': (select element array_var([])),
+{'var_samp': (select element array_var_samp([])),
'var_pop': (select element array_var_pop([]))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_null/scalar_var_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_null/scalar_var_null.1.ddl.sqlpp
index 4e53c2f..9571767 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_null/scalar_var_null.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_null/scalar_var_null.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of var and var_pop with nulls.
+ * Description : Tests the scalar version of var_samp and var_pop with nulls.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_null/scalar_var_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_null/scalar_var_null.3.query.sqlpp
index 6ed05fa..073976b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_null/scalar_var_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/scalar_var_null/scalar_var_null.3.query.sqlpp
@@ -17,18 +17,18 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of var and var_pop with nulls.
+ * Description : Tests the scalar version of var_samp and var_pop with nulls.
* Success : Yes
*/
use test;
-{'var': (with i8 as test.array_var([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
- i16 as test.array_var([test.smallint('1'),test.smallint('2'),test.smallint('3'),null]),
- i32 as test.array_var([test.integer('1'),test.integer('2'),test.integer('3'),null]),
- i64 as test.array_var([test.bigint('1'),test.bigint('2'),test.bigint('3'),null]),
- f as test.array_var([test.float('1'),test.float('2'),test.float('3'),null]),
- d as test.array_var([test.double('1'),test.double('2'),test.double('3'),null])
+{'var_samp': (with i8 as test.array_var_samp([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
+ i16 as test.array_var_samp([test.smallint('1'),test.smallint('2'),test.smallint('3'),null]),
+ i32 as test.array_var_samp([test.integer('1'),test.integer('2'),test.integer('3'),null]),
+ i64 as test.array_var_samp([test.bigint('1'),test.bigint('2'),test.bigint('3'),null]),
+ f as test.array_var_samp([test.float('1'),test.float('2'),test.float('3'),null]),
+ d as test.array_var_samp([test.double('1'),test.double('2'),test.double('3'),null])
select element i
from [i8,i16,i32,i64,f,d] as i),
'var_pop': (with i8 as test.array_var_pop([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.2.update.sqlpp
new file mode 100644
index 0000000..88d820c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':double(4.32),'valplus':double(473847.0)};
+insert into Test
+select element {'id':1,'gid':1,'val':double(5.32)};
+insert into Test
+select element {'id':2,'gid':1,'val':double(6.32),'valplus':double(38473827484738239.0)};
+insert into Test
+select element {'id':3,'gid':1,'val':double(4.32),'valplus':double(678900.0)};
+insert into Test
+select element {'id':4,'gid':1,'val':double(4.32),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.3.query.sqlpp
new file mode 100644
index 0000000..d17e926
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.val) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.2.update.sqlpp
new file mode 100644
index 0000000..88d820c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':double(4.32),'valplus':double(473847.0)};
+insert into Test
+select element {'id':1,'gid':1,'val':double(5.32)};
+insert into Test
+select element {'id':2,'gid':1,'val':double(6.32),'valplus':double(38473827484738239.0)};
+insert into Test
+select element {'id':3,'gid':1,'val':double(4.32),'valplus':double(678900.0)};
+insert into Test
+select element {'id':4,'gid':1,'val':double(4.32),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.3.query.sqlpp
new file mode 100644
index 0000000..299efc7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.valplus) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.3.query.sqlpp
new file mode 100644
index 0000000..d17e926
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.val) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.1.ddl.sqlpp
new file mode 100644
index 0000000..ddac6a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : float
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.2.update.sqlpp
new file mode 100644
index 0000000..40641b5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':float('4.32'),'valplus':float('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':float('5.32')};
+insert into Test
+select element {'id':2,'gid':1,'val':float('6.32'),'valplus':float('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':float('4.32'),'valplus':float('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':float('4.32'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.3.query.sqlpp
new file mode 100644
index 0000000..d17e926
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.val) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.1.ddl.sqlpp
new file mode 100644
index 0000000..ddac6a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : float
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.2.update.sqlpp
new file mode 100644
index 0000000..40641b5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':float('4.32'),'valplus':float('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':float('5.32')};
+insert into Test
+select element {'id':2,'gid':1,'val':float('6.32'),'valplus':float('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':float('4.32'),'valplus':float('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':float('4.32'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.3.query.sqlpp
new file mode 100644
index 0000000..299efc7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.valplus) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.1.ddl.sqlpp
new file mode 100644
index 0000000..0c0bfee
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : smallint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.2.update.sqlpp
new file mode 100644
index 0000000..6210af4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':smallint('4'),'valplus':smallint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':smallint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':smallint('6'),'valplus':smallint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':smallint('4'),'valplus':smallint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':smallint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.3.query.sqlpp
new file mode 100644
index 0000000..d17e926
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.val) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.ddl.sqlpp
new file mode 100644
index 0000000..0c0bfee
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : smallint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.2.update.sqlpp
new file mode 100644
index 0000000..6210af4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':smallint('4'),'valplus':smallint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':smallint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':smallint('6'),'valplus':smallint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':smallint('4'),'valplus':smallint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':smallint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.3.query.sqlpp
new file mode 100644
index 0000000..299efc7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.valplus) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.1.ddl.sqlpp
new file mode 100644
index 0000000..07312bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : integer
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.2.update.sqlpp
new file mode 100644
index 0000000..a248a0f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':integer('4'),'valplus':integer('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':integer('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':integer('6'),'valplus':integer('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':integer('4'),'valplus':integer('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':integer('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.3.query.sqlpp
new file mode 100644
index 0000000..d17e926
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.val) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.ddl.sqlpp
new file mode 100644
index 0000000..07312bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : integer
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.2.update.sqlpp
new file mode 100644
index 0000000..a248a0f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':integer('4'),'valplus':integer('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':integer('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':integer('6'),'valplus':integer('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':integer('4'),'valplus':integer('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':integer('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.3.query.sqlpp
new file mode 100644
index 0000000..299efc7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.valplus) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.1.ddl.sqlpp
new file mode 100644
index 0000000..5e9972c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : bigint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.2.update.sqlpp
new file mode 100644
index 0000000..b460af2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':bigint('4'),'valplus':bigint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':bigint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':bigint('6'),'valplus':bigint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':bigint('4'),'valplus':bigint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':bigint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.3.query.sqlpp
new file mode 100644
index 0000000..d17e926
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.val) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.ddl.sqlpp
new file mode 100644
index 0000000..5e9972c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : bigint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.2.update.sqlpp
new file mode 100644
index 0000000..b460af2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':bigint('4'),'valplus':bigint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':bigint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':bigint('6'),'valplus':bigint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':bigint('4'),'valplus':bigint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':bigint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.3.query.sqlpp
new file mode 100644
index 0000000..299efc7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.valplus) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.1.ddl.sqlpp
new file mode 100644
index 0000000..c45dbfe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.2.update.sqlpp
new file mode 100644
index 0000000..5a65a20
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':tinyint('4'),'valplus':tinyint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':tinyint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':tinyint('6'),'valplus':tinyint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':tinyint('4'),'valplus':tinyint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':tinyint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.3.query.sqlpp
new file mode 100644
index 0000000..d17e926
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.val) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.ddl.sqlpp
new file mode 100644
index 0000000..c45dbfe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.2.update.sqlpp
new file mode 100644
index 0000000..5a65a20
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':tinyint('4'),'valplus':tinyint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':tinyint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':tinyint('6'),'valplus':tinyint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':tinyint('4'),'valplus':tinyint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':tinyint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.3.query.sqlpp
new file mode 100644
index 0000000..299efc7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, kurtosis(t.valplus) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.2.update.sqlpp
new file mode 100644
index 0000000..8c0b731
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.2.update.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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':double(4.32),'valplus':float('2.0')};
+insert into Test
+select element {'id':1,'gid':1,'val':double(5.32)};
+insert into Test
+select element {'id':2,'gid':1,'val':double(6.32),'valplus':'hello world'};
+insert into Test
+select element {'id':3,'gid':1,'val':double(4.32),'valplus':double('3.0')};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.3.query.sqlpp
new file mode 100644
index 0000000..34a818f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.3.query.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+ /*
+ * Description : Run serial-kurtosis over an multiset with mixed types
+ * Expected Res : Failure
+ * Date : March 5th 2018
+ */
+
+use test;
+
+select gid, array_kurtosis((select value g.valplus from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.2.update.sqlpp
new file mode 100644
index 0000000..88d820c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':double(4.32),'valplus':double(473847.0)};
+insert into Test
+select element {'id':1,'gid':1,'val':double(5.32)};
+insert into Test
+select element {'id':2,'gid':1,'val':double(6.32),'valplus':double(38473827484738239.0)};
+insert into Test
+select element {'id':3,'gid':1,'val':double(4.32),'valplus':double(678900.0)};
+insert into Test
+select element {'id':4,'gid':1,'val':double(4.32),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.3.query.sqlpp
new file mode 100644
index 0000000..38094d5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.val) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.2.update.sqlpp
new file mode 100644
index 0000000..88d820c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':double(4.32),'valplus':double(473847.0)};
+insert into Test
+select element {'id':1,'gid':1,'val':double(5.32)};
+insert into Test
+select element {'id':2,'gid':1,'val':double(6.32),'valplus':double(38473827484738239.0)};
+insert into Test
+select element {'id':3,'gid':1,'val':double(4.32),'valplus':double(678900.0)};
+insert into Test
+select element {'id':4,'gid':1,'val':double(4.32),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.3.query.sqlpp
new file mode 100644
index 0000000..4e9fcac
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.valplus) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_empty/serial_skewness_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_empty/serial_skewness_empty.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_empty/serial_skewness_empty.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_empty/serial_skewness_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_empty/serial_skewness_empty.3.query.sqlpp
new file mode 100644
index 0000000..38094d5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_empty/serial_skewness_empty.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.val) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.1.ddl.sqlpp
new file mode 100644
index 0000000..ddac6a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : float
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.2.update.sqlpp
new file mode 100644
index 0000000..40641b5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':float('4.32'),'valplus':float('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':float('5.32')};
+insert into Test
+select element {'id':2,'gid':1,'val':float('6.32'),'valplus':float('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':float('4.32'),'valplus':float('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':float('4.32'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.3.query.sqlpp
new file mode 100644
index 0000000..38094d5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.val) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.1.ddl.sqlpp
new file mode 100644
index 0000000..ddac6a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : float
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.2.update.sqlpp
new file mode 100644
index 0000000..40641b5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':float('4.32'),'valplus':float('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':float('5.32')};
+insert into Test
+select element {'id':2,'gid':1,'val':float('6.32'),'valplus':float('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':float('4.32'),'valplus':float('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':float('4.32'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.3.query.sqlpp
new file mode 100644
index 0000000..4e9fcac
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.valplus) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.1.ddl.sqlpp
new file mode 100644
index 0000000..0c0bfee
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : smallint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.2.update.sqlpp
new file mode 100644
index 0000000..6210af4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':smallint('4'),'valplus':smallint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':smallint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':smallint('6'),'valplus':smallint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':smallint('4'),'valplus':smallint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':smallint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.3.query.sqlpp
new file mode 100644
index 0000000..38094d5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.val) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.1.ddl.sqlpp
new file mode 100644
index 0000000..0c0bfee
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : smallint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.2.update.sqlpp
new file mode 100644
index 0000000..6210af4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':smallint('4'),'valplus':smallint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':smallint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':smallint('6'),'valplus':smallint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':smallint('4'),'valplus':smallint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':smallint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.3.query.sqlpp
new file mode 100644
index 0000000..4e9fcac
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.valplus) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.1.ddl.sqlpp
new file mode 100644
index 0000000..07312bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : integer
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.2.update.sqlpp
new file mode 100644
index 0000000..a248a0f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':integer('4'),'valplus':integer('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':integer('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':integer('6'),'valplus':integer('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':integer('4'),'valplus':integer('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':integer('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.3.query.sqlpp
new file mode 100644
index 0000000..38094d5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.val) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.1.ddl.sqlpp
new file mode 100644
index 0000000..07312bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : integer
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.2.update.sqlpp
new file mode 100644
index 0000000..a248a0f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':integer('4'),'valplus':integer('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':integer('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':integer('6'),'valplus':integer('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':integer('4'),'valplus':integer('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':integer('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.3.query.sqlpp
new file mode 100644
index 0000000..4e9fcac
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.valplus) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.1.ddl.sqlpp
new file mode 100644
index 0000000..5e9972c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : bigint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.2.update.sqlpp
new file mode 100644
index 0000000..b460af2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':bigint('4'),'valplus':bigint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':bigint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':bigint('6'),'valplus':bigint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':bigint('4'),'valplus':bigint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':bigint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.3.query.sqlpp
new file mode 100644
index 0000000..38094d5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.val) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.1.ddl.sqlpp
new file mode 100644
index 0000000..5e9972c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : bigint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.2.update.sqlpp
new file mode 100644
index 0000000..b460af2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':bigint('4'),'valplus':bigint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':bigint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':bigint('6'),'valplus':bigint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':bigint('4'),'valplus':bigint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':bigint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.3.query.sqlpp
new file mode 100644
index 0000000..4e9fcac
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.valplus) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.1.ddl.sqlpp
new file mode 100644
index 0000000..c45dbfe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.2.update.sqlpp
new file mode 100644
index 0000000..5a65a20
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':tinyint('4'),'valplus':tinyint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':tinyint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':tinyint('6'),'valplus':tinyint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':tinyint('4'),'valplus':tinyint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':tinyint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.3.query.sqlpp
new file mode 100644
index 0000000..38094d5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.val) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.1.ddl.sqlpp
new file mode 100644
index 0000000..c45dbfe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.2.update.sqlpp
new file mode 100644
index 0000000..5a65a20
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':tinyint('4'),'valplus':tinyint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':tinyint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':tinyint('6'),'valplus':tinyint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':tinyint('4'),'valplus':tinyint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':tinyint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.3.query.sqlpp
new file mode 100644
index 0000000..4e9fcac
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, skewness(t.valplus) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.2.update.sqlpp
new file mode 100644
index 0000000..8c0b731
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.2.update.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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':double(4.32),'valplus':float('2.0')};
+insert into Test
+select element {'id':1,'gid':1,'val':double(5.32)};
+insert into Test
+select element {'id':2,'gid':1,'val':double(6.32),'valplus':'hello world'};
+insert into Test
+select element {'id':3,'gid':1,'val':double(4.32),'valplus':double('3.0')};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.3.query.sqlpp
new file mode 100644
index 0000000..323d010
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.3.query.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+ /*
+ * Description : Run serial-skewness over an multiset with mixed types
+ * Expected Res : Failure
+ * Date : March 5th 2018
+ */
+
+use test;
+
+select gid, array_skewness((select value g.valplus from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_double/serial_stddev_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_double/serial_stddev_double.3.query.sqlpp
index d20e7c9..1180e69 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_double/serial_stddev_double.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_double/serial_stddev_double.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.val) as stddev, stddev_pop(t.val) as stddev_pop
+select gid, stddev_samp(t.val) as stddev_samp, stddev_pop(t.val) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_double_null/serial_stddev_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_double_null/serial_stddev_double_null.3.query.sqlpp
index eb4bc56..d765d99 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_double_null/serial_stddev_double_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_double_null/serial_stddev_double_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.valplus) as stddev, stddev_pop(t.valplus) as stddev_pop
+select gid, stddev_samp(t.valplus) as stddev_samp, stddev_pop(t.valplus) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_empty/serial_stddev_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_empty/serial_stddev_empty.3.query.sqlpp
index d20e7c9..1180e69 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_empty/serial_stddev_empty.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_empty/serial_stddev_empty.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.val) as stddev, stddev_pop(t.val) as stddev_pop
+select gid, stddev_samp(t.val) as stddev_samp, stddev_pop(t.val) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_float/serial_stddev_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_float/serial_stddev_float.3.query.sqlpp
index d20e7c9..1180e69 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_float/serial_stddev_float.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_float/serial_stddev_float.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.val) as stddev, stddev_pop(t.val) as stddev_pop
+select gid, stddev_samp(t.val) as stddev_samp, stddev_pop(t.val) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_float_null/serial_stddev_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_float_null/serial_stddev_float_null.3.query.sqlpp
index eb4bc56..d765d99 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_float_null/serial_stddev_float_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_float_null/serial_stddev_float_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.valplus) as stddev, stddev_pop(t.valplus) as stddev_pop
+select gid, stddev_samp(t.valplus) as stddev_samp, stddev_pop(t.valplus) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int16/serial_stddev_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int16/serial_stddev_int16.3.query.sqlpp
index d20e7c9..1180e69 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int16/serial_stddev_int16.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int16/serial_stddev_int16.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.val) as stddev, stddev_pop(t.val) as stddev_pop
+select gid, stddev_samp(t.val) as stddev_samp, stddev_pop(t.val) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int16_null/serial_stddev_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int16_null/serial_stddev_int16_null.3.query.sqlpp
index eb4bc56..d765d99 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int16_null/serial_stddev_int16_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int16_null/serial_stddev_int16_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.valplus) as stddev, stddev_pop(t.valplus) as stddev_pop
+select gid, stddev_samp(t.valplus) as stddev_samp, stddev_pop(t.valplus) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int32/serial_stddev_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int32/serial_stddev_int32.3.query.sqlpp
index d20e7c9..1180e69 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int32/serial_stddev_int32.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int32/serial_stddev_int32.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.val) as stddev, stddev_pop(t.val) as stddev_pop
+select gid, stddev_samp(t.val) as stddev_samp, stddev_pop(t.val) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int32_null/serial_stddev_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int32_null/serial_stddev_int32_null.3.query.sqlpp
index eb4bc56..d765d99 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int32_null/serial_stddev_int32_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int32_null/serial_stddev_int32_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.valplus) as stddev, stddev_pop(t.valplus) as stddev_pop
+select gid, stddev_samp(t.valplus) as stddev_samp, stddev_pop(t.valplus) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int64/serial_stddev_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int64/serial_stddev_int64.3.query.sqlpp
index d20e7c9..1180e69 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int64/serial_stddev_int64.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int64/serial_stddev_int64.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.val) as stddev, stddev_pop(t.val) as stddev_pop
+select gid, stddev_samp(t.val) as stddev_samp, stddev_pop(t.val) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int64_null/serial_stddev_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int64_null/serial_stddev_int64_null.3.query.sqlpp
index eb4bc56..d765d99 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int64_null/serial_stddev_int64_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int64_null/serial_stddev_int64_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.valplus) as stddev, stddev_pop(t.valplus) as stddev_pop
+select gid, stddev_samp(t.valplus) as stddev_samp, stddev_pop(t.valplus) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int8/serial_stddev_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int8/serial_stddev_int8.3.query.sqlpp
index d20e7c9..1180e69 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int8/serial_stddev_int8.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int8/serial_stddev_int8.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.val) as stddev, stddev_pop(t.val) as stddev_pop
+select gid, stddev_samp(t.val) as stddev_samp, stddev_pop(t.val) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int8_null/serial_stddev_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int8_null/serial_stddev_int8_null.3.query.sqlpp
index eb4bc56..d765d99 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int8_null/serial_stddev_int8_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_int8_null/serial_stddev_int8_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, stddev(t.valplus) as stddev, stddev_pop(t.valplus) as stddev_pop
+select gid, stddev_samp(t.valplus) as stddev_samp, stddev_pop(t.valplus) as stddev_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_mixed.3.query.sqlpp
index b0c5f68..05f0a0b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_mixed.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_mixed.3.query.sqlpp
@@ -24,7 +24,7 @@
use test;
-select gid, array_stddev((select value g.valplus from g)) as stddev
+select gid, array_stddev_samp((select value g.valplus from g)) as stddev_samp
from Test as t
/* +hash */
group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_double/serial_var_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_double/serial_var_double.3.query.sqlpp
index 48a30f1..56ff105 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_double/serial_var_double.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_double/serial_var_double.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.val) as var, var_pop(t.val) as var_pop
+select gid, var_samp(t.val) as var_samp, var_pop(t.val) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_double_null/serial_var_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_double_null/serial_var_double_null.3.query.sqlpp
index abd0d49..9e79475 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_double_null/serial_var_double_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_double_null/serial_var_double_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.valplus) as var, var_pop(t.valplus) as var_pop
+select gid, var_samp(t.valplus) as var_samp, var_pop(t.valplus) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_empty/serial_var_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_empty/serial_var_empty.3.query.sqlpp
index 48a30f1..56ff105 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_empty/serial_var_empty.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_empty/serial_var_empty.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.val) as var, var_pop(t.val) as var_pop
+select gid, var_samp(t.val) as var_samp, var_pop(t.val) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_float/serial_var_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_float/serial_var_float.3.query.sqlpp
index 48a30f1..56ff105 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_float/serial_var_float.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_float/serial_var_float.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.val) as var, var_pop(t.val) as var_pop
+select gid, var_samp(t.val) as var_samp, var_pop(t.val) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_float_null/serial_var_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_float_null/serial_var_float_null.3.query.sqlpp
index abd0d49..9e79475 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_float_null/serial_var_float_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_float_null/serial_var_float_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.valplus) as var, var_pop(t.valplus) as var_pop
+select gid, var_samp(t.valplus) as var_samp, var_pop(t.valplus) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int16/serial_var_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int16/serial_var_int16.3.query.sqlpp
index 48a30f1..56ff105 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int16/serial_var_int16.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int16/serial_var_int16.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.val) as var, var_pop(t.val) as var_pop
+select gid, var_samp(t.val) as var_samp, var_pop(t.val) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int16_null/serial_var_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int16_null/serial_var_int16_null.3.query.sqlpp
index abd0d49..9e79475 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int16_null/serial_var_int16_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int16_null/serial_var_int16_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.valplus) as var, var_pop(t.valplus) as var_pop
+select gid, var_samp(t.valplus) as var_samp, var_pop(t.valplus) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int32/serial_var_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int32/serial_var_int32.3.query.sqlpp
index 48a30f1..56ff105 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int32/serial_var_int32.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int32/serial_var_int32.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.val) as var, var_pop(t.val) as var_pop
+select gid, var_samp(t.val) as var_samp, var_pop(t.val) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int32_null/serial_var_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int32_null/serial_var_int32_null.3.query.sqlpp
index abd0d49..9e79475 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int32_null/serial_var_int32_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int32_null/serial_var_int32_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.valplus) as var, var_pop(t.valplus) as var_pop
+select gid, var_samp(t.valplus) as var_samp, var_pop(t.valplus) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int64/serial_var_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int64/serial_var_int64.3.query.sqlpp
index 48a30f1..56ff105 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int64/serial_var_int64.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int64/serial_var_int64.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.val) as var, var_pop(t.val) as var_pop
+select gid, var_samp(t.val) as var_samp, var_pop(t.val) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int64_null/serial_var_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int64_null/serial_var_int64_null.3.query.sqlpp
index abd0d49..9e79475 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int64_null/serial_var_int64_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int64_null/serial_var_int64_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.valplus) as var, var_pop(t.valplus) as var_pop
+select gid, var_samp(t.valplus) as var_samp, var_pop(t.valplus) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int8/serial_var_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int8/serial_var_int8.3.query.sqlpp
index 48a30f1..56ff105 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int8/serial_var_int8.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int8/serial_var_int8.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.val) as var, var_pop(t.val) as var_pop
+select gid, var_samp(t.val) as var_samp, var_pop(t.val) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int8_null/serial_var_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int8_null/serial_var_int8_null.3.query.sqlpp
index abd0d49..9e79475 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int8_null/serial_var_int8_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_int8_null/serial_var_int8_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, var(t.valplus) as var, var_pop(t.valplus) as var_pop
+select gid, var_samp(t.valplus) as var_samp, var_pop(t.valplus) as var_pop
from Test as t
/* +hash */
group by t.gid as gid;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_mixed/serial_var_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_mixed/serial_var_mixed.3.query.sqlpp
index 3f53ea5..134fd79 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_mixed/serial_var_mixed.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/serial_var_mixed/serial_var_mixed.3.query.sqlpp
@@ -17,14 +17,14 @@
* under the License.
*/
/*
- * Description : Run serial-var over an multiset with mixed types
+ * Description : Run serial-var_samp over an multiset with mixed types
* Expected Res : Failure
* Date : March 5th 2018
*/
use test;
-select gid, array_var((select value g.valplus from g)) as var
+select gid, array_var_samp((select value g.valplus from g)) as var_samp
from Test as t
/* +hash */
group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_distinct/skewness_distinct.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_distinct/skewness_distinct.1.query.sqlpp
new file mode 100644
index 0000000..0f2717d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_distinct/skewness_distinct.1.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+ {
+ 't1': to_bigint(array_skewness(distinct [10,20,30,10,20,30,10])),
+ 't2': to_bigint(array_skewness(distinct [null,missing,null,missing])),
+ 't3': to_bigint(array_skewness(distinct [40,null,missing,50,40,null,missing,50,40])),
+ 't4': to_bigint(array_skewness(distinct []))
+ }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_double/skewness_double.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_double/skewness_double.1.ddl.sqlpp
new file mode 100644
index 0000000..ad97753
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_double/skewness_double.1.ddl.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_double/skewness_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_double/skewness_double.3.query.sqlpp
new file mode 100644
index 0000000..3650fbe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_double/skewness_double.3.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+select element array_skewness((
+ select element x
+ from [1.0,2.0,double('3.0')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_double_null/skewness_double_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_double_null/skewness_double_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_double_null/skewness_double_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_double_null/skewness_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_double_null/skewness_double_null.3.query.sqlpp
new file mode 100644
index 0000000..58e4a89
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_double_null/skewness_double_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'skewness':test.array_skewness((
+ select element x.doubleField
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_empty_01/skewness_empty_01.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_empty_01/skewness_empty_01.1.ddl.sqlpp
new file mode 100644
index 0000000..f6ac910
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_empty_01/skewness_empty_01.1.ddl.sqlpp
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that skewness aggregation correctly returns null for an empty stream,
+ * without an aggregate combiner.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_empty_01/skewness_empty_01.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_empty_01/skewness_empty_01.3.query.sqlpp
new file mode 100644
index 0000000..e39e8dd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_empty_01/skewness_empty_01.3.query.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that array_skewness aggregation correctly returns null for an empty stream,
+ * without an aggregate combiner.
+ * Success : Yes
+ */
+
+use test;
+
+
+select element test.array_skewness((
+ select element x
+ from [1,2,3] as x
+ where (x > 10)
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_empty_02/skewness_empty_02.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_empty_02/skewness_empty_02.1.ddl.sqlpp
new file mode 100644
index 0000000..a7a39b8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_empty_02/skewness_empty_02.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that skewness aggregation correctly returns null for an empty stream,
+ * with an aggregate combiner.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+ closed {
+ id : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_empty_02/skewness_empty_02.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_empty_02/skewness_empty_02.3.query.sqlpp
new file mode 100644
index 0000000..411caed
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_empty_02/skewness_empty_02.3.query.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that array_skewness aggregation correctly returns null for an empty stream,
+ * with an aggregate combiner.
+ * Success : Yes
+ */
+
+use test;
+
+
+select element test.array_skewness((
+ select element x.val
+ from Test as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_float/skewness_float.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_float/skewness_float.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_float/skewness_float.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_float/skewness_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_float/skewness_float.3.query.sqlpp
new file mode 100644
index 0000000..d148d99
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_float/skewness_float.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.array_skewness((
+ select element x
+ from [test.float('1'),test.float('2'),test.float('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_float_null/skewness_float_null.1.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_float_null/skewness_float_null.1.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_float_null/skewness_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_float_null/skewness_float_null.3.query.sqlpp
new file mode 100644
index 0000000..9a42062
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_float_null/skewness_float_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'skewness':test.array_skewness((
+ select element x.floatField
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int16/skewness_int16.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int16/skewness_int16.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int16/skewness_int16.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int16/skewness_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int16/skewness_int16.3.query.sqlpp
new file mode 100644
index 0000000..fb82e49
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int16/skewness_int16.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.array_skewness((
+ select element x
+ from [test.smallint('1'),test.smallint('2'),test.smallint('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int16_null/skewness_int16_null.1.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int16_null/skewness_int16_null.1.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int16_null/skewness_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int16_null/skewness_int16_null.3.query.sqlpp
new file mode 100644
index 0000000..d277ff0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int16_null/skewness_int16_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'skewness':test.array_skewness((
+ select element x.int16Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int32/skewness_int32.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int32/skewness_int32.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int32/skewness_int32.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int32/skewness_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int32/skewness_int32.3.query.sqlpp
new file mode 100644
index 0000000..e2fe5fe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int32/skewness_int32.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.array_skewness((
+ select element x
+ from [test.integer('1'),test.integer('2'),test.integer('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int32_null/skewness_int32_null.1.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int32_null/skewness_int32_null.1.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int32_null/skewness_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int32_null/skewness_int32_null.3.query.sqlpp
new file mode 100644
index 0000000..59045d7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int32_null/skewness_int32_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'skewness':test.array_skewness((
+ select element x.int32Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int64/skewness_int64.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int64/skewness_int64.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int64/skewness_int64.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int64/skewness_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int64/skewness_int64.3.query.sqlpp
new file mode 100644
index 0000000..57354a1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int64/skewness_int64.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.array_skewness((
+ select element x
+ from [test.bigint('1'),test.bigint('2'),test.bigint('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int64_null/skewness_int64_null.1.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int64_null/skewness_int64_null.1.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int64_null/skewness_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int64_null/skewness_int64_null.3.query.sqlpp
new file mode 100644
index 0000000..f2fc66f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int64_null/skewness_int64_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'skewness':test.array_skewness((
+ select element x.int64Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int8/skewness_int8.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int8/skewness_int8.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int8/skewness_int8.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int8/skewness_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int8/skewness_int8.3.query.sqlpp
new file mode 100644
index 0000000..b76b69a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int8/skewness_int8.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.array_skewness((
+ select element x
+ from [test.tinyint('1'),test.tinyint('2'),test.tinyint('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int8_null/skewness_int8_null.1.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int8_null/skewness_int8_null.1.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int8_null/skewness_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int8_null/skewness_int8_null.3.query.sqlpp
new file mode 100644
index 0000000..e4d98f4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_int8_null/skewness_int8_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'skewness':test.array_skewness((
+ select element x.int8Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_mixed/skewness_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_mixed/skewness_mixed.3.query.sqlpp
new file mode 100644
index 0000000..a986446
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/skewness_mixed/skewness_mixed.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.
+ */
+/*
+* Description : Run array_skewness over an multiset with mixed types
+* Expected Res : Failure
+* Date : Feb 7th 2014
+*/
+
+select element array_skewness((
+ select element x
+ from [float('2.0'),'hello world',93847382783847382,date('2013-01-01')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_distinct/stddev_distinct.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_distinct/stddev_distinct.1.query.sqlpp
index 37606a1..f9a24f0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_distinct/stddev_distinct.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_distinct/stddev_distinct.1.query.sqlpp
@@ -17,10 +17,10 @@
* under the License.
*/
{
- 't1': to_bigint(array_stddev(distinct [10,20,30,10,20,30,10])),
- 't2': to_bigint(array_stddev(distinct [null,missing,null,missing])),
- 't3': to_bigint(array_stddev(distinct [40,null,missing,50,40,null,missing,50,40])),
- 't4': to_bigint(array_stddev(distinct [])),
+ 't1': to_bigint(array_stddev_samp(distinct [10,20,30,10,20,30,10])),
+ 't2': to_bigint(array_stddev_samp(distinct [null,missing,null,missing])),
+ 't3': to_bigint(array_stddev_samp(distinct [40,null,missing,50,40,null,missing,50,40])),
+ 't4': to_bigint(array_stddev_samp(distinct [])),
't5': to_bigint(array_stddev_pop(distinct [10,20,30,10,20,30,10])),
't6': to_bigint(array_stddev_pop(distinct [null,missing,null,missing])),
't7': to_bigint(array_stddev_pop(distinct [40,null,missing,50,40,null,missing,50,40])),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_double/stddev_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_double/stddev_double.3.query.sqlpp
index ff20386..ec59ded 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_double/stddev_double.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_double/stddev_double.3.query.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
-{'stddev': (select element array_stddev((
+{'stddev_samp': (select element array_stddev_samp((
select element x
from [1.0,2.0,double('3.0')] as x
))), 'stddev_pop': (select element array_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_double_null/stddev_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_double_null/stddev_double_null.3.query.sqlpp
index 3899ca2..61e8b95 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_double_null/stddev_double_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_double_null/stddev_double_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev':test.array_stddev((
+{'stddev_samp':test.array_stddev_samp((
select element x.doubleField
from Numeric as x
)), 'stddev_pop':test.array_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_01/stddev_empty_01.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_01/stddev_empty_01.1.ddl.sqlpp
index e2d346b..3bbd512 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_01/stddev_empty_01.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_01/stddev_empty_01.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests that array_stddev aggregation correctly returns null for an empty stream,
+ * Description : Tests that stddev_samp and stddev_pop aggregation correctly returns null for an empty stream,
* without an aggregate combiner.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_01/stddev_empty_01.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_01/stddev_empty_01.3.query.sqlpp
index 988b1e6..6415e6d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_01/stddev_empty_01.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_01/stddev_empty_01.3.query.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests that stddev and stddev_pop aggregation correctly returns null for an empty stream,
+ * Description : Tests that stddev_samp and stddev_pop aggregation correctly returns null for an empty stream,
* without an aggregate combiner.
* Success : Yes
*/
@@ -25,7 +25,7 @@
use test;
-{'stddev': (select element test.array_stddev((
+{'stddev_samp': (select element test.array_stddev_samp((
select element x
from [1,2,3] as x
where (x > 10)
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_02/stddev_empty_02.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_02/stddev_empty_02.1.ddl.sqlpp
index 444cfb2..ac62d7d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_02/stddev_empty_02.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_02/stddev_empty_02.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests that array_stddev aggregation correctly returns null for an empty stream,
+ * Description : Tests that stddev_samp and stddev_pop aggregation correctly returns null for an empty stream,
* with an aggregate combiner.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_02/stddev_empty_02.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_02/stddev_empty_02.3.query.sqlpp
index 3ad8d1b..f515da8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_02/stddev_empty_02.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_empty_02/stddev_empty_02.3.query.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests that stddev and stddev_pop aggregation correctly returns null for an empty stream,
+ * Description : Tests that stddev_samp and stddev_pop aggregation correctly returns null for an empty stream,
* with an aggregate combiner.
* Success : Yes
*/
@@ -25,7 +25,7 @@
use test;
-{'stddev': (select element test.array_stddev((
+{'stddev_samp': (select element test.array_stddev_samp((
select element x.val
from Test as x
))), 'stddev_pop': (select element test.array_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float/stddev_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float/stddev_float.3.query.sqlpp
index a4baabb..b070a2f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float/stddev_float.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float/stddev_float.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev': (select element test.array_stddev((
+{'stddev_samp': (select element test.array_stddev_samp((
select element x
from [test.float('1'),test.float('2'),test.float('3')] as x
))), 'stddev_pop': (select element test.array_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.3.query.sqlpp
deleted file mode 100644
index 8a1abff..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.3.query.sqlpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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;
-
-
-{'stddev':test.array_stddev((
- select element x.floatField
- from Numeric as x
-)), 'stddev_pop':test.array_stddev_pop((
- select element x.floatField
- from Numeric as x
-))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_null.1.ddl.sqlpp
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ddl.sqlpp
rename to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_null.1.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_null.3.query.sqlpp
new file mode 100644
index 0000000..09b4f98
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_float_null/stddev_float_null.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;
+
+
+{'stddev_samp':test.array_stddev_samp((
+ select element x.floatField
+ from Numeric as x
+)), 'stddev_pop':test.array_stddev_pop((
+ select element x.floatField
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int16/stddev_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int16/stddev_int16.3.query.sqlpp
index 2ad24ab..8b02317 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int16/stddev_int16.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int16/stddev_int16.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev': (select element test.array_stddev((
+{'stddev_samp': (select element test.array_stddev_samp((
select element x
from [test.smallint('1'),test.smallint('2'),test.smallint('3')] as x
))), 'stddev_pop': (select element test.array_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int16_null/stddev_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int16_null/stddev_int16_null.3.query.sqlpp
index 2da44d4..01eb35e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int16_null/stddev_int16_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int16_null/stddev_int16_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev':test.array_stddev((
+{'stddev_samp':test.array_stddev_samp((
select element x.int16Field
from Numeric as x
)), 'stddev_pop':test.array_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32/stddev_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32/stddev_int32.3.query.sqlpp
index b8a59c3..8d5a19a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32/stddev_int32.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32/stddev_int32.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev': (select element test.array_stddev((
+{'stddev_samp': (select element test.array_stddev_samp((
select element x
from [test.integer('1'),test.integer('2'),test.integer('3')] as x
))), 'stddev_pop': (select element test.array_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32_null/stddev_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32_null/stddev_int32_null.3.query.sqlpp
index 4d0ff58..6b8805c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32_null/stddev_int32_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32_null/stddev_int32_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev':test.array_stddev((
+{'stddev_samp':test.array_stddev_samp((
select element x.int32Field
from Numeric as x
)), 'stddev_pop':test.array_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64/stddev_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64/stddev_int64.3.query.sqlpp
index cf0fa59..95696e8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64/stddev_int64.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64/stddev_int64.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev': (select element test.array_stddev((
+{'stddev_samp': (select element test.array_stddev_samp((
select element x
from [test.bigint('1'),test.bigint('2'),test.bigint('3')] as x
))), 'stddev_pop': (select element test.array_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64_null/stddev_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64_null/stddev_int64_null.3.query.sqlpp
index 7aa502c..4d28eaf 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64_null/stddev_int64_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64_null/stddev_int64_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev':test.array_stddev((
+{'stddev_samp':test.array_stddev_samp((
select element x.int64Field
from Numeric as x
)), 'stddev_pop':test.array_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8/stddev_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8/stddev_int8.3.query.sqlpp
index 016b368..a8601f0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8/stddev_int8.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8/stddev_int8.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev': (select element test.array_stddev((
+{'stddev_samp': (select element test.array_stddev_samp((
select element x
from [test.tinyint('1'),test.tinyint('2'),test.tinyint('3')] as x
))), 'stddev_pop': (select element test.array_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8_null/stddev_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8_null/stddev_int8_null.3.query.sqlpp
index f7e4dbe..cbcc69b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8_null/stddev_int8_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8_null/stddev_int8_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev':test.array_stddev((
+{'stddev_samp':test.array_stddev_samp((
select element x.int8Field
from Numeric as x
)), 'stddev_pop':test.array_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_mixed/stddev_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_mixed/stddev_mixed.3.query.sqlpp
index 97da862..881a61e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_mixed/stddev_mixed.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_mixed/stddev_mixed.3.query.sqlpp
@@ -17,12 +17,12 @@
* under the License.
*/
/*
-* Description : Run array_stddev over an multiset with mixed types
+* Description : Run array_stddev_samp over an multiset with mixed types
* Expected Res : Failure
* Date : March 5th 2018
*/
-select element array_stddev((
+select element array_stddev_samp((
select element x
from [float('2.0'),'hello world',93847382783847382,date('2013-01-01')] as x
));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_distinct/var_distinct.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_distinct/var_distinct.1.query.sqlpp
index 2dd3402..90f4074 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_distinct/var_distinct.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_distinct/var_distinct.1.query.sqlpp
@@ -17,10 +17,10 @@
* under the License.
*/
{
- 't1': to_bigint(array_var(distinct [10,20,30,10,20,30,10])),
- 't2': to_bigint(array_var(distinct [null,missing,null,missing])),
- 't3': to_bigint(array_var(distinct [40,null,missing,50,40,null,missing,50,40])),
- 't4': to_bigint(array_var(distinct [])),
+ 't1': to_bigint(array_var_samp(distinct [10,20,30,10,20,30,10])),
+ 't2': to_bigint(array_var_samp(distinct [null,missing,null,missing])),
+ 't3': to_bigint(array_var_samp(distinct [40,null,missing,50,40,null,missing,50,40])),
+ 't4': to_bigint(array_var_samp(distinct [])),
't5': to_bigint(array_var_pop(distinct [10,20,30,10,20,30,10])),
't6': to_bigint(array_var_pop(distinct [null,missing,null,missing])),
't7': to_bigint(array_var_pop(distinct [40,null,missing,50,40,null,missing,50,40])),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_double/var_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_double/var_double.3.query.sqlpp
index 52dfea2..0f26fbe 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_double/var_double.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_double/var_double.3.query.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
-{'var': (select element array_var((
+{'var_samp': (select element array_var_samp((
select element x
from [1.0,2.0,double('3.0')] as x
))), 'var_pop': (select element array_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_double_null/var_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_double_null/var_double_null.3.query.sqlpp
index bf0df4f..21c0590 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_double_null/var_double_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_double_null/var_double_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var':test.array_var((
+{'var_samp':test.array_var_samp((
select element x.doubleField
from Numeric as x
)), 'var_pop':test.array_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_01/var_empty_01.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_01/var_empty_01.1.ddl.sqlpp
index 2e5b5b9..db68c0e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_01/var_empty_01.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_01/var_empty_01.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests that array_var aggregation correctly returns null for an empty stream,
+ * Description : Tests that var_samp and var_pop aggregation correctly returns null for an empty stream,
* without an aggregate combiner.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_01/var_empty_01.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_01/var_empty_01.3.query.sqlpp
index 75cbfcc..8c14d91 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_01/var_empty_01.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_01/var_empty_01.3.query.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests that var and var_pop aggregation correctly returns null for an empty stream,
+ * Description : Tests that var_samp and var_pop aggregation correctly returns null for an empty stream,
* without an aggregate combiner.
* Success : Yes
*/
@@ -25,7 +25,7 @@
use test;
-{'var': (select element test.array_var((
+{'var_samp': (select element test.array_var_samp((
select element x
from [1,2,3] as x
where (x > 10)
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_02/var_empty_02.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_02/var_empty_02.1.ddl.sqlpp
index b2d1d8c..ad6e2e9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_02/var_empty_02.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_02/var_empty_02.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests that array_var aggregation correctly returns null for an empty stream,
+ * Description : Tests that var_samp and var_pop aggregation correctly returns null for an empty stream,
* with an aggregate combiner.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_02/var_empty_02.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_02/var_empty_02.3.query.sqlpp
index 63459e2..9245cea 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_02/var_empty_02.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_empty_02/var_empty_02.3.query.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests that var and var_pop aggregation correctly returns null for an empty stream,
+ * Description : Tests that var_samp and var_pop aggregation correctly returns null for an empty stream,
* with an aggregate combiner.
* Success : Yes
*/
@@ -25,7 +25,7 @@
use test;
-{'var': (select element test.array_var((
+{'var_samp': (select element test.array_var_samp((
select element x.val
from Test as x
))), 'var_pop': (select element test.array_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float/var_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float/var_float.3.query.sqlpp
index b022fe5..cd07f78 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float/var_float.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float/var_float.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var': (select element test.array_var((
+{'var_samp': (select element test.array_var_samp((
select element x
from [test.float('1'),test.float('2'),test.float('3')] as x
))), 'var_pop': (select element test.array_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float_null/var_float_nu.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float_null/var_float_nu.3.query.sqlpp
deleted file mode 100644
index 10089c1..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float_null/var_float_nu.3.query.sqlpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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;
-
-
-{'var':test.array_var((
- select element x.floatField
- from Numeric as x
-)), 'var_pop':test.array_var_pop((
- select element x.floatField
- from Numeric as x
-))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float_null/var_float_nu.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float_null/var_float_null.1.ddl.sqlpp
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float_null/var_float_nu.1.ddl.sqlpp
rename to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float_null/var_float_null.1.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float_null/var_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float_null/var_float_null.3.query.sqlpp
new file mode 100644
index 0000000..bd21912
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_float_null/var_float_null.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;
+
+
+{'var_samp':test.array_var_samp((
+ select element x.floatField
+ from Numeric as x
+)), 'var_pop':test.array_var_pop((
+ select element x.floatField
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int16/var_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int16/var_int16.3.query.sqlpp
index 75950f0..5860d7c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int16/var_int16.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int16/var_int16.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var': (select element test.array_var((
+{'var_samp': (select element test.array_var_samp((
select element x
from [test.smallint('1'),test.smallint('2'),test.smallint('3')] as x
))), 'var_pop': (select element test.array_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int16_null/var_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int16_null/var_int16_null.3.query.sqlpp
index d7a9716..480c051 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int16_null/var_int16_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int16_null/var_int16_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var':test.array_var((
+{'var_samp':test.array_var_samp((
select element x.int16Field
from Numeric as x
)), 'var_pop':test.array_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int32/var_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int32/var_int32.3.query.sqlpp
index c9f71a5..3ba7fc1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int32/var_int32.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int32/var_int32.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var': (select element test.array_var((
+{'var_samp': (select element test.array_var_samp((
select element x
from [test.integer('1'),test.integer('2'),test.integer('3')] as x
))), 'var_pop': (select element test.array_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int32_null/var_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int32_null/var_int32_null.3.query.sqlpp
index 427e4a2..8f84922 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int32_null/var_int32_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int32_null/var_int32_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var':test.array_var((
+{'var_samp':test.array_var_samp((
select element x.int32Field
from Numeric as x
)), 'var_pop':test.array_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int64/var_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int64/var_int64.3.query.sqlpp
index 487070d..168cb3f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int64/var_int64.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int64/var_int64.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var': (select element test.array_var((
+{'var_samp': (select element test.array_var_samp((
select element x
from [test.bigint('1'),test.bigint('2'),test.bigint('3')] as x
))), 'var_pop': (select element test.array_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int64_null/var_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int64_null/var_int64_null.3.query.sqlpp
index 012c8b3..1d3ec9d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int64_null/var_int64_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int64_null/var_int64_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var':test.array_var((
+{'var_samp':test.array_var_samp((
select element x.int64Field
from Numeric as x
)), 'var_pop':test.array_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int8/var_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int8/var_int8.3.query.sqlpp
index 6bafd02..6523fe5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int8/var_int8.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int8/var_int8.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var': (select element test.array_var((
+{'var_samp': (select element test.array_var_samp((
select element x
from [test.tinyint('1'),test.tinyint('2'),test.tinyint('3')] as x
))), 'var_pop': (select element test.array_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int8_null/var_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int8_null/var_int8_null.3.query.sqlpp
index d36ab7a..fc47c9d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int8_null/var_int8_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_int8_null/var_int8_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var':test.array_var((
+{'var_samp':test.array_var_samp((
select element x.int8Field
from Numeric as x
)), 'var_pop':test.array_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_mixed/var_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_mixed/var_mixed.3.query.sqlpp
index 3063caa..cd935c0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_mixed/var_mixed.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/var_mixed/var_mixed.3.query.sqlpp
@@ -17,12 +17,12 @@
* under the License.
*/
/*
-* Description : Run array_var over an multiset with mixed types
+* Description : Run array_var_samp over an multiset with mixed types
* Expected Res : Failure
* Date : March 5th 2018
*/
-select element array_var((
+select element array_var_samp((
select element x
from [float('2.0'),'hello world',93847382783847382,date('2013-01-01')] as x
));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null/agg_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null/agg_null.3.query.sqlpp
index b865561..68b384d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null/agg_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null/agg_null.3.query.sqlpp
@@ -22,4 +22,4 @@
* Date : Jun 2nd 2013
*/
-{'count1':strict_count([null]),'average1':strict_avg([null]),'sum1':strict_sum([null]),'min1':strict_min([null]),'max1':strict_max([null]),'stddev1':strict_stddev([null]),'stddev_pop1':strict_stddev_pop([null]),'var1':strict_var([null]),'var_pop1':strict_var_pop([null]),'count2':strict_count({{null,null}}),'average2':strict_avg({{null,null}}),'sum2':strict_sum({{null,null}}),'min2':strict_min({{null,null}}),'max2':strict_max({{null,null}}),'stddev2':strict_stddev({{null,null}}),'stddev_pop2':strict_stddev_pop({{null,null}}),'var2':strict_var({{null,null}}),'var_pop2':strict_var_pop({{null,null}})};
+{'count1':strict_count([null]),'average1':strict_avg([null]),'sum1':strict_sum([null]),'min1':strict_min([null]),'max1':strict_max([null]),'stddev_samp1':strict_stddev_samp([null]),'stddev_pop1':strict_stddev_pop([null]),'var_samp1':strict_var_samp([null]),'var_pop1':strict_var_pop([null]),'skewness1':strict_skewness([null]),'kurtosis1':strict_kurtosis([null]),'count2':strict_count({{null,null}}),'average2':strict_avg({{null,null}}),'sum2':strict_sum({{null,null}}),'min2':strict_min({{null,null}}),'max2':strict_max({{null,null}}),'stddev_samp2':strict_stddev_samp({{null,null}}),'stddev_pop2':strict_stddev_pop({{null,null}}),'var_samp2':strict_var_samp({{null,null}}),'var_pop2':strict_var_pop({{null,null}}),'skewness2':strict_skewness({{null,null}}),'kurtosis2':strict_kurtosis({{null,null}})};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null_rec/agg_null_rec.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null_rec/agg_null_rec.3.query.sqlpp
index 03c7668..d5ddebc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null_rec/agg_null_rec.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null_rec/agg_null_rec.3.query.sqlpp
@@ -40,16 +40,22 @@
)),'max':test.strict_max((
select element t.valplus
from Test as t
-)), 'stddev':test.strict_stddev((
+)), 'stddev_samp':test.strict_stddev_samp((
select element t.valplus
from Test as t
)), 'stddev_pop':test.strict_stddev_pop((
select element t.valplus
from Test as t
-)), 'var':test.strict_var((
+)), 'var_samp':test.strict_var_samp((
select element t.valplus
from Test as t
)), 'var_pop':test.strict_var_pop((
select element t.valplus
from Test as t
+)), 'skewness':test.strict_skewness((
+ select element t.valplus
+ from Test as t
+)), 'kurtosis':test.strict_kurtosis((
+ select element t.valplus
+ from Test as t
))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null_rec_1/agg_null_rec_1.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null_rec_1/agg_null_rec_1.3.query.sqlpp
index 2d97c79..3bb9add 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null_rec_1/agg_null_rec_1.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null_rec_1/agg_null_rec_1.3.query.sqlpp
@@ -52,7 +52,7 @@
select element t
from Test as t
) as i
-)),'stddev':test.strict_stddev((
+)),'stddev_samp':test.strict_stddev_samp((
select element i.val
from (
select element t
@@ -64,7 +64,7 @@
select element t
from Test as t
) as i
-)),'var':test.strict_var((
+)),'var_samp':test.strict_var_samp((
select element i.val
from (
select element t
@@ -76,4 +76,16 @@
select element t
from Test as t
) as i
+)),'skewness':test.strict_skewness((
+ select element i.val
+ from (
+ select element t
+ from Test as t
+ ) as i
+)),'kurtosis':test.strict_kurtosis((
+ select element i.val
+ from (
+ select element t
+ from Test as t
+ ) as i
))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_number/agg_number.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_number/agg_number.3.query.sqlpp
index e0d4dca..8a6cf2d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_number/agg_number.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_number/agg_number.3.query.sqlpp
@@ -22,4 +22,4 @@
* Date : Jun 2nd 2013
*/
-{'count1':strict_count([float('2.0'),double('3.0'),93847382783847382,1]),'average1':strict_avg([float('2.0'),double('3.0'),93847382783847382,1]),'sum1':strict_sum([float('2.0'),double('3.0'),93847382783847382,1]),'min1':strict_min([float('2.0'),double('3.0'),93847382783847382,1]),'max1':strict_max([float('2.0'),double('3.0'),93847382783847382,1]),'stddev1':strict_stddev([float('2.0'),double('3.0'),93847382783847382,1]),'stddev_pop1':strict_stddev_pop([float('2.0'),double('3.0'),93847382783847382,1]),'var1':strict_var([float('2.0'),double('3.0'),93847382783847382,1]),'var_pop1':strict_var_pop([float('2.0'),double('3.0'),93847382783847382,1]),'count2':strict_count({{float('2.0'),double('3.0'),93847382783847382,1}}),'average2':strict_avg({{float('2.0'),double('3.0'),93847382783847382,1}}),'sum2':strict_sum({{float('2.0'),double('3.0'),93847382783847382,1}}),'min2':strict_min({{float('2.0'),double('3.0'),93847382783847382,1}}),'max2':strict_max({{float('2.0'),double('3.0'),93847382783847382,1}}),'stddev2':strict_stddev([float('2.0'),double('3.0'),93847382783847382,1]),'stddev_pop2':strict_stddev_pop([float('2.0'),double('3.0'),93847382783847382,1]),'var2':strict_var([float('2.0'),double('3.0'),93847382783847382,1]),'var_pop2':strict_var_pop([float('2.0'),double('3.0'),93847382783847382,1])};
\ No newline at end of file
+{'count1':strict_count([float('2.0'),double('3.0'),93847382783847382,1]),'average1':strict_avg([float('2.0'),double('3.0'),93847382783847382,1]),'sum1':strict_sum([float('2.0'),double('3.0'),93847382783847382,1]),'min1':strict_min([float('2.0'),double('3.0'),93847382783847382,1]),'max1':strict_max([float('2.0'),double('3.0'),93847382783847382,1]),'stddev_samp1':strict_stddev_samp([float('2.0'),double('3.0'),93847382783847382,1]),'stddev_pop1':strict_stddev_pop([float('2.0'),double('3.0'),93847382783847382,1]),'var_samp1':strict_var_samp([float('2.0'),double('3.0'),93847382783847382,1]),'var_pop1':strict_var_pop([float('2.0'),double('3.0'),93847382783847382,1]),'skewness1':strict_skewness([float('2.0'),double('3.0'),93847382783847382,1]),'kurtosis1':strict_kurtosis([float('2.0'),double('3.0'),93847382783847382,1]),'count2':strict_count({{float('2.0'),double('3.0'),93847382783847382,1}}),'average2':strict_avg({{float('2.0'),double('3.0'),93847382783847382,1}}),'sum2':strict_sum({{float('2.0'),double('3.0'),93847382783847382,1}}),'min2':strict_min({{float('2.0'),double('3.0'),93847382783847382,1}}),'max2':strict_max({{float('2.0'),double('3.0'),93847382783847382,1}}),'stddev_samp2':strict_stddev_samp([float('2.0'),double('3.0'),93847382783847382,1]),'stddev_pop2':strict_stddev_pop([float('2.0'),double('3.0'),93847382783847382,1]),'var_samp2':strict_var_samp([float('2.0'),double('3.0'),93847382783847382,1]),'var_pop2':strict_var_pop([float('2.0'),double('3.0'),93847382783847382,1]),'skewness2':strict_skewness([float('2.0'),double('3.0'),93847382783847382,1]),'kurtosis2':strict_kurtosis([float('2.0'),double('3.0'),93847382783847382,1])};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_number_rec/agg_number_rec.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_number_rec/agg_number_rec.3.query.sqlpp
index e2937d3..160ef87 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_number_rec/agg_number_rec.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_number_rec/agg_number_rec.3.query.sqlpp
@@ -40,16 +40,22 @@
)),'max':test.strict_max((
select element t.valplus
from Test as t
-)),'stddev':test.strict_stddev((
+)),'stddev_samp':test.strict_stddev_samp((
select element t.valplus
from Test as t
)),'stddev_pop':test.strict_stddev_pop((
select element t.valplus
from Test as t
-)),'var':test.strict_var((
+)),'var_samp':test.strict_var_samp((
select element t.valplus
from Test as t
)),'var_pop':test.strict_var_pop((
select element t.valplus
from Test as t
+)),'skewness':test.strict_skewness((
+ select element t.valplus
+ from Test as t
+)),'kurtosis':test.strict_kurtosis((
+ select element t.valplus
+ from Test as t
))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_distinct/kurtosis_distinct.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_distinct/kurtosis_distinct.1.query.sqlpp
new file mode 100644
index 0000000..a0f2365
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_distinct/kurtosis_distinct.1.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+ {
+ 't1': to_bigint(strict_kurtosis(distinct [10,20,30,10,20,30,10])),
+ 't2': to_bigint(strict_kurtosis(distinct [null,missing,null,missing])),
+ 't3': to_bigint(strict_kurtosis(distinct [40,null,missing,50,40,null,missing,50,40])),
+ 't4': to_bigint(strict_kurtosis(distinct []))
+ };
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_double/kurtosis_double.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_double/kurtosis_double.1.ddl.sqlpp
new file mode 100644
index 0000000..ad97753
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_double/kurtosis_double.1.ddl.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_double/kurtosis_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_double/kurtosis_double.3.query.sqlpp
new file mode 100644
index 0000000..159c579
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_double/kurtosis_double.3.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+select element strict_kurtosis((
+ select element x
+ from [1.0,2.0,double('3.0')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_double_null/kurtosis_double_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_double_null/kurtosis_double_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_double_null/kurtosis_double_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_double_null/kurtosis_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_double_null/kurtosis_double_null.3.query.sqlpp
new file mode 100644
index 0000000..c1a394e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_double_null/kurtosis_double_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'kurtosis':test.strict_kurtosis((
+ select element x.doubleField
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_empty_01/kurtosis_empty_01.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_empty_01/kurtosis_empty_01.1.ddl.sqlpp
new file mode 100644
index 0000000..fc97cef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_empty_01/kurtosis_empty_01.1.ddl.sqlpp
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that kurtosis aggregation correctly returns null for an empty stream,
+ * without an aggregate combiner.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_empty_01/kurtosis_empty_01.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_empty_01/kurtosis_empty_01.3.query.sqlpp
new file mode 100644
index 0000000..c5e434f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_empty_01/kurtosis_empty_01.3.query.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that kurtosis aggregation correctly returns null for an empty stream,
+ * without an aggregate combiner.
+ * Success : Yes
+ */
+
+use test;
+
+
+select element test.strict_kurtosis((
+ select element x
+ from [1,2,3] as x
+ where (x > 10)
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_empty_02/kurtosis_empty_02.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_empty_02/kurtosis_empty_02.1.ddl.sqlpp
new file mode 100644
index 0000000..acad83a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_empty_02/kurtosis_empty_02.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that kurtosis aggregation correctly returns null for an empty stream,
+ * with an aggregate combiner.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+ closed {
+ id : integer,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_empty_02/kurtosis_empty_02.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_empty_02/kurtosis_empty_02.3.query.sqlpp
new file mode 100644
index 0000000..e332df3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_empty_02/kurtosis_empty_02.3.query.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that kurtosis aggregation correctly returns null for an empty stream,
+ * with an aggregate combiner.
+ * Success : Yes
+ */
+
+use test;
+
+
+select element test.strict_kurtosis((
+ select element x.val
+ from Test as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_float/kurtosis_float.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_float/kurtosis_float.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_float/kurtosis_float.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_float/kurtosis_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_float/kurtosis_float.3.query.sqlpp
new file mode 100644
index 0000000..03255d2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_float/kurtosis_float.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.strict_kurtosis((
+ select element x
+ from [test.float('1'),test.float('2'),test.float('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_float_null/kurtosis_float_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_float_null/kurtosis_float_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_float_null/kurtosis_float_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_float_null/kurtosis_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_float_null/kurtosis_float_null.3.query.sqlpp
new file mode 100644
index 0000000..8a0c5aa
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_float_null/kurtosis_float_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'kurtosis':test.strict_kurtosis((
+ select element x.floatField
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int16/kurtosis_int16.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int16/kurtosis_int16.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int16/kurtosis_int16.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int16/kurtosis_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int16/kurtosis_int16.3.query.sqlpp
new file mode 100644
index 0000000..8f7fcf2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int16/kurtosis_int16.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.strict_kurtosis((
+ select element x
+ from [test.smallint('1'),test.smallint('2'),test.smallint('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int16_null/kurtosis_int16_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int16_null/kurtosis_int16_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int16_null/kurtosis_int16_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int16_null/kurtosis_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int16_null/kurtosis_int16_null.3.query.sqlpp
new file mode 100644
index 0000000..3bdb6a9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int16_null/kurtosis_int16_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'kurtosis':test.strict_kurtosis((
+ select element x.int16Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int32/kurtosis_int32.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int32/kurtosis_int32.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int32/kurtosis_int32.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int32/kurtosis_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int32/kurtosis_int32.3.query.sqlpp
new file mode 100644
index 0000000..727a60a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int32/kurtosis_int32.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.strict_kurtosis((
+ select element x
+ from [1,2,3] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int32_null/kurtosis_int32_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int32_null/kurtosis_int32_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int32_null/kurtosis_int32_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int32_null/kurtosis_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int32_null/kurtosis_int32_null.3.query.sqlpp
new file mode 100644
index 0000000..9f3b717
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int32_null/kurtosis_int32_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'kurtosis':test.strict_kurtosis((
+ select element x.int32Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int64/kurtosis_int64.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int64/kurtosis_int64.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int64/kurtosis_int64.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int64/kurtosis_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int64/kurtosis_int64.3.query.sqlpp
new file mode 100644
index 0000000..107863a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int64/kurtosis_int64.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.strict_kurtosis((
+ select element x
+ from [test.bigint('1'),test.bigint('2'),test.bigint('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int64_null/kurtosis_int64_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int64_null/kurtosis_int64_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int64_null/kurtosis_int64_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int64_null/kurtosis_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int64_null/kurtosis_int64_null.3.query.sqlpp
new file mode 100644
index 0000000..1ab2f78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int64_null/kurtosis_int64_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'kurtosis':test.strict_kurtosis((
+ select element x.int64Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int8/kurtosis_int8.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int8/kurtosis_int8.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int8/kurtosis_int8.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int8/kurtosis_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int8/kurtosis_int8.3.query.sqlpp
new file mode 100644
index 0000000..220c3ae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int8/kurtosis_int8.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.strict_kurtosis((
+ select element x
+ from [test.tinyint('1'),test.tinyint('2'),test.tinyint('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int8_null/kurtosis_int8_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int8_null/kurtosis_int8_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int8_null/kurtosis_int8_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int8_null/kurtosis_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int8_null/kurtosis_int8_null.3.query.sqlpp
new file mode 100644
index 0000000..3d8a3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_int8_null/kurtosis_int8_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'kurtosis':test.strict_kurtosis((
+ select element x.int8Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_mixed/kurtosis_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_mixed/kurtosis_mixed.3.query.sqlpp
new file mode 100644
index 0000000..fa3dc13
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/kurtosis_mixed/kurtosis_mixed.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.
+ */
+/*
+* Description : Run kurtosis over an multiset with mixed types
+* Expected Res : Failure
+* Date : March 5th 2018
+*/
+
+select element strict_kurtosis((
+ select element x
+ from [float('2.0'),'hello world',93847382783847382,date('2013-01-01')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis/scalar_kurtosis.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis/scalar_kurtosis.1.ddl.sqlpp
new file mode 100644
index 0000000..37a6cc0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis/scalar_kurtosis.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of kurtosis without nulls.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis/scalar_kurtosis.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis/scalar_kurtosis.3.query.sqlpp
new file mode 100644
index 0000000..45c00a4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis/scalar_kurtosis.3.query.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of kurtosis without nulls.
+ * Success : Yes
+ */
+
+use test;
+
+with i8 as test.strict_kurtosis([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
+ i16 as test.strict_kurtosis([test.smallint('1'),test.smallint('2'),test.smallint('3')]),
+ i32 as test.strict_kurtosis([test.integer('1'),test.integer('2'),test.integer('3')]),
+ i64 as test.strict_kurtosis([test.bigint('1'),test.bigint('2'),test.bigint('3')]),
+ f as test.strict_kurtosis([test.float('1'),test.float('2'),test.float('3')]),
+ d as test.strict_kurtosis([test.double('1'),test.double('2'),test.double('3')])
+select element i
+from [i8,i16,i32,i64,f,d] as i;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.1.ddl.sqlpp
new file mode 100644
index 0000000..090d927
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of kurtosis with an empty list.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.3.query.sqlpp
new file mode 100644
index 0000000..3ebfd4c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of kurtosis with an empty list.
+ * Success : Yes
+ */
+
+select element strict_kurtosis([]);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.1.ddl.sqlpp
new file mode 100644
index 0000000..b7b457f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of kurtosis with nulls.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.3.query.sqlpp
new file mode 100644
index 0000000..42e8ea1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.3.query.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of kurtosis with nulls.
+ * Success : Yes
+ */
+
+use test;
+
+with i8 as test.strict_kurtosis([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
+ i16 as test.strict_kurtosis([test.smallint('1'),test.smallint('2'),test.smallint('3'),null]),
+ i32 as test.strict_kurtosis([test.integer('1'),test.integer('2'),test.integer('3'),null]),
+ i64 as test.strict_kurtosis([test.bigint('1'),test.bigint('2'),test.bigint('3'),null]),
+ f as test.strict_kurtosis([test.float('1'),test.float('2'),test.float('3'),null]),
+ d as test.strict_kurtosis([test.double('1'),test.double('2'),test.double('3'),null])
+select element i
+from [i8,i16,i32,i64,f,d] as i;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness/scalar_skewness.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness/scalar_skewness.1.ddl.sqlpp
new file mode 100644
index 0000000..cdc53b6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness/scalar_skewness.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of skewness without nulls.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness/scalar_skewness.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness/scalar_skewness.3.query.sqlpp
new file mode 100644
index 0000000..2616a24
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness/scalar_skewness.3.query.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of skewness without nulls.
+ * Success : Yes
+ */
+
+use test;
+
+with i8 as test.strict_skewness([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
+ i16 as test.strict_skewness([test.smallint('1'),test.smallint('2'),test.smallint('3')]),
+ i32 as test.strict_skewness([test.integer('1'),test.integer('2'),test.integer('3')]),
+ i64 as test.strict_skewness([test.bigint('1'),test.bigint('2'),test.bigint('3')]),
+ f as test.strict_skewness([test.float('1'),test.float('2'),test.float('3')]),
+ d as test.strict_skewness([test.double('1'),test.double('2'),test.double('3')])
+select element i
+from [i8,i16,i32,i64,f,d] as i;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness_empty/scalar_skewness_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness_empty/scalar_skewness_empty.1.ddl.sqlpp
new file mode 100644
index 0000000..94f1e08
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness_empty/scalar_skewness_empty.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of skewness with an empty list.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness_empty/scalar_skewness_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness_empty/scalar_skewness_empty.3.query.sqlpp
new file mode 100644
index 0000000..e5744cd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness_empty/scalar_skewness_empty.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of skewness with an empty list.
+ * Success : Yes
+ */
+
+select element strict_skewness([]);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness_null/scalar_skewness_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness_null/scalar_skewness_null.1.ddl.sqlpp
new file mode 100644
index 0000000..f6d0e40
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness_null/scalar_skewness_null.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of skewness with nulls.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness_null/scalar_skewness_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness_null/scalar_skewness_null.3.query.sqlpp
new file mode 100644
index 0000000..a33d310
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_skewness_null/scalar_skewness_null.3.query.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests the scalar version of skewness with nulls.
+ * Success : Yes
+ */
+
+use test;
+
+with i8 as test.strict_skewness([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
+ i16 as test.strict_skewness([test.smallint('1'),test.smallint('2'),test.smallint('3'),null]),
+ i32 as test.strict_skewness([test.integer('1'),test.integer('2'),test.integer('3'),null]),
+ i64 as test.strict_skewness([test.bigint('1'),test.bigint('2'),test.bigint('3'),null]),
+ f as test.strict_skewness([test.float('1'),test.float('2'),test.float('3'),null]),
+ d as test.strict_skewness([test.double('1'),test.double('2'),test.double('3'),null])
+select element i
+from [i8,i16,i32,i64,f,d] as i;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev/scalar_stddev.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev/scalar_stddev.1.ddl.sqlpp
index 7049419..a49af36 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev/scalar_stddev.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev/scalar_stddev.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of stddev and stddev_pop without nulls.
+ * Description : Tests the scalar version of stddev_samp and stddev_pop without nulls.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev/scalar_stddev.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev/scalar_stddev.3.query.sqlpp
index a7c1497..937876a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev/scalar_stddev.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev/scalar_stddev.3.query.sqlpp
@@ -17,18 +17,18 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of stddev and stddev_pop without nulls.
+ * Description : Tests the scalar version of stddev_samp and stddev_pop without nulls.
* Success : Yes
*/
use test;
-{'stddev': (with i8 as test.strict_stddev([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
- i16 as test.strict_stddev([test.smallint('1'),test.smallint('2'),test.smallint('3')]),
- i32 as test.strict_stddev([test.integer('1'),test.integer('2'),test.integer('3')]),
- i64 as test.strict_stddev([test.bigint('1'),test.bigint('2'),test.bigint('3')]),
- f as test.strict_stddev([test.float('1'),test.float('2'),test.float('3')]),
- d as test.strict_stddev([test.double('1'),test.double('2'),test.double('3')])
+{'stddev_samp': (with i8 as test.strict_stddev_samp([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
+ i16 as test.strict_stddev_samp([test.smallint('1'),test.smallint('2'),test.smallint('3')]),
+ i32 as test.strict_stddev_samp([test.integer('1'),test.integer('2'),test.integer('3')]),
+ i64 as test.strict_stddev_samp([test.bigint('1'),test.bigint('2'),test.bigint('3')]),
+ f as test.strict_stddev_samp([test.float('1'),test.float('2'),test.float('3')]),
+ d as test.strict_stddev_samp([test.double('1'),test.double('2'),test.double('3')])
select element i
from [i8,i16,i32,i64,f,d] as i),
'stddev_pop': (with i8 as test.strict_stddev_pop([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.1.ddl.sqlpp
index 63c85db..d89031c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of stddev and stddev_pop with an empty list.
+ * Description : Tests the scalar version of stddev_samp and stddev_pop with an empty list.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.3.query.sqlpp
index bdccf51..482e4bc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.3.query.sqlpp
@@ -17,9 +17,9 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of stddev and stddev_pop with an empty list.
+ * Description : Tests the scalar version of stddev_samp and stddev_pop with an empty list.
* Success : Yes
*/
-{'stddev': (select element strict_stddev([])),
+{'stddev_samp': (select element strict_stddev_samp([])),
'stddev_pop': (select element strict_stddev_pop([]))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.1.ddl.sqlpp
index 487d166..7df9f06 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of stddev and stddev_pop with nulls.
+ * Description : Tests the scalar version of stddev_samp and stddev_pop with nulls.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.3.query.sqlpp
index d486633..7f24a42 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.3.query.sqlpp
@@ -17,18 +17,18 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of stddev and stddev_pop with nulls.
+ * Description : Tests the scalar version of stddev_samp and stddev_pop with nulls.
* Success : Yes
*/
use test;
-{'stddev': (with i8 as test.strict_stddev([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
- i16 as test.strict_stddev([test.smallint('1'),test.smallint('2'),test.smallint('3'),null]),
- i32 as test.strict_stddev([test.integer('1'),test.integer('2'),test.integer('3'),null]),
- i64 as test.strict_stddev([test.bigint('1'),test.bigint('2'),test.bigint('3'),null]),
- f as test.strict_stddev([test.float('1'),test.float('2'),test.float('3'),null]),
- d as test.strict_stddev([test.double('1'),test.double('2'),test.double('3'),null])
+{'stddev_samp': (with i8 as test.strict_stddev_samp([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
+ i16 as test.strict_stddev_samp([test.smallint('1'),test.smallint('2'),test.smallint('3'),null]),
+ i32 as test.strict_stddev_samp([test.integer('1'),test.integer('2'),test.integer('3'),null]),
+ i64 as test.strict_stddev_samp([test.bigint('1'),test.bigint('2'),test.bigint('3'),null]),
+ f as test.strict_stddev_samp([test.float('1'),test.float('2'),test.float('3'),null]),
+ d as test.strict_stddev_samp([test.double('1'),test.double('2'),test.double('3'),null])
select element i
from [i8,i16,i32,i64,f,d] as i),
'stddev_pop': (with i8 as test.strict_stddev_pop([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var/scalar_var.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var/scalar_var.1.ddl.sqlpp
index 3a3a45c..3c18f75 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var/scalar_var.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var/scalar_var.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of var and var_pop without nulls.
+ * Description : Tests the scalar version of var_samp and var_pop without nulls.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var/scalar_var.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var/scalar_var.3.query.sqlpp
index 669e686..7ce4012 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var/scalar_var.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var/scalar_var.3.query.sqlpp
@@ -17,18 +17,18 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of var and var_pop without nulls.
+ * Description : Tests the scalar version of var_samp and var_pop without nulls.
* Success : Yes
*/
use test;
-{'var': (with i8 as test.strict_var([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
- i16 as test.strict_var([test.smallint('1'),test.smallint('2'),test.smallint('3')]),
- i32 as test.strict_var([test.integer('1'),test.integer('2'),test.integer('3')]),
- i64 as test.strict_var([test.bigint('1'),test.bigint('2'),test.bigint('3')]),
- f as test.strict_var([test.float('1'),test.float('2'),test.float('3')]),
- d as test.strict_var([test.double('1'),test.double('2'),test.double('3')])
+{'var_samp': (with i8 as test.strict_var_samp([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
+ i16 as test.strict_var_samp([test.smallint('1'),test.smallint('2'),test.smallint('3')]),
+ i32 as test.strict_var_samp([test.integer('1'),test.integer('2'),test.integer('3')]),
+ i64 as test.strict_var_samp([test.bigint('1'),test.bigint('2'),test.bigint('3')]),
+ f as test.strict_var_samp([test.float('1'),test.float('2'),test.float('3')]),
+ d as test.strict_var_samp([test.double('1'),test.double('2'),test.double('3')])
select element i
from [i8,i16,i32,i64,f,d] as i),
'var_pop': (with i8 as test.strict_var_pop([test.tinyint('1'),test.tinyint('2'),test.tinyint('3')]),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_empty/scalar_var_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_empty/scalar_var_empty.1.ddl.sqlpp
index aceb0a1..6b21d18 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_empty/scalar_var_empty.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_empty/scalar_var_empty.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of var and var_pop with an empty list.
+ * Description : Tests the scalar version of var_samp and var_pop with an empty list.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_empty/scalar_var_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_empty/scalar_var_empty.3.query.sqlpp
index 35c2a77..ae5e5f3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_empty/scalar_var_empty.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_empty/scalar_var_empty.3.query.sqlpp
@@ -17,9 +17,9 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of var and var_pop with an empty list.
+ * Description : Tests the scalar version of var_samp and var_pop with an empty list.
* Success : Yes
*/
-{'var': (select element strict_var([])),
+{'var_samp': (select element strict_var_samp([])),
'var_pop': (select element strict_var_pop([]))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_null/scalar_var_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_null/scalar_var_null.1.ddl.sqlpp
index 4e53c2f..9571767 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_null/scalar_var_null.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_null/scalar_var_null.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of var and var_pop with nulls.
+ * Description : Tests the scalar version of var_samp and var_pop with nulls.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_null/scalar_var_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_null/scalar_var_null.3.query.sqlpp
index 1c74d53..f898919 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_null/scalar_var_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_var_null/scalar_var_null.3.query.sqlpp
@@ -17,18 +17,18 @@
* under the License.
*/
/*
- * Description : Tests the scalar version of var and var_pop with nulls.
+ * Description : Tests the scalar version of var_samp and var_pop with nulls.
* Success : Yes
*/
use test;
-{'var': (with i8 as test.strict_var([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
- i16 as test.strict_var([test.smallint('1'),test.smallint('2'),test.smallint('3'),null]),
- i32 as test.strict_var([test.integer('1'),test.integer('2'),test.integer('3'),null]),
- i64 as test.strict_var([test.bigint('1'),test.bigint('2'),test.bigint('3'),null]),
- f as test.strict_var([test.float('1'),test.float('2'),test.float('3'),null]),
- d as test.strict_var([test.double('1'),test.double('2'),test.double('3'),null])
+{'var_samp': (with i8 as test.strict_var_samp([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
+ i16 as test.strict_var_samp([test.smallint('1'),test.smallint('2'),test.smallint('3'),null]),
+ i32 as test.strict_var_samp([test.integer('1'),test.integer('2'),test.integer('3'),null]),
+ i64 as test.strict_var_samp([test.bigint('1'),test.bigint('2'),test.bigint('3'),null]),
+ f as test.strict_var_samp([test.float('1'),test.float('2'),test.float('3'),null]),
+ d as test.strict_var_samp([test.double('1'),test.double('2'),test.double('3'),null])
select element i
from [i8,i16,i32,i64,f,d] as i),
'var_pop': (with i8 as test.strict_var_pop([test.tinyint('1'),test.tinyint('2'),test.tinyint('3'),null]),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.2.update.sqlpp
new file mode 100644
index 0000000..88d820c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':double(4.32),'valplus':double(473847.0)};
+insert into Test
+select element {'id':1,'gid':1,'val':double(5.32)};
+insert into Test
+select element {'id':2,'gid':1,'val':double(6.32),'valplus':double(38473827484738239.0)};
+insert into Test
+select element {'id':3,'gid':1,'val':double(4.32),'valplus':double(678900.0)};
+insert into Test
+select element {'id':4,'gid':1,'val':double(4.32),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.3.query.sqlpp
new file mode 100644
index 0000000..53ba1cb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.val from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.2.update.sqlpp
new file mode 100644
index 0000000..88d820c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':double(4.32),'valplus':double(473847.0)};
+insert into Test
+select element {'id':1,'gid':1,'val':double(5.32)};
+insert into Test
+select element {'id':2,'gid':1,'val':double(6.32),'valplus':double(38473827484738239.0)};
+insert into Test
+select element {'id':3,'gid':1,'val':double(4.32),'valplus':double(678900.0)};
+insert into Test
+select element {'id':4,'gid':1,'val':double(4.32),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.3.query.sqlpp
new file mode 100644
index 0000000..d8656d3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.valplus from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.3.query.sqlpp
new file mode 100644
index 0000000..53ba1cb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.val from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.1.ddl.sqlpp
new file mode 100644
index 0000000..ddac6a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : float
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.2.update.sqlpp
new file mode 100644
index 0000000..c83ba1c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':float('4.32'),'valplus':float('473847')};
+insert into Test
+select element {'id':1,'gid':1,'val':float('5.32')};
+insert into Test
+select element {'id':2,'gid':1,'val':float('6.32'),'valplus':float('38473827484738239')};
+insert into Test
+select element {'id':3,'gid':1,'val':float('4.32'),'valplus':float('678900')};
+insert into Test
+select element {'id':4,'gid':1,'val':float('4.32'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.3.query.sqlpp
new file mode 100644
index 0000000..53ba1cb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.val from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.1.ddl.sqlpp
new file mode 100644
index 0000000..ddac6a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : float
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.2.update.sqlpp
new file mode 100644
index 0000000..c83ba1c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':float('4.32'),'valplus':float('473847')};
+insert into Test
+select element {'id':1,'gid':1,'val':float('5.32')};
+insert into Test
+select element {'id':2,'gid':1,'val':float('6.32'),'valplus':float('38473827484738239')};
+insert into Test
+select element {'id':3,'gid':1,'val':float('4.32'),'valplus':float('678900')};
+insert into Test
+select element {'id':4,'gid':1,'val':float('4.32'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.3.query.sqlpp
new file mode 100644
index 0000000..d8656d3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.valplus from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.1.ddl.sqlpp
new file mode 100644
index 0000000..0c0bfee
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : smallint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.2.update.sqlpp
new file mode 100644
index 0000000..6210af4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':smallint('4'),'valplus':smallint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':smallint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':smallint('6'),'valplus':smallint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':smallint('4'),'valplus':smallint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':smallint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.3.query.sqlpp
new file mode 100644
index 0000000..53ba1cb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.val from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.ddl.sqlpp
new file mode 100644
index 0000000..0c0bfee
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : smallint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.2.update.sqlpp
new file mode 100644
index 0000000..6210af4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':smallint('4'),'valplus':smallint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':smallint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':smallint('6'),'valplus':smallint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':smallint('4'),'valplus':smallint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':smallint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.3.query.sqlpp
new file mode 100644
index 0000000..d8656d3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.valplus from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.1.ddl.sqlpp
new file mode 100644
index 0000000..07312bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : integer
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.2.update.sqlpp
new file mode 100644
index 0000000..a248a0f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':integer('4'),'valplus':integer('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':integer('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':integer('6'),'valplus':integer('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':integer('4'),'valplus':integer('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':integer('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.3.query.sqlpp
new file mode 100644
index 0000000..53ba1cb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.val from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.ddl.sqlpp
new file mode 100644
index 0000000..07312bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : integer
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.2.update.sqlpp
new file mode 100644
index 0000000..a248a0f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':integer('4'),'valplus':integer('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':integer('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':integer('6'),'valplus':integer('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':integer('4'),'valplus':integer('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':integer('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.3.query.sqlpp
new file mode 100644
index 0000000..d8656d3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.valplus from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.1.ddl.sqlpp
new file mode 100644
index 0000000..5e9972c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : bigint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.2.update.sqlpp
new file mode 100644
index 0000000..b460af2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':bigint('4'),'valplus':bigint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':bigint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':bigint('6'),'valplus':bigint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':bigint('4'),'valplus':bigint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':bigint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.3.query.sqlpp
new file mode 100644
index 0000000..53ba1cb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.val from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.ddl.sqlpp
new file mode 100644
index 0000000..5e9972c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : bigint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.2.update.sqlpp
new file mode 100644
index 0000000..b460af2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':bigint('4'),'valplus':bigint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':bigint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':bigint('6'),'valplus':bigint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':bigint('4'),'valplus':bigint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':bigint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.3.query.sqlpp
new file mode 100644
index 0000000..d8656d3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.valplus from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.1.ddl.sqlpp
new file mode 100644
index 0000000..c45dbfe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.2.update.sqlpp
new file mode 100644
index 0000000..5a65a20
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':tinyint('4'),'valplus':tinyint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':tinyint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':tinyint('6'),'valplus':tinyint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':tinyint('4'),'valplus':tinyint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':tinyint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.3.query.sqlpp
new file mode 100644
index 0000000..53ba1cb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.val from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.ddl.sqlpp
new file mode 100644
index 0000000..c45dbfe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.2.update.sqlpp
new file mode 100644
index 0000000..5a65a20
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':tinyint('4'),'valplus':tinyint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':tinyint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':tinyint('6'),'valplus':tinyint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':tinyint('4'),'valplus':tinyint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':tinyint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.3.query.sqlpp
new file mode 100644
index 0000000..d8656d3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_kurtosis((select value g.valplus from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.2.update.sqlpp
new file mode 100644
index 0000000..1b4eac9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.2.update.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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':double(4.32),'valplus':float('2.0')};
+insert into Test
+select element {'id':1,'gid':1,'val':double(5.32),'valplus':float('1.0')};
+insert into Test
+select element {'id':2,'gid':1,'val':double(6.32),'valplus':'hello world'};
+insert into Test
+select element {'id':3,'gid':1,'val':double(4.32),'valplus':double('3.0')};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.3.query.sqlpp
new file mode 100644
index 0000000..571a216
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.3.query.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+ /*
+ * Description : Run serial-kurtosis over an multiset with mixed types
+ * Expected Res : Failure
+ * Date : March 5th 2018
+ */
+
+use test;
+
+select gid, strict_kurtosis((select value g.valplus from g)) as kurtosis
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.2.update.sqlpp
new file mode 100644
index 0000000..88d820c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':double(4.32),'valplus':double(473847.0)};
+insert into Test
+select element {'id':1,'gid':1,'val':double(5.32)};
+insert into Test
+select element {'id':2,'gid':1,'val':double(6.32),'valplus':double(38473827484738239.0)};
+insert into Test
+select element {'id':3,'gid':1,'val':double(4.32),'valplus':double(678900.0)};
+insert into Test
+select element {'id':4,'gid':1,'val':double(4.32),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.3.query.sqlpp
new file mode 100644
index 0000000..d2022f3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.val from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.2.update.sqlpp
new file mode 100644
index 0000000..88d820c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':double(4.32),'valplus':double(473847.0)};
+insert into Test
+select element {'id':1,'gid':1,'val':double(5.32)};
+insert into Test
+select element {'id':2,'gid':1,'val':double(6.32),'valplus':double(38473827484738239.0)};
+insert into Test
+select element {'id':3,'gid':1,'val':double(4.32),'valplus':double(678900.0)};
+insert into Test
+select element {'id':4,'gid':1,'val':double(4.32),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.3.query.sqlpp
new file mode 100644
index 0000000..10d167c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.valplus from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_empty/serial_skewness_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_empty/serial_skewness_empty.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_empty/serial_skewness_empty.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_empty/serial_skewness_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_empty/serial_skewness_empty.3.query.sqlpp
new file mode 100644
index 0000000..d2022f3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_empty/serial_skewness_empty.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.val from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.1.ddl.sqlpp
new file mode 100644
index 0000000..ddac6a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : float
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.2.update.sqlpp
new file mode 100644
index 0000000..c83ba1c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':float('4.32'),'valplus':float('473847')};
+insert into Test
+select element {'id':1,'gid':1,'val':float('5.32')};
+insert into Test
+select element {'id':2,'gid':1,'val':float('6.32'),'valplus':float('38473827484738239')};
+insert into Test
+select element {'id':3,'gid':1,'val':float('4.32'),'valplus':float('678900')};
+insert into Test
+select element {'id':4,'gid':1,'val':float('4.32'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.3.query.sqlpp
new file mode 100644
index 0000000..d2022f3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.val from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.1.ddl.sqlpp
new file mode 100644
index 0000000..ddac6a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : float
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.2.update.sqlpp
new file mode 100644
index 0000000..c83ba1c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':float('4.32'),'valplus':float('473847')};
+insert into Test
+select element {'id':1,'gid':1,'val':float('5.32')};
+insert into Test
+select element {'id':2,'gid':1,'val':float('6.32'),'valplus':float('38473827484738239')};
+insert into Test
+select element {'id':3,'gid':1,'val':float('4.32'),'valplus':float('678900')};
+insert into Test
+select element {'id':4,'gid':1,'val':float('4.32'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.3.query.sqlpp
new file mode 100644
index 0000000..10d167c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.valplus from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.1.ddl.sqlpp
new file mode 100644
index 0000000..0c0bfee
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : smallint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.2.update.sqlpp
new file mode 100644
index 0000000..6210af4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':smallint('4'),'valplus':smallint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':smallint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':smallint('6'),'valplus':smallint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':smallint('4'),'valplus':smallint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':smallint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.3.query.sqlpp
new file mode 100644
index 0000000..d2022f3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.val from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.1.ddl.sqlpp
new file mode 100644
index 0000000..0c0bfee
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : smallint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.2.update.sqlpp
new file mode 100644
index 0000000..6210af4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':smallint('4'),'valplus':smallint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':smallint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':smallint('6'),'valplus':smallint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':smallint('4'),'valplus':smallint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':smallint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.3.query.sqlpp
new file mode 100644
index 0000000..10d167c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.valplus from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.1.ddl.sqlpp
new file mode 100644
index 0000000..07312bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : integer
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.2.update.sqlpp
new file mode 100644
index 0000000..a248a0f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':integer('4'),'valplus':integer('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':integer('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':integer('6'),'valplus':integer('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':integer('4'),'valplus':integer('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':integer('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.3.query.sqlpp
new file mode 100644
index 0000000..d2022f3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.val from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.1.ddl.sqlpp
new file mode 100644
index 0000000..07312bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : integer
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.2.update.sqlpp
new file mode 100644
index 0000000..a248a0f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':integer('4'),'valplus':integer('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':integer('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':integer('6'),'valplus':integer('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':integer('4'),'valplus':integer('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':integer('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.3.query.sqlpp
new file mode 100644
index 0000000..10d167c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.valplus from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.1.ddl.sqlpp
new file mode 100644
index 0000000..5e9972c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : bigint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.2.update.sqlpp
new file mode 100644
index 0000000..b460af2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':bigint('4'),'valplus':bigint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':bigint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':bigint('6'),'valplus':bigint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':bigint('4'),'valplus':bigint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':bigint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.3.query.sqlpp
new file mode 100644
index 0000000..d2022f3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.val from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.1.ddl.sqlpp
new file mode 100644
index 0000000..5e9972c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : bigint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.2.update.sqlpp
new file mode 100644
index 0000000..b460af2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':bigint('4'),'valplus':bigint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':bigint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':bigint('6'),'valplus':bigint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':bigint('4'),'valplus':bigint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':bigint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.3.query.sqlpp
new file mode 100644
index 0000000..10d167c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.valplus from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.1.ddl.sqlpp
new file mode 100644
index 0000000..c45dbfe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.2.update.sqlpp
new file mode 100644
index 0000000..5a65a20
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':tinyint('4'),'valplus':tinyint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':tinyint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':tinyint('6'),'valplus':tinyint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':tinyint('4'),'valplus':tinyint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':tinyint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.3.query.sqlpp
new file mode 100644
index 0000000..d2022f3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.val from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(val as val);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.1.ddl.sqlpp
new file mode 100644
index 0000000..c45dbfe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.2.update.sqlpp
new file mode 100644
index 0000000..5a65a20
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.2.update.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':tinyint('4'),'valplus':tinyint('1')};
+insert into Test
+select element {'id':1,'gid':1,'val':tinyint('5')};
+insert into Test
+select element {'id':2,'gid':1,'val':tinyint('6'),'valplus':tinyint('2')};
+insert into Test
+select element {'id':3,'gid':1,'val':tinyint('4'),'valplus':tinyint('3')};
+insert into Test
+select element {'id':4,'gid':1,'val':tinyint('4'),'valplus':null};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.3.query.sqlpp
new file mode 100644
index 0000000..10d167c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 gid, strict_skewness((select value g.valplus from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.1.ddl.sqlpp
new file mode 100644
index 0000000..da0bd7b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.1.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+{
+ id : bigint,
+ gid : bigint,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.2.update.sqlpp
new file mode 100644
index 0000000..1b4eac9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.2.update.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;
+
+insert into Test
+select element {'id':0,'gid':1,'val':double(4.32),'valplus':float('2.0')};
+insert into Test
+select element {'id':1,'gid':1,'val':double(5.32),'valplus':float('1.0')};
+insert into Test
+select element {'id':2,'gid':1,'val':double(6.32),'valplus':'hello world'};
+insert into Test
+select element {'id':3,'gid':1,'val':double(4.32),'valplus':double('3.0')};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.3.query.sqlpp
new file mode 100644
index 0000000..34aebda
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.3.query.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+ /*
+ * Description : Run serial-skewness over an multiset with mixed types
+ * Expected Res : Failure
+ * Date : March 5th 2018
+ */
+
+use test;
+
+select gid, strict_skewness((select value g.valplus from g)) as skewness
+from Test as t
+/* +hash */
+group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.3.query.sqlpp
index ad787f5..2c585b9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.val from g)) as stddev,
+select gid, strict_stddev_samp((select value g.val from g)) as stddev_samp,
strict_stddev_pop((select value g.val from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.3.query.sqlpp
index 3ca4fec..78e08fc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.valplus from g)) as stddev,
+select gid, strict_stddev_samp((select value g.valplus from g)) as stddev_samp,
strict_stddev_pop((select value g.valplus from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_empty/serial_stddev_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_empty/serial_stddev_empty.3.query.sqlpp
index ad787f5..2c585b9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_empty/serial_stddev_empty.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_empty/serial_stddev_empty.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.val from g)) as stddev,
+select gid, strict_stddev_samp((select value g.val from g)) as stddev_samp,
strict_stddev_pop((select value g.val from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.3.query.sqlpp
index ad787f5..2c585b9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.val from g)) as stddev,
+select gid, strict_stddev_samp((select value g.val from g)) as stddev_samp,
strict_stddev_pop((select value g.val from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.3.query.sqlpp
index 3ca4fec..78e08fc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.valplus from g)) as stddev,
+select gid, strict_stddev_samp((select value g.valplus from g)) as stddev_samp,
strict_stddev_pop((select value g.valplus from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.3.query.sqlpp
index ad787f5..2c585b9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.val from g)) as stddev,
+select gid, strict_stddev_samp((select value g.val from g)) as stddev_samp,
strict_stddev_pop((select value g.val from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.3.query.sqlpp
index 3ca4fec..78e08fc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.valplus from g)) as stddev,
+select gid, strict_stddev_samp((select value g.valplus from g)) as stddev_samp,
strict_stddev_pop((select value g.valplus from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.3.query.sqlpp
index ad787f5..2c585b9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.val from g)) as stddev,
+select gid, strict_stddev_samp((select value g.val from g)) as stddev_samp,
strict_stddev_pop((select value g.val from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.3.query.sqlpp
index 3ca4fec..78e08fc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.valplus from g)) as stddev,
+select gid, strict_stddev_samp((select value g.valplus from g)) as stddev_samp,
strict_stddev_pop((select value g.valplus from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.3.query.sqlpp
index ad787f5..2c585b9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.val from g)) as stddev,
+select gid, strict_stddev_samp((select value g.val from g)) as stddev_samp,
strict_stddev_pop((select value g.val from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.3.query.sqlpp
index 3ca4fec..78e08fc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.valplus from g)) as stddev,
+select gid, strict_stddev_samp((select value g.valplus from g)) as stddev_samp,
strict_stddev_pop((select value g.valplus from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.3.query.sqlpp
index ad787f5..2c585b9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.val from g)) as stddev,
+select gid, strict_stddev_samp((select value g.val from g)) as stddev_samp,
strict_stddev_pop((select value g.val from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.3.query.sqlpp
index 3ca4fec..78e08fc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_stddev((select value g.valplus from g)) as stddev,
+select gid, strict_stddev_samp((select value g.valplus from g)) as stddev_samp,
strict_stddev_pop((select value g.valplus from g)) as stddev_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.3.query.sqlpp
index d7889c2..edbf8d5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.3.query.sqlpp
@@ -17,14 +17,14 @@
* under the License.
*/
/*
- * Description : Run serial-stddev over an multiset with mixed types
+ * Description : Run serial-stddev_samp over an multiset with mixed types
* Expected Res : Failure
* Date : March 5th 2018
*/
use test;
-select gid, strict_stddev((select value g.valplus from g)) as stddev
+select gid, strict_stddev_samp((select value g.valplus from g)) as stddev_samp
from Test as t
/* +hash */
group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_double/serial_var_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_double/serial_var_double.3.query.sqlpp
index 23e33cc..67559cd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_double/serial_var_double.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_double/serial_var_double.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.val from g)) as var,
+select gid, strict_var_samp((select value g.val from g)) as var_samp,
strict_var_pop((select value g.val from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_double_null/serial_var_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_double_null/serial_var_double_null.3.query.sqlpp
index 7116737..6952afb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_double_null/serial_var_double_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_double_null/serial_var_double_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.valplus from g)) as var,
+select gid, strict_var_samp((select value g.valplus from g)) as var_samp,
strict_var_pop((select value g.valplus from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_empty/serial_var_empty.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_empty/serial_var_empty.3.query.sqlpp
index 23e33cc..67559cd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_empty/serial_var_empty.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_empty/serial_var_empty.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.val from g)) as var,
+select gid, strict_var_samp((select value g.val from g)) as var_samp,
strict_var_pop((select value g.val from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_float/serial_var_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_float/serial_var_float.3.query.sqlpp
index 23e33cc..67559cd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_float/serial_var_float.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_float/serial_var_float.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.val from g)) as var,
+select gid, strict_var_samp((select value g.val from g)) as var_samp,
strict_var_pop((select value g.val from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_float_null/serial_var_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_float_null/serial_var_float_null.3.query.sqlpp
index 7116737..6952afb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_float_null/serial_var_float_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_float_null/serial_var_float_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.valplus from g)) as var,
+select gid, strict_var_samp((select value g.valplus from g)) as var_samp,
strict_var_pop((select value g.valplus from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int16/serial_var_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int16/serial_var_int16.3.query.sqlpp
index 23e33cc..67559cd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int16/serial_var_int16.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int16/serial_var_int16.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.val from g)) as var,
+select gid, strict_var_samp((select value g.val from g)) as var_samp,
strict_var_pop((select value g.val from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int16_null/serial_var_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int16_null/serial_var_int16_null.3.query.sqlpp
index 7116737..6952afb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int16_null/serial_var_int16_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int16_null/serial_var_int16_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.valplus from g)) as var,
+select gid, strict_var_samp((select value g.valplus from g)) as var_samp,
strict_var_pop((select value g.valplus from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int32/serial_var_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int32/serial_var_int32.3.query.sqlpp
index 23e33cc..67559cd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int32/serial_var_int32.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int32/serial_var_int32.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.val from g)) as var,
+select gid, strict_var_samp((select value g.val from g)) as var_samp,
strict_var_pop((select value g.val from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int32_null/serial_var_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int32_null/serial_var_int32_null.3.query.sqlpp
index 7116737..6952afb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int32_null/serial_var_int32_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int32_null/serial_var_int32_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.valplus from g)) as var,
+select gid, strict_var_samp((select value g.valplus from g)) as var_samp,
strict_var_pop((select value g.valplus from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int64/serial_var_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int64/serial_var_int64.3.query.sqlpp
index 23e33cc..67559cd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int64/serial_var_int64.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int64/serial_var_int64.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.val from g)) as var,
+select gid, strict_var_samp((select value g.val from g)) as var_samp,
strict_var_pop((select value g.val from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int64_null/serial_var_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int64_null/serial_var_int64_null.3.query.sqlpp
index 7116737..6952afb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int64_null/serial_var_int64_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int64_null/serial_var_int64_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.valplus from g)) as var,
+select gid, strict_var_samp((select value g.valplus from g)) as var_samp,
strict_var_pop((select value g.valplus from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int8/serial_var_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int8/serial_var_int8.3.query.sqlpp
index 23e33cc..67559cd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int8/serial_var_int8.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int8/serial_var_int8.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.val from g)) as var,
+select gid, strict_var_samp((select value g.val from g)) as var_samp,
strict_var_pop((select value g.val from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int8_null/serial_var_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int8_null/serial_var_int8_null.3.query.sqlpp
index 7116737..6952afb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int8_null/serial_var_int8_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_int8_null/serial_var_int8_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-select gid, strict_var((select value g.valplus from g)) as var,
+select gid, strict_var_samp((select value g.valplus from g)) as var_samp,
strict_var_pop((select value g.valplus from g)) as var_pop
from Test as t
/* +hash */
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_mixed/serial_var_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_mixed/serial_var_mixed.3.query.sqlpp
index 4f7a31f..0fe7cc2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_mixed/serial_var_mixed.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_var_mixed/serial_var_mixed.3.query.sqlpp
@@ -17,14 +17,14 @@
* under the License.
*/
/*
- * Description : Run serial-var over an multiset with mixed types
+ * Description : Run serial-var_samp over an multiset with mixed types
* Expected Res : Failure
* Date : March 5th 2018
*/
use test;
-select gid, strict_var((select value g.valplus from g)) as var
+select gid, strict_var_samp((select value g.valplus from g)) as var_samp
from Test as t
/* +hash */
group by t.gid as gid group as g(valplus as valplus);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_distinct/skewness_distinct.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_distinct/skewness_distinct.1.query.sqlpp
new file mode 100644
index 0000000..612132b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_distinct/skewness_distinct.1.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+ {
+ 't1': to_bigint(strict_skewness(distinct [10,20,30,10,20,30,10])),
+ 't2': to_bigint(strict_skewness(distinct [null,missing,null,missing])),
+ 't3': to_bigint(strict_skewness(distinct [40,null,missing,50,40,null,missing,50,40])),
+ 't4': to_bigint(strict_skewness(distinct []))
+ };
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_double/skewness_double.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_double/skewness_double.1.ddl.sqlpp
new file mode 100644
index 0000000..ad97753
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_double/skewness_double.1.ddl.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_double/skewness_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_double/skewness_double.3.query.sqlpp
new file mode 100644
index 0000000..2d09a13
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_double/skewness_double.3.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+select element strict_skewness((
+ select element x
+ from [1.0,2.0,double('3.0')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_double_null/skewness_double_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_double_null/skewness_double_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_double_null/skewness_double_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_double_null/skewness_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_double_null/skewness_double_null.3.query.sqlpp
new file mode 100644
index 0000000..e54a3c5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_double_null/skewness_double_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'skewness':test.strict_skewness((
+ select element x.doubleField
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_empty_01/skewness_empty_01.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_empty_01/skewness_empty_01.1.ddl.sqlpp
new file mode 100644
index 0000000..f6ac910
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_empty_01/skewness_empty_01.1.ddl.sqlpp
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that skewness aggregation correctly returns null for an empty stream,
+ * without an aggregate combiner.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_empty_01/skewness_empty_01.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_empty_01/skewness_empty_01.3.query.sqlpp
new file mode 100644
index 0000000..a548063
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_empty_01/skewness_empty_01.3.query.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that skewness aggregation correctly returns null for an empty stream,
+ * without an aggregate combiner.
+ * Success : Yes
+ */
+
+use test;
+
+
+select element test.strict_skewness((
+ select element x
+ from [1,2,3] as x
+ where (x > 10)
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_empty_02/skewness_empty_02.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_empty_02/skewness_empty_02.1.ddl.sqlpp
new file mode 100644
index 0000000..0d38d53
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_empty_02/skewness_empty_02.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that skewness aggregation correctly returns null for an empty stream,
+ * with an aggregate combiner.
+ * Success : Yes
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.TestType as
+ closed {
+ id : integer,
+ val : double
+};
+
+create dataset Test(TestType) primary key id;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_empty_02/skewness_empty_02.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_empty_02/skewness_empty_02.3.query.sqlpp
new file mode 100644
index 0000000..6bc89d8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_empty_02/skewness_empty_02.3.query.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+/*
+ * Description : Tests that skewness aggregation correctly returns null for an empty stream,
+ * with an aggregate combiner.
+ * Success : Yes
+ */
+
+use test;
+
+
+select element test.strict_skewness((
+ select element x.val
+ from Test as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_float/skewness_float.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_float/skewness_float.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_float/skewness_float.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_float/skewness_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_float/skewness_float.3.query.sqlpp
new file mode 100644
index 0000000..1a5bfda
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_float/skewness_float.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.strict_skewness((
+ select element x
+ from [test.float('1'),test.float('2'),test.float('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_float_null/skewness_float_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_float_null/skewness_float_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_float_null/skewness_float_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_float_null/skewness_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_float_null/skewness_float_null.3.query.sqlpp
new file mode 100644
index 0000000..c34c163
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_float_null/skewness_float_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'skewness':test.strict_skewness((
+ select element x.floatField
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int16/skewness_int16.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int16/skewness_int16.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int16/skewness_int16.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int16/skewness_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int16/skewness_int16.3.query.sqlpp
new file mode 100644
index 0000000..c584a75
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int16/skewness_int16.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.strict_skewness((
+ select element x
+ from [test.smallint('1'),test.smallint('2'),test.smallint('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int16_null/skewness_int16_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int16_null/skewness_int16_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int16_null/skewness_int16_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int16_null/skewness_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int16_null/skewness_int16_null.3.query.sqlpp
new file mode 100644
index 0000000..9ce8023
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int16_null/skewness_int16_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'skewness':test.strict_skewness((
+ select element x.int16Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int32/skewness_int32.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int32/skewness_int32.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int32/skewness_int32.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int32/skewness_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int32/skewness_int32.3.query.sqlpp
new file mode 100644
index 0000000..7faa1c6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int32/skewness_int32.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.strict_skewness((
+ select element x
+ from [1,2,3] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int32_null/skewness_int32_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int32_null/skewness_int32_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int32_null/skewness_int32_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int32_null/skewness_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int32_null/skewness_int32_null.3.query.sqlpp
new file mode 100644
index 0000000..8ccb452
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int32_null/skewness_int32_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'skewness':test.strict_skewness((
+ select element x.int32Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int64/skewness_int64.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int64/skewness_int64.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int64/skewness_int64.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int64/skewness_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int64/skewness_int64.3.query.sqlpp
new file mode 100644
index 0000000..3fe0279
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int64/skewness_int64.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.strict_skewness((
+ select element x
+ from [test.bigint('1'),test.bigint('2'),test.bigint('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int64_null/skewness_int64_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int64_null/skewness_int64_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int64_null/skewness_int64_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int64_null/skewness_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int64_null/skewness_int64_null.3.query.sqlpp
new file mode 100644
index 0000000..4e03b41
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int64_null/skewness_int64_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'skewness':test.strict_skewness((
+ select element x.int64Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int8/skewness_int8.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int8/skewness_int8.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int8/skewness_int8.1.ddl.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int8/skewness_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int8/skewness_int8.3.query.sqlpp
new file mode 100644
index 0000000..9e13a2b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int8/skewness_int8.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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 element test.strict_skewness((
+ select element x
+ from [test.tinyint('1'),test.tinyint('2'),test.tinyint('3')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int8_null/skewness_int8_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int8_null/skewness_int8_null.1.ddl.sqlpp
new file mode 100644
index 0000000..3f2c5bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int8_null/skewness_int8_null.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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 dataverse test if exists;
+create dataverse test;
+
+use test;
+
+
+create type test.NumericType as
+{
+ id : integer,
+ int8Field : tinyint?,
+ int16Field : smallint?,
+ int32Field : integer?,
+ int64Field : bigint?,
+ floatField : float?,
+ doubleField : double?
+};
+
+create external dataset Numeric(NumericType) using localfs((`path`=`asterix_nc1://data/nontagged/numericData.json`),(`format`=`adm`));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int8_null/skewness_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int8_null/skewness_int8_null.3.query.sqlpp
new file mode 100644
index 0000000..e6b390f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_int8_null/skewness_int8_null.3.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+
+{'skewness':test.strict_skewness((
+ select element x.int8Field
+ from Numeric as x
+))};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_mixed/skewness_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_mixed/skewness_mixed.3.query.sqlpp
new file mode 100644
index 0000000..19bee68
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/skewness_mixed/skewness_mixed.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.
+ */
+/*
+* Description : Run skewness over an multiset with mixed types
+* Expected Res : Failure
+* Date : March 5th 2018
+*/
+
+select element strict_skewness((
+ select element x
+ from [float('2.0'),'hello world',93847382783847382,date('2013-01-01')] as x
+));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_distinct/stddev_distinct.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_distinct/stddev_distinct.1.query.sqlpp
index ee5b28c..4932339 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_distinct/stddev_distinct.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_distinct/stddev_distinct.1.query.sqlpp
@@ -17,10 +17,10 @@
* under the License.
*/
{
- 't1': to_bigint(strict_stddev(distinct [10,20,30,10,20,30,10])),
- 't2': to_bigint(strict_stddev(distinct [null,missing,null,missing])),
- 't3': to_bigint(strict_stddev(distinct [40,null,missing,50,40,null,missing,50,40])),
- 't4': to_bigint(strict_stddev(distinct [])),
+ 't1': to_bigint(strict_stddev_samp(distinct [10,20,30,10,20,30,10])),
+ 't2': to_bigint(strict_stddev_samp(distinct [null,missing,null,missing])),
+ 't3': to_bigint(strict_stddev_samp(distinct [40,null,missing,50,40,null,missing,50,40])),
+ 't4': to_bigint(strict_stddev_samp(distinct [])),
't5': to_bigint(strict_stddev_pop(distinct [10,20,30,10,20,30,10])),
't6': to_bigint(strict_stddev_pop(distinct [null,missing,null,missing])),
't7': to_bigint(strict_stddev_pop(distinct [40,null,missing,50,40,null,missing,50,40])),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_double/stddev_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_double/stddev_double.3.query.sqlpp
index 6ec48bd..a02f088 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_double/stddev_double.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_double/stddev_double.3.query.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
-{'stddev':(select element strict_stddev((
+{'stddev_samp':(select element strict_stddev_samp((
select element x
from [1.0,2.0,double('3.0')] as x
))), 'stddev_pop': (select element strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_double_null/stddev_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_double_null/stddev_double_null.3.query.sqlpp
index b8970f0..1bc4da0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_double_null/stddev_double_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_double_null/stddev_double_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-{'stddev':test.strict_stddev((
+{'stddev_samp':test.strict_stddev_samp((
select element x.doubleField
from Numeric as x
)), 'stddev_pop':test.strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.1.ddl.sqlpp
index 8ec3e08..307a359 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests that stddev aggregation correctly returns null for an empty stream,
+ * Description : Tests that stddev_samp aggregation correctly returns null for an empty stream,
* without an aggregate combiner.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.3.query.sqlpp
index 7c02b5d..c50927a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.3.query.sqlpp
@@ -17,14 +17,14 @@
* under the License.
*/
/*
- * Description : Tests that stddev aggregation correctly returns null for an empty stream,
+ * Description : Tests that stddev_samp aggregation correctly returns null for an empty stream,
* without an aggregate combiner.
* Success : Yes
*/
use test;
-{'stddev': (select element test.strict_stddev((
+{'stddev_samp': (select element test.strict_stddev_samp((
select element x
from [1,2,3] as x
where (x > 10)
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.1.ddl.sqlpp
index ac9ee8f..4d40712 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests that stddev aggregation correctly returns null for an empty stream,
+ * Description : Tests that stddev_samp aggregation correctly returns null for an empty stream,
* with an aggregate combiner.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.3.query.sqlpp
index 00ef2a5..4d53b40 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.3.query.sqlpp
@@ -17,14 +17,14 @@
* under the License.
*/
/*
- * Description : Tests that stddev aggregation correctly returns null for an empty stream,
+ * Description : Tests that stddev_samp aggregation correctly returns null for an empty stream,
* with an aggregate combiner.
* Success : Yes
*/
use test;
-{'stddev': (select element test.strict_stddev((
+{'stddev_samp': (select element test.strict_stddev_samp((
select element x.val
from Test as x
))), 'stddev_pop': (select element test.strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_float/stddev_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_float/stddev_float.3.query.sqlpp
index 7d93d5f..12576a5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_float/stddev_float.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_float/stddev_float.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev': (select element test.strict_stddev((
+{'stddev_samp': (select element test.strict_stddev_samp((
select element x
from [test.float('1'),test.float('2'),test.float('3')] as x
))), 'stddev_pop': (select element test.strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_float_null/stddev_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_float_null/stddev_float_null.3.query.sqlpp
index 8953da9..d36b889 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_float_null/stddev_float_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_float_null/stddev_float_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev':test.strict_stddev((
+{'stddev_samp':test.strict_stddev_samp((
select element x.floatField
from Numeric as x
)), 'stddev_pop':test.strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int16/stddev_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int16/stddev_int16.3.query.sqlpp
index 3c8b633..fccd854 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int16/stddev_int16.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int16/stddev_int16.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev': (select element test.strict_stddev((
+{'stddev_samp': (select element test.strict_stddev_samp((
select element x
from [test.smallint('1'),test.smallint('2'),test.smallint('3')] as x
))), 'stddev_pop': (select element test.strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.3.query.sqlpp
index 314b28f..00b1a00 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev':test.strict_stddev((
+{'stddev_samp':test.strict_stddev_samp((
select element x.int16Field
from Numeric as x
)), 'stddev_pop':test.strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int32/stddev_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int32/stddev_int32.3.query.sqlpp
index 9f4fd0d..68a4c4c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int32/stddev_int32.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int32/stddev_int32.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev': (select element test.strict_stddev((
+{'stddev_samp': (select element test.strict_stddev_samp((
select element x
from [1,2,3] as x
))), 'stddev_pop': (select element test.strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.3.query.sqlpp
index 404532c..a53b924 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev':test.strict_stddev((
+{'stddev_samp':test.strict_stddev_samp((
select element x.int32Field
from Numeric as x
)), 'stddev_pop':test.strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int64/stddev_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int64/stddev_int64.3.query.sqlpp
index 4d42043..9b3037f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int64/stddev_int64.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int64/stddev_int64.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev': (select element test.strict_stddev((
+{'stddev_samp': (select element test.strict_stddev_samp((
select element x
from [test.bigint('1'),test.bigint('2'),test.bigint('3')] as x
))), 'stddev_pop': (select element test.strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.3.query.sqlpp
index a5808a8..d764180 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev':test.strict_stddev((
+{'stddev_samp':test.strict_stddev_samp((
select element x.int64Field
from Numeric as x
)), 'stddev_pop':test.strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int8/stddev_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int8/stddev_int8.3.query.sqlpp
index ba6d178..73e084d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int8/stddev_int8.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int8/stddev_int8.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev': (select element test.strict_stddev((
+{'stddev_samp': (select element test.strict_stddev_samp((
select element x
from [test.tinyint('1'),test.tinyint('2'),test.tinyint('3')] as x
))), 'stddev_pop': (select element test.strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.3.query.sqlpp
index f1d1c9b..22c5357 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'stddev':test.strict_stddev((
+{'stddev_samp':test.strict_stddev_samp((
select element x.int8Field
from Numeric as x
)), 'stddev_pop':test.strict_stddev_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_mixed/stddev_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_mixed/stddev_mixed.3.query.sqlpp
index ebdc53b..1bdda05 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_mixed/stddev_mixed.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/stddev_mixed/stddev_mixed.3.query.sqlpp
@@ -17,12 +17,12 @@
* under the License.
*/
/*
-* Description : Run stddev over an multiset with mixed types
+* Description : Run stddev_samp over an multiset with mixed types
* Expected Res : Failure
* Date : March 5th 2018
*/
-select element strict_stddev((
+select element strict_stddev_samp((
select element x
from [float('2.0'),'hello world',93847382783847382,date('2013-01-01')] as x
));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_distinct/var_distinct.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_distinct/var_distinct.1.query.sqlpp
index 1a6c6ef..f732512 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_distinct/var_distinct.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_distinct/var_distinct.1.query.sqlpp
@@ -17,10 +17,10 @@
* under the License.
*/
{
- 't1': to_bigint(strict_var(distinct [10,20,30,10,20,30,10])),
- 't2': to_bigint(strict_var(distinct [null,missing,null,missing])),
- 't3': to_bigint(strict_var(distinct [40,null,missing,50,40,null,missing,50,40])),
- 't4': to_bigint(strict_var(distinct [])),
+ 't1': to_bigint(strict_var_samp(distinct [10,20,30,10,20,30,10])),
+ 't2': to_bigint(strict_var_samp(distinct [null,missing,null,missing])),
+ 't3': to_bigint(strict_var_samp(distinct [40,null,missing,50,40,null,missing,50,40])),
+ 't4': to_bigint(strict_var_samp(distinct [])),
't5': to_bigint(strict_var_pop(distinct [10,20,30,10,20,30,10])),
't6': to_bigint(strict_var_pop(distinct [null,missing,null,missing])),
't7': to_bigint(strict_var_pop(distinct [40,null,missing,50,40,null,missing,50,40])),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_double/var_double.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_double/var_double.3.query.sqlpp
index c86f158..385743f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_double/var_double.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_double/var_double.3.query.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
-{'var':(select element strict_var((
+{'var_samp':(select element strict_var_samp((
select element x
from [1.0,2.0,double('3.0')] as x
))), 'var_pop': (select element strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_double_null/var_double_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_double_null/var_double_null.3.query.sqlpp
index 028f030..3e325d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_double_null/var_double_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_double_null/var_double_null.3.query.sqlpp
@@ -19,7 +19,7 @@
use test;
-{'var':test.strict_var((
+{'var_samp':test.strict_var_samp((
select element x.doubleField
from Numeric as x
)), 'var_pop':test.strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_01/var_empty_01.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_01/var_empty_01.1.ddl.sqlpp
index 5f589a8..db68c0e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_01/var_empty_01.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_01/var_empty_01.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests that var aggregation correctly returns null for an empty stream,
+ * Description : Tests that var_samp and var_pop aggregation correctly returns null for an empty stream,
* without an aggregate combiner.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_01/var_empty_01.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_01/var_empty_01.3.query.sqlpp
index 3dc4380..7430c7b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_01/var_empty_01.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_01/var_empty_01.3.query.sqlpp
@@ -17,14 +17,14 @@
* under the License.
*/
/*
- * Description : Tests that var aggregation correctly returns null for an empty stream,
+ * Description : Tests that var_samp and var_pop aggregation correctly returns null for an empty stream,
* without an aggregate combiner.
* Success : Yes
*/
use test;
-{'var': (select element test.strict_var((
+{'var_samp': (select element test.strict_var_samp((
select element x
from [1,2,3] as x
where (x > 10)
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_02/var_empty_02.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_02/var_empty_02.1.ddl.sqlpp
index c218aa2..27754d1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_02/var_empty_02.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_02/var_empty_02.1.ddl.sqlpp
@@ -17,7 +17,7 @@
* under the License.
*/
/*
- * Description : Tests that var aggregation correctly returns null for an empty stream,
+ * Description : Tests that var_samp and var_pop aggregation correctly returns null for an empty stream,
* with an aggregate combiner.
* Success : Yes
*/
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_02/var_empty_02.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_02/var_empty_02.3.query.sqlpp
index 986f49c..b6f0cba 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_02/var_empty_02.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_empty_02/var_empty_02.3.query.sqlpp
@@ -17,14 +17,14 @@
* under the License.
*/
/*
- * Description : Tests that var aggregation correctly returns null for an empty stream,
+ * Description : Tests that var_samp and var_pop aggregation correctly returns null for an empty stream,
* with an aggregate combiner.
* Success : Yes
*/
use test;
-{'var': (select element test.strict_var((
+{'var_samp': (select element test.strict_var_samp((
select element x.val
from Test as x
))), 'var_pop': (select element test.strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_float/var_float.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_float/var_float.3.query.sqlpp
index 79e8f24..151d21f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_float/var_float.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_float/var_float.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var': (select element test.strict_var((
+{'var_samp': (select element test.strict_var_samp((
select element x
from [test.float('1'),test.float('2'),test.float('3')] as x
))), 'var_pop': (select element test.strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_float_null/var_float_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_float_null/var_float_null.3.query.sqlpp
index 72005cc..8eabb3f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_float_null/var_float_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_float_null/var_float_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var':test.strict_var((
+{'var_samp':test.strict_var_samp((
select element x.floatField
from Numeric as x
)), 'var_pop':test.strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int16/var_int16.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int16/var_int16.3.query.sqlpp
index 396c430..fe09402 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int16/var_int16.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int16/var_int16.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var': (select element test.strict_var((
+{'var_samp': (select element test.strict_var_samp((
select element x
from [test.smallint('1'),test.smallint('2'),test.smallint('3')] as x
))), 'var_pop': (select element test.strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int16_null/var_int16_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int16_null/var_int16_null.3.query.sqlpp
index 2db7bb1..dcb0243 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int16_null/var_int16_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int16_null/var_int16_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var':test.strict_var((
+{'var_samp':test.strict_var_samp((
select element x.int16Field
from Numeric as x
)), 'var_pop':test.strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int32/var_int32.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int32/var_int32.3.query.sqlpp
index e04dd4c..2dfe26a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int32/var_int32.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int32/var_int32.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var': (select element test.strict_var((
+{'var_samp': (select element test.strict_var_samp((
select element x
from [1,2,3] as x
))), 'var_pop': (select element test.strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int32_null/var_int32_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int32_null/var_int32_null.3.query.sqlpp
index 2a6ccf7..2ced8a6 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int32_null/var_int32_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int32_null/var_int32_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var':test.strict_var((
+{'var_samp':test.strict_var_samp((
select element x.int32Field
from Numeric as x
)), 'var_pop':test.strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int64/var_int64.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int64/var_int64.3.query.sqlpp
index 082552a..eee3f5f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int64/var_int64.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int64/var_int64.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var': (select element test.strict_var((
+{'var_samp': (select element test.strict_var_samp((
select element x
from [test.bigint('1'),test.bigint('2'),test.bigint('3')] as x
))), 'var_pop': (select element test.strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int64_null/var_int64_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int64_null/var_int64_null.3.query.sqlpp
index 0d988c6..37bdeb0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int64_null/var_int64_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int64_null/var_int64_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var':test.strict_var((
+{'var_samp':test.strict_var_samp((
select element x.int64Field
from Numeric as x
)), 'var_pop':test.strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int8/var_int8.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int8/var_int8.3.query.sqlpp
index 6965f4e..63eb872 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int8/var_int8.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int8/var_int8.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var': (select element test.strict_var((
+{'var_samp': (select element test.strict_var_samp((
select element x
from [test.tinyint('1'),test.tinyint('2'),test.tinyint('3')] as x
))), 'var_pop': (select element test.strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int8_null/var_int8_null.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int8_null/var_int8_null.3.query.sqlpp
index d661a87..2052b99 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int8_null/var_int8_null.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_int8_null/var_int8_null.3.query.sqlpp
@@ -20,7 +20,7 @@
use test;
-{'var':test.strict_var((
+{'var_samp':test.strict_var_samp((
select element x.int8Field
from Numeric as x
)), 'var_pop':test.strict_var_pop((
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_mixed/var_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_mixed/var_mixed.3.query.sqlpp
index 761a4d2..863b69d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_mixed/var_mixed.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/var_mixed/var_mixed.3.query.sqlpp
@@ -17,12 +17,12 @@
* under the License.
*/
/*
-* Description : Run var over an multiset with mixed types
+* Description : Run var_samp over an multiset with mixed types
* Expected Res : Failure
* Date : March 5th 2018
*/
-select element strict_var((
+select element strict_var_samp((
select element x
from [float('2.0'),'hello world',93847382783847382,date('2013-01-01')] as x
));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_null/agg_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_null/agg_null.1.adm
index f99998e..ff9f275 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_null/agg_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_null/agg_null.1.adm
@@ -1 +1 @@
-{ "sql-count1": 0, "average1": null, "sql-sum1": null, "sql-min1": null, "sql-max1": null, "sql-stddev1": null, "sql-stddev_pop1": null, "sql-var1": null, "sql-var_pop1": null, "sql-count2": 0, "average2": null, "sql-sum2": null, "sql-min2": null, "sql-max2": null, "sql-stddev2": null, "sql-stddev_pop2": null, "sql-var2": null, "sql-var_pop2": null }
+{ "sql-count1": 0, "average1": null, "sql-sum1": null, "sql-min1": null, "sql-max1": null, "sql-stddev_samp1": null, "sql-stddev_pop1": null, "sql-var_samp1": null, "sql-var_pop1": null, "sql-skewness1": null, "sql-kurtosis1": null, "sql-count2": 0, "average2": null, "sql-sum2": null, "sql-min2": null, "sql-max2": null, "sql-stddev_samp2": null, "sql-stddev_pop2": null, "sql-var_samp2": null, "sql-var_pop2": null, "sql-skewness2": null, "sql-kurtosis2": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_null_rec/agg_null_rec.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_null_rec/agg_null_rec.1.adm
index 7041077..6afe638 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_null_rec/agg_null_rec.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_null_rec/agg_null_rec.1.adm
@@ -1 +1 @@
-{ "sql-count": 2, "average": 26.0, "sql-stddev": 7.0710678118654755, "sql-stddev_pop": 5.0, "sql-var": 50.0, "sql-var_pop": 25.0, "sql-sum": 52, "sql-min": 21, "sql-max": 31 }
+{ "sql-count": 2, "average": 26.0, "sql-stddev_samp": 7.0710678118654755, "sql-stddev_pop": 5.0, "sql-var_samp": 50.0, "sql-var_pop": 25.0, "sql-skewness": null, "sql-kurtosis": null, "sql-sum": 52, "sql-min": 21, "sql-max": 31 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_null_rec_1/agg_null_rec.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_null_rec_1/agg_null_rec.1.adm
index d0fa295..7e26472 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_null_rec_1/agg_null_rec.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_null_rec_1/agg_null_rec.1.adm
@@ -1 +1 @@
-{ "sql-count": 3, "average": 5.32, "sql-sum": 15.96, "sql-stddev": 2.720510431232472E16, "sql-stddev_pop": 1.9236913742132196E16, "sql-var": 7.40117700644469E32, "sql-var_pop": 3.700588503222345E32, "sql-min": 473847, "sql-max": 38473827484738239 }
+{ "sql-count": 3, "average": 5.32, "sql-sum": 15.96, "sql-stddev_samp": 2.720510431232472E16, "sql-stddev_pop": 1.9236913742132196E16, "sql-var_samp": 7.40117700644469E32, "sql-var_pop": 3.700588503222345E32, "sql-skewness": null, "sql-kurtosis": null, "sql-min": 473847, "sql-max": 38473827484738239 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_number/agg_number.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_number/agg_number.1.adm
index 08843c5..5b9fb13 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_number/agg_number.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_number/agg_number.1.adm
@@ -1 +1 @@
-{ "sql-count1": 4, "average1": 2.3461845695961844E16, "sql-stddev1": 4.6923691391923688E16, "sql-stddev_pop1": 4.0637108784747104E16, "sql-var1": 2.2018328138444933E33, "sql-var_pop1": 1.65137461038337E33, "sql-count2": 4, "average2": 2.3461845695961844E16, "sql-stddev2": 4.6923691391923688E16, "sql-stddev_pop2": 4.0637108784747104E16, "sql-var2": 2.2018328138444933E33, "sql-var_pop2": 1.65137461038337E33, "sql-sum1": 9.3847382783847376E16, "sql-min1": 1.0, "sql-max1": 9.3847382783847376E16, "sql-sum2": 9.3847382783847376E16, "sql-min2": 1.0, "sql-max2": 9.3847382783847376E16 }
+{ "sql-count1": 4, "average1": 2.3461845695961844E16, "sql-stddev_samp1": 4.6923691391923688E16, "sql-stddev_pop1": 4.0637108784747104E16, "sql-var_samp1": 2.2018328138444933E33, "sql-var_pop1": 1.65137461038337E33, "sql-skewness1": 1.1547005383792517, "sql-kurtosis1": -0.6666666666666665, "sql-count2": 4, "average2": 2.3461845695961844E16, "sql-stddev_samp2": 4.6923691391923688E16, "sql-stddev_pop2": 4.0637108784747104E16, "sql-var_samp2": 2.2018328138444933E33, "sql-var_pop2": 1.65137461038337E33, "sql-skewness2": 1.1547005383792517, "sql-kurtosis2": -0.6666666666666665, "sql-sum1": 9.3847382783847376E16, "sql-min1": 1.0, "sql-max1": 9.3847382783847376E16, "sql-sum2": 9.3847382783847376E16, "sql-min2": 1.0, "sql-max2": 9.3847382783847376E16 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_number_rec/agg_number_rec.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_number_rec/agg_number_rec.1.adm
index 0a8fb2f..81960dd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_number_rec/agg_number_rec.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/agg_number_rec/agg_number_rec.1.adm
@@ -1 +1 @@
-{ "sql-count": 3, "average": 1.2824609161579424E16, "sql-stddev": 2.2212874655068836E16, "sql-stddev_pop": 1.8136736208439848E16, "sql-var": 4.934118004417994E32, "sql-var_pop": 3.28941200294533E32, "sql-sum": 3.8473827484738272E16, "sql-min": 2.0, "sql-max": 3.847382748473824E16 }
+{ "sql-count": 3, "average": 1.2824609161579424E16, "sql-stddev_samp": 2.2212874655068836E16, "sql-stddev_pop": 1.8136736208439848E16, "sql-var_samp": 4.934118004417994E32, "sql-var_pop": 3.28941200294533E32, "sql-skewness": 0.7071067811865476, "sql-kurtosis": -1.5, "sql-sum": 3.8473827484738272E16, "sql-min": 2.0, "sql-max": 3.847382748473824E16 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_distinct/kurtosis_distinct.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_distinct/kurtosis_distinct.1.adm
new file mode 100644
index 0000000..0f3644d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_distinct/kurtosis_distinct.1.adm
@@ -0,0 +1 @@
+{ "t1": -2, "t2": null, "t3": null, "t4": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_double/kurtosis_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_double/kurtosis_double.1.adm
new file mode 100644
index 0000000..a6fadae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_double/kurtosis_double.1.adm
@@ -0,0 +1 @@
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_double_null/kurtosis_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_double_null/kurtosis_double_null.1.adm
new file mode 100644
index 0000000..79acf81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_double_null/kurtosis_double_null.1.adm
@@ -0,0 +1 @@
+{ "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.1.adm
new file mode 100644
index 0000000..19765bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.1.adm
@@ -0,0 +1 @@
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.1.adm
new file mode 100644
index 0000000..19765bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.1.adm
@@ -0,0 +1 @@
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_float/kurtosis_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_float/kurtosis_float.1.adm
new file mode 100644
index 0000000..a6fadae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_float/kurtosis_float.1.adm
@@ -0,0 +1 @@
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_float_null/kurtosis_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_float_null/kurtosis_float_null.1.adm
new file mode 100644
index 0000000..79acf81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_float_null/kurtosis_float_null.1.adm
@@ -0,0 +1 @@
+{ "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int16/kurtosis_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int16/kurtosis_int16.1.adm
new file mode 100644
index 0000000..a6fadae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int16/kurtosis_int16.1.adm
@@ -0,0 +1 @@
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.1.adm
new file mode 100644
index 0000000..79acf81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.1.adm
@@ -0,0 +1 @@
+{ "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int32/kurtosis_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int32/kurtosis_int32.1.adm
new file mode 100644
index 0000000..a6fadae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int32/kurtosis_int32.1.adm
@@ -0,0 +1 @@
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.1.adm
new file mode 100644
index 0000000..79acf81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.1.adm
@@ -0,0 +1 @@
+{ "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int64/kurtosis_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int64/kurtosis_int64.1.adm
new file mode 100644
index 0000000..a6fadae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int64/kurtosis_int64.1.adm
@@ -0,0 +1 @@
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.1.adm
new file mode 100644
index 0000000..79acf81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.1.adm
@@ -0,0 +1 @@
+{ "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int8/kurtosis_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int8/kurtosis_int8.1.adm
new file mode 100644
index 0000000..a6fadae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int8/kurtosis_int8.1.adm
@@ -0,0 +1 @@
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.1.adm
new file mode 100644
index 0000000..e4ae234
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.1.adm
@@ -0,0 +1 @@
+{ "kurtosis": -1.5 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_mixed/kurtosis_mixed.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_mixed/kurtosis_mixed.1.adm
new file mode 100644
index 0000000..e3b97f5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/kurtosis_mixed/kurtosis_mixed.1.adm
@@ -0,0 +1 @@
+[ ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_kurtosis/scalar_kurtosis.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_kurtosis/scalar_kurtosis.1.adm
new file mode 100644
index 0000000..ab27df6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_kurtosis/scalar_kurtosis.1.adm
@@ -0,0 +1,6 @@
+-1.5
+-1.5
+-1.5
+-1.5
+-1.5
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.1.adm
new file mode 100644
index 0000000..19765bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.1.adm
@@ -0,0 +1 @@
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.1.adm
new file mode 100644
index 0000000..ab27df6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.1.adm
@@ -0,0 +1,6 @@
+-1.5
+-1.5
+-1.5
+-1.5
+-1.5
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_skewness/scalar_skewness.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_skewness/scalar_skewness.1.adm
new file mode 100644
index 0000000..46223ba
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_skewness/scalar_skewness.1.adm
@@ -0,0 +1,6 @@
+0.0
+0.0
+0.0
+0.0
+0.0
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.1.adm
new file mode 100644
index 0000000..19765bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.1.adm
@@ -0,0 +1 @@
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_skewness_null/scalar_skewness_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_skewness_null/scalar_skewness_null.1.adm
new file mode 100644
index 0000000..46223ba
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_skewness_null/scalar_skewness_null.1.adm
@@ -0,0 +1,6 @@
+0.0
+0.0
+0.0
+0.0
+0.0
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_stddev/scalar_stddev.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_stddev/scalar_stddev.1.adm
index 16c838c..02ed68e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_stddev/scalar_stddev.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_stddev/scalar_stddev.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "stddev_pop": [ 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "stddev_pop": [ 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.1.adm
index eb24dcb..9549671 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.1.adm
@@ -1 +1 @@
-{ "stddev": [ null ], "stddev_pop": [ null ] }
+{ "stddev_samp": [ null ], "stddev_pop": [ null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_stddev_null/scalar_stddev_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_stddev_null/scalar_stddev_null.1.adm
index 16c838c..02ed68e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_stddev_null/scalar_stddev_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_stddev_null/scalar_stddev_null.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "stddev_pop": [ 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "stddev_pop": [ 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_var/scalar_var.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_var/scalar_var.1.adm
index 8b66369..b3a0444 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_var/scalar_var.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_var/scalar_var.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "var_pop": [ 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666 ] }
+{ "var_samp": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "var_pop": [ 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_var_empty/scalar_var_empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_var_empty/scalar_var_empty.1.adm
index abf4b45..7a82d03 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_var_empty/scalar_var_empty.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_var_empty/scalar_var_empty.1.adm
@@ -1 +1 @@
-{ "var": [ null ], "var_pop": [ null ] }
+{ "var_samp": [ null ], "var_pop": [ null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_var_null/scalar_var_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_var_null/scalar_var_null.1.adm
index 8b66369..b3a0444 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_var_null/scalar_var_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/scalar_var_null/scalar_var_null.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "var_pop": [ 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666 ] }
+{ "var_samp": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "var_pop": [ 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.1.adm
new file mode 100644
index 0000000..80f5e78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 2.9392265193370157 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.1.adm
new file mode 100644
index 0000000..f557115
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 1.4999999999999998 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.1.adm
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.1.adm
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.1.adm
new file mode 100644
index 0000000..80f5e78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 2.9392265193370157 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.1.adm
new file mode 100644
index 0000000..628c1c1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 6.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.1.adm
new file mode 100644
index 0000000..80f5e78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 2.9392265193370157 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.adm
new file mode 100644
index 0000000..628c1c1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 6.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.1.adm
new file mode 100644
index 0000000..80f5e78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 2.9392265193370157 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.adm
new file mode 100644
index 0000000..628c1c1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 6.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.1.adm
new file mode 100644
index 0000000..80f5e78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 2.9392265193370157 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.adm
new file mode 100644
index 0000000..628c1c1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 6.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.1.adm
new file mode 100644
index 0000000..80f5e78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 2.9392265193370157 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.adm
new file mode 100644
index 0000000..628c1c1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 6.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.1.adm
new file mode 100644
index 0000000..e3b97f5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.1.adm
@@ -0,0 +1 @@
+[ ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_double/serial_skewness_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_double/serial_skewness_double.1.adm
new file mode 100644
index 0000000..e0e3f62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_double/serial_skewness_double.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.8437499999999999 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.1.adm
new file mode 100644
index 0000000..a1408ba
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.7071067811865474 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_empty/serial_skewness_empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_empty/serial_skewness_empty.1.adm
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_empty/serial_skewness_empty.1.adm
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_float/serial_skewness_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_float/serial_skewness_float.1.adm
new file mode 100644
index 0000000..e0e3f62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_float/serial_skewness_float.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.8437499999999999 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.1.adm
new file mode 100644
index 0000000..efbd615
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.0 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int16/serial_skewness_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int16/serial_skewness_int16.1.adm
new file mode 100644
index 0000000..e0e3f62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int16/serial_skewness_int16.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.8437499999999999 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.1.adm
new file mode 100644
index 0000000..9425bae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int32/serial_skewness_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int32/serial_skewness_int32.1.adm
new file mode 100644
index 0000000..e0e3f62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int32/serial_skewness_int32.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.8437499999999999 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.1.adm
new file mode 100644
index 0000000..9425bae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int64/serial_skewness_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int64/serial_skewness_int64.1.adm
new file mode 100644
index 0000000..e0e3f62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int64/serial_skewness_int64.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.8437499999999999 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.1.adm
new file mode 100644
index 0000000..9425bae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int8/serial_skewness_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int8/serial_skewness_int8.1.adm
new file mode 100644
index 0000000..e0e3f62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int8/serial_skewness_int8.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.8437499999999999 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.1.adm
new file mode 100644
index 0000000..9425bae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.1.adm
new file mode 100644
index 0000000..e3b97f5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.1.adm
@@ -0,0 +1 @@
+[ ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_double/serial_stddev_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_double/serial_stddev_double.1.adm
index 4e89687..90579d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_double/serial_stddev_double.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_double/serial_stddev_double.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 0.8944271909999159, "stddev_pop": 0.8 }
+{ "gid": 1, "stddev_samp": 0.8944271909999159, "stddev_pop": 0.8 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_double_null/serial_stddev_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_double_null/serial_stddev_double_null.1.adm
index c71ba21..2de435b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_double_null/serial_stddev_double_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_double_null/serial_stddev_double_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 2.2212874654736076E16, "stddev_pop": 1.8136736208168148E16 }
+{ "gid": 1, "stddev_samp": 2.2212874654736076E16, "stddev_pop": 1.8136736208168148E16 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_float/serial_stddev_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_float/serial_stddev_float.1.adm
index 4e89687..90579d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_float/serial_stddev_float.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_float/serial_stddev_float.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 0.8944271909999159, "stddev_pop": 0.8 }
+{ "gid": 1, "stddev_samp": 0.8944271909999159, "stddev_pop": 0.8 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_float_null/serial_stddev_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_float_null/serial_stddev_float_null.1.adm
index daa09e6..7af690c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_float_null/serial_stddev_float_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_float_null/serial_stddev_float_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 1.0, "stddev_pop": 0.816496580927726 }
+{ "gid": 1, "stddev_samp": 1.0, "stddev_pop": 0.816496580927726 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int16/serial_stddev_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int16/serial_stddev_int16.1.adm
index 4e89687..90579d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int16/serial_stddev_int16.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int16/serial_stddev_int16.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 0.8944271909999159, "stddev_pop": 0.8 }
+{ "gid": 1, "stddev_samp": 0.8944271909999159, "stddev_pop": 0.8 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int16_null/serial_stddev_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int16_null/serial_stddev_int16_null.1.adm
index daa09e6..7af690c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int16_null/serial_stddev_int16_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int16_null/serial_stddev_int16_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 1.0, "stddev_pop": 0.816496580927726 }
+{ "gid": 1, "stddev_samp": 1.0, "stddev_pop": 0.816496580927726 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int32/serial_stddev_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int32/serial_stddev_int32.1.adm
index 4e89687..90579d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int32/serial_stddev_int32.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int32/serial_stddev_int32.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 0.8944271909999159, "stddev_pop": 0.8 }
+{ "gid": 1, "stddev_samp": 0.8944271909999159, "stddev_pop": 0.8 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int32_null/serial_stddev_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int32_null/serial_stddev_int32_null.1.adm
index daa09e6..7af690c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int32_null/serial_stddev_int32_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int32_null/serial_stddev_int32_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 1.0, "stddev_pop": 0.816496580927726 }
+{ "gid": 1, "stddev_samp": 1.0, "stddev_pop": 0.816496580927726 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int64/serial_stddev_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int64/serial_stddev_int64.1.adm
index 4e89687..90579d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int64/serial_stddev_int64.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int64/serial_stddev_int64.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 0.8944271909999159, "stddev_pop": 0.8 }
+{ "gid": 1, "stddev_samp": 0.8944271909999159, "stddev_pop": 0.8 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int64_null/serial_stddev_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int64_null/serial_stddev_int64_null.1.adm
index daa09e6..7af690c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int64_null/serial_stddev_int64_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int64_null/serial_stddev_int64_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 1.0, "stddev_pop": 0.816496580927726 }
+{ "gid": 1, "stddev_samp": 1.0, "stddev_pop": 0.816496580927726 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int8/serial_stddev_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int8/serial_stddev_int8.1.adm
index 4e89687..90579d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int8/serial_stddev_int8.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int8/serial_stddev_int8.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 0.8944271909999159, "stddev_pop": 0.8 }
+{ "gid": 1, "stddev_samp": 0.8944271909999159, "stddev_pop": 0.8 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int8_null/serial_stddev_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int8_null/serial_stddev_int8_null.1.adm
index daa09e6..7af690c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int8_null/serial_stddev_int8_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_stddev_int8_null/serial_stddev_int8_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 1.0, "stddev_pop": 0.816496580927726 }
+{ "gid": 1, "stddev_samp": 1.0, "stddev_pop": 0.816496580927726 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_double/serial_var_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_double/serial_var_double.1.adm
index b2f05cb..9bf1888 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_double/serial_var_double.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_double/serial_var_double.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 0.8, "var_pop": 0.64 }
+{ "gid": 1, "var_samp": 0.8, "var_pop": 0.64 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_double_null/serial_var_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_double_null/serial_var_double_null.1.adm
index 1d1b2a6..7851bdd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_double_null/serial_var_double_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_double_null/serial_var_double_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 4.934118004270163E32, "var_pop": 3.289412002846775E32 }
+{ "gid": 1, "var_samp": 4.934118004270163E32, "var_pop": 3.289412002846775E32 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_float/serial_var_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_float/serial_var_float.1.adm
index b2f05cb..9bf1888 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_float/serial_var_float.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_float/serial_var_float.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 0.8, "var_pop": 0.64 }
+{ "gid": 1, "var_samp": 0.8, "var_pop": 0.64 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_float_null/serial_var_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_float_null/serial_var_float_null.1.adm
index 2335482..ec6cb7f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_float_null/serial_var_float_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_float_null/serial_var_float_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 1.0, "var_pop": 0.6666666666666666 }
+{ "gid": 1, "var_samp": 1.0, "var_pop": 0.6666666666666666 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int16/serial_var_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int16/serial_var_int16.1.adm
index b2f05cb..9bf1888 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int16/serial_var_int16.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int16/serial_var_int16.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 0.8, "var_pop": 0.64 }
+{ "gid": 1, "var_samp": 0.8, "var_pop": 0.64 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int16_null/serial_var_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int16_null/serial_var_int16_null.1.adm
index 2335482..ec6cb7f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int16_null/serial_var_int16_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int16_null/serial_var_int16_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 1.0, "var_pop": 0.6666666666666666 }
+{ "gid": 1, "var_samp": 1.0, "var_pop": 0.6666666666666666 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int32/serial_var_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int32/serial_var_int32.1.adm
index b2f05cb..9bf1888 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int32/serial_var_int32.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int32/serial_var_int32.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 0.8, "var_pop": 0.64 }
+{ "gid": 1, "var_samp": 0.8, "var_pop": 0.64 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int32_null/serial_var_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int32_null/serial_var_int32_null.1.adm
index 2335482..ec6cb7f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int32_null/serial_var_int32_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int32_null/serial_var_int32_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 1.0, "var_pop": 0.6666666666666666 }
+{ "gid": 1, "var_samp": 1.0, "var_pop": 0.6666666666666666 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int64/serial_var_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int64/serial_var_int64.1.adm
index b2f05cb..9bf1888 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int64/serial_var_int64.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int64/serial_var_int64.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 0.8, "var_pop": 0.64 }
+{ "gid": 1, "var_samp": 0.8, "var_pop": 0.64 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int64_null/serial_var_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int64_null/serial_var_int64_null.1.adm
index 2335482..ec6cb7f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int64_null/serial_var_int64_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int64_null/serial_var_int64_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 1.0, "var_pop": 0.6666666666666666 }
+{ "gid": 1, "var_samp": 1.0, "var_pop": 0.6666666666666666 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int8/serial_var_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int8/serial_var_int8.1.adm
index b2f05cb..9bf1888 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int8/serial_var_int8.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int8/serial_var_int8.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 0.8, "var_pop": 0.64 }
+{ "gid": 1, "var_samp": 0.8, "var_pop": 0.64 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int8_null/serial_var_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int8_null/serial_var_int8_null.1.adm
index 2335482..ec6cb7f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int8_null/serial_var_int8_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/serial_var_int8_null/serial_var_int8_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 1.0, "var_pop": 0.6666666666666666 }
+{ "gid": 1, "var_samp": 1.0, "var_pop": 0.6666666666666666 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_distinct/skewness_distinct.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_distinct/skewness_distinct.1.adm
new file mode 100644
index 0000000..83b615b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_distinct/skewness_distinct.1.adm
@@ -0,0 +1 @@
+{ "t1": 0, "t2": null, "t3": null, "t4": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_double/skewness_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_double/skewness_double.1.adm
new file mode 100644
index 0000000..ba66466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_double/skewness_double.1.adm
@@ -0,0 +1 @@
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_double_null/skewness_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_double_null/skewness_double_null.1.adm
new file mode 100644
index 0000000..0695dc1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_double_null/skewness_double_null.1.adm
@@ -0,0 +1 @@
+{ "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_empty_01/skewness_empty_01.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_empty_01/skewness_empty_01.1.adm
new file mode 100644
index 0000000..19765bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_empty_01/skewness_empty_01.1.adm
@@ -0,0 +1 @@
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_empty_02/skewness_empty_02.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_empty_02/skewness_empty_02.1.adm
new file mode 100644
index 0000000..19765bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_empty_02/skewness_empty_02.1.adm
@@ -0,0 +1 @@
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_float/skewness_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_float/skewness_float.1.adm
new file mode 100644
index 0000000..ba66466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_float/skewness_float.1.adm
@@ -0,0 +1 @@
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_float_null/skewness_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_float_null/skewness_float_null.1.adm
new file mode 100644
index 0000000..0695dc1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_float_null/skewness_float_null.1.adm
@@ -0,0 +1 @@
+{ "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int16/skewness_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int16/skewness_int16.1.adm
new file mode 100644
index 0000000..ba66466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int16/skewness_int16.1.adm
@@ -0,0 +1 @@
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int16_null/skewness_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int16_null/skewness_int16_null.1.adm
new file mode 100644
index 0000000..0695dc1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int16_null/skewness_int16_null.1.adm
@@ -0,0 +1 @@
+{ "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int32/skewness_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int32/skewness_int32.1.adm
new file mode 100644
index 0000000..ba66466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int32/skewness_int32.1.adm
@@ -0,0 +1 @@
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int32_null/skewness_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int32_null/skewness_int32_null.1.adm
new file mode 100644
index 0000000..0695dc1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int32_null/skewness_int32_null.1.adm
@@ -0,0 +1 @@
+{ "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int64/skewness_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int64/skewness_int64.1.adm
new file mode 100644
index 0000000..ba66466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int64/skewness_int64.1.adm
@@ -0,0 +1 @@
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int64_null/skewness_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int64_null/skewness_int64_null.1.adm
new file mode 100644
index 0000000..0695dc1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int64_null/skewness_int64_null.1.adm
@@ -0,0 +1 @@
+{ "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int8/skewness_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int8/skewness_int8.1.adm
new file mode 100644
index 0000000..ba66466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int8/skewness_int8.1.adm
@@ -0,0 +1 @@
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int8_null/skewness_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int8_null/skewness_int8_null.1.adm
new file mode 100644
index 0000000..0e1e7ca
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_int8_null/skewness_int8_null.1.adm
@@ -0,0 +1 @@
+{ "skewness": 0.7024026117220766 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_mixed/skewness_mixed.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_mixed/skewness_mixed.1.adm
new file mode 100644
index 0000000..e3b97f5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/skewness_mixed/skewness_mixed.1.adm
@@ -0,0 +1 @@
+[ ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_double/stddev_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_double/stddev_double.1.adm
index 653259d..3b69e19 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_double/stddev_double.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_double/stddev_double.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_double_null/stddev_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_double_null/stddev_double_null.1.adm
index 4f788be..ca7c775 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_double_null/stddev_double_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_double_null/stddev_double_null.1.adm
@@ -1 +1 @@
-{ "stddev": 0.0, "stddev_pop": 0.0 }
+{ "stddev_samp": 0.0, "stddev_pop": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_empty_01/stddev_empty_01.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_empty_01/stddev_empty_01.1.adm
index eb24dcb..9549671 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_empty_01/stddev_empty_01.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_empty_01/stddev_empty_01.1.adm
@@ -1 +1 @@
-{ "stddev": [ null ], "stddev_pop": [ null ] }
+{ "stddev_samp": [ null ], "stddev_pop": [ null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_empty_02/stddev_empty_02.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_empty_02/stddev_empty_02.1.adm
index eb24dcb..9549671 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_empty_02/stddev_empty_02.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_empty_02/stddev_empty_02.1.adm
@@ -1 +1 @@
-{ "stddev": [ null ], "stddev_pop": [ null ] }
+{ "stddev_samp": [ null ], "stddev_pop": [ null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_float/stddev_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_float/stddev_float.1.adm
index 653259d..3b69e19 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_float/stddev_float.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_float/stddev_float.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_float_null/stddev_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_float_null/stddev_float_null.1.adm
index 4f788be..ca7c775 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_float_null/stddev_float_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_float_null/stddev_float_null.1.adm
@@ -1 +1 @@
-{ "stddev": 0.0, "stddev_pop": 0.0 }
+{ "stddev_samp": 0.0, "stddev_pop": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int16/stddev_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int16/stddev_int16.1.adm
index 653259d..3b69e19 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int16/stddev_int16.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int16/stddev_int16.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int16_null/stddev_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int16_null/stddev_int16_null.1.adm
index 4f788be..ca7c775 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int16_null/stddev_int16_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int16_null/stddev_int16_null.1.adm
@@ -1 +1 @@
-{ "stddev": 0.0, "stddev_pop": 0.0 }
+{ "stddev_samp": 0.0, "stddev_pop": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int32/stddev_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int32/stddev_int32.1.adm
index 653259d..3b69e19 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int32/stddev_int32.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int32/stddev_int32.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int32_null/stddev_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int32_null/stddev_int32_null.1.adm
index 4f788be..ca7c775 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int32_null/stddev_int32_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int32_null/stddev_int32_null.1.adm
@@ -1 +1 @@
-{ "stddev": 0.0, "stddev_pop": 0.0 }
+{ "stddev_samp": 0.0, "stddev_pop": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int64/stddev_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int64/stddev_int64.1.adm
index 653259d..3b69e19 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int64/stddev_int64.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int64/stddev_int64.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int64_null/stddev_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int64_null/stddev_int64_null.1.adm
index 4f788be..ca7c775 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int64_null/stddev_int64_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int64_null/stddev_int64_null.1.adm
@@ -1 +1 @@
-{ "stddev": 0.0, "stddev_pop": 0.0 }
+{ "stddev_samp": 0.0, "stddev_pop": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int8/stddev_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int8/stddev_int8.1.adm
index 653259d..3b69e19 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int8/stddev_int8.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int8/stddev_int8.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int8_null/stddev_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int8_null/stddev_int8_null.1.adm
index 20dd54a..4a53982 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int8_null/stddev_int8_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/stddev_int8_null/stddev_int8_null.1.adm
@@ -1 +1 @@
-{ "stddev": 26.0, "stddev_pop": 21.228911104120876 }
+{ "stddev_samp": 26.0, "stddev_pop": 21.228911104120876 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_double/var_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_double/var_double.1.adm
index b6c4979..e19b726 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_double/var_double.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_double/var_double.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
+{ "var_samp": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_double_null/var_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_double_null/var_double_null.1.adm
index 99c6acf..13313ef 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_double_null/var_double_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_double_null/var_double_null.1.adm
@@ -1 +1 @@
-{ "var": 0.0, "var_pop": 0.0 }
+{ "var_samp": 0.0, "var_pop": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_empty_01/var_empty_01.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_empty_01/var_empty_01.1.adm
index abf4b45..7a82d03 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_empty_01/var_empty_01.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_empty_01/var_empty_01.1.adm
@@ -1 +1 @@
-{ "var": [ null ], "var_pop": [ null ] }
+{ "var_samp": [ null ], "var_pop": [ null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_empty_02/var_empty_02.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_empty_02/var_empty_02.1.adm
index abf4b45..7a82d03 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_empty_02/var_empty_02.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_empty_02/var_empty_02.1.adm
@@ -1 +1 @@
-{ "var": [ null ], "var_pop": [ null ] }
+{ "var_samp": [ null ], "var_pop": [ null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_float/var_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_float/var_float.1.adm
index b6c4979..e19b726 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_float/var_float.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_float/var_float.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
+{ "var_samp": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_float_null/var_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_float_null/var_float_null.1.adm
index 99c6acf..13313ef 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_float_null/var_float_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_float_null/var_float_null.1.adm
@@ -1 +1 @@
-{ "var": 0.0, "var_pop": 0.0 }
+{ "var_samp": 0.0, "var_pop": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int16/var_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int16/var_int16.1.adm
index b6c4979..e19b726 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int16/var_int16.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int16/var_int16.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
+{ "var_samp": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int16_null/var_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int16_null/var_int16_null.1.adm
index 99c6acf..13313ef 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int16_null/var_int16_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int16_null/var_int16_null.1.adm
@@ -1 +1 @@
-{ "var": 0.0, "var_pop": 0.0 }
+{ "var_samp": 0.0, "var_pop": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int32/var_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int32/var_int32.1.adm
index b6c4979..e19b726 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int32/var_int32.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int32/var_int32.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
+{ "var_samp": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int32_null/var_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int32_null/var_int32_null.1.adm
index 99c6acf..13313ef 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int32_null/var_int32_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int32_null/var_int32_null.1.adm
@@ -1 +1 @@
-{ "var": 0.0, "var_pop": 0.0 }
+{ "var_samp": 0.0, "var_pop": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int64/var_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int64/var_int64.1.adm
index b6c4979..e19b726 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int64/var_int64.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int64/var_int64.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
+{ "var_samp": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int64_null/var_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int64_null/var_int64_null.1.adm
index 99c6acf..13313ef 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int64_null/var_int64_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int64_null/var_int64_null.1.adm
@@ -1 +1 @@
-{ "var": 0.0, "var_pop": 0.0 }
+{ "var_samp": 0.0, "var_pop": 0.0 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int8/var_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int8/var_int8.1.adm
index b6c4979..e19b726 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int8/var_int8.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int8/var_int8.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
+{ "var_samp": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int8_null/var_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int8_null/var_int8_null.1.adm
index f02f9f2..cfa9c7e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int8_null/var_int8_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate-sql/var_int8_null/var_int8_null.1.adm
@@ -1 +1 @@
-{ "var": 676.0, "var_pop": 450.6666666666667 }
\ No newline at end of file
+{ "var_samp": 676.0, "var_pop": 450.6666666666667 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_null/agg_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_null/agg_null.1.adm
index 8977277..a66cd88 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_null/agg_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_null/agg_null.1.adm
@@ -1 +1 @@
-{ "count1": 1, "average1": null, "sum1": null, "min1": null, "max1": null, "stddev1": null, "stddev_pop1": null, "var1": null, "var_pop1": null, "count2": 2, "average2": null, "sum2": null, "min2": null, "max2": null, "stddev2": null, "stddev_pop2": null, "var2": null, "var_pop2": null }
+{ "count1": 1, "average1": null, "sum1": null, "min1": null, "max1": null, "stddev_samp1": null, "stddev_pop1": null, "var_samp1": null, "var_pop1": null, "skewness1": null, "kurtosis1": null, "count2": 2, "average2": null, "sum2": null, "min2": null, "max2": null, "stddev_samp2": null, "stddev_pop2": null, "var_samp2": null, "var_pop2": null, "skewness2": null, "kurtosis2": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_null_rec/agg_null_rec.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_null_rec/agg_null_rec.1.adm
index d38c950..306be86 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_null_rec/agg_null_rec.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_null_rec/agg_null_rec.1.adm
@@ -1 +1 @@
-{ "count": 3, "average": null, "stddev": null, "stddev_pop": null, "var": null, "var_pop": null, "sum": null, "min": null, "max": null }
+{ "count": 3, "average": null, "stddev_samp": null, "stddev_pop": null, "var_samp": null, "var_pop": null, "skewness": null, "kurtosis": null, "sum": null, "min": null, "max": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_null_rec_1/agg_null_rec.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_null_rec_1/agg_null_rec.1.adm
index 1127706..35dbf92 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_null_rec_1/agg_null_rec.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_null_rec_1/agg_null_rec.1.adm
@@ -1 +1 @@
-{ "count": 3, "average": 5.32, "sum": 15.96, "stddev": 1.0, "stddev_pop": 0.816496580927726, "var": 1.0, "var_pop": 0.6666666666666666, "min": null, "max": null }
+{ "count": 3, "average": 5.32, "sum": 15.96, "stddev_samp": 1.0, "stddev_pop": 0.816496580927726, "var_samp": 1.0, "var_pop": 0.6666666666666666, "skewness": 0.0, "kurtosis": -1.5, "min": null, "max": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_number/agg_number.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_number/agg_number.1.adm
index 760b06c..39353a5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_number/agg_number.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_number/agg_number.1.adm
@@ -1 +1 @@
-{ "count1": 4, "average1": 2.3461845695961844E16, "stddev1": 4.6923691391923688E16, "stddev_pop1": 4.0637108784747104E16, "var1": 2.2018328138444933E33, "var_pop1": 1.65137461038337E33, "count2": 4, "average2": 2.3461845695961844E16, "stddev2": 4.6923691391923688E16, "stddev_pop2": 4.0637108784747104E16, "var2": 2.2018328138444933E33, "var_pop2": 1.65137461038337E33, "sum1": 9.3847382783847376E16, "min1": 1.0, "max1": 9.3847382783847376E16, "sum2": 9.3847382783847376E16, "min2": 1.0, "max2": 9.3847382783847376E16 }
+{ "count1": 4, "average1": 2.3461845695961844E16, "stddev_samp1": 4.6923691391923688E16, "stddev_pop1": 4.0637108784747104E16, "var_samp1": 2.2018328138444933E33, "var_pop1": 1.65137461038337E33, "skewness1": 1.1547005383792517, "kurtosis1": -0.6666666666666665, "count2": 4, "average2": 2.3461845695961844E16, "stddev_samp2": 4.6923691391923688E16, "stddev_pop2": 4.0637108784747104E16, "var_samp2": 2.2018328138444933E33, "var_pop2": 1.65137461038337E33, "skewness2": 1.1547005383792517, "kurtosis2": -0.6666666666666665, "sum1": 9.3847382783847376E16, "min1": 1.0, "max1": 9.3847382783847376E16, "sum2": 9.3847382783847376E16, "min2": 1.0, "max2": 9.3847382783847376E16 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_number_rec/agg_number_rec.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_number_rec/agg_number_rec.1.adm
index 525ae14..128f8d4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_number_rec/agg_number_rec.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/agg_number_rec/agg_number_rec.1.adm
@@ -1 +1 @@
-{ "count": 3, "average": 1.2824609161579424E16, "stddev": 2.2212874655068836E16, "stddev_pop": 1.8136736208439848E16, "var": 4.934118004417994E32, "var_pop": 3.28941200294533E32, "sum": 3.8473827484738272E16, "min": 2.0, "max": 3.847382748473824E16 }
+{ "count": 3, "average": 1.2824609161579424E16, "stddev_samp": 2.2212874655068836E16, "stddev_pop": 1.8136736208439848E16, "var_samp": 4.934118004417994E32, "var_pop": 3.28941200294533E32, "skewness": 0.7071067811865476, "kurtosis": -1.5, "sum": 3.8473827484738272E16, "min": 2.0, "max": 3.847382748473824E16 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_distinct/kurtosis_distinct.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_distinct/kurtosis_distinct.1.adm
new file mode 100644
index 0000000..0f3644d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_distinct/kurtosis_distinct.1.adm
@@ -0,0 +1 @@
+{ "t1": -2, "t2": null, "t3": null, "t4": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_double/kurtosis_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_double/kurtosis_double.1.adm
new file mode 100644
index 0000000..a6fadae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_double/kurtosis_double.1.adm
@@ -0,0 +1 @@
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_double_null/kurtosis_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_double_null/kurtosis_double_null.1.adm
new file mode 100644
index 0000000..79acf81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_double_null/kurtosis_double_null.1.adm
@@ -0,0 +1 @@
+{ "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_empty_01/kurtosis_empty_01.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_empty_01/kurtosis_empty_01.1.adm
new file mode 100644
index 0000000..19765bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_empty_01/kurtosis_empty_01.1.adm
@@ -0,0 +1 @@
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_empty_02/kurtosis_empty_02.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_empty_02/kurtosis_empty_02.1.adm
new file mode 100644
index 0000000..19765bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_empty_02/kurtosis_empty_02.1.adm
@@ -0,0 +1 @@
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_float/kurtosis_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_float/kurtosis_float.1.adm
new file mode 100644
index 0000000..a6fadae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_float/kurtosis_float.1.adm
@@ -0,0 +1 @@
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_float_null/kurtosis_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_float_null/kurtosis_float_null.1.adm
new file mode 100644
index 0000000..79acf81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_float_null/kurtosis_float_null.1.adm
@@ -0,0 +1 @@
+{ "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int16/kurtosis_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int16/kurtosis_int16.1.adm
new file mode 100644
index 0000000..a6fadae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int16/kurtosis_int16.1.adm
@@ -0,0 +1 @@
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int16_null/kurtosis_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int16_null/kurtosis_int16_null.1.adm
new file mode 100644
index 0000000..79acf81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int16_null/kurtosis_int16_null.1.adm
@@ -0,0 +1 @@
+{ "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int32/kurtosis_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int32/kurtosis_int32.1.adm
new file mode 100644
index 0000000..a6fadae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int32/kurtosis_int32.1.adm
@@ -0,0 +1 @@
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int32_null/kurtosis_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int32_null/kurtosis_int32_null.1.adm
new file mode 100644
index 0000000..79acf81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int32_null/kurtosis_int32_null.1.adm
@@ -0,0 +1 @@
+{ "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int64/kurtosis_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int64/kurtosis_int64.1.adm
new file mode 100644
index 0000000..a6fadae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int64/kurtosis_int64.1.adm
@@ -0,0 +1 @@
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int64_null/kurtosis_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int64_null/kurtosis_int64_null.1.adm
new file mode 100644
index 0000000..79acf81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int64_null/kurtosis_int64_null.1.adm
@@ -0,0 +1 @@
+{ "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int8/kurtosis_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int8/kurtosis_int8.1.adm
new file mode 100644
index 0000000..a6fadae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int8/kurtosis_int8.1.adm
@@ -0,0 +1 @@
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int8_null/kurtosis_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int8_null/kurtosis_int8_null.1.adm
new file mode 100644
index 0000000..79acf81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_int8_null/kurtosis_int8_null.1.adm
@@ -0,0 +1 @@
+{ "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_mixed/kurtosis_mixed.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_mixed/kurtosis_mixed.1.adm
new file mode 100644
index 0000000..e3b97f5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/kurtosis_mixed/kurtosis_mixed.1.adm
@@ -0,0 +1 @@
+[ ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_kurtosis/scalar_kurtosis.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_kurtosis/scalar_kurtosis.1.adm
new file mode 100644
index 0000000..ab27df6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_kurtosis/scalar_kurtosis.1.adm
@@ -0,0 +1,6 @@
+-1.5
+-1.5
+-1.5
+-1.5
+-1.5
+-1.5
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.1.adm
new file mode 100644
index 0000000..19765bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.1.adm
@@ -0,0 +1 @@
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.1.adm
new file mode 100644
index 0000000..aef8b7f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.1.adm
@@ -0,0 +1,6 @@
+null
+null
+null
+null
+null
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_skewness/scalar_skewness.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_skewness/scalar_skewness.1.adm
new file mode 100644
index 0000000..46223ba
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_skewness/scalar_skewness.1.adm
@@ -0,0 +1,6 @@
+0.0
+0.0
+0.0
+0.0
+0.0
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_skewness_empty/scalar_skewness_empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_skewness_empty/scalar_skewness_empty.1.adm
new file mode 100644
index 0000000..ec747fa
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_skewness_empty/scalar_skewness_empty.1.adm
@@ -0,0 +1 @@
+null
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_skewness_null/scalar_skewness_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_skewness_null/scalar_skewness_null.1.adm
new file mode 100644
index 0000000..aef8b7f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_skewness_null/scalar_skewness_null.1.adm
@@ -0,0 +1,6 @@
+null
+null
+null
+null
+null
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_stddev/scalar_stddev.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_stddev/scalar_stddev.1.adm
index 16c838c..02ed68e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_stddev/scalar_stddev.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_stddev/scalar_stddev.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "stddev_pop": [ 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "stddev_pop": [ 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726, 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_stddev_empty/scalar_stddev_empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_stddev_empty/scalar_stddev_empty.1.adm
index eb24dcb..9549671 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_stddev_empty/scalar_stddev_empty.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_stddev_empty/scalar_stddev_empty.1.adm
@@ -1 +1 @@
-{ "stddev": [ null ], "stddev_pop": [ null ] }
+{ "stddev_samp": [ null ], "stddev_pop": [ null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_stddev_null/scalar_stddev_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_stddev_null/scalar_stddev_null.1.adm
index a8cdc43..fef0b9b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_stddev_null/scalar_stddev_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_stddev_null/scalar_stddev_null.1.adm
@@ -1 +1 @@
-{ "stddev": [ null, null, null, null, null, null ], "stddev_pop": [ null, null, null, null, null, null ] }
+{ "stddev_samp": [ null, null, null, null, null, null ], "stddev_pop": [ null, null, null, null, null, null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_var/scalar_var.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_var/scalar_var.1.adm
index 8b66369..b3a0444 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_var/scalar_var.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_var/scalar_var.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "var_pop": [ 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666 ] }
+{ "var_samp": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "var_pop": [ 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_var_empty/scalar_var_empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_var_empty/scalar_var_empty.1.adm
index abf4b45..7a82d03 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_var_empty/scalar_var_empty.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_var_empty/scalar_var_empty.1.adm
@@ -1 +1 @@
-{ "var": [ null ], "var_pop": [ null ] }
+{ "var_samp": [ null ], "var_pop": [ null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_var_null/scalar_var_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_var_null/scalar_var_null.1.adm
index 8bb7869..4cd197d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_var_null/scalar_var_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_var_null/scalar_var_null.1.adm
@@ -1 +1 @@
-{ "var": [ null, null, null, null, null, null ], "var_pop": [ null, null, null, null, null, null ] }
+{ "var_samp": [ null, null, null, null, null, null ], "var_pop": [ null, null, null, null, null, null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_double/serial_kurtosis_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_double/serial_kurtosis_double.1.adm
new file mode 100644
index 0000000..80f5e78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_double/serial_kurtosis_double.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 2.9392265193370157 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.1.adm
new file mode 100644
index 0000000..561878d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.1.adm
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.1.adm
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_float/serial_kurtosis_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_float/serial_kurtosis_float.1.adm
new file mode 100644
index 0000000..80f5e78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_float/serial_kurtosis_float.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 2.9392265193370157 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.1.adm
new file mode 100644
index 0000000..561878d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.1.adm
new file mode 100644
index 0000000..80f5e78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 2.9392265193370157 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.adm
new file mode 100644
index 0000000..561878d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.1.adm
new file mode 100644
index 0000000..80f5e78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 2.9392265193370157 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.adm
new file mode 100644
index 0000000..561878d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.1.adm
new file mode 100644
index 0000000..80f5e78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 2.9392265193370157 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.adm
new file mode 100644
index 0000000..561878d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.1.adm
new file mode 100644
index 0000000..80f5e78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": 2.9392265193370157 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.adm
new file mode 100644
index 0000000..561878d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.1.adm
new file mode 100644
index 0000000..0bbd7e2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "kurtosis_samp": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_double/serial_skewness_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_double/serial_skewness_double.1.adm
new file mode 100644
index 0000000..e0e3f62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_double/serial_skewness_double.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.8437499999999999 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_double_null/serial_skewness_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_double_null/serial_skewness_double_null.1.adm
new file mode 100644
index 0000000..56027d1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_double_null/serial_skewness_double_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_empty/serial_skewness_empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_empty/serial_skewness_empty.1.adm
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_empty/serial_skewness_empty.1.adm
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_float/serial_skewness_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_float/serial_skewness_float.1.adm
new file mode 100644
index 0000000..e0e3f62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_float/serial_skewness_float.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.8437499999999999 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_float_null/serial_skewness_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_float_null/serial_skewness_float_null.1.adm
new file mode 100644
index 0000000..56027d1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_float_null/serial_skewness_float_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int16/serial_skewness_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int16/serial_skewness_int16.1.adm
new file mode 100644
index 0000000..e0e3f62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int16/serial_skewness_int16.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.8437499999999999 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.1.adm
new file mode 100644
index 0000000..56027d1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int32/serial_skewness_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int32/serial_skewness_int32.1.adm
new file mode 100644
index 0000000..e0e3f62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int32/serial_skewness_int32.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.8437499999999999 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.1.adm
new file mode 100644
index 0000000..56027d1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int64/serial_skewness_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int64/serial_skewness_int64.1.adm
new file mode 100644
index 0000000..e0e3f62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int64/serial_skewness_int64.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.8437499999999999 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.1.adm
new file mode 100644
index 0000000..56027d1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int8/serial_skewness_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int8/serial_skewness_int8.1.adm
new file mode 100644
index 0000000..e0e3f62
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int8/serial_skewness_int8.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": 0.8437499999999999 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.1.adm
new file mode 100644
index 0000000..56027d1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_mixed/serial_skewness_mixed.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_mixed/serial_skewness_mixed.1.adm
new file mode 100644
index 0000000..6f1e562
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_skewness_mixed/serial_skewness_mixed.1.adm
@@ -0,0 +1 @@
+{ "gid": 1, "skewness_samp": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_double/serial_stddev_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_double/serial_stddev_double.1.adm
index 4e89687..90579d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_double/serial_stddev_double.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_double/serial_stddev_double.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 0.8944271909999159, "stddev_pop": 0.8 }
+{ "gid": 1, "stddev_samp": 0.8944271909999159, "stddev_pop": 0.8 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_double_null/serial_stddev_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_double_null/serial_stddev_double_null.1.adm
index 0405f84..a3fbb24 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_double_null/serial_stddev_double_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_double_null/serial_stddev_double_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": null, "stddev_pop": null }
+{ "gid": 1, "stddev_samp": null, "stddev_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_float/serial_stddev_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_float/serial_stddev_float.1.adm
index 4e89687..90579d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_float/serial_stddev_float.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_float/serial_stddev_float.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 0.8944271909999159, "stddev_pop": 0.8 }
+{ "gid": 1, "stddev_samp": 0.8944271909999159, "stddev_pop": 0.8 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_float_null/serial_stddev_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_float_null/serial_stddev_float_null.1.adm
index 0405f84..a3fbb24 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_float_null/serial_stddev_float_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_float_null/serial_stddev_float_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": null, "stddev_pop": null }
+{ "gid": 1, "stddev_samp": null, "stddev_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int16/serial_stddev_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int16/serial_stddev_int16.1.adm
index 4e89687..90579d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int16/serial_stddev_int16.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int16/serial_stddev_int16.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 0.8944271909999159, "stddev_pop": 0.8 }
+{ "gid": 1, "stddev_samp": 0.8944271909999159, "stddev_pop": 0.8 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.1.adm
index 0405f84..a3fbb24 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": null, "stddev_pop": null }
+{ "gid": 1, "stddev_samp": null, "stddev_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int32/serial_stddev_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int32/serial_stddev_int32.1.adm
index 4e89687..90579d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int32/serial_stddev_int32.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int32/serial_stddev_int32.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 0.8944271909999159, "stddev_pop": 0.8 }
+{ "gid": 1, "stddev_samp": 0.8944271909999159, "stddev_pop": 0.8 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.1.adm
index 0405f84..a3fbb24 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": null, "stddev_pop": null }
+{ "gid": 1, "stddev_samp": null, "stddev_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int64/serial_stddev_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int64/serial_stddev_int64.1.adm
index 4e89687..90579d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int64/serial_stddev_int64.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int64/serial_stddev_int64.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 0.8944271909999159, "stddev_pop": 0.8 }
+{ "gid": 1, "stddev_samp": 0.8944271909999159, "stddev_pop": 0.8 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.1.adm
index 0405f84..a3fbb24 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": null, "stddev_pop": null }
+{ "gid": 1, "stddev_samp": null, "stddev_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int8/serial_stddev_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int8/serial_stddev_int8.1.adm
index 4e89687..90579d8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int8/serial_stddev_int8.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int8/serial_stddev_int8.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": 0.8944271909999159, "stddev_pop": 0.8 }
+{ "gid": 1, "stddev_samp": 0.8944271909999159, "stddev_pop": 0.8 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.1.adm
index 0405f84..a3fbb24 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": null, "stddev_pop": null }
+{ "gid": 1, "stddev_samp": null, "stddev_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_mixed/serial_stddev_mixed.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_mixed/serial_stddev_mixed.1.adm
index c65635a..8ae0625 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_mixed/serial_stddev_mixed.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_stddev_mixed/serial_stddev_mixed.1.adm
@@ -1 +1 @@
-{ "gid": 1, "stddev": null }
+{ "gid": 1, "stddev_samp": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_double/serial_var_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_double/serial_var_double.1.adm
index b2f05cb..9bf1888 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_double/serial_var_double.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_double/serial_var_double.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 0.8, "var_pop": 0.64 }
+{ "gid": 1, "var_samp": 0.8, "var_pop": 0.64 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_double_null/serial_var_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_double_null/serial_var_double_null.1.adm
index 6341e9f..7f97226 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_double_null/serial_var_double_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_double_null/serial_var_double_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": null, "var_pop": null }
+{ "gid": 1, "var_samp": null, "var_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_float/serial_var_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_float/serial_var_float.1.adm
index b2f05cb..9bf1888 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_float/serial_var_float.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_float/serial_var_float.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 0.8, "var_pop": 0.64 }
+{ "gid": 1, "var_samp": 0.8, "var_pop": 0.64 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_float_null/serial_var_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_float_null/serial_var_float_null.1.adm
index 6341e9f..7f97226 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_float_null/serial_var_float_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_float_null/serial_var_float_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": null, "var_pop": null }
+{ "gid": 1, "var_samp": null, "var_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int16/serial_var_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int16/serial_var_int16.1.adm
index b2f05cb..9bf1888 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int16/serial_var_int16.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int16/serial_var_int16.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 0.8, "var_pop": 0.64 }
+{ "gid": 1, "var_samp": 0.8, "var_pop": 0.64 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int16_null/serial_var_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int16_null/serial_var_int16_null.1.adm
index 6341e9f..7f97226 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int16_null/serial_var_int16_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int16_null/serial_var_int16_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": null, "var_pop": null }
+{ "gid": 1, "var_samp": null, "var_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int32/serial_var_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int32/serial_var_int32.1.adm
index b2f05cb..9bf1888 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int32/serial_var_int32.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int32/serial_var_int32.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 0.8, "var_pop": 0.64 }
+{ "gid": 1, "var_samp": 0.8, "var_pop": 0.64 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int32_null/serial_var_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int32_null/serial_var_int32_null.1.adm
index 6341e9f..7f97226 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int32_null/serial_var_int32_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int32_null/serial_var_int32_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": null, "var_pop": null }
+{ "gid": 1, "var_samp": null, "var_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int64/serial_var_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int64/serial_var_int64.1.adm
index b2f05cb..9bf1888 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int64/serial_var_int64.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int64/serial_var_int64.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 0.8, "var_pop": 0.64 }
+{ "gid": 1, "var_samp": 0.8, "var_pop": 0.64 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int64_null/serial_var_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int64_null/serial_var_int64_null.1.adm
index 6341e9f..7f97226 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int64_null/serial_var_int64_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int64_null/serial_var_int64_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": null, "var_pop": null }
+{ "gid": 1, "var_samp": null, "var_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int8/serial_var_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int8/serial_var_int8.1.adm
index b2f05cb..9bf1888 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int8/serial_var_int8.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int8/serial_var_int8.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": 0.8, "var_pop": 0.64 }
+{ "gid": 1, "var_samp": 0.8, "var_pop": 0.64 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int8_null/serial_var_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int8_null/serial_var_int8_null.1.adm
index 6341e9f..7f97226 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int8_null/serial_var_int8_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_int8_null/serial_var_int8_null.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": null, "var_pop": null }
+{ "gid": 1, "var_samp": null, "var_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_mixed/serial_var_mixed.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_mixed/serial_var_mixed.1.adm
index ae7dd85..3d1db2f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_mixed/serial_var_mixed.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/serial_var_mixed/serial_var_mixed.1.adm
@@ -1 +1 @@
-{ "gid": 1, "var": null }
+{ "gid": 1, "var_samp": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_distinct/skewness_distinct.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_distinct/skewness_distinct.1.adm
new file mode 100644
index 0000000..83b615b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_distinct/skewness_distinct.1.adm
@@ -0,0 +1 @@
+{ "t1": 0, "t2": null, "t3": null, "t4": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_double/skewness_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_double/skewness_double.1.adm
new file mode 100644
index 0000000..ba66466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_double/skewness_double.1.adm
@@ -0,0 +1 @@
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_double_null/skewness_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_double_null/skewness_double_null.1.adm
new file mode 100644
index 0000000..0695dc1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_double_null/skewness_double_null.1.adm
@@ -0,0 +1 @@
+{ "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_empty_01/skewness_empty_01.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_empty_01/skewness_empty_01.1.adm
new file mode 100644
index 0000000..19765bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_empty_01/skewness_empty_01.1.adm
@@ -0,0 +1 @@
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_empty_02/skewness_empty_02.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_empty_02/skewness_empty_02.1.adm
new file mode 100644
index 0000000..19765bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_empty_02/skewness_empty_02.1.adm
@@ -0,0 +1 @@
+null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_float/skewness_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_float/skewness_float.1.adm
new file mode 100644
index 0000000..ba66466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_float/skewness_float.1.adm
@@ -0,0 +1 @@
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_float_null/skewness_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_float_null/skewness_float_null.1.adm
new file mode 100644
index 0000000..0695dc1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_float_null/skewness_float_null.1.adm
@@ -0,0 +1 @@
+{ "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int16/skewness_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int16/skewness_int16.1.adm
new file mode 100644
index 0000000..ba66466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int16/skewness_int16.1.adm
@@ -0,0 +1 @@
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int16_null/skewness_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int16_null/skewness_int16_null.1.adm
new file mode 100644
index 0000000..0695dc1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int16_null/skewness_int16_null.1.adm
@@ -0,0 +1 @@
+{ "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int32/skewness_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int32/skewness_int32.1.adm
new file mode 100644
index 0000000..ba66466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int32/skewness_int32.1.adm
@@ -0,0 +1 @@
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int32_null/skewness_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int32_null/skewness_int32_null.1.adm
new file mode 100644
index 0000000..0695dc1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int32_null/skewness_int32_null.1.adm
@@ -0,0 +1 @@
+{ "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int64/skewness_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int64/skewness_int64.1.adm
new file mode 100644
index 0000000..ba66466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int64/skewness_int64.1.adm
@@ -0,0 +1 @@
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int64_null/skewness_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int64_null/skewness_int64_null.1.adm
new file mode 100644
index 0000000..0695dc1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int64_null/skewness_int64_null.1.adm
@@ -0,0 +1 @@
+{ "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int8/skewness_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int8/skewness_int8.1.adm
new file mode 100644
index 0000000..ba66466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int8/skewness_int8.1.adm
@@ -0,0 +1 @@
+0.0
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int8_null/skewness_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int8_null/skewness_int8_null.1.adm
new file mode 100644
index 0000000..0695dc1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_int8_null/skewness_int8_null.1.adm
@@ -0,0 +1 @@
+{ "skewness": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_mixed/skewness_mixed.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_mixed/skewness_mixed.1.adm
new file mode 100644
index 0000000..e3b97f5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/skewness_mixed/skewness_mixed.1.adm
@@ -0,0 +1 @@
+[ ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_double/stddev_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_double/stddev_double.1.adm
index 653259d..3b69e19 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_double/stddev_double.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_double/stddev_double.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_double_null/stddev_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_double_null/stddev_double_null.1.adm
index 07f36d3..6862994 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_double_null/stddev_double_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_double_null/stddev_double_null.1.adm
@@ -1 +1 @@
-{ "stddev": null, "stddev_pop": null }
+{ "stddev_samp": null, "stddev_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_empty_01/stddev_empty_01.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_empty_01/stddev_empty_01.1.adm
index eb24dcb..9549671 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_empty_01/stddev_empty_01.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_empty_01/stddev_empty_01.1.adm
@@ -1 +1 @@
-{ "stddev": [ null ], "stddev_pop": [ null ] }
+{ "stddev_samp": [ null ], "stddev_pop": [ null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_empty_02/stddev_empty_02.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_empty_02/stddev_empty_02.1.adm
index eb24dcb..9549671 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_empty_02/stddev_empty_02.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_empty_02/stddev_empty_02.1.adm
@@ -1 +1 @@
-{ "stddev": [ null ], "stddev_pop": [ null ] }
+{ "stddev_samp": [ null ], "stddev_pop": [ null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_float/stddev_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_float/stddev_float.1.adm
index 653259d..3b69e19 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_float/stddev_float.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_float/stddev_float.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_float_null/stddev_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_float_null/stddev_float_null.1.adm
index 07f36d3..6862994 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_float_null/stddev_float_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_float_null/stddev_float_null.1.adm
@@ -1 +1 @@
-{ "stddev": null, "stddev_pop": null }
+{ "stddev_samp": null, "stddev_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int16/stddev_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int16/stddev_int16.1.adm
index 653259d..3b69e19 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int16/stddev_int16.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int16/stddev_int16.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int16_null/stddev_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int16_null/stddev_int16_null.1.adm
index 07f36d3..6862994 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int16_null/stddev_int16_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int16_null/stddev_int16_null.1.adm
@@ -1 +1 @@
-{ "stddev": null, "stddev_pop": null }
+{ "stddev_samp": null, "stddev_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int32/stddev_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int32/stddev_int32.1.adm
index 653259d..3b69e19 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int32/stddev_int32.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int32/stddev_int32.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int32_null/stddev_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int32_null/stddev_int32_null.1.adm
index 07f36d3..6862994 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int32_null/stddev_int32_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int32_null/stddev_int32_null.1.adm
@@ -1 +1 @@
-{ "stddev": null, "stddev_pop": null }
+{ "stddev_samp": null, "stddev_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int64/stddev_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int64/stddev_int64.1.adm
index 653259d..3b69e19 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int64/stddev_int64.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int64/stddev_int64.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int64_null/stddev_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int64_null/stddev_int64_null.1.adm
index 07f36d3..6862994 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int64_null/stddev_int64_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int64_null/stddev_int64_null.1.adm
@@ -1 +1 @@
-{ "stddev": null, "stddev_pop": null }
+{ "stddev_samp": null, "stddev_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int8/stddev_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int8/stddev_int8.1.adm
index 653259d..3b69e19 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int8/stddev_int8.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int8/stddev_int8.1.adm
@@ -1 +1 @@
-{ "stddev": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
+{ "stddev_samp": [ 1.0 ], "stddev_pop": [ 0.816496580927726 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int8_null/stddev_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int8_null/stddev_int8_null.1.adm
index 07f36d3..6862994 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int8_null/stddev_int8_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/stddev_int8_null/stddev_int8_null.1.adm
@@ -1 +1 @@
-{ "stddev": null, "stddev_pop": null }
+{ "stddev_samp": null, "stddev_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_double/var_double.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_double/var_double.1.adm
index b6c4979..e19b726 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_double/var_double.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_double/var_double.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
+{ "var_samp": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_double_null/var_double_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_double_null/var_double_null.1.adm
index 0a34eda..fa21ca5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_double_null/var_double_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_double_null/var_double_null.1.adm
@@ -1 +1 @@
-{ "var": null, "var_pop": null }
+{ "var_samp": null, "var_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_empty_01/var_empty_01.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_empty_01/var_empty_01.1.adm
index abf4b45..7a82d03 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_empty_01/var_empty_01.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_empty_01/var_empty_01.1.adm
@@ -1 +1 @@
-{ "var": [ null ], "var_pop": [ null ] }
+{ "var_samp": [ null ], "var_pop": [ null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_empty_02/var_empty_02.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_empty_02/var_empty_02.1.adm
index abf4b45..7a82d03 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_empty_02/var_empty_02.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_empty_02/var_empty_02.1.adm
@@ -1 +1 @@
-{ "var": [ null ], "var_pop": [ null ] }
+{ "var_samp": [ null ], "var_pop": [ null ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_float/var_float.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_float/var_float.1.adm
index b6c4979..e19b726 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_float/var_float.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_float/var_float.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
+{ "var_samp": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_float_null/var_float_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_float_null/var_float_null.1.adm
index 0a34eda..fa21ca5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_float_null/var_float_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_float_null/var_float_null.1.adm
@@ -1 +1 @@
-{ "var": null, "var_pop": null }
+{ "var_samp": null, "var_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int16/var_int16.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int16/var_int16.1.adm
index b6c4979..e19b726 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int16/var_int16.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int16/var_int16.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
+{ "var_samp": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int16_null/var_int16_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int16_null/var_int16_null.1.adm
index 0a34eda..fa21ca5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int16_null/var_int16_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int16_null/var_int16_null.1.adm
@@ -1 +1 @@
-{ "var": null, "var_pop": null }
+{ "var_samp": null, "var_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int32/var_int32.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int32/var_int32.1.adm
index b6c4979..e19b726 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int32/var_int32.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int32/var_int32.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
+{ "var_samp": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int32_null/var_int32_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int32_null/var_int32_null.1.adm
index 0a34eda..fa21ca5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int32_null/var_int32_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int32_null/var_int32_null.1.adm
@@ -1 +1 @@
-{ "var": null, "var_pop": null }
+{ "var_samp": null, "var_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int64/var_int64.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int64/var_int64.1.adm
index b6c4979..e19b726 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int64/var_int64.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int64/var_int64.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
+{ "var_samp": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int64_null/var_int64_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int64_null/var_int64_null.1.adm
index 0a34eda..fa21ca5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int64_null/var_int64_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int64_null/var_int64_null.1.adm
@@ -1 +1 @@
-{ "var": null, "var_pop": null }
+{ "var_samp": null, "var_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int8/var_int8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int8/var_int8.1.adm
index b6c4979..e19b726 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int8/var_int8.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int8/var_int8.1.adm
@@ -1 +1 @@
-{ "var": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
+{ "var_samp": [ 1.0 ], "var_pop": [ 0.6666666666666666 ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int8_null/var_int8_null.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int8_null/var_int8_null.1.adm
index 0a34eda..fa21ca5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int8_null/var_int8_null.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/var_int8_null/var_int8_null.1.adm
@@ -1 +1 @@
-{ "var": null, "var_pop": null }
+{ "var_samp": null, "var_pop": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_null/agg_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_null/agg_null.3.ast
index f370f90..76db390 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_null/agg_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_null/agg_null.3.ast
@@ -46,9 +46,9 @@
]
)
(
- LiteralExpr [STRING] [sql-stddev1]
+ LiteralExpr [STRING] [sql-stddev_samp1]
:
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
LiteralExpr [NULL]
]
@@ -64,9 +64,9 @@
]
)
(
- LiteralExpr [STRING] [sql-var1]
+ LiteralExpr [STRING] [sql-var_samp1]
:
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
LiteralExpr [NULL]
]
@@ -82,6 +82,24 @@
]
)
(
+ LiteralExpr [STRING] [sql-skewness1]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ LiteralExpr [NULL]
+ ]
+ ]
+ )
+ (
+ LiteralExpr [STRING] [sql-kurtosis1]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ LiteralExpr [NULL]
+ ]
+ ]
+ )
+ (
LiteralExpr [STRING] [sql-count2]
:
FunctionCall asterix.sql-count@1[
@@ -132,9 +150,9 @@
]
)
(
- LiteralExpr [STRING] [sql-stddev2]
+ LiteralExpr [STRING] [sql-stddev_samp2]
:
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
UnorderedListConstructor [
LiteralExpr [NULL]
LiteralExpr [NULL]
@@ -152,9 +170,9 @@
]
)
(
- LiteralExpr [STRING] [sql-var2]
+ LiteralExpr [STRING] [sql-var_samp2]
:
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
UnorderedListConstructor [
LiteralExpr [NULL]
LiteralExpr [NULL]
@@ -171,4 +189,24 @@
]
]
)
+ (
+ LiteralExpr [STRING] [sql-skewness2]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ UnorderedListConstructor [
+ LiteralExpr [NULL]
+ LiteralExpr [NULL]
+ ]
+ ]
+ )
+ (
+ LiteralExpr [STRING] [sql-kurtosis2]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ UnorderedListConstructor [
+ LiteralExpr [NULL]
+ LiteralExpr [NULL]
+ ]
+ ]
+ )
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_null_rec/agg_null_rec.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_null_rec/agg_null_rec.3.ast
index 110949e..0595f49 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_null_rec/agg_null_rec.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_null_rec/agg_null_rec.3.ast
@@ -97,9 +97,9 @@
]
)
(
- LiteralExpr [STRING] [sql-stddev]
+ LiteralExpr [STRING] [sql-stddev_samp]
:
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -135,9 +135,9 @@
]
)
(
- LiteralExpr [STRING] [sql-var]
+ LiteralExpr [STRING] [sql-var_samp]
:
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -172,4 +172,42 @@
)
]
)
+ (
+ LiteralExpr [STRING] [sql-skewness]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=valplus
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+ ]
+ )
+ ]
+ )
+ (
+ LiteralExpr [STRING] [sql-kurtosis]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=valplus
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+ ]
+ )
+ ]
+ )
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_null_rec_1/agg_null_rec_1.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_null_rec_1/agg_null_rec_1.3.ast
index f10192b..7a8927a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_null_rec_1/agg_null_rec_1.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_null_rec_1/agg_null_rec_1.3.ast
@@ -122,9 +122,9 @@
]
)
(
- LiteralExpr [STRING] [sql-stddev]
+ LiteralExpr [STRING] [sql-stddev_samp]
:
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -174,9 +174,9 @@
]
)
(
- LiteralExpr [STRING] [sql-var]
+ LiteralExpr [STRING] [sql-var_samp]
:
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -225,4 +225,56 @@
)
]
)
+ (
+ LiteralExpr [STRING] [sql-skewness]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$i ]
+ Field=valplus
+ ]
+ ]
+ FROM [ (
+ SELECT ELEMENT [
+ Variable [ Name=$t ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+ ]
+ )
+ AS Variable [ Name=$i ]
+ ]
+ )
+ ]
+ )
+ (
+ LiteralExpr [STRING] [sql-kurtosis]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$i ]
+ Field=valplus
+ ]
+ ]
+ FROM [ (
+ SELECT ELEMENT [
+ Variable [ Name=$t ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+ ]
+ )
+ AS Variable [ Name=$i ]
+ ]
+ )
+ ]
+ )
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_number/agg_number.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_number/agg_number.3.ast
index bcc764d..64386d6 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_number/agg_number.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_number/agg_number.3.ast
@@ -81,9 +81,9 @@
]
)
(
- LiteralExpr [STRING] [sql-stddev1]
+ LiteralExpr [STRING] [sql-stddev_samp1]
:
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall null.float@1[
LiteralExpr [STRING] [2.0]
@@ -113,9 +113,9 @@
]
)
(
- LiteralExpr [STRING] [sql-var1]
+ LiteralExpr [STRING] [sql-var_samp1]
:
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall null.float@1[
LiteralExpr [STRING] [2.0]
@@ -145,6 +145,38 @@
]
)
(
+ LiteralExpr [STRING] [sql-skewness1]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall null.float@1[
+ LiteralExpr [STRING] [2.0]
+ ]
+ FunctionCall null.double@1[
+ LiteralExpr [STRING] [3.0]
+ ]
+ LiteralExpr [LONG] [93847382783847382]
+ LiteralExpr [LONG] [1]
+ ]
+ ]
+ )
+ (
+ LiteralExpr [STRING] [sql-kurtosis1]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall null.float@1[
+ LiteralExpr [STRING] [2.0]
+ ]
+ FunctionCall null.double@1[
+ LiteralExpr [STRING] [3.0]
+ ]
+ LiteralExpr [LONG] [93847382783847382]
+ LiteralExpr [LONG] [1]
+ ]
+ ]
+ )
+ (
LiteralExpr [STRING] [sql-count2]
:
FunctionCall asterix.sql-count@1[
@@ -225,9 +257,9 @@
]
)
(
- LiteralExpr [STRING] [sql-stddev2]
+ LiteralExpr [STRING] [sql-stddev_samp2]
:
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
UnorderedListConstructor [
FunctionCall null.float@1[
LiteralExpr [STRING] [2.0]
@@ -257,9 +289,9 @@
]
)
(
- LiteralExpr [STRING] [sql-var2]
+ LiteralExpr [STRING] [sql-var_samp2]
:
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
UnorderedListConstructor [
FunctionCall null.float@1[
LiteralExpr [STRING] [2.0]
@@ -288,4 +320,36 @@
]
]
)
+ (
+ LiteralExpr [STRING] [sql-skewness2]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ UnorderedListConstructor [
+ FunctionCall null.float@1[
+ LiteralExpr [STRING] [2.0]
+ ]
+ FunctionCall null.double@1[
+ LiteralExpr [STRING] [3.0]
+ ]
+ LiteralExpr [LONG] [93847382783847382]
+ LiteralExpr [LONG] [1]
+ ]
+ ]
+ )
+ (
+ LiteralExpr [STRING] [sql-kurtosis2]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ UnorderedListConstructor [
+ FunctionCall null.float@1[
+ LiteralExpr [STRING] [2.0]
+ ]
+ FunctionCall null.double@1[
+ LiteralExpr [STRING] [3.0]
+ ]
+ LiteralExpr [LONG] [93847382783847382]
+ LiteralExpr [LONG] [1]
+ ]
+ ]
+ )
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_number_rec/agg_number_rec.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_number_rec/agg_number_rec.3.ast
index 110949e..0595f49 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_number_rec/agg_number_rec.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/agg_number_rec/agg_number_rec.3.ast
@@ -97,9 +97,9 @@
]
)
(
- LiteralExpr [STRING] [sql-stddev]
+ LiteralExpr [STRING] [sql-stddev_samp]
:
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -135,9 +135,9 @@
]
)
(
- LiteralExpr [STRING] [sql-var]
+ LiteralExpr [STRING] [sql-var_samp]
:
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -172,4 +172,42 @@
)
]
)
+ (
+ LiteralExpr [STRING] [sql-skewness]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=valplus
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+ ]
+ )
+ ]
+ )
+ (
+ LiteralExpr [STRING] [sql-kurtosis]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=valplus
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+ ]
+ )
+ ]
+ )
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_double/kurtosis_double.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_double/kurtosis_double.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_double/kurtosis_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_double/kurtosis_double.3.ast
new file mode 100644
index 0000000..2921b94
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_double/kurtosis_double.3.ast
@@ -0,0 +1,19 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ LiteralExpr [DOUBLE] [1.0]
+ LiteralExpr [DOUBLE] [2.0]
+ FunctionCall null.double@1[
+ LiteralExpr [STRING] [3.0]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_double_null/kurtosis_double_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_double_null/kurtosis_double_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_double_null/kurtosis_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_double_null/kurtosis_double_null.3.ast
new file mode 100644
index 0000000..ba248e3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_double_null/kurtosis_double_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=doubleField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.3.ast
new file mode 100644
index 0000000..9ad473f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_empty_01/kurtosis_empty_01.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ LiteralExpr [LONG] [1]
+ LiteralExpr [LONG] [2]
+ LiteralExpr [LONG] [3]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ Where
+ OperatorExpr [
+ Variable [ Name=$x ]
+ >
+ LiteralExpr [LONG] [10]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.1.ast
new file mode 100644
index 0000000..baf977e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.1.ast
@@ -0,0 +1,8 @@
+DataverseUse test
+TypeDecl TestType [
+ closed RecordType {
+ id : bigint,
+ val : double
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.3.ast
new file mode 100644
index 0000000..091578a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_empty_02/kurtosis_empty_02.3.ast
@@ -0,0 +1,19 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=val
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_float/kurtosis_float.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_float/kurtosis_float.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_float/kurtosis_float.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_float/kurtosis_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_float/kurtosis_float.3.ast
new file mode 100644
index 0000000..4256f27
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_float/kurtosis_float.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_float_null/kurtosis_float_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_float_null/kurtosis_float_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_float_null/kurtosis_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_float_null/kurtosis_float_null.3.ast
new file mode 100644
index 0000000..0296417
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_float_null/kurtosis_float_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=floatField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int16/kurtosis_int16.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int16/kurtosis_int16.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int16/kurtosis_int16.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int16/kurtosis_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int16/kurtosis_int16.3.ast
new file mode 100644
index 0000000..34b8b2f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int16/kurtosis_int16.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.3.ast
new file mode 100644
index 0000000..6d5d6f6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int16_null/kurtosis_int16_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int16Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int32/kurtosis_int32.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int32/kurtosis_int32.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int32/kurtosis_int32.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int32/kurtosis_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int32/kurtosis_int32.3.ast
new file mode 100644
index 0000000..1edafeb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int32/kurtosis_int32.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.3.ast
new file mode 100644
index 0000000..0f9aacb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int32_null/kurtosis_int32_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int32Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int64/kurtosis_int64.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int64/kurtosis_int64.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int64/kurtosis_int64.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int64/kurtosis_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int64/kurtosis_int64.3.ast
new file mode 100644
index 0000000..fa95d6f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int64/kurtosis_int64.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.3.ast
new file mode 100644
index 0000000..f7d0f57
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int64_null/kurtosis_int64_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int64Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int8/kurtosis_int8.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int8/kurtosis_int8.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int8/kurtosis_int8.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int8/kurtosis_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int8/kurtosis_int8.3.ast
new file mode 100644
index 0000000..0c2ded8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int8/kurtosis_int8.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.3.ast
new file mode 100644
index 0000000..8b79a50
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_int8_null/kurtosis_int8_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int8Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_mixed/kurtosis_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_mixed/kurtosis_mixed.3.ast
new file mode 100644
index 0000000..d9571bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/kurtosis_mixed/kurtosis_mixed.3.ast
@@ -0,0 +1,22 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall null.float@1[
+ LiteralExpr [STRING] [2.0]
+ ]
+ LiteralExpr [STRING] [hello world]
+ LiteralExpr [LONG] [93847382783847382]
+ FunctionCall null.date@1[
+ LiteralExpr [STRING] [2013-01-01]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis/scalar_kurtosis.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis/scalar_kurtosis.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis/scalar_kurtosis.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis/scalar_kurtosis.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis/scalar_kurtosis.3.ast
new file mode 100644
index 0000000..4cb2969
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis/scalar_kurtosis.3.ast
@@ -0,0 +1,105 @@
+DataverseUse test
+Query:
+Let Variable [ Name=$i8 ]
+ :=
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$i16 ]
+ :=
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$i32 ]
+ :=
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$i64 ]
+ :=
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$f ]
+ :=
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$d ]
+ :=
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+SELECT ELEMENT [
+Variable [ Name=$i ]
+]
+FROM [ OrderedListConstructor [
+ Variable [ Name=$i8 ]
+ Variable [ Name=$i16 ]
+ Variable [ Name=$i32 ]
+ Variable [ Name=$i64 ]
+ Variable [ Name=$f ]
+ Variable [ Name=$d ]
+ ]
+ AS Variable [ Name=$i ]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.3.ast
new file mode 100644
index 0000000..77a7650
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis_empty/scalar_kurtosis_empty.3.ast
@@ -0,0 +1,7 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ ]
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.3.ast
new file mode 100644
index 0000000..cf5de4c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_kurtosis_null/scalar_kurtosis_null.3.ast
@@ -0,0 +1,111 @@
+DataverseUse test
+Query:
+Let Variable [ Name=$i8 ]
+ :=
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$i16 ]
+ :=
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$i32 ]
+ :=
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$i64 ]
+ :=
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$f ]
+ :=
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$d ]
+ :=
+ FunctionCall asterix.sql-kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+SELECT ELEMENT [
+Variable [ Name=$i ]
+]
+FROM [ OrderedListConstructor [
+ Variable [ Name=$i8 ]
+ Variable [ Name=$i16 ]
+ Variable [ Name=$i32 ]
+ Variable [ Name=$i64 ]
+ Variable [ Name=$f ]
+ Variable [ Name=$d ]
+ ]
+ AS Variable [ Name=$i ]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness/scalar_skewness.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness/scalar_skewness.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness/scalar_skewness.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness/scalar_skewness.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness/scalar_skewness.3.ast
new file mode 100644
index 0000000..c500b17
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness/scalar_skewness.3.ast
@@ -0,0 +1,105 @@
+DataverseUse test
+Query:
+Let Variable [ Name=$i8 ]
+ :=
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$i16 ]
+ :=
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$i32 ]
+ :=
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$i64 ]
+ :=
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$f ]
+ :=
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$d ]
+ :=
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+SELECT ELEMENT [
+Variable [ Name=$i ]
+]
+FROM [ OrderedListConstructor [
+ Variable [ Name=$i8 ]
+ Variable [ Name=$i16 ]
+ Variable [ Name=$i32 ]
+ Variable [ Name=$i64 ]
+ Variable [ Name=$f ]
+ Variable [ Name=$d ]
+ ]
+ AS Variable [ Name=$i ]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.3.ast
new file mode 100644
index 0000000..a869913
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness_empty/scalar_skewness_empty.3.ast
@@ -0,0 +1,7 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ ]
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness_null/scalar_skewness_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness_null/scalar_skewness_null.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness_null/scalar_skewness_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness_null/scalar_skewness_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness_null/scalar_skewness_null.3.ast
new file mode 100644
index 0000000..d3fd744
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_skewness_null/scalar_skewness_null.3.ast
@@ -0,0 +1,111 @@
+DataverseUse test
+Query:
+Let Variable [ Name=$i8 ]
+ :=
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$i16 ]
+ :=
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$i32 ]
+ :=
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$i64 ]
+ :=
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$f ]
+ :=
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$d ]
+ :=
+ FunctionCall asterix.sql-skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+SELECT ELEMENT [
+Variable [ Name=$i ]
+]
+FROM [ OrderedListConstructor [
+ Variable [ Name=$i8 ]
+ Variable [ Name=$i16 ]
+ Variable [ Name=$i32 ]
+ Variable [ Name=$i64 ]
+ Variable [ Name=$f ]
+ Variable [ Name=$d ]
+ ]
+ AS Variable [ Name=$i ]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_stddev/scalar_stddev.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_stddev/scalar_stddev.3.ast
index c9a7865..0c5206c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_stddev/scalar_stddev.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_stddev/scalar_stddev.3.ast
@@ -2,12 +2,12 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
Let Variable [ Name=$i8 ]
:=
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int8@1[
LiteralExpr [STRING] [1]
@@ -22,7 +22,7 @@
]
Let Variable [ Name=$i16 ]
:=
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int16@1[
LiteralExpr [STRING] [1]
@@ -37,7 +37,7 @@
]
Let Variable [ Name=$i32 ]
:=
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int32@1[
LiteralExpr [STRING] [1]
@@ -52,7 +52,7 @@
]
Let Variable [ Name=$i64 ]
:=
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int64@1[
LiteralExpr [STRING] [1]
@@ -67,7 +67,7 @@
]
Let Variable [ Name=$f ]
:=
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall test.float@1[
LiteralExpr [STRING] [1]
@@ -82,7 +82,7 @@
]
Let Variable [ Name=$d ]
:=
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall test.double@1[
LiteralExpr [STRING] [1]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.3.ast
index 3fd8fec..c12ee45 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_stddev_empty/scalar_stddev_empty.3.ast
@@ -1,11 +1,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
]
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_stddev_null/scalar_stddev_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_stddev_null/scalar_stddev_null.3.ast
index 5615328..0c4e2b9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_stddev_null/scalar_stddev_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_stddev_null/scalar_stddev_null.3.ast
@@ -2,12 +2,12 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
Let Variable [ Name=$i8 ]
:=
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int8@1[
LiteralExpr [STRING] [1]
@@ -23,7 +23,7 @@
]
Let Variable [ Name=$i16 ]
:=
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int16@1[
LiteralExpr [STRING] [1]
@@ -39,7 +39,7 @@
]
Let Variable [ Name=$i32 ]
:=
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int32@1[
LiteralExpr [STRING] [1]
@@ -55,7 +55,7 @@
]
Let Variable [ Name=$i64 ]
:=
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int64@1[
LiteralExpr [STRING] [1]
@@ -71,7 +71,7 @@
]
Let Variable [ Name=$f ]
:=
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall test.float@1[
LiteralExpr [STRING] [1]
@@ -87,7 +87,7 @@
]
Let Variable [ Name=$d ]
:=
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
OrderedListConstructor [
FunctionCall test.double@1[
LiteralExpr [STRING] [1]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_var/scalar_var.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_var/scalar_var.3.ast
index 71b0a16..190da47 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_var/scalar_var.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_var/scalar_var.3.ast
@@ -2,12 +2,12 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
Let Variable [ Name=$i8 ]
:=
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall test.int8@1[
LiteralExpr [STRING] [1]
@@ -22,7 +22,7 @@
]
Let Variable [ Name=$i16 ]
:=
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall test.int16@1[
LiteralExpr [STRING] [1]
@@ -37,7 +37,7 @@
]
Let Variable [ Name=$i32 ]
:=
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall test.int32@1[
LiteralExpr [STRING] [1]
@@ -52,7 +52,7 @@
]
Let Variable [ Name=$i64 ]
:=
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall test.int64@1[
LiteralExpr [STRING] [1]
@@ -67,7 +67,7 @@
]
Let Variable [ Name=$f ]
:=
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall test.float@1[
LiteralExpr [STRING] [1]
@@ -82,7 +82,7 @@
]
Let Variable [ Name=$d ]
:=
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall test.double@1[
LiteralExpr [STRING] [1]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_var_empty/scalar_var_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_var_empty/scalar_var_empty.3.ast
index a4126bb..43e6f6c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_var_empty/scalar_var_empty.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_var_empty/scalar_var_empty.3.ast
@@ -1,11 +1,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
]
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_var_null/scalar_var_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_var_null/scalar_var_null.3.ast
index 22e3104..09ace81 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_var_null/scalar_var_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/scalar_var_null/scalar_var_null.3.ast
@@ -2,12 +2,12 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
Let Variable [ Name=$i8 ]
:=
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall test.int8@1[
LiteralExpr [STRING] [1]
@@ -23,7 +23,7 @@
]
Let Variable [ Name=$i16 ]
:=
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall test.int16@1[
LiteralExpr [STRING] [1]
@@ -39,7 +39,7 @@
]
Let Variable [ Name=$i32 ]
:=
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall test.int32@1[
LiteralExpr [STRING] [1]
@@ -55,7 +55,7 @@
]
Let Variable [ Name=$i64 ]
:=
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall test.int64@1[
LiteralExpr [STRING] [1]
@@ -71,7 +71,7 @@
]
Let Variable [ Name=$f ]
:=
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall test.float@1[
LiteralExpr [STRING] [1]
@@ -87,7 +87,7 @@
]
Let Variable [ Name=$d ]
:=
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
OrderedListConstructor [
FunctionCall test.double@1[
LiteralExpr [STRING] [1]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.3.ast
new file mode 100644
index 0000000..77b4c9d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double/serial_kurtosis_double.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.3.ast
new file mode 100644
index 0000000..367ea53
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_double_null/serial_kurtosis_double_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.3.ast
new file mode 100644
index 0000000..77b4c9d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_empty/serial_kurtosis_empty.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.1.ast
new file mode 100644
index 0000000..9af248f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : float
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.3.ast
new file mode 100644
index 0000000..77b4c9d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float/serial_kurtosis_float.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.1.ast
new file mode 100644
index 0000000..9af248f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : float
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.3.ast
new file mode 100644
index 0000000..367ea53
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_float_null/serial_kurtosis_float_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.1.ast
new file mode 100644
index 0000000..16d25a8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : smallint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.3.ast
new file mode 100644
index 0000000..77b4c9d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16/serial_kurtosis_int16.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.ast
new file mode 100644
index 0000000..16d25a8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : smallint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.3.ast
new file mode 100644
index 0000000..367ea53
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int16_null/serial_kurtosis_int16_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.1.ast
new file mode 100644
index 0000000..6eaf31a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : integer
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.3.ast
new file mode 100644
index 0000000..77b4c9d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32/serial_kurtosis_int32.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.ast
new file mode 100644
index 0000000..6eaf31a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : integer
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.3.ast
new file mode 100644
index 0000000..367ea53
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int32_null/serial_kurtosis_int32_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.1.ast
new file mode 100644
index 0000000..7911712
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : bigint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.3.ast
new file mode 100644
index 0000000..77b4c9d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64/serial_kurtosis_int64.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.ast
new file mode 100644
index 0000000..7911712
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : bigint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.3.ast
new file mode 100644
index 0000000..367ea53
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int64_null/serial_kurtosis_int64_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.1.ast
new file mode 100644
index 0000000..44c9cde
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.3.ast
new file mode 100644
index 0000000..77b4c9d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8/serial_kurtosis_int8.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.ast
new file mode 100644
index 0000000..44c9cde
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.3.ast
new file mode 100644
index 0000000..367ea53
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_int8_null/serial_kurtosis_int8_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.3.ast
new file mode 100644
index 0000000..c388d44
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_kurtosis_mixed/serial_kurtosis_mixed.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.3.ast
new file mode 100644
index 0000000..d77c450
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double/serial_skewness_double.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.3.ast
new file mode 100644
index 0000000..126091f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_double_null/serial_skewness_double_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_empty/serial_skewness_empty.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_empty/serial_skewness_empty.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_empty/serial_skewness_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_empty/serial_skewness_empty.3.ast
new file mode 100644
index 0000000..d77c450
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_empty/serial_skewness_empty.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.1.ast
new file mode 100644
index 0000000..9af248f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : float
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.3.ast
new file mode 100644
index 0000000..d77c450
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float/serial_skewness_float.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.1.ast
new file mode 100644
index 0000000..9af248f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : float
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.3.ast
new file mode 100644
index 0000000..126091f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_float_null/serial_skewness_float_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.1.ast
new file mode 100644
index 0000000..16d25a8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : smallint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.3.ast
new file mode 100644
index 0000000..d77c450
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16/serial_skewness_int16.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.1.ast
new file mode 100644
index 0000000..16d25a8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : smallint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.3.ast
new file mode 100644
index 0000000..126091f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int16_null/serial_skewness_int16_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.1.ast
new file mode 100644
index 0000000..6eaf31a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : integer
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.3.ast
new file mode 100644
index 0000000..d77c450
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32/serial_skewness_int32.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.1.ast
new file mode 100644
index 0000000..6eaf31a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : integer
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.3.ast
new file mode 100644
index 0000000..126091f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int32_null/serial_skewness_int32_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.1.ast
new file mode 100644
index 0000000..7911712
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : bigint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.3.ast
new file mode 100644
index 0000000..d77c450
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64/serial_skewness_int64.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.1.ast
new file mode 100644
index 0000000..7911712
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : bigint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.3.ast
new file mode 100644
index 0000000..126091f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int64_null/serial_skewness_int64_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.1.ast
new file mode 100644
index 0000000..44c9cde
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.3.ast
new file mode 100644
index 0000000..d77c450
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8/serial_skewness_int8.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.1.ast
new file mode 100644
index 0000000..44c9cde
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.3.ast
new file mode 100644
index 0000000..126091f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_int8_null/serial_skewness_int8_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ FieldAccessor [
+ Variable [ Name=#2 ]
+ Field=t
+ ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=#1 ]
+ AS Variable [ Name=#2 ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=#1 ]
+ (
+ t:=Variable [ Name=$t ]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.3.ast
new file mode 100644
index 0000000..93911c5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_skewness_mixed/serial_skewness_mixed.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_double/serial_stddev_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_double/serial_stddev_double.3.ast
index d9e097b..f584460 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_double/serial_stddev_double.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_double/serial_stddev_double.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_double_null/serial_stddev_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_double_null/serial_stddev_double_null.3.ast
index 923fc41..5fffca0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_double_null/serial_stddev_double_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_double_null/serial_stddev_double_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_empty/serial_stddev_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_empty/serial_stddev_empty.3.ast
index d9e097b..f584460 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_empty/serial_stddev_empty.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_empty/serial_stddev_empty.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_float/serial_stddev_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_float/serial_stddev_float.3.ast
index d9e097b..f584460 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_float/serial_stddev_float.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_float/serial_stddev_float.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_float_null/serial_stddev_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_float_null/serial_stddev_float_null.3.ast
index 923fc41..5fffca0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_float_null/serial_stddev_float_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_float_null/serial_stddev_float_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int16/serial_stddev_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int16/serial_stddev_int16.3.ast
index d9e097b..f584460 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int16/serial_stddev_int16.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int16/serial_stddev_int16.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int16_null/serial_stddev_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int16_null/serial_stddev_int16_null.3.ast
index 923fc41..5fffca0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int16_null/serial_stddev_int16_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int16_null/serial_stddev_int16_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int32/serial_stddev_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int32/serial_stddev_int32.3.ast
index d9e097b..f584460 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int32/serial_stddev_int32.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int32/serial_stddev_int32.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int32_null/serial_stddev_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int32_null/serial_stddev_int32_null.3.ast
index 923fc41..5fffca0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int32_null/serial_stddev_int32_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int32_null/serial_stddev_int32_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int64/serial_stddev_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int64/serial_stddev_int64.3.ast
index d9e097b..f584460 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int64/serial_stddev_int64.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int64/serial_stddev_int64.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int64_null/serial_stddev_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int64_null/serial_stddev_int64_null.3.ast
index 923fc41..5fffca0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int64_null/serial_stddev_int64_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int64_null/serial_stddev_int64_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int8/serial_stddev_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int8/serial_stddev_int8.3.ast
index d9e097b..f584460 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int8/serial_stddev_int8.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int8/serial_stddev_int8.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int8_null/serial_stddev_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int8_null/serial_stddev_int8_null.3.ast
index 923fc41..5fffca0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int8_null/serial_stddev_int8_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_int8_null/serial_stddev_int8_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -19,7 +19,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.sql-stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.3.ast
deleted file mode 100644
index 8a897bc..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.3.ast
+++ /dev/null
@@ -1,40 +0,0 @@
-DataverseUse test
-Query:
-SELECT [
-Variable [ Name=$gid ]
-gid
-FunctionCall asterix.sql-stddev@1[
- (
- SELECT ELEMENT [
- FieldAccessor [
- Variable [ Name=$g ]
- Field=valplus
- ]
- ]
- FROM [ Variable [ Name=$g ]
- AS Variable [ Name=$g ]
- ]
- )
-]
-stddev
-]
-FROM [ FunctionCall asterix.dataset@1[
- LiteralExpr [STRING] [test.Test]
- ]
- AS Variable [ Name=$t ]
-]
-Groupby
- Variable [ Name=$gid ]
- :=
- FieldAccessor [
- Variable [ Name=$t ]
- Field=gid
- ]
- GROUP AS Variable [ Name=$g ]
- (
- valplus:=FunctionCall asterix.field-access-by-name@2[
- Variable [ Name=$t ]
- LiteralExpr [STRING] [valplus]
-]
- )
-
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_mixed.1.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_mixed.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_mixed.2.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_mixed.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_mixed.3.ast
new file mode 100644
index 0000000..60cfe76
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_mixed.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-stddev_samp@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+stddev_samp
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_pop_mixed/serial_stddev_pop_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_pop_mixed/serial_stddev_pop_mixed.1.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_pop_mixed/serial_stddev_pop_int64_null.1.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_pop_mixed/serial_stddev_pop_mixed.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_pop_mixed/serial_stddev_pop_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_pop_mixed/serial_stddev_pop_mixed.2.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_pop_mixed/serial_stddev_pop_int64_null.2.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_pop_mixed/serial_stddev_pop_mixed.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_pop_mixed/serial_stddev_pop_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_pop_mixed/serial_stddev_pop_mixed.3.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_pop_mixed/serial_stddev_pop_int64_null.3.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_pop_mixed/serial_stddev_pop_mixed.3.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.3.ast
deleted file mode 100644
index 5ed5c3a..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.3.ast
+++ /dev/null
@@ -1,40 +0,0 @@
-DataverseUse test
-Query:
-SELECT [
-Variable [ Name=$gid ]
-gid
-FunctionCall asterix.sql-var@1[
- (
- SELECT ELEMENT [
- FieldAccessor [
- Variable [ Name=$g ]
- Field=valplus
- ]
- ]
- FROM [ Variable [ Name=$g ]
- AS Variable [ Name=$g ]
- ]
- )
-]
-var
-]
-FROM [ FunctionCall asterix.dataset@1[
- LiteralExpr [STRING] [test.Test]
- ]
- AS Variable [ Name=$t ]
-]
-Groupby
- Variable [ Name=$gid ]
- :=
- FieldAccessor [
- Variable [ Name=$t ]
- Field=gid
- ]
- GROUP AS Variable [ Name=$g ]
- (
- valplus:=FunctionCall asterix.field-access-by-name@2[
- Variable [ Name=$t ]
- LiteralExpr [STRING] [valplus]
-]
- )
-
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_mixed.1.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_mixed.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_mixed.2.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_mixed.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_mixed.3.ast
new file mode 100644
index 0000000..1087b9d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_mixed.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.sql-var_samp@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+var_samp
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_pop_mixed/serial_var_pop_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_pop_mixed/serial_var_pop_mixed.1.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_pop_mixed/serial_var_pop_int64_null.1.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_pop_mixed/serial_var_pop_mixed.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_pop_mixed/serial_var_pop_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_pop_mixed/serial_var_pop_mixed.2.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_pop_mixed/serial_var_pop_int64_null.2.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_pop_mixed/serial_var_pop_mixed.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_pop_mixed/serial_var_pop_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_pop_mixed/serial_var_pop_mixed.3.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_pop_mixed/serial_var_pop_int64_null.3.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_pop_mixed/serial_var_pop_mixed.3.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_double/skewness_double.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_double/skewness_double.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_double/skewness_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_double/skewness_double.3.ast
new file mode 100644
index 0000000..257e9b4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_double/skewness_double.3.ast
@@ -0,0 +1,19 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ LiteralExpr [DOUBLE] [1.0]
+ LiteralExpr [DOUBLE] [2.0]
+ FunctionCall null.double@1[
+ LiteralExpr [STRING] [3.0]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_double_null/skewness_double_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_double_null/skewness_double_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_double_null/skewness_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_double_null/skewness_double_null.3.ast
new file mode 100644
index 0000000..efd55a6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_double_null/skewness_double_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=doubleField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_empty_01/skewness_empty_01.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_empty_01/skewness_empty_01.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_empty_01/skewness_empty_01.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_empty_01/skewness_empty_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_empty_01/skewness_empty_01.3.ast
new file mode 100644
index 0000000..5419977
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_empty_01/skewness_empty_01.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ LiteralExpr [LONG] [1]
+ LiteralExpr [LONG] [2]
+ LiteralExpr [LONG] [3]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ Where
+ OperatorExpr [
+ Variable [ Name=$x ]
+ >
+ LiteralExpr [LONG] [10]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_empty_02/skewness_empty_02.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_empty_02/skewness_empty_02.1.ast
new file mode 100644
index 0000000..baf977e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_empty_02/skewness_empty_02.1.ast
@@ -0,0 +1,8 @@
+DataverseUse test
+TypeDecl TestType [
+ closed RecordType {
+ id : bigint,
+ val : double
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_empty_02/skewness_empty_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_empty_02/skewness_empty_02.3.ast
new file mode 100644
index 0000000..3ddfd4d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_empty_02/skewness_empty_02.3.ast
@@ -0,0 +1,19 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=val
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_float/skewness_float.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_float/skewness_float.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_float/skewness_float.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_float/skewness_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_float/skewness_float.3.ast
new file mode 100644
index 0000000..2eed91d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_float/skewness_float.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_float_null/skewness_float_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_float_null/skewness_float_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_float_null/skewness_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_float_null/skewness_float_null.3.ast
new file mode 100644
index 0000000..75251b9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_float_null/skewness_float_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=floatField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int16/skewness_int16.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int16/skewness_int16.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int16/skewness_int16.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int16/skewness_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int16/skewness_int16.3.ast
new file mode 100644
index 0000000..46e1594
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int16/skewness_int16.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int16_null/skewness_int16_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int16_null/skewness_int16_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int16_null/skewness_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int16_null/skewness_int16_null.3.ast
new file mode 100644
index 0000000..a454859
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int16_null/skewness_int16_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int16Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int32/skewness_int32.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int32/skewness_int32.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int32/skewness_int32.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int32/skewness_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int32/skewness_int32.3.ast
new file mode 100644
index 0000000..d9c0023
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int32/skewness_int32.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int32_null/skewness_int32_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int32_null/skewness_int32_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int32_null/skewness_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int32_null/skewness_int32_null.3.ast
new file mode 100644
index 0000000..d551bed
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int32_null/skewness_int32_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int32Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int64/skewness_int64.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int64/skewness_int64.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int64/skewness_int64.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int64/skewness_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int64/skewness_int64.3.ast
new file mode 100644
index 0000000..5bcb272
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int64/skewness_int64.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int64_null/skewness_int64_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int64_null/skewness_int64_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int64_null/skewness_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int64_null/skewness_int64_null.3.ast
new file mode 100644
index 0000000..7f53f71
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int64_null/skewness_int64_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int64Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int8/skewness_int8.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int8/skewness_int8.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int8/skewness_int8.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int8/skewness_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int8/skewness_int8.3.ast
new file mode 100644
index 0000000..0dde87f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int8/skewness_int8.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int8_null/skewness_int8_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int8_null/skewness_int8_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int8_null/skewness_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int8_null/skewness_int8_null.3.ast
new file mode 100644
index 0000000..fb9e831
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_int8_null/skewness_int8_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int8Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_mixed/skewness_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_mixed/skewness_mixed.3.ast
new file mode 100644
index 0000000..d45db6d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/skewness_mixed/skewness_mixed.3.ast
@@ -0,0 +1,22 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.sql-skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall null.float@1[
+ LiteralExpr [STRING] [2.0]
+ ]
+ LiteralExpr [STRING] [hello world]
+ LiteralExpr [LONG] [93847382783847382]
+ FunctionCall null.date@1[
+ LiteralExpr [STRING] [2013-01-01]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_double/stddev_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_double/stddev_double.3.ast
index a156d16..ab8468e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_double/stddev_double.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_double/stddev_double.3.ast
@@ -1,11 +1,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_double_null/stddev_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_double_null/stddev_double_null.3.ast
index 02ccab8..15687f0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_double_null/stddev_double_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_double_null/stddev_double_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_empty_01/stddev_empty_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_empty_01/stddev_empty_01.3.ast
index 51a67dc..1878d8c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_empty_01/stddev_empty_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_empty_01/stddev_empty_01.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_empty_02/stddev_empty_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_empty_02/stddev_empty_02.3.ast
index 1fcdc77..d560c87 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_empty_02/stddev_empty_02.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_empty_02/stddev_empty_02.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float/stddev_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float/stddev_float.3.ast
index 3b9af93..761af43 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float/stddev_float.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float/stddev_float.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.3.ast
deleted file mode 100644
index af4b678..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.3.ast
+++ /dev/null
@@ -1,42 +0,0 @@
-DataverseUse test
-Query:
-RecordConstructor [
- (
- LiteralExpr [STRING] [stddev]
- :
- FunctionCall asterix.sql-stddev@1[
- (
- SELECT ELEMENT [
- FieldAccessor [
- Variable [ Name=$x ]
- Field=floatField
- ]
- ]
- FROM [ FunctionCall asterix.dataset@1[
- LiteralExpr [STRING] [test.Numeric]
- ]
- AS Variable [ Name=$x ]
- ]
- )
- ]
- )
- (
- LiteralExpr [STRING] [stddev_pop]
- :
- FunctionCall asterix.sql-stddev_pop@1[
- (
- SELECT ELEMENT [
- FieldAccessor [
- Variable [ Name=$x ]
- Field=floatField
- ]
- ]
- FROM [ FunctionCall asterix.dataset@1[
- LiteralExpr [STRING] [test.Numeric]
- ]
- AS Variable [ Name=$x ]
- ]
- )
- ]
- )
-]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_null.1.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_nu.1.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_null.3.ast
new file mode 100644
index 0000000..4e5380c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_float_null/stddev_float_null.3.ast
@@ -0,0 +1,42 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [stddev_samp]
+ :
+ FunctionCall asterix.sql-stddev_samp@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=floatField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+ (
+ LiteralExpr [STRING] [stddev_pop]
+ :
+ FunctionCall asterix.sql-stddev_pop@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=floatField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int16/stddev_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int16/stddev_int16.3.ast
index a3ae382..6a49179 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int16/stddev_int16.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int16/stddev_int16.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int16_null/stddev_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int16_null/stddev_int16_null.3.ast
index abfdf357..5490833 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int16_null/stddev_int16_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int16_null/stddev_int16_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int32/stddev_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int32/stddev_int32.3.ast
index 475d383..6059d33 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int32/stddev_int32.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int32/stddev_int32.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int32_null/stddev_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int32_null/stddev_int32_null.3.ast
index ae92087..89e7c18 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int32_null/stddev_int32_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int32_null/stddev_int32_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int64/stddev_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int64/stddev_int64.3.ast
index aafffb8..1bf3e70 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int64/stddev_int64.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int64/stddev_int64.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int64_null/stddev_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int64_null/stddev_int64_null.3.ast
index 8726277..4568ffe 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int64_null/stddev_int64_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int64_null/stddev_int64_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int8/stddev_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int8/stddev_int8.3.ast
index 21b3171..e1bd8a4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int8/stddev_int8.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int8/stddev_int8.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int8_null/stddev_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int8_null/stddev_int8_null.3.ast
index f2c9bef..d794390 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int8_null/stddev_int8_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_int8_null/stddev_int8_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.sql-stddev@1[
+ FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_mixed/stddev_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_mixed/stddev_mixed.3.ast
index 14781dd..e9f65c8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_mixed/stddev_mixed.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/stddev_mixed/stddev_mixed.3.ast
@@ -1,6 +1,6 @@
Query:
SELECT ELEMENT [
-FunctionCall asterix.sql-stddev@1[
+FunctionCall asterix.sql-stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_double/var_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_double/var_double.3.ast
index 9037555..656ce03 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_double/var_double.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_double/var_double.3.ast
@@ -1,11 +1,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_double_null/var_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_double_null/var_double_null.3.ast
index 0060c07..a7c3964 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_double_null/var_double_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_double_null/var_double_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_empty_01/var_empty_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_empty_01/var_empty_01.3.ast
index c724d18..7882880 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_empty_01/var_empty_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_empty_01/var_empty_01.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_empty_02/var_empty_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_empty_02/var_empty_02.3.ast
index 1705103..0029156 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_empty_02/var_empty_02.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_empty_02/var_empty_02.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float/var_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float/var_float.3.ast
index 592907d..a534e0c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float/var_float.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float/var_float.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float_null/var_float_nu.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float_null/var_float_nu.3.ast
deleted file mode 100644
index 0587de5..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float_null/var_float_nu.3.ast
+++ /dev/null
@@ -1,42 +0,0 @@
-DataverseUse test
-Query:
-RecordConstructor [
- (
- LiteralExpr [STRING] [var]
- :
- FunctionCall asterix.sql-var@1[
- (
- SELECT ELEMENT [
- FieldAccessor [
- Variable [ Name=$x ]
- Field=floatField
- ]
- ]
- FROM [ FunctionCall asterix.dataset@1[
- LiteralExpr [STRING] [test.Numeric]
- ]
- AS Variable [ Name=$x ]
- ]
- )
- ]
- )
- (
- LiteralExpr [STRING] [var_pop]
- :
- FunctionCall asterix.sql-var_pop@1[
- (
- SELECT ELEMENT [
- FieldAccessor [
- Variable [ Name=$x ]
- Field=floatField
- ]
- ]
- FROM [ FunctionCall asterix.dataset@1[
- LiteralExpr [STRING] [test.Numeric]
- ]
- AS Variable [ Name=$x ]
- ]
- )
- ]
- )
-]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float_null/var_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float_null/var_float_null.1.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float_null/var_float_nu.1.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float_null/var_float_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float_null/var_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float_null/var_float_null.3.ast
new file mode 100644
index 0000000..698bace
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_float_null/var_float_null.3.ast
@@ -0,0 +1,42 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [var_samp]
+ :
+ FunctionCall asterix.sql-var_samp@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=floatField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+ (
+ LiteralExpr [STRING] [var_pop]
+ :
+ FunctionCall asterix.sql-var_pop@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=floatField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int16/var_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int16/var_int16.3.ast
index f741ad6..cecf5cc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int16/var_int16.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int16/var_int16.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int16_null/var_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int16_null/var_int16_null.3.ast
index 1d41f05..633309f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int16_null/var_int16_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int16_null/var_int16_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int32/var_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int32/var_int32.3.ast
index d7dd2a2..c38a181 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int32/var_int32.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int32/var_int32.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int32_null/var_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int32_null/var_int32_null.3.ast
index 8e87e8a..470f53f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int32_null/var_int32_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int32_null/var_int32_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int64/var_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int64/var_int64.3.ast
index dd6556e..858716d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int64/var_int64.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int64/var_int64.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int64_null/var_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int64_null/var_int64_null.3.ast
index 86920ae..3c2b5e6 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int64_null/var_int64_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int64_null/var_int64_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int8/var_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int8/var_int8.3.ast
index 3a0c710..9d9db88 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int8/var_int8.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int8/var_int8.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int8_null/var_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int8_null/var_int8_null.3.ast
index 46434d3..4ee2da4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int8_null/var_int8_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_int8_null/var_int8_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.sql-var@1[
+ FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_mixed/var_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_mixed/var_mixed.3.ast
index ce71370..4ce8e68 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_mixed/var_mixed.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/var_mixed/var_mixed.3.ast
@@ -1,6 +1,6 @@
Query:
SELECT ELEMENT [
-FunctionCall asterix.sql-var@1[
+FunctionCall asterix.sql-var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_null/agg_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_null/agg_null.3.ast
index 001001e..86b51e6 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_null/agg_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_null/agg_null.3.ast
@@ -46,9 +46,9 @@
]
)
(
- LiteralExpr [STRING] [stddev1]
+ LiteralExpr [STRING] [stddev_samp1]
:
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
LiteralExpr [NULL]
]
@@ -64,9 +64,9 @@
]
)
(
- LiteralExpr [STRING] [var1]
+ LiteralExpr [STRING] [var_samp1]
:
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
LiteralExpr [NULL]
]
@@ -82,6 +82,24 @@
]
)
(
+ LiteralExpr [STRING] [skewness1]
+ :
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ LiteralExpr [NULL]
+ ]
+ ]
+ )
+ (
+ LiteralExpr [STRING] [kurtosis1]
+ :
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ LiteralExpr [NULL]
+ ]
+ ]
+ )
+ (
LiteralExpr [STRING] [count2]
:
FunctionCall asterix.count@1[
@@ -132,9 +150,9 @@
]
)
(
- LiteralExpr [STRING] [stddev2]
+ LiteralExpr [STRING] [stddev_samp2]
:
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
UnorderedListConstructor [
LiteralExpr [NULL]
LiteralExpr [NULL]
@@ -152,9 +170,9 @@
]
)
(
- LiteralExpr [STRING] [var2]
+ LiteralExpr [STRING] [var_samp2]
:
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
UnorderedListConstructor [
LiteralExpr [NULL]
LiteralExpr [NULL]
@@ -171,4 +189,24 @@
]
]
)
+ (
+ LiteralExpr [STRING] [skewness2]
+ :
+ FunctionCall asterix.skewness@1[
+ UnorderedListConstructor [
+ LiteralExpr [NULL]
+ LiteralExpr [NULL]
+ ]
+ ]
+ )
+ (
+ LiteralExpr [STRING] [kurtosis2]
+ :
+ FunctionCall asterix.kurtosis@1[
+ UnorderedListConstructor [
+ LiteralExpr [NULL]
+ LiteralExpr [NULL]
+ ]
+ ]
+ )
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_null_rec/agg_null_rec.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_null_rec/agg_null_rec.3.ast
index 3995d9f..e994793 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_null_rec/agg_null_rec.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_null_rec/agg_null_rec.3.ast
@@ -97,9 +97,9 @@
]
)
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -135,9 +135,9 @@
]
)
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -172,4 +172,42 @@
)
]
)
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=valplus
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+ ]
+ )
+ ]
+ )
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=valplus
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+ ]
+ )
+ ]
+ )
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_null_rec_1/agg_null_rec_1.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_null_rec_1/agg_null_rec_1.3.ast
index 87a6de0..d8c3de1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_null_rec_1/agg_null_rec_1.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_null_rec_1/agg_null_rec_1.3.ast
@@ -122,9 +122,9 @@
]
)
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -174,9 +174,9 @@
]
)
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -225,4 +225,56 @@
)
]
)
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$i ]
+ Field=val
+ ]
+ ]
+ FROM [ (
+ SELECT ELEMENT [
+ Variable [ Name=$t ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+ ]
+ )
+ AS Variable [ Name=$i ]
+ ]
+ )
+ ]
+ )
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$i ]
+ Field=val
+ ]
+ ]
+ FROM [ (
+ SELECT ELEMENT [
+ Variable [ Name=$t ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+ ]
+ )
+ AS Variable [ Name=$i ]
+ ]
+ )
+ ]
+ )
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_number/agg_number.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_number/agg_number.3.ast
index 7df9903..21cab5a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_number/agg_number.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_number/agg_number.3.ast
@@ -81,9 +81,9 @@
]
)
(
- LiteralExpr [STRING] [stddev1]
+ LiteralExpr [STRING] [stddev_samp1]
:
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall null.float@1[
LiteralExpr [STRING] [2.0]
@@ -113,9 +113,9 @@
]
)
(
- LiteralExpr [STRING] [var1]
+ LiteralExpr [STRING] [var_samp1]
:
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall null.float@1[
LiteralExpr [STRING] [2.0]
@@ -145,6 +145,38 @@
]
)
(
+ LiteralExpr [STRING] [skewness1]
+ :
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall null.float@1[
+ LiteralExpr [STRING] [2.0]
+ ]
+ FunctionCall null.double@1[
+ LiteralExpr [STRING] [3.0]
+ ]
+ LiteralExpr [LONG] [93847382783847382]
+ LiteralExpr [LONG] [1]
+ ]
+ ]
+ )
+ (
+ LiteralExpr [STRING] [kurtosis1]
+ :
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall null.float@1[
+ LiteralExpr [STRING] [2.0]
+ ]
+ FunctionCall null.double@1[
+ LiteralExpr [STRING] [3.0]
+ ]
+ LiteralExpr [LONG] [93847382783847382]
+ LiteralExpr [LONG] [1]
+ ]
+ ]
+ )
+ (
LiteralExpr [STRING] [count2]
:
FunctionCall asterix.count@1[
@@ -225,9 +257,9 @@
]
)
(
- LiteralExpr [STRING] [stddev2]
+ LiteralExpr [STRING] [stddev_samp2]
:
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall null.float@1[
LiteralExpr [STRING] [2.0]
@@ -257,9 +289,9 @@
]
)
(
- LiteralExpr [STRING] [var2]
+ LiteralExpr [STRING] [var_samp2]
:
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall null.float@1[
LiteralExpr [STRING] [2.0]
@@ -288,4 +320,36 @@
]
]
)
+ (
+ LiteralExpr [STRING] [skewness2]
+ :
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall null.float@1[
+ LiteralExpr [STRING] [2.0]
+ ]
+ FunctionCall null.double@1[
+ LiteralExpr [STRING] [3.0]
+ ]
+ LiteralExpr [LONG] [93847382783847382]
+ LiteralExpr [LONG] [1]
+ ]
+ ]
+ )
+ (
+ LiteralExpr [STRING] [kurtosis2]
+ :
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall null.float@1[
+ LiteralExpr [STRING] [2.0]
+ ]
+ FunctionCall null.double@1[
+ LiteralExpr [STRING] [3.0]
+ ]
+ LiteralExpr [LONG] [93847382783847382]
+ LiteralExpr [LONG] [1]
+ ]
+ ]
+ )
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_number_rec/agg_number_rec.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_number_rec/agg_number_rec.3.ast
index 3995d9f..e994793 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_number_rec/agg_number_rec.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/agg_number_rec/agg_number_rec.3.ast
@@ -97,9 +97,9 @@
]
)
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -135,9 +135,9 @@
]
)
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -172,4 +172,42 @@
)
]
)
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=valplus
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+ ]
+ )
+ ]
+ )
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=valplus
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+ ]
+ )
+ ]
+ )
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_double/kurtosis_double.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_double/kurtosis_double.1.ast
new file mode 100644
index 0000000..086bc5f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_double/kurtosis_double.1.ast
@@ -0,0 +1,2 @@
+DataverseUse test
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_double/kurtosis_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_double/kurtosis_double.3.ast
new file mode 100644
index 0000000..417a2c2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_double/kurtosis_double.3.ast
@@ -0,0 +1,19 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ LiteralExpr [DOUBLE] [1.0]
+ LiteralExpr [DOUBLE] [2.0]
+ FunctionCall null.double@1[
+ LiteralExpr [STRING] [3.0]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_double_null/kurtosis_double_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_double_null/kurtosis_double_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_double_null/kurtosis_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_double_null/kurtosis_double_null.3.ast
new file mode 100644
index 0000000..5d7e04c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_double_null/kurtosis_double_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=doubleField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_empty_01/kurtosis_empty_01.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_empty_01/kurtosis_empty_01.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_empty_01/kurtosis_empty_01.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_empty_01/kurtosis_empty_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_empty_01/kurtosis_empty_01.3.ast
new file mode 100644
index 0000000..98602ed
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_empty_01/kurtosis_empty_01.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ LiteralExpr [LONG] [1]
+ LiteralExpr [LONG] [2]
+ LiteralExpr [LONG] [3]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ Where
+ OperatorExpr [
+ Variable [ Name=$x ]
+ >
+ LiteralExpr [LONG] [10]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_empty_02/kurtosis_empty_02.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_empty_02/kurtosis_empty_02.1.ast
new file mode 100644
index 0000000..babcce4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_empty_02/kurtosis_empty_02.1.ast
@@ -0,0 +1,8 @@
+DataverseUse test
+TypeDecl TestType [
+ closed RecordType {
+ id : integer,
+ val : double
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_empty_02/kurtosis_empty_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_empty_02/kurtosis_empty_02.3.ast
new file mode 100644
index 0000000..2447f01
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_empty_02/kurtosis_empty_02.3.ast
@@ -0,0 +1,19 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=val
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_float/kurtosis_float.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_float/kurtosis_float.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_float/kurtosis_float.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_float/kurtosis_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_float/kurtosis_float.3.ast
new file mode 100644
index 0000000..163c050
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_float/kurtosis_float.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_float_null/kurtosis_float_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_float_null/kurtosis_float_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_float_null/kurtosis_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_float_null/kurtosis_float_null.3.ast
new file mode 100644
index 0000000..982ae95
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_float_null/kurtosis_float_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=floatField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int16/kurtosis_int16.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int16/kurtosis_int16.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int16/kurtosis_int16.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int16/kurtosis_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int16/kurtosis_int16.3.ast
new file mode 100644
index 0000000..878c950
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int16/kurtosis_int16.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int16_null/kurtosis_int16_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int16_null/kurtosis_int16_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int16_null/kurtosis_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int16_null/kurtosis_int16_null.3.ast
new file mode 100644
index 0000000..c472279
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int16_null/kurtosis_int16_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int16Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int32/kurtosis_int32.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int32/kurtosis_int32.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int32/kurtosis_int32.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int32/kurtosis_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int32/kurtosis_int32.3.ast
new file mode 100644
index 0000000..6c8b3fe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int32/kurtosis_int32.3.ast
@@ -0,0 +1,18 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ LiteralExpr [LONG] [1]
+ LiteralExpr [LONG] [2]
+ LiteralExpr [LONG] [3]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int32_null/kurtosis_int32_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int32_null/kurtosis_int32_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int32_null/kurtosis_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int32_null/kurtosis_int32_null.3.ast
new file mode 100644
index 0000000..b4b84dd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int32_null/kurtosis_int32_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int32Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int64/kurtosis_int64.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int64/kurtosis_int64.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int64/kurtosis_int64.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int64/kurtosis_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int64/kurtosis_int64.3.ast
new file mode 100644
index 0000000..cf519fc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int64/kurtosis_int64.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int64_null/kurtosis_int64_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int64_null/kurtosis_int64_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int64_null/kurtosis_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int64_null/kurtosis_int64_null.3.ast
new file mode 100644
index 0000000..fad8053
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int64_null/kurtosis_int64_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int64Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int8/kurtosis_int8.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int8/kurtosis_int8.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int8/kurtosis_int8.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int8/kurtosis_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int8/kurtosis_int8.3.ast
new file mode 100644
index 0000000..1d36b03
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int8/kurtosis_int8.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int8_null/kurtosis_int8_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int8_null/kurtosis_int8_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int8_null/kurtosis_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int8_null/kurtosis_int8_null.3.ast
new file mode 100644
index 0000000..ad20582
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_int8_null/kurtosis_int8_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [kurtosis]
+ :
+ FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int8Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_mixed/kurtosis_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_mixed/kurtosis_mixed.3.ast
new file mode 100644
index 0000000..4048b74
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/kurtosis_mixed/kurtosis_mixed.3.ast
@@ -0,0 +1,22 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall null.float@1[
+ LiteralExpr [STRING] [2.0]
+ ]
+ LiteralExpr [STRING] [hello world]
+ LiteralExpr [LONG] [93847382783847382]
+ FunctionCall null.date@1[
+ LiteralExpr [STRING] [2013-01-01]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis/scalar_kurtosis.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis/scalar_kurtosis.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis/scalar_kurtosis.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis/scalar_kurtosis.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis/scalar_kurtosis.3.ast
new file mode 100644
index 0000000..8d26180
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis/scalar_kurtosis.3.ast
@@ -0,0 +1,105 @@
+DataverseUse test
+Query:
+Let Variable [ Name=$i8 ]
+ :=
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$i16 ]
+ :=
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$i32 ]
+ :=
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$i64 ]
+ :=
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$f ]
+ :=
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$d ]
+ :=
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+SELECT ELEMENT [
+Variable [ Name=$i ]
+]
+FROM [ OrderedListConstructor [
+ Variable [ Name=$i8 ]
+ Variable [ Name=$i16 ]
+ Variable [ Name=$i32 ]
+ Variable [ Name=$i64 ]
+ Variable [ Name=$f ]
+ Variable [ Name=$d ]
+ ]
+ AS Variable [ Name=$i ]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.3.ast
new file mode 100644
index 0000000..163f286
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis_empty/scalar_kurtosis_empty.3.ast
@@ -0,0 +1,7 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ ]
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.3.ast
new file mode 100644
index 0000000..bbb93cc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_kurtosis_null/scalar_kurtosis_null.3.ast
@@ -0,0 +1,111 @@
+DataverseUse test
+Query:
+Let Variable [ Name=$i8 ]
+ :=
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$i16 ]
+ :=
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$i32 ]
+ :=
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$i64 ]
+ :=
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$f ]
+ :=
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$d ]
+ :=
+ FunctionCall asterix.kurtosis@1[
+ OrderedListConstructor [
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+SELECT ELEMENT [
+Variable [ Name=$i ]
+]
+FROM [ OrderedListConstructor [
+ Variable [ Name=$i8 ]
+ Variable [ Name=$i16 ]
+ Variable [ Name=$i32 ]
+ Variable [ Name=$i64 ]
+ Variable [ Name=$f ]
+ Variable [ Name=$d ]
+ ]
+ AS Variable [ Name=$i ]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness/scalar_skewness.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness/scalar_skewness.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness/scalar_skewness.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness/scalar_skewness.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness/scalar_skewness.3.ast
new file mode 100644
index 0000000..dc5525d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness/scalar_skewness.3.ast
@@ -0,0 +1,105 @@
+DataverseUse test
+Query:
+Let Variable [ Name=$i8 ]
+ :=
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$i16 ]
+ :=
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$i32 ]
+ :=
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$i64 ]
+ :=
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$f ]
+ :=
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+Let Variable [ Name=$d ]
+ :=
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ ]
+SELECT ELEMENT [
+Variable [ Name=$i ]
+]
+FROM [ OrderedListConstructor [
+ Variable [ Name=$i8 ]
+ Variable [ Name=$i16 ]
+ Variable [ Name=$i32 ]
+ Variable [ Name=$i64 ]
+ Variable [ Name=$f ]
+ Variable [ Name=$d ]
+ ]
+ AS Variable [ Name=$i ]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness_empty/scalar_skewness_empty.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness_empty/scalar_skewness_empty.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness_empty/scalar_skewness_empty.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness_empty/scalar_skewness_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness_empty/scalar_skewness_empty.3.ast
new file mode 100644
index 0000000..45f7041
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness_empty/scalar_skewness_empty.3.ast
@@ -0,0 +1,7 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ ]
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness_null/scalar_skewness_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness_null/scalar_skewness_null.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness_null/scalar_skewness_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness_null/scalar_skewness_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness_null/scalar_skewness_null.3.ast
new file mode 100644
index 0000000..685fc80
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_skewness_null/scalar_skewness_null.3.ast
@@ -0,0 +1,111 @@
+DataverseUse test
+Query:
+Let Variable [ Name=$i8 ]
+ :=
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$i16 ]
+ :=
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$i32 ]
+ :=
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int32@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$i64 ]
+ :=
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$f ]
+ :=
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+Let Variable [ Name=$d ]
+ :=
+ FunctionCall asterix.skewness@1[
+ OrderedListConstructor [
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.double@1[
+ LiteralExpr [STRING] [3]
+ ]
+ LiteralExpr [NULL]
+ ]
+ ]
+SELECT ELEMENT [
+Variable [ Name=$i ]
+]
+FROM [ OrderedListConstructor [
+ Variable [ Name=$i8 ]
+ Variable [ Name=$i16 ]
+ Variable [ Name=$i32 ]
+ Variable [ Name=$i64 ]
+ Variable [ Name=$f ]
+ Variable [ Name=$d ]
+ ]
+ AS Variable [ Name=$i ]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_stddev/scalar_stddev.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_stddev/scalar_stddev.3.ast
index 4606161..f80e1f9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_stddev/scalar_stddev.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_stddev/scalar_stddev.3.ast
@@ -2,12 +2,12 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
Let Variable [ Name=$i8 ]
:=
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int8@1[
LiteralExpr [STRING] [1]
@@ -22,7 +22,7 @@
]
Let Variable [ Name=$i16 ]
:=
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int16@1[
LiteralExpr [STRING] [1]
@@ -37,7 +37,7 @@
]
Let Variable [ Name=$i32 ]
:=
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int32@1[
LiteralExpr [STRING] [1]
@@ -52,7 +52,7 @@
]
Let Variable [ Name=$i64 ]
:=
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int64@1[
LiteralExpr [STRING] [1]
@@ -67,7 +67,7 @@
]
Let Variable [ Name=$f ]
:=
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall test.float@1[
LiteralExpr [STRING] [1]
@@ -82,7 +82,7 @@
]
Let Variable [ Name=$d ]
:=
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall test.double@1[
LiteralExpr [STRING] [1]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.3.ast
index cb2d59f..158863d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.3.ast
@@ -1,11 +1,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
]
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.3.ast
index a155c95..a3e4c95 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.3.ast
@@ -2,12 +2,12 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
Let Variable [ Name=$i8 ]
:=
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int8@1[
LiteralExpr [STRING] [1]
@@ -23,7 +23,7 @@
]
Let Variable [ Name=$i16 ]
:=
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int16@1[
LiteralExpr [STRING] [1]
@@ -39,7 +39,7 @@
]
Let Variable [ Name=$i32 ]
:=
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int32@1[
LiteralExpr [STRING] [1]
@@ -55,7 +55,7 @@
]
Let Variable [ Name=$i64 ]
:=
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall test.int64@1[
LiteralExpr [STRING] [1]
@@ -71,7 +71,7 @@
]
Let Variable [ Name=$f ]
:=
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall test.float@1[
LiteralExpr [STRING] [1]
@@ -87,7 +87,7 @@
]
Let Variable [ Name=$d ]
:=
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
OrderedListConstructor [
FunctionCall test.double@1[
LiteralExpr [STRING] [1]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_var/scalar_var.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_var/scalar_var.3.ast
index 0fbda2c..8d75e8d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_var/scalar_var.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_var/scalar_var.3.ast
@@ -2,12 +2,12 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
Let Variable [ Name=$i8 ]
:=
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall test.int8@1[
LiteralExpr [STRING] [1]
@@ -22,7 +22,7 @@
]
Let Variable [ Name=$i16 ]
:=
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall test.int16@1[
LiteralExpr [STRING] [1]
@@ -37,7 +37,7 @@
]
Let Variable [ Name=$i32 ]
:=
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall test.int32@1[
LiteralExpr [STRING] [1]
@@ -52,7 +52,7 @@
]
Let Variable [ Name=$i64 ]
:=
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall test.int64@1[
LiteralExpr [STRING] [1]
@@ -67,7 +67,7 @@
]
Let Variable [ Name=$f ]
:=
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall test.float@1[
LiteralExpr [STRING] [1]
@@ -82,7 +82,7 @@
]
Let Variable [ Name=$d ]
:=
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall test.double@1[
LiteralExpr [STRING] [1]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_var_empty/scalar_var_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_var_empty/scalar_var_empty.3.ast
index 7186fb5..2df85ec 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_var_empty/scalar_var_empty.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_var_empty/scalar_var_empty.3.ast
@@ -1,11 +1,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
]
]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_var_null/scalar_var_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_var_null/scalar_var_null.3.ast
index 2ade7e0..feeae0a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_var_null/scalar_var_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/scalar_var_null/scalar_var_null.3.ast
@@ -2,12 +2,12 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
Let Variable [ Name=$i8 ]
:=
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall test.int8@1[
LiteralExpr [STRING] [1]
@@ -23,7 +23,7 @@
]
Let Variable [ Name=$i16 ]
:=
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall test.int16@1[
LiteralExpr [STRING] [1]
@@ -39,7 +39,7 @@
]
Let Variable [ Name=$i32 ]
:=
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall test.int32@1[
LiteralExpr [STRING] [1]
@@ -55,7 +55,7 @@
]
Let Variable [ Name=$i64 ]
:=
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall test.int64@1[
LiteralExpr [STRING] [1]
@@ -71,7 +71,7 @@
]
Let Variable [ Name=$f ]
:=
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall test.float@1[
LiteralExpr [STRING] [1]
@@ -87,7 +87,7 @@
]
Let Variable [ Name=$d ]
:=
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
OrderedListConstructor [
FunctionCall test.double@1[
LiteralExpr [STRING] [1]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.3.ast
new file mode 100644
index 0000000..ea239a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double/serial_kurtosis_double.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.3.ast
new file mode 100644
index 0000000..20551a4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_double_null/serial_kurtosis_double_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.3.ast
new file mode 100644
index 0000000..ea239a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_empty/serial_kurtosis_empty.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.1.ast
new file mode 100644
index 0000000..9af248f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : float
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.3.ast
new file mode 100644
index 0000000..ea239a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float/serial_kurtosis_float.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.1.ast
new file mode 100644
index 0000000..9af248f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : float
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.3.ast
new file mode 100644
index 0000000..20551a4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_float_null/serial_kurtosis_float_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.1.ast
new file mode 100644
index 0000000..16d25a8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : smallint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.3.ast
new file mode 100644
index 0000000..ea239a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16/serial_kurtosis_int16.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.ast
new file mode 100644
index 0000000..16d25a8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : smallint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.3.ast
new file mode 100644
index 0000000..20551a4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int16_null/serial_kurtosis_int16_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.1.ast
new file mode 100644
index 0000000..6eaf31a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : integer
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.3.ast
new file mode 100644
index 0000000..ea239a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32/serial_kurtosis_int32.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.ast
new file mode 100644
index 0000000..6eaf31a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : integer
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.3.ast
new file mode 100644
index 0000000..20551a4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int32_null/serial_kurtosis_int32_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.1.ast
new file mode 100644
index 0000000..7911712
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : bigint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.3.ast
new file mode 100644
index 0000000..ea239a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64/serial_kurtosis_int64.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.ast
new file mode 100644
index 0000000..7911712
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : bigint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.3.ast
new file mode 100644
index 0000000..20551a4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int64_null/serial_kurtosis_int64_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.1.ast
new file mode 100644
index 0000000..44c9cde
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.3.ast
new file mode 100644
index 0000000..ea239a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8/serial_kurtosis_int8.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.ast
new file mode 100644
index 0000000..44c9cde
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.3.ast
new file mode 100644
index 0000000..20551a4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_int8_null/serial_kurtosis_int8_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.3.ast
new file mode 100644
index 0000000..20551a4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_kurtosis_mixed/serial_kurtosis_mixed.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.kurtosis@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+kurtosis
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.3.ast
new file mode 100644
index 0000000..04c73ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double/serial_skewness_double.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.3.ast
new file mode 100644
index 0000000..925de9f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_double_null/serial_skewness_double_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_empty/serial_skewness_empty.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_empty/serial_skewness_empty.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_empty/serial_skewness_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_empty/serial_skewness_empty.3.ast
new file mode 100644
index 0000000..04c73ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_empty/serial_skewness_empty.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.1.ast
new file mode 100644
index 0000000..9af248f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : float
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.3.ast
new file mode 100644
index 0000000..04c73ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float/serial_skewness_float.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.1.ast
new file mode 100644
index 0000000..9af248f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : float
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.3.ast
new file mode 100644
index 0000000..925de9f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_float_null/serial_skewness_float_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.1.ast
new file mode 100644
index 0000000..16d25a8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : smallint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.3.ast
new file mode 100644
index 0000000..04c73ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16/serial_skewness_int16.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.1.ast
new file mode 100644
index 0000000..16d25a8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : smallint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.3.ast
new file mode 100644
index 0000000..925de9f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int16_null/serial_skewness_int16_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.1.ast
new file mode 100644
index 0000000..6eaf31a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : integer
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.3.ast
new file mode 100644
index 0000000..04c73ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32/serial_skewness_int32.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.1.ast
new file mode 100644
index 0000000..6eaf31a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : integer
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.3.ast
new file mode 100644
index 0000000..925de9f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int32_null/serial_skewness_int32_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.1.ast
new file mode 100644
index 0000000..7911712
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : bigint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.3.ast
new file mode 100644
index 0000000..04c73ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64/serial_skewness_int64.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.1.ast
new file mode 100644
index 0000000..7911712
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : bigint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.3.ast
new file mode 100644
index 0000000..925de9f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int64_null/serial_skewness_int64_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.1.ast
new file mode 100644
index 0000000..44c9cde
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.3.ast
new file mode 100644
index 0000000..04c73ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8/serial_skewness_int8.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=val
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ val:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [val]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.1.ast
new file mode 100644
index 0000000..44c9cde
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+ open RecordType {
+ id : bigint,
+ gid : bigint,
+ val : tinyint
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_stddev_mixed/serial_stddev_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.3.ast
new file mode 100644
index 0000000..925de9f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_int8_null/serial_skewness_int8_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.2.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/serial_var_mixed/serial_var_int64_null.2.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.2.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.3.ast
new file mode 100644
index 0000000..925de9f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_skewness_mixed/serial_skewness_mixed.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$g ]
+ Field=valplus
+ ]
+ ]
+ FROM [ Variable [ Name=$g ]
+ AS Variable [ Name=$g ]
+ ]
+ )
+]
+skewness
+]
+FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$t ]
+]
+Groupby
+ Variable [ Name=$gid ]
+ :=
+ FieldAccessor [
+ Variable [ Name=$t ]
+ Field=gid
+ ]
+ GROUP AS Variable [ Name=$g ]
+ (
+ valplus:=FunctionCall asterix.field-access-by-name@2[
+ Variable [ Name=$t ]
+ LiteralExpr [STRING] [valplus]
+]
+ )
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.3.ast
index 02388b6..a246849 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.3.ast
index b8ce40c..98e072d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_empty/serial_stddev_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_empty/serial_stddev_empty.3.ast
index 02388b6..a246849 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_empty/serial_stddev_empty.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_empty/serial_stddev_empty.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.3.ast
index 02388b6..a246849 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.3.ast
index b8ce40c..98e072d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.3.ast
index 02388b6..a246849 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.3.ast
index b8ce40c..98e072d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.3.ast
index 02388b6..a246849 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.3.ast
index b8ce40c..98e072d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.3.ast
index 02388b6..a246849 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.3.ast
index b8ce40c..98e072d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.3.ast
index 02388b6..a246849 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.3.ast
index b8ce40c..98e072d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
FunctionCall asterix.stddev_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.3.ast
index f05d552..d8cdbde 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-stddev
+stddev_samp
]
FROM [ FunctionCall asterix.dataset@1[
LiteralExpr [STRING] [test.Test]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_double/serial_var_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_double/serial_var_double.3.ast
index 44c30e7..7cebf6d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_double/serial_var_double.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_double/serial_var_double.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_double_null/serial_var_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_double_null/serial_var_double_null.3.ast
index 5dc2f39..98690d9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_double_null/serial_var_double_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_double_null/serial_var_double_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_empty/serial_var_empty.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_empty/serial_var_empty.3.ast
index 44c30e7..7cebf6d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_empty/serial_var_empty.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_empty/serial_var_empty.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_float/serial_var_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_float/serial_var_float.3.ast
index 44c30e7..7cebf6d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_float/serial_var_float.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_float/serial_var_float.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_float_null/serial_var_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_float_null/serial_var_float_null.3.ast
index 5dc2f39..98690d9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_float_null/serial_var_float_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_float_null/serial_var_float_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int16/serial_var_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int16/serial_var_int16.3.ast
index 44c30e7..7cebf6d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int16/serial_var_int16.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int16/serial_var_int16.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int16_null/serial_var_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int16_null/serial_var_int16_null.3.ast
index 5dc2f39..98690d9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int16_null/serial_var_int16_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int16_null/serial_var_int16_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int32/serial_var_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int32/serial_var_int32.3.ast
index 44c30e7..7cebf6d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int32/serial_var_int32.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int32/serial_var_int32.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int32_null/serial_var_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int32_null/serial_var_int32_null.3.ast
index 5dc2f39..98690d9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int32_null/serial_var_int32_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int32_null/serial_var_int32_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int64/serial_var_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int64/serial_var_int64.3.ast
index 44c30e7..7cebf6d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int64/serial_var_int64.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int64/serial_var_int64.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int64_null/serial_var_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int64_null/serial_var_int64_null.3.ast
index 5dc2f39..98690d9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int64_null/serial_var_int64_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int64_null/serial_var_int64_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int8/serial_var_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int8/serial_var_int8.3.ast
index 44c30e7..7cebf6d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int8/serial_var_int8.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int8/serial_var_int8.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int8_null/serial_var_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int8_null/serial_var_int8_null.3.ast
index 5dc2f39..98690d9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int8_null/serial_var_int8_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_int8_null/serial_var_int8_null.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
FunctionCall asterix.var_pop@1[
(
SELECT ELEMENT [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_mixed/serial_var_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_mixed/serial_var_mixed.3.ast
index a42c0cb..32e4fea 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_mixed/serial_var_mixed.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_var_mixed/serial_var_mixed.3.ast
@@ -3,7 +3,7 @@
SELECT [
Variable [ Name=$gid ]
gid
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
@@ -16,7 +16,7 @@
]
)
]
-var
+var_samp
]
FROM [ FunctionCall asterix.dataset@1[
LiteralExpr [STRING] [test.Test]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_double/skewness_double.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_double/skewness_double.1.ast
new file mode 100644
index 0000000..086bc5f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_double/skewness_double.1.ast
@@ -0,0 +1,2 @@
+DataverseUse test
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_double/skewness_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_double/skewness_double.3.ast
new file mode 100644
index 0000000..f494ef4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_double/skewness_double.3.ast
@@ -0,0 +1,19 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ LiteralExpr [DOUBLE] [1.0]
+ LiteralExpr [DOUBLE] [2.0]
+ FunctionCall null.double@1[
+ LiteralExpr [STRING] [3.0]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_double_null/skewness_double_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_double_null/skewness_double_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_double_null/skewness_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_double_null/skewness_double_null.3.ast
new file mode 100644
index 0000000..37aee67
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_double_null/skewness_double_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=doubleField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_empty_01/skewness_empty_01.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_empty_01/skewness_empty_01.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_empty_01/skewness_empty_01.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_empty_01/skewness_empty_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_empty_01/skewness_empty_01.3.ast
new file mode 100644
index 0000000..b22541d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_empty_01/skewness_empty_01.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ LiteralExpr [LONG] [1]
+ LiteralExpr [LONG] [2]
+ LiteralExpr [LONG] [3]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ Where
+ OperatorExpr [
+ Variable [ Name=$x ]
+ >
+ LiteralExpr [LONG] [10]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_empty_02/skewness_empty_02.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_empty_02/skewness_empty_02.1.ast
new file mode 100644
index 0000000..babcce4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_empty_02/skewness_empty_02.1.ast
@@ -0,0 +1,8 @@
+DataverseUse test
+TypeDecl TestType [
+ closed RecordType {
+ id : integer,
+ val : double
+ }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_empty_02/skewness_empty_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_empty_02/skewness_empty_02.3.ast
new file mode 100644
index 0000000..893d26e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_empty_02/skewness_empty_02.3.ast
@@ -0,0 +1,19 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=val
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Test]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_float/skewness_float.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_float/skewness_float.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_float/skewness_float.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_float/skewness_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_float/skewness_float.3.ast
new file mode 100644
index 0000000..8db90d3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_float/skewness_float.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.float@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_float_null/skewness_float_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_float_null/skewness_float_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_float_null/skewness_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_float_null/skewness_float_null.3.ast
new file mode 100644
index 0000000..c198b59
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_float_null/skewness_float_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=floatField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int16/skewness_int16.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int16/skewness_int16.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int16/skewness_int16.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int16/skewness_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int16/skewness_int16.3.ast
new file mode 100644
index 0000000..4239198
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int16/skewness_int16.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int16@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int16_null/skewness_int16_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int16_null/skewness_int16_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int16_null/skewness_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int16_null/skewness_int16_null.3.ast
new file mode 100644
index 0000000..9870c60
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int16_null/skewness_int16_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int16Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int32/skewness_int32.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int32/skewness_int32.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int32/skewness_int32.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int32/skewness_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int32/skewness_int32.3.ast
new file mode 100644
index 0000000..16414e5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int32/skewness_int32.3.ast
@@ -0,0 +1,18 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ LiteralExpr [LONG] [1]
+ LiteralExpr [LONG] [2]
+ LiteralExpr [LONG] [3]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int32_null/skewness_int32_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int32_null/skewness_int32_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int32_null/skewness_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int32_null/skewness_int32_null.3.ast
new file mode 100644
index 0000000..9d49b65
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int32_null/skewness_int32_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int32Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int64/skewness_int64.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int64/skewness_int64.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int64/skewness_int64.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int64/skewness_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int64/skewness_int64.3.ast
new file mode 100644
index 0000000..f9ec6d2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int64/skewness_int64.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int64@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int64_null/skewness_int64_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int64_null/skewness_int64_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int64_null/skewness_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int64_null/skewness_int64_null.3.ast
new file mode 100644
index 0000000..7b2555f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int64_null/skewness_int64_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int64Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int8/skewness_int8.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int8/skewness_int8.1.ast
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int8/skewness_int8.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int8/skewness_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int8/skewness_int8.3.ast
new file mode 100644
index 0000000..28f63a3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int8/skewness_int8.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [1]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [2]
+ ]
+ FunctionCall test.int8@1[
+ LiteralExpr [STRING] [3]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int8_null/skewness_int8_null.1.ast
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
copy to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int8_null/skewness_int8_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int8_null/skewness_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int8_null/skewness_int8_null.3.ast
new file mode 100644
index 0000000..1b49e43
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_int8_null/skewness_int8_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [skewness]
+ :
+ FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=int8Field
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_mixed/skewness_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_mixed/skewness_mixed.3.ast
new file mode 100644
index 0000000..0e9858f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/skewness_mixed/skewness_mixed.3.ast
@@ -0,0 +1,22 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.skewness@1[
+ (
+ SELECT ELEMENT [
+ Variable [ Name=$x ]
+ ]
+ FROM [ OrderedListConstructor [
+ FunctionCall null.float@1[
+ LiteralExpr [STRING] [2.0]
+ ]
+ LiteralExpr [STRING] [hello world]
+ LiteralExpr [LONG] [93847382783847382]
+ FunctionCall null.date@1[
+ LiteralExpr [STRING] [2013-01-01]
+ ]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+]
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double/stddev_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double/stddev_double.3.ast
index c2a0566..21402a9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double/stddev_double.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double/stddev_double.3.ast
@@ -1,11 +1,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double_null/stddev_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double_null/stddev_double_null.3.ast
index 863ef3a..03c867b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double_null/stddev_double_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double_null/stddev_double_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.3.ast
index 6d6b228..8937f5d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.3.ast
index ee7f74f..a5dcac9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float/stddev_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float/stddev_float.3.ast
index 679b6a5..89fca0b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float/stddev_float.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float/stddev_float.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.3.ast
deleted file mode 100644
index 93e6093..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.3.ast
+++ /dev/null
@@ -1,42 +0,0 @@
-DataverseUse test
-Query:
-RecordConstructor [
- (
- LiteralExpr [STRING] [stddev]
- :
- FunctionCall asterix.stddev@1[
- (
- SELECT ELEMENT [
- FieldAccessor [
- Variable [ Name=$x ]
- Field=floatField
- ]
- ]
- FROM [ FunctionCall asterix.dataset@1[
- LiteralExpr [STRING] [test.Numeric]
- ]
- AS Variable [ Name=$x ]
- ]
- )
- ]
- )
- (
- LiteralExpr [STRING] [stddev_pop]
- :
- FunctionCall asterix.stddev_pop@1[
- (
- SELECT ELEMENT [
- FieldAccessor [
- Variable [ Name=$x ]
- Field=floatField
- ]
- ]
- FROM [ FunctionCall asterix.dataset@1[
- LiteralExpr [STRING] [test.Numeric]
- ]
- AS Variable [ Name=$x ]
- ]
- )
- ]
- )
-]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_null.1.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_null.3.ast
new file mode 100644
index 0000000..95ebace
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_null.3.ast
@@ -0,0 +1,42 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [stddev_samp]
+ :
+ FunctionCall asterix.stddev_samp@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=floatField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+ (
+ LiteralExpr [STRING] [stddev_pop]
+ :
+ FunctionCall asterix.stddev_pop@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=floatField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16/stddev_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16/stddev_int16.3.ast
index 00b7c98..0bb10a7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16/stddev_int16.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16/stddev_int16.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.3.ast
index bf1e0ad..1a59b30 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32/stddev_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32/stddev_int32.3.ast
index 626c894..906ee9b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32/stddev_int32.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32/stddev_int32.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.3.ast
index c76244c..b60a68b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64/stddev_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64/stddev_int64.3.ast
index 64f7c03..0d50d68 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64/stddev_int64.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64/stddev_int64.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.3.ast
index 27c0067..3523989 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8/stddev_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8/stddev_int8.3.ast
index c3eada1..f907f85 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8/stddev_int8.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8/stddev_int8.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.3.ast
index db4982a..1a4af34 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [stddev]
+ LiteralExpr [STRING] [stddev_samp]
:
- FunctionCall asterix.stddev@1[
+ FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_mixed/stddev_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_mixed/stddev_mixed.3.ast
index 6661e1d..1013db0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_mixed/stddev_mixed.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_mixed/stddev_mixed.3.ast
@@ -1,6 +1,6 @@
Query:
SELECT ELEMENT [
-FunctionCall asterix.stddev@1[
+FunctionCall asterix.stddev_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_double/var_double.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_double/var_double.3.ast
index 3c8e43d..b561ed9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_double/var_double.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_double/var_double.3.ast
@@ -1,11 +1,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_double_null/var_double_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_double_null/var_double_null.3.ast
index 6ae7dac..562c731 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_double_null/var_double_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_double_null/var_double_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_empty_01/var_empty_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_empty_01/var_empty_01.3.ast
index 1deb3da..985f46a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_empty_01/var_empty_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_empty_01/var_empty_01.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_empty_02/var_empty_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_empty_02/var_empty_02.3.ast
index 2bafb81..9428d0c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_empty_02/var_empty_02.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_empty_02/var_empty_02.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float/var_float.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float/var_float.3.ast
index b83c96c..415e866 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float/var_float.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float/var_float.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float_null/var_float_nu.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float_null/var_float_nu.3.ast
deleted file mode 100644
index e057b6f..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float_null/var_float_nu.3.ast
+++ /dev/null
@@ -1,42 +0,0 @@
-DataverseUse test
-Query:
-RecordConstructor [
- (
- LiteralExpr [STRING] [var]
- :
- FunctionCall asterix.var@1[
- (
- SELECT ELEMENT [
- FieldAccessor [
- Variable [ Name=$x ]
- Field=floatField
- ]
- ]
- FROM [ FunctionCall asterix.dataset@1[
- LiteralExpr [STRING] [test.Numeric]
- ]
- AS Variable [ Name=$x ]
- ]
- )
- ]
- )
- (
- LiteralExpr [STRING] [var_pop]
- :
- FunctionCall asterix.var_pop@1[
- (
- SELECT ELEMENT [
- FieldAccessor [
- Variable [ Name=$x ]
- Field=floatField
- ]
- ]
- FROM [ FunctionCall asterix.dataset@1[
- LiteralExpr [STRING] [test.Numeric]
- ]
- AS Variable [ Name=$x ]
- ]
- )
- ]
- )
-]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float_null/var_float_nu.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float_null/var_float_null.1.ast
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float_null/var_float_nu.1.ast
rename to asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float_null/var_float_null.1.ast
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float_null/var_float_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float_null/var_float_null.3.ast
new file mode 100644
index 0000000..cec50b7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_float_null/var_float_null.3.ast
@@ -0,0 +1,42 @@
+DataverseUse test
+Query:
+RecordConstructor [
+ (
+ LiteralExpr [STRING] [var_samp]
+ :
+ FunctionCall asterix.var_samp@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=floatField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+ (
+ LiteralExpr [STRING] [var_pop]
+ :
+ FunctionCall asterix.var_pop@1[
+ (
+ SELECT ELEMENT [
+ FieldAccessor [
+ Variable [ Name=$x ]
+ Field=floatField
+ ]
+ ]
+ FROM [ FunctionCall asterix.dataset@1[
+ LiteralExpr [STRING] [test.Numeric]
+ ]
+ AS Variable [ Name=$x ]
+ ]
+ )
+ ]
+ )
+]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int16/var_int16.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int16/var_int16.3.ast
index 79bcb4a..f4919e7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int16/var_int16.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int16/var_int16.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int16_null/var_int16_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int16_null/var_int16_null.3.ast
index 9b566f4..f8ebbeb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int16_null/var_int16_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int16_null/var_int16_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int32/var_int32.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int32/var_int32.3.ast
index 154538e..0b529b5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int32/var_int32.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int32/var_int32.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int32_null/var_int32_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int32_null/var_int32_null.3.ast
index 054780c..b50dcbb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int32_null/var_int32_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int32_null/var_int32_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int64/var_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int64/var_int64.3.ast
index afbe240..2dc97d3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int64/var_int64.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int64/var_int64.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int64_null/var_int64_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int64_null/var_int64_null.3.ast
index 98b7ca7..7d08453 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int64_null/var_int64_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int64_null/var_int64_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int8/var_int8.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int8/var_int8.3.ast
index f51aeee..21311bb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int8/var_int8.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int8/var_int8.3.ast
@@ -2,11 +2,11 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
(
SELECT ELEMENT [
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int8_null/var_int8_null.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int8_null/var_int8_null.3.ast
index 40ae288..186e2e3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int8_null/var_int8_null.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_int8_null/var_int8_null.3.ast
@@ -2,9 +2,9 @@
Query:
RecordConstructor [
(
- LiteralExpr [STRING] [var]
+ LiteralExpr [STRING] [var_samp]
:
- FunctionCall asterix.var@1[
+ FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
FieldAccessor [
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_mixed/var_mixed.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_mixed/var_mixed.3.ast
index ae1dddb..4e0bd99 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_mixed/var_mixed.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/var_mixed/var_mixed.3.ast
@@ -1,6 +1,6 @@
Query:
SELECT ELEMENT [
-FunctionCall asterix.var@1[
+FunctionCall asterix.var_samp@1[
(
SELECT ELEMENT [
Variable [ Name=$x ]
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 23db0b1..42e3024 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -216,13 +216,13 @@
<test-case FilePath="aggregate">
<compilation-unit name="stddev_mixed">
<output-dir compare="Text">stddev_mixed</output-dir>
- <expected-error>Type incompatibility: function agg-stddev gets incompatible input values: string and float</expected-error>
+ <expected-error>Type incompatibility: function agg-stddev_samp gets incompatible input values: string and float</expected-error>
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
<compilation-unit name="serial_stddev_mixed">
<output-dir compare="Text">serial_stddev_mixed</output-dir>
- <expected-error>Type incompatibility: function agg-stddev gets incompatible input values: string and float</expected-error>
+ <expected-error>Type incompatibility: function agg-stddev_samp gets incompatible input values: string and float</expected-error>
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
@@ -252,13 +252,13 @@
<test-case FilePath="aggregate">
<compilation-unit name="var_mixed">
<output-dir compare="Text">var_mixed</output-dir>
- <expected-error>Type incompatibility: function agg-var gets incompatible input values: string and float</expected-error>
+ <expected-error>Type incompatibility: function agg-var_samp gets incompatible input values: string and float</expected-error>
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
<compilation-unit name="serial_var_mixed">
<output-dir compare="Text">serial_var_mixed</output-dir>
- <expected-error>Type incompatibility: function agg-var gets incompatible input values: string and float</expected-error>
+ <expected-error>Type incompatibility: function agg-var_samp gets incompatible input values: string and float</expected-error>
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
@@ -274,6 +274,30 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_mixed">
+ <output-dir compare="Text">kurtosis_mixed</output-dir>
+ <expected-error>Type incompatibility: function agg-kurtosis gets incompatible input values: string and float</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_mixed">
+ <output-dir compare="Text">serial_kurtosis_mixed</output-dir>
+ <expected-error>Type incompatibility: function agg-kurtosis gets incompatible input values: string and float</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_mixed">
+ <output-dir compare="Text">skewness_mixed</output-dir>
+ <expected-error>Type incompatibility: function agg-skewness gets incompatible input values: string and float</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_mixed">
+ <output-dir compare="Text">serial_skewness_mixed</output-dir>
+ <expected-error>Type incompatibility: function agg-skewness gets incompatible input values: string and float</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
<compilation-unit name="agg_number">
<output-dir compare="Text">agg_number</output-dir>
</compilation-unit>
@@ -505,6 +529,81 @@
</test-case>
-->
<test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_double">
+ <output-dir compare="Text">kurtosis_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_double_null">
+ <output-dir compare="Text">kurtosis_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_empty_01">
+ <output-dir compare="Text">kurtosis_empty_01</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_empty_02">
+ <output-dir compare="Text">kurtosis_empty_02</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_float">
+ <output-dir compare="Text">kurtosis_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_float_null">
+ <output-dir compare="Text">kurtosis_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int16">
+ <output-dir compare="Text">kurtosis_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int16_null">
+ <output-dir compare="Text">kurtosis_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int32">
+ <output-dir compare="Text">kurtosis_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int32_null">
+ <output-dir compare="Text">kurtosis_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int64">
+ <output-dir compare="Text">kurtosis_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int64_null">
+ <output-dir compare="Text">kurtosis_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int8">
+ <output-dir compare="Text">kurtosis_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int8_null">
+ <output-dir compare="Text">kurtosis_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_distinct">
+ <output-dir compare="Text">kurtosis_distinct</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
<compilation-unit name="max_empty_01">
<output-dir compare="Text">max_empty_01</output-dir>
</compilation-unit>
@@ -565,6 +664,21 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
+ <compilation-unit name="scalar_kurtosis">
+ <output-dir compare="Text">scalar_kurtosis</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="scalar_kurtosis_empty">
+ <output-dir compare="Text">scalar_kurtosis_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="scalar_kurtosis_null">
+ <output-dir compare="Text">scalar_kurtosis_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
<compilation-unit name="scalar_max">
<output-dir compare="Text">scalar_max</output-dir>
</compilation-unit>
@@ -595,6 +709,21 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
+ <compilation-unit name="scalar_skewness">
+ <output-dir compare="Text">scalar_skewness</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="scalar_skewness_empty">
+ <output-dir compare="Text">scalar_skewness_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="scalar_skewness_null">
+ <output-dir compare="Text">scalar_skewness_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
<compilation-unit name="scalar_stddev">
<output-dir compare="Text">scalar_stddev</output-dir>
</compilation-unit>
@@ -640,6 +769,136 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_double">
+ <output-dir compare="Text">serial_kurtosis_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_double_null">
+ <output-dir compare="Text">serial_kurtosis_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_empty">
+ <output-dir compare="Text">serial_kurtosis_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_float">
+ <output-dir compare="Text">serial_kurtosis_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_float_null">
+ <output-dir compare="Text">serial_kurtosis_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int16">
+ <output-dir compare="Text">serial_kurtosis_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int16_null">
+ <output-dir compare="Text">serial_kurtosis_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int32">
+ <output-dir compare="Text">serial_kurtosis_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int32_null">
+ <output-dir compare="Text">serial_kurtosis_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int64">
+ <output-dir compare="Text">serial_kurtosis_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int64_null">
+ <output-dir compare="Text">serial_kurtosis_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int8">
+ <output-dir compare="Text">serial_kurtosis_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int8_null">
+ <output-dir compare="Text">serial_kurtosis_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_double">
+ <output-dir compare="Text">serial_skewness_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_double_null">
+ <output-dir compare="Text">serial_skewness_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_empty">
+ <output-dir compare="Text">serial_skewness_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_float">
+ <output-dir compare="Text">serial_skewness_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_float_null">
+ <output-dir compare="Text">serial_skewness_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int16">
+ <output-dir compare="Text">serial_skewness_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int16_null">
+ <output-dir compare="Text">serial_skewness_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int32">
+ <output-dir compare="Text">serial_skewness_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int32_null">
+ <output-dir compare="Text">serial_skewness_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int64">
+ <output-dir compare="Text">serial_skewness_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int64_null">
+ <output-dir compare="Text">serial_skewness_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int8">
+ <output-dir compare="Text">serial_skewness_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int8_null">
+ <output-dir compare="Text">serial_skewness_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
<compilation-unit name="serial_stddev_double">
<output-dir compare="Text">serial_stddev_double</output-dir>
</compilation-unit>
@@ -841,6 +1100,81 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
+ <compilation-unit name="skewness_double">
+ <output-dir compare="Text">skewness_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_double_null">
+ <output-dir compare="Text">skewness_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_empty_01">
+ <output-dir compare="Text">skewness_empty_01</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_empty_02">
+ <output-dir compare="Text">skewness_empty_02</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_float">
+ <output-dir compare="Text">skewness_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_float_null">
+ <output-dir compare="Text">skewness_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int16">
+ <output-dir compare="Text">skewness_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int16_null">
+ <output-dir compare="Text">skewness_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int32">
+ <output-dir compare="Text">skewness_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int32_null">
+ <output-dir compare="Text">skewness_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int64">
+ <output-dir compare="Text">skewness_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int64_null">
+ <output-dir compare="Text">skewness_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int8">
+ <output-dir compare="Text">skewness_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int8_null">
+ <output-dir compare="Text">skewness_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_distinct">
+ <output-dir compare="Text">skewness_distinct</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
<compilation-unit name="stddev_double">
<output-dir compare="Text">stddev_double</output-dir>
</compilation-unit>
@@ -1128,13 +1462,13 @@
<test-case FilePath="aggregate-sql">
<compilation-unit name="serial_stddev_mixed">
<output-dir compare="Text">serial_stddev_mixed</output-dir>
- <expected-error>Invalid item type: function agg-stddev cannot process item type string in an input array (or multiset)</expected-error>
+ <expected-error>Invalid item type: function agg-stddev_samp cannot process item type string in an input array (or multiset)</expected-error>
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
<compilation-unit name="stddev_mixed">
<output-dir compare="Text">stddev_mixed</output-dir>
- <expected-error>Type incompatibility: function agg-stddev gets incompatible input values: string and float</expected-error>
+ <expected-error>Type incompatibility: function agg-stddev_samp gets incompatible input values: string and float</expected-error>
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
@@ -1164,13 +1498,13 @@
<test-case FilePath="aggregate-sql">
<compilation-unit name="serial_var_mixed">
<output-dir compare="Text">serial_var_mixed</output-dir>
- <expected-error>Invalid item type: function agg-var cannot process item type string in an input array (or multiset)</expected-error>
+ <expected-error>Invalid item type: function agg-var_samp cannot process item type string in an input array (or multiset)</expected-error>
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
<compilation-unit name="var_mixed">
<output-dir compare="Text">var_mixed</output-dir>
- <expected-error>Type incompatibility: function agg-var gets incompatible input values: string and float</expected-error>
+ <expected-error>Type incompatibility: function agg-var_samp gets incompatible input values: string and float</expected-error>
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
@@ -1186,6 +1520,18 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_mixed">
+ <output-dir compare="Text">serial_skewness_mixed</output-dir>
+ <expected-error>Invalid item type: function agg-skewness cannot process item type string in an input array (or multiset)</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_mixed">
+ <output-dir compare="Text">skewness_mixed</output-dir>
+ <expected-error>Type incompatibility: function agg-skewness gets incompatible input values: string and float</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
<compilation-unit name="agg_number">
<output-dir compare="Text">agg_number</output-dir>
</compilation-unit>
@@ -1346,6 +1692,81 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_double">
+ <output-dir compare="Text">kurtosis_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_double_null">
+ <output-dir compare="Text">kurtosis_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_empty_01">
+ <output-dir compare="Text">kurtosis_empty_01</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_empty_02">
+ <output-dir compare="Text">kurtosis_empty_02</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_float">
+ <output-dir compare="Text">kurtosis_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_float_null">
+ <output-dir compare="Text">kurtosis_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int16">
+ <output-dir compare="Text">kurtosis_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int16_null">
+ <output-dir compare="Text">kurtosis_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int32">
+ <output-dir compare="Text">kurtosis_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int32_null">
+ <output-dir compare="Text">kurtosis_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int64">
+ <output-dir compare="Text">kurtosis_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int64_null">
+ <output-dir compare="Text">kurtosis_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int8">
+ <output-dir compare="Text">kurtosis_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int8_null">
+ <output-dir compare="Text">kurtosis_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_distinct">
+ <output-dir compare="Text">kurtosis_distinct</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
<compilation-unit name="max_empty_01">
<output-dir compare="Text">max_empty_01</output-dir>
</compilation-unit>
@@ -1406,6 +1827,21 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
+ <compilation-unit name="scalar_kurtosis">
+ <output-dir compare="Text">scalar_kurtosis</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="scalar_kurtosis_empty">
+ <output-dir compare="Text">scalar_kurtosis_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="scalar_kurtosis_null">
+ <output-dir compare="Text">scalar_kurtosis_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
<compilation-unit name="scalar_max">
<output-dir compare="Text">scalar_max</output-dir>
</compilation-unit>
@@ -1436,6 +1872,21 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
+ <compilation-unit name="scalar_skewness">
+ <output-dir compare="Text">scalar_skewness</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="scalar_skewness_empty">
+ <output-dir compare="Text">scalar_skewness_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="scalar_skewness_null">
+ <output-dir compare="Text">scalar_skewness_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
<compilation-unit name="scalar_stddev">
<output-dir compare="Text">scalar_stddev</output-dir>
</compilation-unit>
@@ -1481,6 +1932,136 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_double">
+ <output-dir compare="Text">serial_kurtosis_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_double_null">
+ <output-dir compare="Text">serial_kurtosis_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_empty">
+ <output-dir compare="Text">serial_kurtosis_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_float">
+ <output-dir compare="Text">serial_kurtosis_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_float_null">
+ <output-dir compare="Text">serial_kurtosis_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int16">
+ <output-dir compare="Text">serial_kurtosis_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int16_null">
+ <output-dir compare="Text">serial_kurtosis_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int32">
+ <output-dir compare="Text">serial_kurtosis_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int32_null">
+ <output-dir compare="Text">serial_kurtosis_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int64">
+ <output-dir compare="Text">serial_kurtosis_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int64_null">
+ <output-dir compare="Text">serial_kurtosis_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int8">
+ <output-dir compare="Text">serial_kurtosis_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int8_null">
+ <output-dir compare="Text">serial_kurtosis_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_double">
+ <output-dir compare="Text">serial_skewness_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_double_null">
+ <output-dir compare="Text">serial_skewness_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_empty">
+ <output-dir compare="Text">serial_skewness_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_float">
+ <output-dir compare="Text">serial_skewness_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_float_null">
+ <output-dir compare="Text">serial_skewness_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int16">
+ <output-dir compare="Text">serial_skewness_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int16_null">
+ <output-dir compare="Text">serial_skewness_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int32">
+ <output-dir compare="Text">serial_skewness_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int32_null">
+ <output-dir compare="Text">serial_skewness_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int64">
+ <output-dir compare="Text">serial_skewness_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int64_null">
+ <output-dir compare="Text">serial_skewness_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int8">
+ <output-dir compare="Text">serial_skewness_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int8_null">
+ <output-dir compare="Text">serial_skewness_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
<compilation-unit name="serial_stddev_double">
<output-dir compare="Text">serial_stddev_double</output-dir>
</compilation-unit>
@@ -1682,6 +2263,81 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_double">
+ <output-dir compare="Text">skewness_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_double_null">
+ <output-dir compare="Text">skewness_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_empty_01">
+ <output-dir compare="Text">skewness_empty_01</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_empty_02">
+ <output-dir compare="Text">skewness_empty_02</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_float">
+ <output-dir compare="Text">skewness_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_float_null">
+ <output-dir compare="Text">skewness_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int16">
+ <output-dir compare="Text">skewness_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int16_null">
+ <output-dir compare="Text">skewness_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int32">
+ <output-dir compare="Text">skewness_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int32_null">
+ <output-dir compare="Text">skewness_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int64">
+ <output-dir compare="Text">skewness_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int64_null">
+ <output-dir compare="Text">skewness_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int8">
+ <output-dir compare="Text">skewness_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int8_null">
+ <output-dir compare="Text">skewness_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_distinct">
+ <output-dir compare="Text">skewness_distinct</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
<compilation-unit name="stddev_double">
<output-dir compare="Text">stddev_double</output-dir>
</compilation-unit>
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp_parser.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp_parser.xml
index 8f721cb..4199a64 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp_parser.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp_parser.xml
@@ -170,6 +170,30 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_mixed">
+ <output-dir compare="AST">kurtosis_mixed</output-dir>
+ <expected-error>org.apache.asterix.common.exceptions.AsterixException</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_mixed">
+ <output-dir compare="AST">serial_kurtosis_mixed</output-dir>
+ <expected-error>org.apache.asterix.common.exceptions.AsterixException</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_mixed">
+ <output-dir compare="AST">skewness_mixed</output-dir>
+ <expected-error>org.apache.asterix.common.exceptions.AsterixException</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_mixed">
+ <output-dir compare="AST">serial_skewness_mixed</output-dir>
+ <expected-error>org.apache.asterix.common.exceptions.AsterixException</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
<compilation-unit name="agg_number">
<output-dir compare="AST">agg_number</output-dir>
</compilation-unit>
@@ -386,6 +410,76 @@
</test-case>
-->
<test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_double">
+ <output-dir compare="AST">kurtosis_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_double_null">
+ <output-dir compare="AST">kurtosis_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_empty_01">
+ <output-dir compare="AST">kurtosis_empty_01</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_empty_02">
+ <output-dir compare="AST">kurtosis_empty_02</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_float">
+ <output-dir compare="AST">kurtosis_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_float_null">
+ <output-dir compare="AST">kurtosis_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int16">
+ <output-dir compare="AST">kurtosis_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int16_null">
+ <output-dir compare="AST">kurtosis_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int32">
+ <output-dir compare="AST">kurtosis_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int32_null">
+ <output-dir compare="AST">kurtosis_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int64">
+ <output-dir compare="AST">kurtosis_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int64_null">
+ <output-dir compare="AST">kurtosis_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int8">
+ <output-dir compare="AST">kurtosis_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="kurtosis_int8_null">
+ <output-dir compare="AST">kurtosis_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
<compilation-unit name="max_empty_01">
<output-dir compare="AST">max_empty_01</output-dir>
</compilation-unit>
@@ -436,6 +530,21 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
+ <compilation-unit name="scalar_kurtosis">
+ <output-dir compare="AST">scalar_kurtosis</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="scalar_kurtosis_empty">
+ <output-dir compare="AST">scalar_kurtosis_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="scalar_kurtosis_null">
+ <output-dir compare="AST">scalar_kurtosis_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
<compilation-unit name="scalar_max">
<output-dir compare="AST">scalar_max</output-dir>
</compilation-unit>
@@ -466,6 +575,21 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
+ <compilation-unit name="scalar_skewness">
+ <output-dir compare="AST">scalar_skewness</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="scalar_skewness_empty">
+ <output-dir compare="AST">scalar_skewness_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="scalar_skewness_null">
+ <output-dir compare="AST">scalar_skewness_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
<compilation-unit name="scalar_stddev">
<output-dir compare="AST">scalar_stddev</output-dir>
</compilation-unit>
@@ -511,8 +635,133 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
- <compilation-unit name="serial_stddev_int8_null">
- <output-dir compare="AST">serial_stddev_int8_null</output-dir>
+ <compilation-unit name="serial_kurtosis_double">
+ <output-dir compare="AST">serial_kurtosis_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_double_null">
+ <output-dir compare="AST">serial_kurtosis_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_empty">
+ <output-dir compare="AST">serial_kurtosis_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_float">
+ <output-dir compare="AST">serial_kurtosis_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_float_null">
+ <output-dir compare="AST">serial_kurtosis_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int16">
+ <output-dir compare="AST">serial_kurtosis_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int16_null">
+ <output-dir compare="AST">serial_kurtosis_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int32">
+ <output-dir compare="AST">serial_kurtosis_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int32_null">
+ <output-dir compare="AST">serial_kurtosis_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int64">
+ <output-dir compare="AST">serial_kurtosis_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int64_null">
+ <output-dir compare="AST">serial_kurtosis_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int8">
+ <output-dir compare="AST">serial_kurtosis_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_kurtosis_int8_null">
+ <output-dir compare="AST">serial_kurtosis_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_double">
+ <output-dir compare="AST">serial_skewness_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_double_null">
+ <output-dir compare="AST">serial_skewness_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_empty">
+ <output-dir compare="AST">serial_skewness_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_float">
+ <output-dir compare="AST">serial_skewness_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_float_null">
+ <output-dir compare="AST">serial_skewness_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int16">
+ <output-dir compare="AST">serial_skewness_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int16_null">
+ <output-dir compare="AST">serial_skewness_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int32">
+ <output-dir compare="AST">serial_skewness_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int32_null">
+ <output-dir compare="AST">serial_skewness_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int64">
+ <output-dir compare="AST">serial_skewness_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int64_null">
+ <output-dir compare="AST">serial_skewness_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int8">
+ <output-dir compare="AST">serial_skewness_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="serial_skewness_int8_null">
+ <output-dir compare="AST">serial_skewness_int8_null</output-dir>
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
@@ -581,11 +830,6 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
- <compilation-unit name="serial_var_int8_null">
- <output-dir compare="AST">serial_var_int8_null</output-dir>
- </compilation-unit>
- </test-case>
- <test-case FilePath="aggregate">
<compilation-unit name="serial_var_double">
<output-dir compare="AST">serial_var_double</output-dir>
</compilation-unit>
@@ -651,6 +895,76 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate">
+ <compilation-unit name="skewness_double">
+ <output-dir compare="AST">skewness_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_double_null">
+ <output-dir compare="AST">skewness_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_empty_01">
+ <output-dir compare="AST">skewness_empty_01</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_empty_02">
+ <output-dir compare="AST">skewness_empty_02</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_float">
+ <output-dir compare="AST">skewness_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_float_null">
+ <output-dir compare="AST">skewness_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int16">
+ <output-dir compare="AST">skewness_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int16_null">
+ <output-dir compare="AST">skewness_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int32">
+ <output-dir compare="AST">skewness_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int32_null">
+ <output-dir compare="AST">skewness_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int64">
+ <output-dir compare="AST">skewness_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int64_null">
+ <output-dir compare="AST">skewness_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int8">
+ <output-dir compare="AST">skewness_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="skewness_int8_null">
+ <output-dir compare="AST">skewness_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
<compilation-unit name="stddev_double">
<output-dir compare="AST">stddev_double</output-dir>
</compilation-unit>
@@ -964,6 +1278,30 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_mixed">
+ <output-dir compare="AST">serial_kurtosis_mixed</output-dir>
+ <expected-error>org.apache.asterix.common.exceptions.AsterixException</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_mixed">
+ <output-dir compare="AST">kurtosis_mixed</output-dir>
+ <expected-error>org.apache.asterix.common.exceptions.AsterixException</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_mixed">
+ <output-dir compare="AST">serial_skewness_mixed</output-dir>
+ <expected-error>org.apache.asterix.common.exceptions.AsterixException</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_mixed">
+ <output-dir compare="AST">skewness_mixed</output-dir>
+ <expected-error>org.apache.asterix.common.exceptions.AsterixException</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
<compilation-unit name="agg_number">
<output-dir compare="AST">agg_number</output-dir>
</compilation-unit>
@@ -1099,6 +1437,76 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_double">
+ <output-dir compare="AST">kurtosis_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_double_null">
+ <output-dir compare="AST">kurtosis_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_empty_01">
+ <output-dir compare="AST">kurtosis_empty_01</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_empty_02">
+ <output-dir compare="AST">kurtosis_empty_02</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_float">
+ <output-dir compare="AST">kurtosis_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_float_null">
+ <output-dir compare="AST">kurtosis_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int16">
+ <output-dir compare="AST">kurtosis_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int16_null">
+ <output-dir compare="AST">kurtosis_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int32">
+ <output-dir compare="AST">kurtosis_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int32_null">
+ <output-dir compare="AST">kurtosis_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int64">
+ <output-dir compare="AST">kurtosis_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int64_null">
+ <output-dir compare="AST">kurtosis_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int8">
+ <output-dir compare="AST">kurtosis_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="kurtosis_int8_null">
+ <output-dir compare="AST">kurtosis_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
<compilation-unit name="max_empty_01">
<output-dir compare="AST">max_empty_01</output-dir>
</compilation-unit>
@@ -1149,6 +1557,21 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
+ <compilation-unit name="scalar_kurtosis">
+ <output-dir compare="AST">scalar_kurtosis</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="scalar_kurtosis_empty">
+ <output-dir compare="AST">scalar_kurtosis_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="scalar_kurtosis_null">
+ <output-dir compare="AST">scalar_kurtosis_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
<compilation-unit name="scalar_max">
<output-dir compare="AST">scalar_max</output-dir>
</compilation-unit>
@@ -1179,6 +1602,21 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
+ <compilation-unit name="scalar_skewness">
+ <output-dir compare="AST">scalar_skewness</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="scalar_skewness_empty">
+ <output-dir compare="AST">scalar_skewness_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="scalar_skewness_null">
+ <output-dir compare="AST">scalar_skewness_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
<compilation-unit name="scalar_stddev">
<output-dir compare="AST">scalar_stddev</output-dir>
</compilation-unit>
@@ -1224,6 +1662,136 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_double">
+ <output-dir compare="AST">serial_kurtosis_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_double_null">
+ <output-dir compare="AST">serial_kurtosis_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_empty">
+ <output-dir compare="AST">serial_kurtosis_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_float">
+ <output-dir compare="AST">serial_kurtosis_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_float_null">
+ <output-dir compare="AST">serial_kurtosis_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int16">
+ <output-dir compare="AST">serial_kurtosis_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int16_null">
+ <output-dir compare="AST">serial_kurtosis_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int32">
+ <output-dir compare="AST">serial_kurtosis_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int32_null">
+ <output-dir compare="AST">serial_kurtosis_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int64">
+ <output-dir compare="AST">serial_kurtosis_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int64_null">
+ <output-dir compare="AST">serial_kurtosis_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int8">
+ <output-dir compare="AST">serial_kurtosis_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_kurtosis_int8_null">
+ <output-dir compare="AST">serial_kurtosis_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_double">
+ <output-dir compare="AST">serial_skewness_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_double_null">
+ <output-dir compare="AST">serial_skewness_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_empty">
+ <output-dir compare="AST">serial_skewness_empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_float">
+ <output-dir compare="AST">serial_skewness_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_float_null">
+ <output-dir compare="AST">serial_skewness_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int16">
+ <output-dir compare="AST">serial_skewness_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int16_null">
+ <output-dir compare="AST">serial_skewness_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int32">
+ <output-dir compare="AST">serial_skewness_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int32_null">
+ <output-dir compare="AST">serial_skewness_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int64">
+ <output-dir compare="AST">serial_skewness_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int64_null">
+ <output-dir compare="AST">serial_skewness_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int8">
+ <output-dir compare="AST">serial_skewness_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="serial_skewness_int8_null">
+ <output-dir compare="AST">serial_skewness_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
<compilation-unit name="serial_stddev_double">
<output-dir compare="AST">serial_stddev_double</output-dir>
</compilation-unit>
@@ -1289,6 +1857,76 @@
</compilation-unit>
</test-case>
<test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_double">
+ <output-dir compare="AST">skewness_double</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_double_null">
+ <output-dir compare="AST">skewness_double_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_empty_01">
+ <output-dir compare="AST">skewness_empty_01</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_empty_02">
+ <output-dir compare="AST">skewness_empty_02</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_float">
+ <output-dir compare="AST">skewness_float</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_float_null">
+ <output-dir compare="AST">skewness_float_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int16">
+ <output-dir compare="AST">skewness_int16</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int16_null">
+ <output-dir compare="AST">skewness_int16_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int32">
+ <output-dir compare="AST">skewness_int32</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int32_null">
+ <output-dir compare="AST">skewness_int32_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int64">
+ <output-dir compare="AST">skewness_int64</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int64_null">
+ <output-dir compare="AST">skewness_int64_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int8">
+ <output-dir compare="AST">skewness_int8</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
+ <compilation-unit name="skewness_int8_null">
+ <output-dir compare="AST">skewness_int8_null</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate-sql">
<compilation-unit name="stddev_double">
<output-dir compare="AST">stddev_double</output-dir>
</compilation-unit>
diff --git a/asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md b/asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md
index 3fdb4dd..17b6e13 100644
--- a/asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md
+++ b/asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md
@@ -167,11 +167,11 @@
3.4
-### array_stddev ###
+### array_stddev_samp ###
* Syntax:
- array_stddev(num_collection)
+ array_stddev_samp(num_collection)
* Gets the sample standard deviation value of the non-null and non-missing numeric items in the given collection.
* Arguments:
@@ -188,7 +188,7 @@
* Example:
- array_stddev( [1.2, 2.3, 3.4, 0, null] );
+ array_stddev_samp( [1.2, 2.3, 3.4, 0, null] );
* The expected result is:
@@ -221,11 +221,11 @@
1.2636751956100112
-### array_var ###
+### array_var_samp ###
* Syntax:
- array_var(num_collection)
+ array_var_samp(num_collection)
* Gets the sample variance value of the non-null and non-missing numeric items in the given collection.
* Arguments:
@@ -242,7 +242,7 @@
* Example:
- array_var( [1.2, 2.3, 3.4, 0, null] );
+ array_var_samp( [1.2, 2.3, 3.4, 0, null] );
* The expected result is:
@@ -275,6 +275,59 @@
1.5968749999999998
+### array_skewness ###
+
+ * Syntax:
+
+ array_skewness(num_collection)
+
+ * Gets the skewness value of the non-null and non-missing numeric items in the given collection.
+ * Arguments:
+ * `num_collection` could be:
+ * an `array` or `multiset` containing numeric values, `null`s or `missing`s,
+ * or, a `null` value,
+ * or, a `missing` value.
+ * Return Value:
+ * a `double` value representing the skewness of the non-null and non-missing numbers in the given collection,
+ * `null` is returned if the input is `null` or `missing`,
+ * `null` is returned if the given collection does not contain any non-null and non-missing items,
+ * any other non-array and non-multiset input value will cause a type error,
+ * any other non-numeric value in the input collection will cause a type error.
+
+ * Example:
+
+ array_skewness( [1.2, 2.3, 3.4, 0, null] );
+
+ * The expected result is:
+
+ -0.04808451539164242
+
+### array_kurtosis ###
+
+ * Syntax:
+
+ array_kurtosis(num_collection)
+
+ * Gets the kurtosis value from the normal distribution of the non-null and non-missing numeric items in the given collection.
+ * Arguments:
+ * `num_collection` could be:
+ * an `array` or `multiset` containing numeric values, `null`s or `missing`s,
+ * or, a `null` value,
+ * or, a `missing` value.
+ * Return Value:
+ * a `double` value representing the kurtosis from a normal distribution of the non-null and non-missing numbers in the given collection,
+ * `null` is returned if the input is `null` or `missing`,
+ * `null` is returned if the given collection does not contain any non-null and non-missing items,
+ * any other non-array and non-multiset input value will cause a type error,
+ * any other non-numeric value in the input collection will cause a type error.
+
+ * Example:
+
+ array_kurtosis( [1.2, 2.3, 3.4, 0, null] );
+
+ * The expected result is:
+
+ -1.342049701096427
### strict_count ###
* Syntax:
@@ -408,10 +461,10 @@
100.0
-### strict_stddev ###
+### strict_stddev_samp ###
* Syntax:
- strict_stddev(num_collection)
+ strict_stddev_samp(num_collection)
* Gets the sample standard deviation value of the numeric items in the given collection.
* Arguments:
@@ -427,7 +480,7 @@
* Example:
- strict_stddev( [100, 200, 300] );
+ strict_stddev_samp( [100, 200, 300] );
* The expected result is:
@@ -458,10 +511,10 @@
81.64965809277261
-### strict_var ###
+### strict_var_samp ###
* Syntax:
- strict_var(num_collection)
+ strict_var_samp(num_collection)
* Gets the sample variance value of the numeric items in the given collection.
* Arguments:
@@ -477,7 +530,7 @@
* Example:
- strict_var( [100, 200, 300] );
+ strict_var_samp( [100, 200, 300] );
* The expected result is:
@@ -507,3 +560,53 @@
* The expected result is:
6666.666666666667
+
+### strict_skewness ###
+ * Syntax:
+
+ strict_skewness(num_collection)
+
+ * Gets the skewness value of the numeric items in the given collection.
+ * Arguments:
+ * `num_collection` could be:
+ * an `array` or `multiset` containing numeric values, `null`s or `missing`s,
+ * or, a `null` value,
+ * or, a `missing` value.
+ * Return Value:
+ * a `double` value representing the skewness of the numbers in the given collection,
+ * `null` is returned if the input is `null` or `missing`,
+ * `null` is returned if there is a `null` or `missing` in the input collection,
+ * any other non-numeric value in the input collection will cause a type error.
+
+ * Example:
+
+ strict_skewness( [100, 200, 300] );
+
+ * The expected result is:
+
+ 0.0
+
+### strict_kurtosis ###
+ * Syntax:
+
+ strict_kurtosis(num_collection)
+
+ * Gets the kurtosis value from the normal distribution of the numeric items in the given collection.
+ * Arguments:
+ * `num_collection` could be:
+ * an `array` or `multiset` containing numeric values, `null`s or `missing`s,
+ * or, a `null` value,
+ * or, a `missing` value.
+ * Return Value:
+ * a `double` value representing the kurtosis from a normal distribution of the numbers in the given collection,
+ * `null` is returned if the input is `null` or `missing`,
+ * `null` is returned if there is a `null` or `missing` in the input collection,
+ * any other non-numeric value in the input collection will cause a type error.
+
+ * Example:
+
+ strict_kurtosis( [100, 200, 300] );
+
+ * The expected result is:
+
+ -1.5
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/BuiltinFunctions.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/BuiltinFunctions.java
index 43896d0..24ef2c5 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/BuiltinFunctions.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/BuiltinFunctions.java
@@ -497,14 +497,14 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-first-element", 1);
public static final FunctionIdentifier LAST_ELEMENT =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-last-element", 1);
- public static final FunctionIdentifier STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-stddev", 1);
- public static final FunctionIdentifier GLOBAL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-stddev", 1);
- public static final FunctionIdentifier INTERMEDIATE_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-intermediate-stddev", 1);
- public static final FunctionIdentifier LOCAL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-stddev", 1);
+ public static final FunctionIdentifier STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-stddev_samp", 1);
+ public static final FunctionIdentifier GLOBAL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-stddev_samp", 1);
+ public static final FunctionIdentifier INTERMEDIATE_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-intermediate-stddev_samp", 1);
+ public static final FunctionIdentifier LOCAL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-stddev_samp", 1);
public static final FunctionIdentifier LOCAL_SAMPLING =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-sampling", FunctionIdentifier.VARARGS);
public static final FunctionIdentifier RANGE_MAP =
@@ -517,13 +517,14 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-intermediate-stddev_pop", 1);
public static final FunctionIdentifier LOCAL_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-stddev_pop", 1);
- public static final FunctionIdentifier VAR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-var", 1);
- public static final FunctionIdentifier GLOBAL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-var", 1);
- public static final FunctionIdentifier INTERMEDIATE_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-intermediate-var", 1);
- public static final FunctionIdentifier LOCAL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-var", 1);
+ public static final FunctionIdentifier VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-var_samp", 1);
+ public static final FunctionIdentifier GLOBAL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-var_samp", 1);
+ public static final FunctionIdentifier INTERMEDIATE_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-intermediate-var_samp", 1);
+ public static final FunctionIdentifier LOCAL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-var_samp", 1);
public static final FunctionIdentifier VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-var_pop", 1);
public static final FunctionIdentifier GLOBAL_VAR_POP =
@@ -532,6 +533,22 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-intermediate-var_pop", 1);
public static final FunctionIdentifier LOCAL_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-var_pop", 1);
+ public static final FunctionIdentifier SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-skewness", 1);
+ public static final FunctionIdentifier GLOBAL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-skewness", 1);
+ public static final FunctionIdentifier INTERMEDIATE_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-intermediate-skewness", 1);
+ public static final FunctionIdentifier LOCAL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-skewness", 1);
+ public static final FunctionIdentifier KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-kurtosis", 1);
+ public static final FunctionIdentifier GLOBAL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-kurtosis", 1);
+ public static final FunctionIdentifier INTERMEDIATE_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-intermediate-kurtosis", 1);
+ public static final FunctionIdentifier LOCAL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-kurtosis", 1);
public static final FunctionIdentifier SCALAR_AVG = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "avg", 1);
public static final FunctionIdentifier SCALAR_COUNT =
@@ -549,29 +566,42 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-first-element", 1);
public static final FunctionIdentifier SCALAR_LAST_ELEMENT =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "last-element", 1);
- public static final FunctionIdentifier SCALAR_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "stddev", 1);
- public static final FunctionIdentifier SCALAR_GLOBAL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-stddev", 1);
- public static final FunctionIdentifier SCALAR_LOCAL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-stddev", 1);
+ public static final FunctionIdentifier SCALAR_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "stddev_samp", 1);
+ public static final FunctionIdentifier SCALAR_GLOBAL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-stddev_samp", 1);
+ public static final FunctionIdentifier SCALAR_LOCAL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-stddev_samp", 1);
public static final FunctionIdentifier SCALAR_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "stddev_pop", 1);
public static final FunctionIdentifier SCALAR_GLOBAL_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-stddev_pop", 1);
public static final FunctionIdentifier SCALAR_LOCAL_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-stddev_pop", 1);
- public static final FunctionIdentifier SCALAR_VAR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "var", 1);
- public static final FunctionIdentifier SCALAR_GLOBAL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-var", 1);
- public static final FunctionIdentifier SCALAR_LOCAL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-var", 1);
+ public static final FunctionIdentifier SCALAR_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "var_samp", 1);
+ public static final FunctionIdentifier SCALAR_GLOBAL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-var_samp", 1);
+ public static final FunctionIdentifier SCALAR_LOCAL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-var_samp", 1);
public static final FunctionIdentifier SCALAR_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "var_pop", 1);
public static final FunctionIdentifier SCALAR_GLOBAL_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-var_pop", 1);
public static final FunctionIdentifier SCALAR_LOCAL_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-var_pop", 1);
+ public static final FunctionIdentifier SCALAR_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "skewness", 1);
+ public static final FunctionIdentifier SCALAR_GLOBAL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-skewness", 1);
+ public static final FunctionIdentifier SCALAR_LOCAL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-skewness", 1);
+ public static final FunctionIdentifier SCALAR_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "kurtosis", 1);
+ public static final FunctionIdentifier SCALAR_GLOBAL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-kurtosis", 1);
+ public static final FunctionIdentifier SCALAR_LOCAL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-kurtosis", 1);
// serializable aggregate functions
public static final FunctionIdentifier SERIAL_AVG =
@@ -592,14 +622,14 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-avg-serial", 1);
public static final FunctionIdentifier SERIAL_INTERMEDIATE_AVG =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-avg-serial", 1);
- public static final FunctionIdentifier SERIAL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "stddev-serial", 1);
- public static final FunctionIdentifier SERIAL_GLOBAL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-stddev-serial", 1);
- public static final FunctionIdentifier SERIAL_LOCAL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-stddev-serial", 1);
- public static final FunctionIdentifier SERIAL_INTERMEDIATE_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-stddev-serial", 1);
+ public static final FunctionIdentifier SERIAL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "stddev_samp-serial", 1);
+ public static final FunctionIdentifier SERIAL_GLOBAL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-stddev_samp-serial", 1);
+ public static final FunctionIdentifier SERIAL_LOCAL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-stddev_samp-serial", 1);
+ public static final FunctionIdentifier SERIAL_INTERMEDIATE_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-stddev_samp-serial", 1);
public static final FunctionIdentifier SERIAL_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "stddev_pop-serial", 1);
public static final FunctionIdentifier SERIAL_GLOBAL_STDDEV_POP =
@@ -608,14 +638,14 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-stddev_pop-serial", 1);
public static final FunctionIdentifier SERIAL_INTERMEDIATE_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-stddev_pop-serial", 1);
- public static final FunctionIdentifier SERIAL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "var-serial", 1);
- public static final FunctionIdentifier SERIAL_GLOBAL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-var-serial", 1);
- public static final FunctionIdentifier SERIAL_LOCAL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-var-serial", 1);
- public static final FunctionIdentifier SERIAL_INTERMEDIATE_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-var-serial", 1);
+ public static final FunctionIdentifier SERIAL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "var_samp-serial", 1);
+ public static final FunctionIdentifier SERIAL_GLOBAL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-var_samp-serial", 1);
+ public static final FunctionIdentifier SERIAL_LOCAL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-var_samp-serial", 1);
+ public static final FunctionIdentifier SERIAL_INTERMEDIATE_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-var_samp-serial", 1);
public static final FunctionIdentifier SERIAL_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "var_pop-serial", 1);
public static final FunctionIdentifier SERIAL_GLOBAL_VAR_POP =
@@ -624,6 +654,22 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-var_pop-serial", 1);
public static final FunctionIdentifier SERIAL_INTERMEDIATE_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-var_pop-serial", 1);
+ public static final FunctionIdentifier SERIAL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "skewness-serial", 1);
+ public static final FunctionIdentifier SERIAL_GLOBAL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-skewness-serial", 1);
+ public static final FunctionIdentifier SERIAL_LOCAL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-skewness-serial", 1);
+ public static final FunctionIdentifier SERIAL_INTERMEDIATE_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-skewness-serial", 1);
+ public static final FunctionIdentifier SERIAL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "kurtosis-serial", 1);
+ public static final FunctionIdentifier SERIAL_GLOBAL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-kurtosis-serial", 1);
+ public static final FunctionIdentifier SERIAL_LOCAL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-kurtosis-serial", 1);
+ public static final FunctionIdentifier SERIAL_INTERMEDIATE_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-kurtosis-serial", 1);
// distinct aggregate functions
public static final FunctionIdentifier COUNT_DISTINCT =
@@ -646,22 +692,30 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-min-distinct", 1);
public static final FunctionIdentifier SCALAR_MIN_DISTINCT =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "min-distinct", 1);
- public static final FunctionIdentifier STDDEV_DISTINCT =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-stddev-distinct", 1);
- public static final FunctionIdentifier SCALAR_STDDEV_DISTINCT =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "stddev-distinct", 1);
+ public static final FunctionIdentifier STDDEV_SAMP_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-stddev_samp-distinct", 1);
+ public static final FunctionIdentifier SCALAR_STDDEV_SAMP_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "stddev_samp-distinct", 1);
public static final FunctionIdentifier STDDEV_POP_DISTINCT =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-stddev_pop-distinct", 1);
public static final FunctionIdentifier SCALAR_STDDEV_POP_DISTINCT =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "stddev_pop-distinct", 1);
- public static final FunctionIdentifier VAR_DISTINCT =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-var-distinct", 1);
- public static final FunctionIdentifier SCALAR_VAR_DISTINCT =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "var-distinct", 1);
+ public static final FunctionIdentifier VAR_SAMP_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-var_samp-distinct", 1);
+ public static final FunctionIdentifier SCALAR_VAR_SAMP_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "var_samp-distinct", 1);
public static final FunctionIdentifier VAR_POP_DISTINCT =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-var_pop-distinct", 1);
public static final FunctionIdentifier SCALAR_VAR_POP_DISTINCT =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "var_pop-distinct", 1);
+ public static final FunctionIdentifier SKEWNESS_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-skewness-distinct", 1);
+ public static final FunctionIdentifier SCALAR_SKEWNESS_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "skewness-distinct", 1);
+ public static final FunctionIdentifier KURTOSIS_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-kurtosis-distinct", 1);
+ public static final FunctionIdentifier SCALAR_KURTOSIS_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "kurtosis-distinct", 1);
// sql aggregate functions
public static final FunctionIdentifier SQL_AVG =
@@ -690,14 +744,14 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-sql-avg", 1);
public static final FunctionIdentifier LOCAL_SQL_AVG =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-sql-avg", 1);
- public static final FunctionIdentifier SQL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-stddev", 1);
- public static final FunctionIdentifier INTERMEDIATE_SQL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-agg-sql-stddev", 1);
- public static final FunctionIdentifier GLOBAL_SQL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-sql-stddev", 1);
- public static final FunctionIdentifier LOCAL_SQL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-sql-stddev", 1);
+ public static final FunctionIdentifier SQL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-stddev_samp", 1);
+ public static final FunctionIdentifier INTERMEDIATE_SQL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-agg-sql-stddev_samp", 1);
+ public static final FunctionIdentifier GLOBAL_SQL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-sql-stddev_samp", 1);
+ public static final FunctionIdentifier LOCAL_SQL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-sql-stddev_samp", 1);
public static final FunctionIdentifier SQL_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-stddev_pop", 1);
public static final FunctionIdentifier INTERMEDIATE_SQL_STDDEV_POP =
@@ -706,14 +760,14 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-sql-stddev_pop", 1);
public static final FunctionIdentifier LOCAL_SQL_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-sql-stddev_pop", 1);
- public static final FunctionIdentifier SQL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-var", 1);
- public static final FunctionIdentifier INTERMEDIATE_SQL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-agg-sql-var", 1);
- public static final FunctionIdentifier GLOBAL_SQL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-sql-var", 1);
- public static final FunctionIdentifier LOCAL_SQL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-sql-var", 1);
+ public static final FunctionIdentifier SQL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-var_samp", 1);
+ public static final FunctionIdentifier INTERMEDIATE_SQL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-agg-sql-var_samp", 1);
+ public static final FunctionIdentifier GLOBAL_SQL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-sql-var_samp", 1);
+ public static final FunctionIdentifier LOCAL_SQL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-sql-var_samp", 1);
public static final FunctionIdentifier SQL_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-var_pop", 1);
public static final FunctionIdentifier INTERMEDIATE_SQL_VAR_POP =
@@ -722,6 +776,22 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-sql-var_pop", 1);
public static final FunctionIdentifier LOCAL_SQL_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-sql-var_pop", 1);
+ public static final FunctionIdentifier SQL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-skewness", 1);
+ public static final FunctionIdentifier INTERMEDIATE_SQL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-agg-sql-skewness", 1);
+ public static final FunctionIdentifier GLOBAL_SQL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-sql-skewness", 1);
+ public static final FunctionIdentifier LOCAL_SQL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-sql-skewness", 1);
+ public static final FunctionIdentifier SQL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-kurtosis", 1);
+ public static final FunctionIdentifier INTERMEDIATE_SQL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-agg-sql-kurtosis", 1);
+ public static final FunctionIdentifier GLOBAL_SQL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-global-sql-kurtosis", 1);
+ public static final FunctionIdentifier LOCAL_SQL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-sql-kurtosis", 1);
public static final FunctionIdentifier SCALAR_SQL_AVG =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-avg", 1);
@@ -737,30 +807,42 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-avg", 1);
public static final FunctionIdentifier SCALAR_LOCAL_SQL_AVG =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-avg", 1);
- public static final FunctionIdentifier SCALAR_SQL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-stddev", 1);
- public static final FunctionIdentifier SCALAR_GLOBAL_SQL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-stddev", 1);
- public static final FunctionIdentifier SCALAR_LOCAL_SQL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-stddev", 1);
+ public static final FunctionIdentifier SCALAR_SQL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-stddev_samp", 1);
+ public static final FunctionIdentifier SCALAR_GLOBAL_SQL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-stddev_samp", 1);
+ public static final FunctionIdentifier SCALAR_LOCAL_SQL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-stddev_samp", 1);
public static final FunctionIdentifier SCALAR_SQL_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-stddev_pop", 1);
public static final FunctionIdentifier SCALAR_GLOBAL_SQL_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-stddev_pop", 1);
public static final FunctionIdentifier SCALAR_LOCAL_SQL_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-stddev_pop", 1);
- public static final FunctionIdentifier SCALAR_SQL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-var", 1);
- public static final FunctionIdentifier SCALAR_GLOBAL_SQL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-var", 1);
- public static final FunctionIdentifier SCALAR_LOCAL_SQL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-var", 1);
+ public static final FunctionIdentifier SCALAR_SQL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-var_samp", 1);
+ public static final FunctionIdentifier SCALAR_GLOBAL_SQL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-var_samp", 1);
+ public static final FunctionIdentifier SCALAR_LOCAL_SQL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-var_samp", 1);
public static final FunctionIdentifier SCALAR_SQL_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-var_pop", 1);
public static final FunctionIdentifier SCALAR_GLOBAL_SQL_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-var_pop", 1);
public static final FunctionIdentifier SCALAR_LOCAL_SQL_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-var_pop", 1);
+ public static final FunctionIdentifier SCALAR_SQL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-skewness", 1);
+ public static final FunctionIdentifier SCALAR_GLOBAL_SQL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-skewness", 1);
+ public static final FunctionIdentifier SCALAR_LOCAL_SQL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-skewness", 1);
+ public static final FunctionIdentifier SCALAR_SQL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-kurtosis", 1);
+ public static final FunctionIdentifier SCALAR_GLOBAL_SQL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-kurtosis", 1);
+ public static final FunctionIdentifier SCALAR_LOCAL_SQL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-kurtosis", 1);
// serializable sql aggregate functions
public static final FunctionIdentifier SERIAL_SQL_AVG =
@@ -781,14 +863,14 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-sql-avg-serial", 1);
public static final FunctionIdentifier SERIAL_LOCAL_SQL_AVG =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-avg-serial", 1);
- public static final FunctionIdentifier SERIAL_SQL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-stddev-serial", 1);
- public static final FunctionIdentifier SERIAL_GLOBAL_SQL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-stddev-serial", 1);
- public static final FunctionIdentifier SERIAL_INTERMEDIATE_SQL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-sql-stddev-serial", 1);
- public static final FunctionIdentifier SERIAL_LOCAL_SQL_STDDEV =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-stddev-serial", 1);
+ public static final FunctionIdentifier SERIAL_SQL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-stddev-serial_samp", 1);
+ public static final FunctionIdentifier SERIAL_GLOBAL_SQL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-stddev-serial_samp", 1);
+ public static final FunctionIdentifier SERIAL_INTERMEDIATE_SQL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-sql-stddev-serial_samp", 1);
+ public static final FunctionIdentifier SERIAL_LOCAL_SQL_STDDEV_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-stddev-serial_samp", 1);
public static final FunctionIdentifier SERIAL_SQL_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-stddev_pop-serial", 1);
public static final FunctionIdentifier SERIAL_GLOBAL_SQL_STDDEV_POP =
@@ -797,14 +879,14 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-sql-stddev_pop-serial", 1);
public static final FunctionIdentifier SERIAL_LOCAL_SQL_STDDEV_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-stddev_pop-serial", 1);
- public static final FunctionIdentifier SERIAL_SQL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-var-serial", 1);
- public static final FunctionIdentifier SERIAL_GLOBAL_SQL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-var-serial", 1);
- public static final FunctionIdentifier SERIAL_INTERMEDIATE_SQL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-sql-var-serial", 1);
- public static final FunctionIdentifier SERIAL_LOCAL_SQL_VAR =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-var-serial", 1);
+ public static final FunctionIdentifier SERIAL_SQL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-var_samp-serial", 1);
+ public static final FunctionIdentifier SERIAL_GLOBAL_SQL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-var_samp-serial", 1);
+ public static final FunctionIdentifier SERIAL_INTERMEDIATE_SQL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-sql-var_samp-serial", 1);
+ public static final FunctionIdentifier SERIAL_LOCAL_SQL_VAR_SAMP =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-var_samp-serial", 1);
public static final FunctionIdentifier SERIAL_SQL_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-var_pop-serial", 1);
public static final FunctionIdentifier SERIAL_GLOBAL_SQL_VAR_POP =
@@ -813,6 +895,22 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-sql-var_pop-serial", 1);
public static final FunctionIdentifier SERIAL_LOCAL_SQL_VAR_POP =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-var_pop-serial", 1);
+ public static final FunctionIdentifier SERIAL_SQL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-skewness-serial", 1);
+ public static final FunctionIdentifier SERIAL_GLOBAL_SQL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-skewness-serial", 1);
+ public static final FunctionIdentifier SERIAL_INTERMEDIATE_SQL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-sql-skewness-serial", 1);
+ public static final FunctionIdentifier SERIAL_LOCAL_SQL_SKEWNESS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-skewness-serial", 1);
+ public static final FunctionIdentifier SERIAL_SQL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-kurtosis-serial", 1);
+ public static final FunctionIdentifier SERIAL_GLOBAL_SQL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "global-sql-kurtosis-serial", 1);
+ public static final FunctionIdentifier SERIAL_INTERMEDIATE_SQL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "intermediate-sql-kurtosis-serial", 1);
+ public static final FunctionIdentifier SERIAL_LOCAL_SQL_KURTOSIS =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "local-sql-kurtosis-serial", 1);
// distinct sql aggregate functions
public static final FunctionIdentifier SQL_COUNT_DISTINCT =
@@ -835,22 +933,30 @@
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-min-distinct", 1);
public static final FunctionIdentifier SCALAR_SQL_MIN_DISTINCT =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-min-distinct", 1);
- public static final FunctionIdentifier SQL_STDDEV_DISTINCT =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-stddev-distinct", 1);
- public static final FunctionIdentifier SCALAR_SQL_STDDEV_DISTINCT =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-stddev-distinct", 1);
+ public static final FunctionIdentifier SQL_STDDEV_SAMP_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-stddev_samp-distinct", 1);
+ public static final FunctionIdentifier SCALAR_SQL_STDDEV_SAMP_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-stddev_samp-distinct", 1);
public static final FunctionIdentifier SQL_STDDEV_POP_DISTINCT =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-stddev_pop-distinct", 1);
public static final FunctionIdentifier SCALAR_SQL_STDDEV_POP_DISTINCT =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-stddev_pop-distinct", 1);
- public static final FunctionIdentifier SQL_VAR_DISTINCT =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-var-distinct", 1);
- public static final FunctionIdentifier SCALAR_SQL_VAR_DISTINCT =
- new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-var-distinct", 1);
+ public static final FunctionIdentifier SQL_VAR_SAMP_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-var_samp-distinct", 1);
+ public static final FunctionIdentifier SCALAR_SQL_VAR_SAMP_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-var_samp-distinct", 1);
public static final FunctionIdentifier SQL_VAR_POP_DISTINCT =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-var_pop-distinct", 1);
public static final FunctionIdentifier SCALAR_SQL_VAR_POP_DISTINCT =
new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-var_pop-distinct", 1);
+ public static final FunctionIdentifier SQL_SKEWNESS_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-skewness-distinct", 1);
+ public static final FunctionIdentifier SCALAR_SQL_SKEWNESS_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-skewness-distinct", 1);
+ public static final FunctionIdentifier SQL_KURTOSIS_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sql-kurtosis-distinct", 1);
+ public static final FunctionIdentifier SCALAR_SQL_KURTOSIS_DISTINCT =
+ new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sql-kurtosis-distinct", 1);
// window functions
public static final FunctionIdentifier CUME_DIST =
@@ -1647,20 +1753,26 @@
addPrivateFunction(FIRST_ELEMENT, PropagateTypeComputer.INSTANCE_NULLABLE, true);
addPrivateFunction(LOCAL_FIRST_ELEMENT, PropagateTypeComputer.INSTANCE_NULLABLE, true);
addPrivateFunction(LAST_ELEMENT, PropagateTypeComputer.INSTANCE_NULLABLE, true);
- addPrivateFunction(LOCAL_STDDEV, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addFunction(STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(GLOBAL_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(LOCAL_STDDEV_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addFunction(STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(GLOBAL_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(LOCAL_SAMPLING, ListOfSamplesTypeComputer.INSTANCE, true);
addPrivateFunction(RANGE_MAP, ABinaryTypeComputer.INSTANCE, true);
addPrivateFunction(LOCAL_STDDEV_POP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
addFunction(STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(GLOBAL_STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(LOCAL_VAR, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addFunction(VAR, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(GLOBAL_VAR, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(LOCAL_VAR_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addFunction(VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(GLOBAL_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(LOCAL_VAR_POP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
addFunction(VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(GLOBAL_VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(LOCAL_SKEWNESS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addFunction(SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(GLOBAL_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(LOCAL_KURTOSIS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addFunction(KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(GLOBAL_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
// SUM
addFunction(SUM, NumericSumAggTypeComputer.INSTANCE, true);
@@ -1685,14 +1797,14 @@
addFunction(SCALAR_MAX, ScalarVersionOfAggregateResultType.INSTANCE, true);
addFunction(SCALAR_MIN, ScalarVersionOfAggregateResultType.INSTANCE, true);
addPrivateFunction(INTERMEDIATE_AVG, LocalAvgTypeComputer.INSTANCE, true);
- addFunction(SCALAR_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SCALAR_GLOBAL_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SCALAR_LOCAL_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(INTERMEDIATE_STDDEV, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_SQL_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_GLOBAL_SQL_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_LOCAL_SQL_STDDEV, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_INTERMEDIATE_SQL_STDDEV, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_GLOBAL_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_LOCAL_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(INTERMEDIATE_STDDEV_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_SQL_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_GLOBAL_SQL_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_LOCAL_SQL_STDDEV_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_INTERMEDIATE_SQL_STDDEV_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
addFunction(SCALAR_STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SCALAR_GLOBAL_STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SCALAR_LOCAL_STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
@@ -1701,14 +1813,14 @@
addPrivateFunction(SERIAL_GLOBAL_SQL_STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_LOCAL_SQL_STDDEV_POP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_INTERMEDIATE_SQL_STDDEV_POP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addFunction(SCALAR_VAR, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SCALAR_GLOBAL_VAR, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SCALAR_LOCAL_VAR, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(INTERMEDIATE_VAR, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_SQL_VAR, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_GLOBAL_SQL_VAR, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_LOCAL_SQL_VAR, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_INTERMEDIATE_SQL_VAR, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_GLOBAL_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_LOCAL_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(INTERMEDIATE_VAR_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_SQL_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_GLOBAL_SQL_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_LOCAL_SQL_VAR_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_INTERMEDIATE_SQL_VAR_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
addFunction(SCALAR_VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SCALAR_GLOBAL_VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SCALAR_LOCAL_VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
@@ -1717,6 +1829,22 @@
addPrivateFunction(SERIAL_GLOBAL_SQL_VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_LOCAL_SQL_VAR_POP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_INTERMEDIATE_SQL_VAR_POP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_GLOBAL_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_LOCAL_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(INTERMEDIATE_SKEWNESS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_SQL_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_GLOBAL_SQL_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_LOCAL_SQL_SKEWNESS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_INTERMEDIATE_SQL_SKEWNESS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_GLOBAL_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_LOCAL_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(INTERMEDIATE_KURTOSIS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_SQL_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_GLOBAL_SQL_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_LOCAL_SQL_KURTOSIS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_INTERMEDIATE_SQL_KURTOSIS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
// SQL SUM
addFunction(SQL_SUM, NumericSumAggTypeComputer.INSTANCE, true);
@@ -1745,13 +1873,13 @@
addFunction(SCALAR_SQL_MAX, ScalarVersionOfAggregateResultType.INSTANCE, true);
addFunction(SCALAR_SQL_MIN, ScalarVersionOfAggregateResultType.INSTANCE, true);
addPrivateFunction(INTERMEDIATE_SQL_AVG, LocalAvgTypeComputer.INSTANCE, true);
- addFunction(SQL_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(GLOBAL_SQL_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(LOCAL_SQL_STDDEV, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addPrivateFunction(INTERMEDIATE_SQL_STDDEV, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addFunction(SCALAR_SQL_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SCALAR_GLOBAL_SQL_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SCALAR_LOCAL_SQL_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SQL_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(GLOBAL_SQL_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(LOCAL_SQL_STDDEV_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(INTERMEDIATE_SQL_STDDEV_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_SQL_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_GLOBAL_SQL_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_LOCAL_SQL_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
addFunction(SQL_STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(GLOBAL_SQL_STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(LOCAL_SQL_STDDEV_POP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
@@ -1759,13 +1887,13 @@
addFunction(SCALAR_SQL_STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SCALAR_GLOBAL_SQL_STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SCALAR_LOCAL_SQL_STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
- addFunction(SQL_VAR, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(GLOBAL_SQL_VAR, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(LOCAL_SQL_VAR, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addPrivateFunction(INTERMEDIATE_SQL_VAR, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addFunction(SCALAR_SQL_VAR, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SCALAR_GLOBAL_SQL_VAR, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SCALAR_LOCAL_SQL_VAR, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SQL_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(GLOBAL_SQL_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(LOCAL_SQL_VAR_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(INTERMEDIATE_SQL_VAR_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_SQL_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_GLOBAL_SQL_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_LOCAL_SQL_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
addFunction(SQL_VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(GLOBAL_SQL_VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(LOCAL_SQL_VAR_POP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
@@ -1773,28 +1901,52 @@
addFunction(SCALAR_SQL_VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SCALAR_GLOBAL_SQL_VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SCALAR_LOCAL_SQL_VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SQL_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(GLOBAL_SQL_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(LOCAL_SQL_SKEWNESS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(INTERMEDIATE_SQL_SKEWNESS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_SQL_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_GLOBAL_SQL_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_LOCAL_SQL_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SQL_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(GLOBAL_SQL_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(LOCAL_SQL_KURTOSIS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(INTERMEDIATE_SQL_KURTOSIS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_SQL_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_GLOBAL_SQL_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SCALAR_LOCAL_SQL_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_AVG, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_COUNT, AInt64TypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_GLOBAL_AVG, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_LOCAL_AVG, LocalAvgTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_INTERMEDIATE_AVG, LocalAvgTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_GLOBAL_STDDEV, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_LOCAL_STDDEV, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_INTERMEDIATE_STDDEV, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_SUM, NumericSumAggTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_LOCAL_SUM, NumericSumAggTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_GLOBAL_STDDEV_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_LOCAL_STDDEV_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_INTERMEDIATE_STDDEV_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_GLOBAL_STDDEV_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_LOCAL_STDDEV_POP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_INTERMEDIATE_STDDEV_POP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_VAR, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_GLOBAL_VAR, NullableDoubleTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_LOCAL_VAR, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
- addPrivateFunction(SERIAL_INTERMEDIATE_VAR, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_GLOBAL_VAR_SAMP, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_LOCAL_VAR_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_INTERMEDIATE_VAR_SAMP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_GLOBAL_VAR_POP, NullableDoubleTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_LOCAL_VAR_POP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
addPrivateFunction(SERIAL_INTERMEDIATE_VAR_POP, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_GLOBAL_SKEWNESS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_LOCAL_SKEWNESS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_INTERMEDIATE_SKEWNESS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_GLOBAL_KURTOSIS, NullableDoubleTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_LOCAL_KURTOSIS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
+ addPrivateFunction(SERIAL_INTERMEDIATE_KURTOSIS, LocalSingleVarStatisticsTypeComputer.INSTANCE, true);
// Distinct aggregate functions
@@ -1823,26 +1975,36 @@
addFunction(SQL_MIN_DISTINCT, MinMaxAggTypeComputer.INSTANCE, true);
addFunction(SCALAR_SQL_MIN_DISTINCT, ScalarVersionOfAggregateResultType.INSTANCE, true);
- addFunction(STDDEV_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
- addFunction(SCALAR_STDDEV_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
- addFunction(SQL_STDDEV_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
- addFunction(SCALAR_SQL_STDDEV_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(STDDEV_SAMP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_STDDEV_SAMP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SQL_STDDEV_SAMP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_SQL_STDDEV_SAMP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
addFunction(STDDEV_POP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
addFunction(SCALAR_STDDEV_POP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
addFunction(SQL_STDDEV_POP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
addFunction(SCALAR_SQL_STDDEV_POP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
- addFunction(VAR_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
- addFunction(SCALAR_VAR_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
- addFunction(SQL_VAR_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
- addFunction(SCALAR_SQL_VAR_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(VAR_SAMP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_VAR_SAMP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SQL_VAR_SAMP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_SQL_VAR_SAMP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
addFunction(VAR_POP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
addFunction(SCALAR_VAR_POP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
addFunction(SQL_VAR_POP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
addFunction(SCALAR_SQL_VAR_POP_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SKEWNESS_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_SKEWNESS_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SQL_SKEWNESS_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_SQL_SKEWNESS_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+
+ addFunction(KURTOSIS_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_KURTOSIS_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SQL_KURTOSIS_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+ addFunction(SCALAR_SQL_KURTOSIS_DISTINCT, NullableDoubleTypeComputer.INSTANCE, true);
+
// Window functions
addFunction(CUME_DIST, ADoubleTypeComputer.INSTANCE, false);
@@ -2196,37 +2358,37 @@
addDistinctAgg(MAX_DISTINCT, SCALAR_MAX);
addScalarAgg(MAX_DISTINCT, SCALAR_MAX_DISTINCT);
- // STDDEV
+ // STDDEV_SAMP
- addAgg(STDDEV);
- addAgg(LOCAL_STDDEV);
- addAgg(GLOBAL_STDDEV);
- addLocalAgg(STDDEV, LOCAL_STDDEV);
- addIntermediateAgg(STDDEV, INTERMEDIATE_STDDEV);
- addIntermediateAgg(LOCAL_STDDEV, INTERMEDIATE_STDDEV);
- addIntermediateAgg(GLOBAL_STDDEV, INTERMEDIATE_STDDEV);
- addGlobalAgg(STDDEV, GLOBAL_STDDEV);
+ addAgg(STDDEV_SAMP);
+ addAgg(LOCAL_STDDEV_SAMP);
+ addAgg(GLOBAL_STDDEV_SAMP);
+ addLocalAgg(STDDEV_SAMP, LOCAL_STDDEV_SAMP);
+ addIntermediateAgg(STDDEV_SAMP, INTERMEDIATE_STDDEV_SAMP);
+ addIntermediateAgg(LOCAL_STDDEV_SAMP, INTERMEDIATE_STDDEV_SAMP);
+ addIntermediateAgg(GLOBAL_STDDEV_SAMP, INTERMEDIATE_STDDEV_SAMP);
+ addGlobalAgg(STDDEV_SAMP, GLOBAL_STDDEV_SAMP);
- addScalarAgg(STDDEV, SCALAR_STDDEV);
- addScalarAgg(GLOBAL_STDDEV, SCALAR_GLOBAL_STDDEV);
- addScalarAgg(LOCAL_STDDEV, SCALAR_LOCAL_STDDEV);
+ addScalarAgg(STDDEV_SAMP, SCALAR_STDDEV_SAMP);
+ addScalarAgg(GLOBAL_STDDEV_SAMP, SCALAR_GLOBAL_STDDEV_SAMP);
+ addScalarAgg(LOCAL_STDDEV_SAMP, SCALAR_LOCAL_STDDEV_SAMP);
- addSerialAgg(STDDEV, SERIAL_STDDEV);
- addSerialAgg(LOCAL_STDDEV, SERIAL_LOCAL_STDDEV);
- addSerialAgg(GLOBAL_STDDEV, SERIAL_GLOBAL_STDDEV);
- addAgg(SERIAL_STDDEV);
- addAgg(SERIAL_LOCAL_STDDEV);
- addAgg(SERIAL_GLOBAL_STDDEV);
- addLocalAgg(SERIAL_STDDEV, SERIAL_LOCAL_STDDEV);
- addIntermediateAgg(SERIAL_STDDEV, SERIAL_INTERMEDIATE_STDDEV);
- addIntermediateAgg(SERIAL_LOCAL_STDDEV, SERIAL_INTERMEDIATE_STDDEV);
- addIntermediateAgg(SERIAL_GLOBAL_STDDEV, SERIAL_INTERMEDIATE_STDDEV);
- addGlobalAgg(SERIAL_STDDEV, SERIAL_GLOBAL_STDDEV);
+ addSerialAgg(STDDEV_SAMP, SERIAL_STDDEV_SAMP);
+ addSerialAgg(LOCAL_STDDEV_SAMP, SERIAL_LOCAL_STDDEV_SAMP);
+ addSerialAgg(GLOBAL_STDDEV_SAMP, SERIAL_GLOBAL_STDDEV_SAMP);
+ addAgg(SERIAL_STDDEV_SAMP);
+ addAgg(SERIAL_LOCAL_STDDEV_SAMP);
+ addAgg(SERIAL_GLOBAL_STDDEV_SAMP);
+ addLocalAgg(SERIAL_STDDEV_SAMP, SERIAL_LOCAL_STDDEV_SAMP);
+ addIntermediateAgg(SERIAL_STDDEV_SAMP, SERIAL_INTERMEDIATE_STDDEV_SAMP);
+ addIntermediateAgg(SERIAL_LOCAL_STDDEV_SAMP, SERIAL_INTERMEDIATE_STDDEV_SAMP);
+ addIntermediateAgg(SERIAL_GLOBAL_STDDEV_SAMP, SERIAL_INTERMEDIATE_STDDEV_SAMP);
+ addGlobalAgg(SERIAL_STDDEV_SAMP, SERIAL_GLOBAL_STDDEV_SAMP);
- // STDDEV DISTINCT
+ // STDDEV_SAMP DISTINCT
- addDistinctAgg(STDDEV_DISTINCT, SCALAR_STDDEV);
- addScalarAgg(STDDEV_DISTINCT, SCALAR_STDDEV_DISTINCT);
+ addDistinctAgg(STDDEV_SAMP_DISTINCT, SCALAR_STDDEV_SAMP);
+ addScalarAgg(STDDEV_SAMP_DISTINCT, SCALAR_STDDEV_SAMP_DISTINCT);
// STDDEV_POP
@@ -2260,37 +2422,37 @@
addDistinctAgg(STDDEV_POP_DISTINCT, SCALAR_STDDEV_POP);
addScalarAgg(STDDEV_POP_DISTINCT, SCALAR_STDDEV_POP_DISTINCT);
- // VAR
+ // VAR_SAMP
- addAgg(VAR);
- addAgg(LOCAL_VAR);
- addAgg(GLOBAL_VAR);
- addLocalAgg(VAR, LOCAL_VAR);
- addIntermediateAgg(VAR, INTERMEDIATE_VAR);
- addIntermediateAgg(LOCAL_VAR, INTERMEDIATE_VAR);
- addIntermediateAgg(GLOBAL_VAR, INTERMEDIATE_VAR);
- addGlobalAgg(VAR, GLOBAL_VAR);
+ addAgg(VAR_SAMP);
+ addAgg(LOCAL_VAR_SAMP);
+ addAgg(GLOBAL_VAR_SAMP);
+ addLocalAgg(VAR_SAMP, LOCAL_VAR_SAMP);
+ addIntermediateAgg(VAR_SAMP, INTERMEDIATE_VAR_SAMP);
+ addIntermediateAgg(LOCAL_VAR_SAMP, INTERMEDIATE_VAR_SAMP);
+ addIntermediateAgg(GLOBAL_VAR_SAMP, INTERMEDIATE_VAR_SAMP);
+ addGlobalAgg(VAR_SAMP, GLOBAL_VAR_SAMP);
- addScalarAgg(VAR, SCALAR_VAR);
- addScalarAgg(GLOBAL_VAR, SCALAR_GLOBAL_VAR);
- addScalarAgg(LOCAL_VAR, SCALAR_LOCAL_VAR);
+ addScalarAgg(VAR_SAMP, SCALAR_VAR_SAMP);
+ addScalarAgg(GLOBAL_VAR_SAMP, SCALAR_GLOBAL_VAR_SAMP);
+ addScalarAgg(LOCAL_VAR_SAMP, SCALAR_LOCAL_VAR_SAMP);
- addSerialAgg(VAR, SERIAL_VAR);
- addSerialAgg(LOCAL_VAR, SERIAL_LOCAL_VAR);
- addSerialAgg(GLOBAL_VAR, SERIAL_GLOBAL_VAR);
- addAgg(SERIAL_VAR);
- addAgg(SERIAL_LOCAL_VAR);
- addAgg(SERIAL_GLOBAL_VAR);
- addLocalAgg(SERIAL_VAR, SERIAL_LOCAL_VAR);
- addIntermediateAgg(SERIAL_VAR, SERIAL_INTERMEDIATE_VAR);
- addIntermediateAgg(SERIAL_LOCAL_VAR, SERIAL_INTERMEDIATE_VAR);
- addIntermediateAgg(SERIAL_GLOBAL_VAR, SERIAL_INTERMEDIATE_VAR);
- addGlobalAgg(SERIAL_VAR, SERIAL_GLOBAL_VAR);
+ addSerialAgg(VAR_SAMP, SERIAL_VAR_SAMP);
+ addSerialAgg(LOCAL_VAR_SAMP, SERIAL_LOCAL_VAR_SAMP);
+ addSerialAgg(GLOBAL_VAR_SAMP, SERIAL_GLOBAL_VAR_SAMP);
+ addAgg(SERIAL_VAR_SAMP);
+ addAgg(SERIAL_LOCAL_VAR_SAMP);
+ addAgg(SERIAL_GLOBAL_VAR_SAMP);
+ addLocalAgg(SERIAL_VAR_SAMP, SERIAL_LOCAL_VAR_SAMP);
+ addIntermediateAgg(SERIAL_VAR_SAMP, SERIAL_INTERMEDIATE_VAR_SAMP);
+ addIntermediateAgg(SERIAL_LOCAL_VAR_SAMP, SERIAL_INTERMEDIATE_VAR_SAMP);
+ addIntermediateAgg(SERIAL_GLOBAL_VAR_SAMP, SERIAL_INTERMEDIATE_VAR_SAMP);
+ addGlobalAgg(SERIAL_VAR_SAMP, SERIAL_GLOBAL_VAR_SAMP);
- // VAR DISTINCT
+ // VAR_SAMP DISTINCT
- addDistinctAgg(VAR_DISTINCT, SCALAR_VAR);
- addScalarAgg(VAR_DISTINCT, SCALAR_VAR_DISTINCT);
+ addDistinctAgg(VAR_SAMP_DISTINCT, SCALAR_VAR_SAMP);
+ addScalarAgg(VAR_SAMP_DISTINCT, SCALAR_VAR_SAMP_DISTINCT);
// VAR_POP
@@ -2324,6 +2486,70 @@
addDistinctAgg(VAR_POP_DISTINCT, SCALAR_VAR_POP);
addScalarAgg(VAR_POP_DISTINCT, SCALAR_VAR_POP_DISTINCT);
+ // SKEWNESS
+
+ addAgg(SKEWNESS);
+ addAgg(LOCAL_SKEWNESS);
+ addAgg(GLOBAL_SKEWNESS);
+ addLocalAgg(SKEWNESS, LOCAL_SKEWNESS);
+ addIntermediateAgg(SKEWNESS, INTERMEDIATE_SKEWNESS);
+ addIntermediateAgg(LOCAL_SKEWNESS, INTERMEDIATE_SKEWNESS);
+ addIntermediateAgg(GLOBAL_SKEWNESS, INTERMEDIATE_SKEWNESS);
+ addGlobalAgg(SKEWNESS, GLOBAL_SKEWNESS);
+
+ addScalarAgg(SKEWNESS, SCALAR_SKEWNESS);
+ addScalarAgg(GLOBAL_SKEWNESS, SCALAR_GLOBAL_SKEWNESS);
+ addScalarAgg(LOCAL_SKEWNESS, SCALAR_LOCAL_SKEWNESS);
+
+ addSerialAgg(SKEWNESS, SERIAL_SKEWNESS);
+ addSerialAgg(LOCAL_SKEWNESS, SERIAL_LOCAL_SKEWNESS);
+ addSerialAgg(GLOBAL_SKEWNESS, SERIAL_GLOBAL_SKEWNESS);
+ addAgg(SERIAL_SKEWNESS);
+ addAgg(SERIAL_LOCAL_SKEWNESS);
+ addAgg(SERIAL_GLOBAL_SKEWNESS);
+ addLocalAgg(SERIAL_SKEWNESS, SERIAL_LOCAL_SKEWNESS);
+ addIntermediateAgg(SERIAL_SKEWNESS, SERIAL_INTERMEDIATE_SKEWNESS);
+ addIntermediateAgg(SERIAL_LOCAL_SKEWNESS, SERIAL_INTERMEDIATE_SKEWNESS);
+ addIntermediateAgg(SERIAL_GLOBAL_SKEWNESS, SERIAL_INTERMEDIATE_SKEWNESS);
+ addGlobalAgg(SERIAL_SKEWNESS, SERIAL_GLOBAL_SKEWNESS);
+
+ // SKEWNESS DISTINCT
+
+ addDistinctAgg(SKEWNESS_DISTINCT, SCALAR_SKEWNESS);
+ addScalarAgg(SKEWNESS_DISTINCT, SCALAR_SKEWNESS_DISTINCT);
+
+ // KURTOSIS
+
+ addAgg(KURTOSIS);
+ addAgg(LOCAL_KURTOSIS);
+ addAgg(GLOBAL_KURTOSIS);
+ addLocalAgg(KURTOSIS, LOCAL_KURTOSIS);
+ addIntermediateAgg(KURTOSIS, INTERMEDIATE_KURTOSIS);
+ addIntermediateAgg(LOCAL_KURTOSIS, INTERMEDIATE_KURTOSIS);
+ addIntermediateAgg(GLOBAL_KURTOSIS, INTERMEDIATE_KURTOSIS);
+ addGlobalAgg(KURTOSIS, GLOBAL_KURTOSIS);
+
+ addScalarAgg(KURTOSIS, SCALAR_KURTOSIS);
+ addScalarAgg(GLOBAL_KURTOSIS, SCALAR_GLOBAL_KURTOSIS);
+ addScalarAgg(LOCAL_KURTOSIS, SCALAR_LOCAL_KURTOSIS);
+
+ addSerialAgg(KURTOSIS, SERIAL_KURTOSIS);
+ addSerialAgg(LOCAL_KURTOSIS, SERIAL_LOCAL_KURTOSIS);
+ addSerialAgg(GLOBAL_KURTOSIS, SERIAL_GLOBAL_KURTOSIS);
+ addAgg(SERIAL_KURTOSIS);
+ addAgg(SERIAL_LOCAL_KURTOSIS);
+ addAgg(SERIAL_GLOBAL_KURTOSIS);
+ addLocalAgg(SERIAL_KURTOSIS, SERIAL_LOCAL_KURTOSIS);
+ addIntermediateAgg(SERIAL_KURTOSIS, SERIAL_INTERMEDIATE_KURTOSIS);
+ addIntermediateAgg(SERIAL_LOCAL_KURTOSIS, SERIAL_INTERMEDIATE_KURTOSIS);
+ addIntermediateAgg(SERIAL_GLOBAL_KURTOSIS, SERIAL_INTERMEDIATE_KURTOSIS);
+ addGlobalAgg(SERIAL_KURTOSIS, SERIAL_GLOBAL_KURTOSIS);
+
+ // KURTOSIS DISTINCT
+
+ addDistinctAgg(KURTOSIS_DISTINCT, SCALAR_KURTOSIS);
+ addScalarAgg(KURTOSIS_DISTINCT, SCALAR_KURTOSIS_DISTINCT);
+
// FIRST_ELEMENT
addAgg(FIRST_ELEMENT);
@@ -2424,32 +2650,32 @@
addIntermediateAgg(SERIAL_GLOBAL_SQL_AVG, SERIAL_INTERMEDIATE_SQL_AVG);
addGlobalAgg(SERIAL_SQL_AVG, SERIAL_GLOBAL_SQL_AVG);
- // SQL STDDEV
+ // SQL STDDEV_SAMP
- addAgg(SQL_STDDEV);
- addAgg(LOCAL_SQL_STDDEV);
- addAgg(GLOBAL_SQL_STDDEV);
- addLocalAgg(SQL_STDDEV, LOCAL_SQL_STDDEV);
- addIntermediateAgg(SQL_STDDEV, INTERMEDIATE_SQL_STDDEV);
- addIntermediateAgg(LOCAL_SQL_STDDEV, INTERMEDIATE_SQL_STDDEV);
- addIntermediateAgg(GLOBAL_SQL_STDDEV, INTERMEDIATE_SQL_STDDEV);
- addGlobalAgg(SQL_STDDEV, GLOBAL_SQL_STDDEV);
+ addAgg(SQL_STDDEV_SAMP);
+ addAgg(LOCAL_SQL_STDDEV_SAMP);
+ addAgg(GLOBAL_SQL_STDDEV_SAMP);
+ addLocalAgg(SQL_STDDEV_SAMP, LOCAL_SQL_STDDEV_SAMP);
+ addIntermediateAgg(SQL_STDDEV_SAMP, INTERMEDIATE_SQL_STDDEV_SAMP);
+ addIntermediateAgg(LOCAL_SQL_STDDEV_SAMP, INTERMEDIATE_SQL_STDDEV_SAMP);
+ addIntermediateAgg(GLOBAL_SQL_STDDEV_SAMP, INTERMEDIATE_SQL_STDDEV_SAMP);
+ addGlobalAgg(SQL_STDDEV_SAMP, GLOBAL_SQL_STDDEV_SAMP);
- addScalarAgg(SQL_STDDEV, SCALAR_SQL_STDDEV);
- addScalarAgg(GLOBAL_SQL_STDDEV, SCALAR_GLOBAL_SQL_STDDEV);
- addScalarAgg(LOCAL_SQL_STDDEV, SCALAR_LOCAL_SQL_STDDEV);
+ addScalarAgg(SQL_STDDEV_SAMP, SCALAR_SQL_STDDEV_SAMP);
+ addScalarAgg(GLOBAL_SQL_STDDEV_SAMP, SCALAR_GLOBAL_SQL_STDDEV_SAMP);
+ addScalarAgg(LOCAL_SQL_STDDEV_SAMP, SCALAR_LOCAL_SQL_STDDEV_SAMP);
- addSerialAgg(SQL_STDDEV, SERIAL_SQL_STDDEV);
- addSerialAgg(LOCAL_SQL_STDDEV, SERIAL_LOCAL_SQL_STDDEV);
- addSerialAgg(GLOBAL_SQL_STDDEV, SERIAL_GLOBAL_SQL_STDDEV);
- addAgg(SERIAL_SQL_STDDEV);
- addAgg(SERIAL_LOCAL_SQL_STDDEV);
- addAgg(SERIAL_GLOBAL_SQL_STDDEV);
- addLocalAgg(SERIAL_SQL_STDDEV, SERIAL_LOCAL_SQL_STDDEV);
- addIntermediateAgg(SERIAL_SQL_STDDEV, SERIAL_INTERMEDIATE_SQL_STDDEV);
- addIntermediateAgg(SERIAL_LOCAL_SQL_STDDEV, SERIAL_INTERMEDIATE_SQL_STDDEV);
- addIntermediateAgg(SERIAL_GLOBAL_SQL_STDDEV, SERIAL_INTERMEDIATE_SQL_STDDEV);
- addGlobalAgg(SERIAL_SQL_STDDEV, SERIAL_GLOBAL_SQL_STDDEV);
+ addSerialAgg(SQL_STDDEV_SAMP, SERIAL_SQL_STDDEV_SAMP);
+ addSerialAgg(LOCAL_SQL_STDDEV_SAMP, SERIAL_LOCAL_SQL_STDDEV_SAMP);
+ addSerialAgg(GLOBAL_SQL_STDDEV_SAMP, SERIAL_GLOBAL_SQL_STDDEV_SAMP);
+ addAgg(SERIAL_SQL_STDDEV_SAMP);
+ addAgg(SERIAL_LOCAL_SQL_STDDEV_SAMP);
+ addAgg(SERIAL_GLOBAL_SQL_STDDEV_SAMP);
+ addLocalAgg(SERIAL_SQL_STDDEV_SAMP, SERIAL_LOCAL_SQL_STDDEV_SAMP);
+ addIntermediateAgg(SERIAL_SQL_STDDEV_SAMP, SERIAL_INTERMEDIATE_SQL_STDDEV_SAMP);
+ addIntermediateAgg(SERIAL_LOCAL_SQL_STDDEV_SAMP, SERIAL_INTERMEDIATE_SQL_STDDEV_SAMP);
+ addIntermediateAgg(SERIAL_GLOBAL_SQL_STDDEV_SAMP, SERIAL_INTERMEDIATE_SQL_STDDEV_SAMP);
+ addGlobalAgg(SERIAL_SQL_STDDEV_SAMP, SERIAL_GLOBAL_SQL_STDDEV_SAMP);
// SQL STDDEV_POP
@@ -2478,32 +2704,32 @@
addIntermediateAgg(SERIAL_GLOBAL_SQL_STDDEV_POP, SERIAL_INTERMEDIATE_SQL_STDDEV_POP);
addGlobalAgg(SERIAL_SQL_STDDEV_POP, SERIAL_GLOBAL_SQL_STDDEV_POP);
- // SQL VAR
+ // SQL VAR_SAMP
- addAgg(SQL_VAR);
- addAgg(LOCAL_SQL_VAR);
- addAgg(GLOBAL_SQL_VAR);
- addLocalAgg(SQL_VAR, LOCAL_SQL_VAR);
- addIntermediateAgg(SQL_VAR, INTERMEDIATE_SQL_VAR);
- addIntermediateAgg(LOCAL_SQL_VAR, INTERMEDIATE_SQL_VAR);
- addIntermediateAgg(GLOBAL_SQL_VAR, INTERMEDIATE_SQL_VAR);
- addGlobalAgg(SQL_VAR, GLOBAL_SQL_VAR);
+ addAgg(SQL_VAR_SAMP);
+ addAgg(LOCAL_SQL_VAR_SAMP);
+ addAgg(GLOBAL_SQL_VAR_SAMP);
+ addLocalAgg(SQL_VAR_SAMP, LOCAL_SQL_VAR_SAMP);
+ addIntermediateAgg(SQL_VAR_SAMP, INTERMEDIATE_SQL_VAR_SAMP);
+ addIntermediateAgg(LOCAL_SQL_VAR_SAMP, INTERMEDIATE_SQL_VAR_SAMP);
+ addIntermediateAgg(GLOBAL_SQL_VAR_SAMP, INTERMEDIATE_SQL_VAR_SAMP);
+ addGlobalAgg(SQL_VAR_SAMP, GLOBAL_SQL_VAR_SAMP);
- addScalarAgg(SQL_VAR, SCALAR_SQL_VAR);
- addScalarAgg(GLOBAL_SQL_VAR, SCALAR_GLOBAL_SQL_VAR);
- addScalarAgg(LOCAL_SQL_VAR, SCALAR_LOCAL_SQL_VAR);
+ addScalarAgg(SQL_VAR_SAMP, SCALAR_SQL_VAR_SAMP);
+ addScalarAgg(GLOBAL_SQL_VAR_SAMP, SCALAR_GLOBAL_SQL_VAR_SAMP);
+ addScalarAgg(LOCAL_SQL_VAR_SAMP, SCALAR_LOCAL_SQL_VAR_SAMP);
- addSerialAgg(SQL_VAR, SERIAL_SQL_VAR);
- addSerialAgg(LOCAL_SQL_VAR, SERIAL_LOCAL_SQL_VAR);
- addSerialAgg(GLOBAL_SQL_VAR, SERIAL_GLOBAL_SQL_VAR);
- addAgg(SERIAL_SQL_VAR);
- addAgg(SERIAL_LOCAL_SQL_VAR);
- addAgg(SERIAL_GLOBAL_SQL_VAR);
- addLocalAgg(SERIAL_SQL_VAR, SERIAL_LOCAL_SQL_VAR);
- addIntermediateAgg(SERIAL_SQL_VAR, SERIAL_INTERMEDIATE_SQL_VAR);
- addIntermediateAgg(SERIAL_LOCAL_SQL_VAR, SERIAL_INTERMEDIATE_SQL_VAR);
- addIntermediateAgg(SERIAL_GLOBAL_SQL_VAR, SERIAL_INTERMEDIATE_SQL_VAR);
- addGlobalAgg(SERIAL_SQL_VAR, SERIAL_GLOBAL_SQL_VAR);
+ addSerialAgg(SQL_VAR_SAMP, SERIAL_SQL_VAR_SAMP);
+ addSerialAgg(LOCAL_SQL_VAR_SAMP, SERIAL_LOCAL_SQL_VAR_SAMP);
+ addSerialAgg(GLOBAL_SQL_VAR_SAMP, SERIAL_GLOBAL_SQL_VAR_SAMP);
+ addAgg(SERIAL_SQL_VAR_SAMP);
+ addAgg(SERIAL_LOCAL_SQL_VAR_SAMP);
+ addAgg(SERIAL_GLOBAL_SQL_VAR_SAMP);
+ addLocalAgg(SERIAL_SQL_VAR_SAMP, SERIAL_LOCAL_SQL_VAR_SAMP);
+ addIntermediateAgg(SERIAL_SQL_VAR_SAMP, SERIAL_INTERMEDIATE_SQL_VAR_SAMP);
+ addIntermediateAgg(SERIAL_LOCAL_SQL_VAR_SAMP, SERIAL_INTERMEDIATE_SQL_VAR_SAMP);
+ addIntermediateAgg(SERIAL_GLOBAL_SQL_VAR_SAMP, SERIAL_INTERMEDIATE_SQL_VAR_SAMP);
+ addGlobalAgg(SERIAL_SQL_VAR_SAMP, SERIAL_GLOBAL_SQL_VAR_SAMP);
// SQL VAR_POP
@@ -2532,31 +2758,95 @@
addIntermediateAgg(SERIAL_GLOBAL_SQL_VAR_POP, SERIAL_INTERMEDIATE_SQL_VAR_POP);
addGlobalAgg(SERIAL_SQL_VAR_POP, SERIAL_GLOBAL_SQL_VAR_POP);
+ // SQL SKEWNESS
+
+ addAgg(SQL_SKEWNESS);
+ addAgg(LOCAL_SQL_SKEWNESS);
+ addAgg(GLOBAL_SQL_SKEWNESS);
+ addLocalAgg(SQL_SKEWNESS, LOCAL_SQL_SKEWNESS);
+ addIntermediateAgg(SQL_SKEWNESS, INTERMEDIATE_SQL_SKEWNESS);
+ addIntermediateAgg(LOCAL_SQL_SKEWNESS, INTERMEDIATE_SQL_SKEWNESS);
+ addIntermediateAgg(GLOBAL_SQL_SKEWNESS, INTERMEDIATE_SQL_SKEWNESS);
+ addGlobalAgg(SQL_SKEWNESS, GLOBAL_SQL_SKEWNESS);
+
+ addScalarAgg(SQL_SKEWNESS, SCALAR_SQL_SKEWNESS);
+ addScalarAgg(GLOBAL_SQL_SKEWNESS, SCALAR_GLOBAL_SQL_SKEWNESS);
+ addScalarAgg(LOCAL_SQL_SKEWNESS, SCALAR_LOCAL_SQL_SKEWNESS);
+
+ addSerialAgg(SQL_SKEWNESS, SERIAL_SQL_SKEWNESS);
+ addSerialAgg(LOCAL_SQL_SKEWNESS, SERIAL_LOCAL_SQL_SKEWNESS);
+ addSerialAgg(GLOBAL_SQL_SKEWNESS, SERIAL_GLOBAL_SQL_SKEWNESS);
+ addAgg(SERIAL_SQL_SKEWNESS);
+ addAgg(SERIAL_LOCAL_SQL_SKEWNESS);
+ addAgg(SERIAL_GLOBAL_SQL_SKEWNESS);
+ addLocalAgg(SERIAL_SQL_SKEWNESS, SERIAL_LOCAL_SQL_SKEWNESS);
+ addIntermediateAgg(SERIAL_SQL_SKEWNESS, SERIAL_INTERMEDIATE_SQL_SKEWNESS);
+ addIntermediateAgg(SERIAL_LOCAL_SQL_SKEWNESS, SERIAL_INTERMEDIATE_SQL_SKEWNESS);
+ addIntermediateAgg(SERIAL_GLOBAL_SQL_SKEWNESS, SERIAL_INTERMEDIATE_SQL_SKEWNESS);
+ addGlobalAgg(SERIAL_SQL_SKEWNESS, SERIAL_GLOBAL_SQL_SKEWNESS);
+
+ // SQL KURTOSIS
+
+ addAgg(SQL_KURTOSIS);
+ addAgg(LOCAL_SQL_KURTOSIS);
+ addAgg(GLOBAL_SQL_KURTOSIS);
+ addLocalAgg(SQL_KURTOSIS, LOCAL_SQL_KURTOSIS);
+ addIntermediateAgg(SQL_KURTOSIS, INTERMEDIATE_SQL_KURTOSIS);
+ addIntermediateAgg(LOCAL_SQL_KURTOSIS, INTERMEDIATE_SQL_KURTOSIS);
+ addIntermediateAgg(GLOBAL_SQL_KURTOSIS, INTERMEDIATE_SQL_KURTOSIS);
+ addGlobalAgg(SQL_KURTOSIS, GLOBAL_SQL_KURTOSIS);
+
+ addScalarAgg(SQL_KURTOSIS, SCALAR_SQL_KURTOSIS);
+ addScalarAgg(GLOBAL_SQL_KURTOSIS, SCALAR_GLOBAL_SQL_KURTOSIS);
+ addScalarAgg(LOCAL_SQL_KURTOSIS, SCALAR_LOCAL_SQL_KURTOSIS);
+
+ addSerialAgg(SQL_KURTOSIS, SERIAL_SQL_KURTOSIS);
+ addSerialAgg(LOCAL_SQL_KURTOSIS, SERIAL_LOCAL_SQL_KURTOSIS);
+ addSerialAgg(GLOBAL_SQL_KURTOSIS, SERIAL_GLOBAL_SQL_KURTOSIS);
+ addAgg(SERIAL_SQL_KURTOSIS);
+ addAgg(SERIAL_LOCAL_SQL_KURTOSIS);
+ addAgg(SERIAL_GLOBAL_SQL_KURTOSIS);
+ addLocalAgg(SERIAL_SQL_KURTOSIS, SERIAL_LOCAL_SQL_KURTOSIS);
+ addIntermediateAgg(SERIAL_SQL_KURTOSIS, SERIAL_INTERMEDIATE_SQL_KURTOSIS);
+ addIntermediateAgg(SERIAL_LOCAL_SQL_KURTOSIS, SERIAL_INTERMEDIATE_SQL_KURTOSIS);
+ addIntermediateAgg(SERIAL_GLOBAL_SQL_KURTOSIS, SERIAL_INTERMEDIATE_SQL_KURTOSIS);
+ addGlobalAgg(SERIAL_SQL_KURTOSIS, SERIAL_GLOBAL_SQL_KURTOSIS);
+
// SQL AVG DISTINCT
addDistinctAgg(SQL_AVG_DISTINCT, SCALAR_SQL_AVG);
addScalarAgg(SQL_AVG_DISTINCT, SCALAR_SQL_AVG_DISTINCT);
- // SQL STDDEV DISTINCT
+ // SQL STDDEV_SAMP DISTINCT
- addDistinctAgg(SQL_STDDEV_DISTINCT, SCALAR_SQL_STDDEV);
- addScalarAgg(SQL_STDDEV_DISTINCT, SCALAR_SQL_STDDEV_DISTINCT);
+ addDistinctAgg(SQL_STDDEV_SAMP_DISTINCT, SCALAR_SQL_STDDEV_SAMP);
+ addScalarAgg(SQL_STDDEV_SAMP_DISTINCT, SCALAR_SQL_STDDEV_SAMP_DISTINCT);
// SQL STDDEV_POP DISTINCT
addDistinctAgg(SQL_STDDEV_POP_DISTINCT, SCALAR_SQL_STDDEV_POP);
addScalarAgg(SQL_STDDEV_POP_DISTINCT, SCALAR_SQL_STDDEV_POP_DISTINCT);
- // SQL VAR DISTINCT
+ // SQL VAR_SAMP DISTINCT
- addDistinctAgg(SQL_VAR_DISTINCT, SCALAR_SQL_VAR);
- addScalarAgg(SQL_VAR_DISTINCT, SCALAR_SQL_VAR_DISTINCT);
+ addDistinctAgg(SQL_VAR_SAMP_DISTINCT, SCALAR_SQL_VAR_SAMP);
+ addScalarAgg(SQL_VAR_SAMP_DISTINCT, SCALAR_SQL_VAR_SAMP_DISTINCT);
// SQL VAR_POP DISTINCT
addDistinctAgg(SQL_VAR_POP_DISTINCT, SCALAR_SQL_VAR_POP);
addScalarAgg(SQL_VAR_POP_DISTINCT, SCALAR_SQL_VAR_POP_DISTINCT);
+ // SQL SKEWNESS DISTINCT
+
+ addDistinctAgg(SQL_SKEWNESS_DISTINCT, SCALAR_SQL_SKEWNESS);
+ addScalarAgg(SQL_SKEWNESS_DISTINCT, SCALAR_SQL_SKEWNESS_DISTINCT);
+
+ // SQL KURTOSIS DISTINCT
+
+ addDistinctAgg(SQL_KURTOSIS_DISTINCT, SCALAR_SQL_KURTOSIS);
+ addScalarAgg(SQL_KURTOSIS_DISTINCT, SCALAR_SQL_KURTOSIS_DISTINCT);
+
// SQL COUNT
addAgg(SQL_COUNT);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/LocalSingleVarStatisticsTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/LocalSingleVarStatisticsTypeComputer.java
index 7650687f..1be970a 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/LocalSingleVarStatisticsTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/LocalSingleVarStatisticsTypeComputer.java
@@ -36,8 +36,10 @@
@Override
public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
- return new ARecordType(null, new String[] { "m1", "m2", "count" },
+ return new ARecordType(null, new String[] { "m1", "m2", "m3", "m4", "count" },
new IAType[] { AUnionType.createNullableType(BuiltinType.ADOUBLE, "OptionalDouble"),
+ AUnionType.createNullableType(BuiltinType.ADOUBLE, "OptionalDouble"),
+ AUnionType.createNullableType(BuiltinType.ADOUBLE, "OptionalDouble"),
AUnionType.createNullableType(BuiltinType.ADOUBLE, "OptionalDouble"), BuiltinType.AINT64 },
false);
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..943c74d
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarKurtosisAggregateDescriptor.java
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.runtime.aggregates.scalar;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.std.KurtosisAggregateDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+
+public class ScalarKurtosisAggregateDescriptor extends AbstractScalarAggregateDescriptor {
+
+ private static final long serialVersionUID = 1L;
+
+ public final static FunctionIdentifier FID = BuiltinFunctions.SCALAR_KURTOSIS;
+
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new ScalarKurtosisAggregateDescriptor(
+ KurtosisAggregateDescriptor.FACTORY.createFunctionDescriptor());
+ }
+ };
+
+ private ScalarKurtosisAggregateDescriptor(IFunctionDescriptor aggFuncDesc) {
+ super(aggFuncDesc);
+ }
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return FID;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..1fad8e4
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSkewnessAggregateDescriptor.java
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.runtime.aggregates.scalar;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.std.SkewnessAggregateDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+
+public class ScalarSkewnessAggregateDescriptor extends AbstractScalarAggregateDescriptor {
+
+ private static final long serialVersionUID = 1L;
+
+ public final static FunctionIdentifier FID = BuiltinFunctions.SCALAR_SKEWNESS;
+
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new ScalarSkewnessAggregateDescriptor(
+ SkewnessAggregateDescriptor.FACTORY.createFunctionDescriptor());
+ }
+ };
+
+ private ScalarSkewnessAggregateDescriptor(IFunctionDescriptor aggFuncDesc) {
+ super(aggFuncDesc);
+ }
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return FID;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..472b479
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlKurtosisAggregateDescriptor.java
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.runtime.aggregates.scalar;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.std.SqlKurtosisAggregateDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+
+public class ScalarSqlKurtosisAggregateDescriptor extends AbstractScalarAggregateDescriptor {
+
+ private static final long serialVersionUID = 1L;
+
+ public final static FunctionIdentifier FID = BuiltinFunctions.SCALAR_SQL_KURTOSIS;
+
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new ScalarSqlKurtosisAggregateDescriptor(
+ SqlKurtosisAggregateDescriptor.FACTORY.createFunctionDescriptor());
+ }
+ };
+
+ private ScalarSqlKurtosisAggregateDescriptor(IFunctionDescriptor aggFuncDesc) {
+ super(aggFuncDesc);
+ }
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return FID;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..d52f597
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlSkewnessAggregateDescriptor.java
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.runtime.aggregates.scalar;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.std.SqlSkewnessAggregateDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+
+public class ScalarSqlSkewnessAggregateDescriptor extends AbstractScalarAggregateDescriptor {
+
+ private static final long serialVersionUID = 1L;
+
+ public final static FunctionIdentifier FID = BuiltinFunctions.SCALAR_SQL_SKEWNESS;
+
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new ScalarSqlSkewnessAggregateDescriptor(
+ SqlSkewnessAggregateDescriptor.FACTORY.createFunctionDescriptor());
+ }
+ };
+
+ private ScalarSqlSkewnessAggregateDescriptor(IFunctionDescriptor aggFuncDesc) {
+ super(aggFuncDesc);
+ }
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return FID;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlStddevAggregateDescriptor.java
index 0b80fe4..f52032d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlStddevAggregateDescriptor.java
@@ -28,7 +28,7 @@
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = BuiltinFunctions.SCALAR_SQL_STDDEV;
+ public final static FunctionIdentifier FID = BuiltinFunctions.SCALAR_SQL_STDDEV_SAMP;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlVarAggregateDescriptor.java
index 853aec3..983e178 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSqlVarAggregateDescriptor.java
@@ -28,7 +28,7 @@
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = BuiltinFunctions.SCALAR_SQL_VAR;
+ public final static FunctionIdentifier FID = BuiltinFunctions.SCALAR_SQL_VAR_SAMP;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarStddevAggregateDescriptor.java
index 00d26c9..23b1255 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarStddevAggregateDescriptor.java
@@ -28,7 +28,7 @@
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = BuiltinFunctions.SCALAR_STDDEV;
+ public final static FunctionIdentifier FID = BuiltinFunctions.SCALAR_STDDEV_SAMP;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarVarAggregateDescriptor.java
index 73a5dda..2f600c2 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarVarAggregateDescriptor.java
@@ -28,7 +28,7 @@
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = BuiltinFunctions.SCALAR_VAR;
+ public final static FunctionIdentifier FID = BuiltinFunctions.SCALAR_VAR_SAMP;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSingleVariableStatisticsAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSingleVariableStatisticsAggregateFunction.java
index ec03472..3e0142d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSingleVariableStatisticsAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSingleVariableStatisticsAggregateFunction.java
@@ -53,12 +53,16 @@
*/
private static final int M1_FIELD_ID = 0;
private static final int M2_FIELD_ID = 1;
- private static final int COUNT_FIELD_ID = 2;
+ private static final int M3_FIELD_ID = 2;
+ private static final int M4_FIELD_ID = 3;
+ private static final int COUNT_FIELD_ID = 4;
private static final int M1_OFFSET = 0;
private static final int M2_OFFSET = 8;
- private static final int COUNT_OFFSET = 16;
- protected static final int AGG_TYPE_OFFSET = 24;
+ private static final int M3_OFFSET = 16;
+ private static final int M4_OFFSET = 24;
+ private static final int COUNT_OFFSET = 32;
+ protected static final int AGG_TYPE_OFFSET = 40;
private IPointable inputVal = new VoidPointable();
private IScalarEvaluator eval;
@@ -71,10 +75,16 @@
private DataOutput m1BytesOutput = new DataOutputStream(m1Bytes);
private ByteArrayAccessibleOutputStream m2Bytes = new ByteArrayAccessibleOutputStream();
private DataOutput m2BytesOutput = new DataOutputStream(m2Bytes);
+ private ByteArrayAccessibleOutputStream m3Bytes = new ByteArrayAccessibleOutputStream();
+ private DataOutput m3BytesOutput = new DataOutputStream(m3Bytes);
+ private ByteArrayAccessibleOutputStream m4Bytes = new ByteArrayAccessibleOutputStream();
+ private DataOutput m4BytesOutput = new DataOutputStream(m4Bytes);
private ByteArrayAccessibleOutputStream countBytes = new ByteArrayAccessibleOutputStream();
private DataOutput countBytesOutput = new DataOutputStream(countBytes);
private IScalarEvaluator evalM1 = new AccessibleByteArrayEval(m1Bytes);
private IScalarEvaluator evalM2 = new AccessibleByteArrayEval(m2Bytes);
+ private IScalarEvaluator evalM3 = new AccessibleByteArrayEval(m3Bytes);
+ private IScalarEvaluator evalM4 = new AccessibleByteArrayEval(m4Bytes);
private IScalarEvaluator evalCount = new AccessibleByteArrayEval(countBytes);
private ClosedRecordConstructorEval recordEval;
@@ -99,9 +109,11 @@
try {
state.writeDouble(0.0);
state.writeDouble(0.0);
+ state.writeDouble(0.0);
+ state.writeDouble(0.0);
state.writeLong(0L);
state.writeByte(ATypeTag.SERIALIZED_SYSTEM_NULL_TYPE_TAG);
- moments.set(0, 0, 0);
+ moments.set(0, 0, 0, 0, 0, getM3Flag(), getM4Flag());
} catch (IOException e) {
throw HyracksDataException.create(e);
}
@@ -120,6 +132,10 @@
protected abstract FunctionIdentifier getFunctionIdentifier();
+ protected abstract boolean getM3Flag();
+
+ protected abstract boolean getM4Flag();
+
protected void processDataValues(IFrameTupleReference tuple, byte[] state, int start, int len)
throws HyracksDataException {
if (skipStep(state, start)) {
@@ -131,8 +147,10 @@
double m1 = BufferSerDeUtil.getDouble(state, start + M1_OFFSET);
double m2 = BufferSerDeUtil.getDouble(state, start + M2_OFFSET);
+ double m3 = BufferSerDeUtil.getDouble(state, start + M3_OFFSET);
+ double m4 = BufferSerDeUtil.getDouble(state, start + M4_OFFSET);
long count = BufferSerDeUtil.getLong(state, start + COUNT_OFFSET);
- moments.set(m1, m2, count);
+ moments.set(m1, m2, m3, m4, count, getM3Flag(), getM4Flag());
ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]);
ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
@@ -183,6 +201,8 @@
}
BufferSerDeUtil.writeDouble(moments.getM1(), state, start + M1_OFFSET);
BufferSerDeUtil.writeDouble(moments.getM2(), state, start + M2_OFFSET);
+ BufferSerDeUtil.writeDouble(moments.getM3(), state, start + M3_OFFSET);
+ BufferSerDeUtil.writeDouble(moments.getM4(), state, start + M4_OFFSET);
BufferSerDeUtil.writeLong(moments.getCount(), state, start + COUNT_OFFSET);
state[start + AGG_TYPE_OFFSET] = aggType.serialize();
}
@@ -191,12 +211,18 @@
throws HyracksDataException {
double m1 = BufferSerDeUtil.getDouble(state, start + M1_OFFSET);
double m2 = BufferSerDeUtil.getDouble(state, start + M2_OFFSET);
+ double m3 = BufferSerDeUtil.getDouble(state, start + M3_OFFSET);
+ double m4 = BufferSerDeUtil.getDouble(state, start + M4_OFFSET);
long count = BufferSerDeUtil.getLong(state, start + COUNT_OFFSET);
ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
if (recordEval == null) {
- ARecordType recType = new ARecordType(null, new String[] { "m1", "m2", "count" },
- new IAType[] { BuiltinType.ADOUBLE, BuiltinType.ADOUBLE, BuiltinType.AINT64 }, false);
- recordEval = new ClosedRecordConstructorEval(recType, new IScalarEvaluator[] { evalM1, evalM2, evalCount });
+ ARecordType recType =
+ new ARecordType(null,
+ new String[] { "m1", "m2", "m3", "m4", "count" }, new IAType[] { BuiltinType.ADOUBLE,
+ BuiltinType.ADOUBLE, BuiltinType.ADOUBLE, BuiltinType.ADOUBLE, BuiltinType.AINT64 },
+ false);
+ recordEval = new ClosedRecordConstructorEval(recType,
+ new IScalarEvaluator[] { evalM1, evalM2, evalM3, evalM4, evalCount });
}
try {
@@ -214,6 +240,12 @@
m2Bytes.reset();
aDouble.setValue(m2);
doubleSerde.serialize(aDouble, m2BytesOutput);
+ m3Bytes.reset();
+ aDouble.setValue(m3);
+ doubleSerde.serialize(aDouble, m3BytesOutput);
+ m4Bytes.reset();
+ aDouble.setValue(m4);
+ doubleSerde.serialize(aDouble, m4BytesOutput);
countBytes.reset();
aInt64.setValue(count);
longSerde.serialize(aInt64, countBytesOutput);
@@ -232,8 +264,10 @@
}
double m1 = BufferSerDeUtil.getDouble(state, start + M1_OFFSET);
double m2 = BufferSerDeUtil.getDouble(state, start + M2_OFFSET);
+ double m3 = BufferSerDeUtil.getDouble(state, start + M3_OFFSET);
+ double m4 = BufferSerDeUtil.getDouble(state, start + M4_OFFSET);
long count = BufferSerDeUtil.getLong(state, start + COUNT_OFFSET);
- moments.set(m1, m2, count);
+ moments.set(m1, m2, m3, m4, count, getM3Flag(), getM4Flag());
eval.evaluate(tuple, inputVal);
byte[] serBytes = inputVal.getByteArray();
@@ -255,15 +289,23 @@
nullBitmapSize, false);
int offset2 = ARecordSerializerDeserializer.getFieldOffsetById(serBytes, offset, M2_FIELD_ID,
nullBitmapSize, false);
- int offset3 = ARecordSerializerDeserializer.getFieldOffsetById(serBytes, offset, COUNT_FIELD_ID,
+ int offset3 = ARecordSerializerDeserializer.getFieldOffsetById(serBytes, offset, M3_FIELD_ID,
+ nullBitmapSize, false);
+ int offset4 = ARecordSerializerDeserializer.getFieldOffsetById(serBytes, offset, M4_FIELD_ID,
+ nullBitmapSize, false);
+ int offset5 = ARecordSerializerDeserializer.getFieldOffsetById(serBytes, offset, COUNT_FIELD_ID,
nullBitmapSize, false);
double temp_m1 = ADoubleSerializerDeserializer.getDouble(serBytes, offset1);
double temp_m2 = ADoubleSerializerDeserializer.getDouble(serBytes, offset2);
- long temp_count = AInt64SerializerDeserializer.getLong(serBytes, offset3);
- moments.combine(temp_m1, temp_m2, temp_count);
+ double temp_m3 = ADoubleSerializerDeserializer.getDouble(serBytes, offset3);
+ double temp_m4 = ADoubleSerializerDeserializer.getDouble(serBytes, offset4);
+ long temp_count = AInt64SerializerDeserializer.getLong(serBytes, offset5);
+ moments.combine(temp_m1, temp_m2, temp_m3, temp_m4, temp_count);
BufferSerDeUtil.writeDouble(moments.getM1(), state, start + M1_OFFSET);
BufferSerDeUtil.writeDouble(moments.getM2(), state, start + M2_OFFSET);
+ BufferSerDeUtil.writeDouble(moments.getM3(), state, start + M3_OFFSET);
+ BufferSerDeUtil.writeDouble(moments.getM4(), state, start + M4_OFFSET);
BufferSerDeUtil.writeLong(moments.getCount(), state, start + COUNT_OFFSET);
state[start + AGG_TYPE_OFFSET] = aggType.serialize();
break;
@@ -306,6 +348,42 @@
}
}
+ protected void finishSkewFinalResults(byte[] state, int start, int len, DataOutput result)
+ throws HyracksDataException {
+ double m2 = BufferSerDeUtil.getDouble(state, start + M2_OFFSET);
+ double m3 = BufferSerDeUtil.getDouble(state, start + M3_OFFSET);
+ long count = BufferSerDeUtil.getLong(state, start + COUNT_OFFSET);
+ ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
+ try {
+ if (count <= 1 || aggType == ATypeTag.NULL || (m2 < Double.MIN_VALUE && m2 > -Double.MIN_VALUE)) {
+ nullSerde.serialize(ANull.NULL, result);
+ } else {
+ aDouble.setValue(Math.sqrt(count) * m3 / Math.pow(m2, 1.5));
+ doubleSerde.serialize(aDouble, result);
+ }
+ } catch (IOException e) {
+ throw HyracksDataException.create(e);
+ }
+ }
+
+ protected void finishKurtFinalResults(byte[] state, int start, int len, DataOutput result)
+ throws HyracksDataException {
+ double m2 = BufferSerDeUtil.getDouble(state, start + M2_OFFSET);
+ double m4 = BufferSerDeUtil.getDouble(state, start + M4_OFFSET);
+ long count = BufferSerDeUtil.getLong(state, start + COUNT_OFFSET);
+ ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
+ try {
+ if (count <= 1 || aggType == ATypeTag.NULL || (m2 < Double.MIN_VALUE && m2 > -Double.MIN_VALUE)) {
+ nullSerde.serialize(ANull.NULL, result);
+ } else {
+ aDouble.setValue(m4 * count / (m2 * m2 - 3));
+ doubleSerde.serialize(aDouble, result);
+ }
+ } catch (IOException e) {
+ throw HyracksDataException.create(e);
+ }
+ }
+
protected boolean skipStep(byte[] state, int start) {
return false;
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..831ae43
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalKurtosisAggregateDescriptor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableGlobalKurtosisAggregateDescriptor
+ extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableGlobalKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_GLOBAL_KURTOSIS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableGlobalKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalKurtosisAggregateFunction.java
new file mode 100644
index 0000000..f5c9dd3
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalKurtosisAggregateFunction.java
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableGlobalKurtosisAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableGlobalKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processPartialResults(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishKurtFinalResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ state[start + AGG_TYPE_OFFSET] = ATypeTag.SERIALIZED_NULL_TYPE_TAG;
+ }
+
+ @Override
+ protected boolean skipStep(byte[] state, int start) {
+ ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..291a1e9
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSkewnessAggregateDescriptor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableGlobalSkewnessAggregateDescriptor
+ extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableGlobalSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_GLOBAL_SKEWNESS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableGlobalSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSkewnessAggregateFunction.java
new file mode 100644
index 0000000..85047ed
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSkewnessAggregateFunction.java
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableGlobalSkewnessAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableGlobalSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processPartialResults(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishSkewFinalResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ state[start + AGG_TYPE_OFFSET] = ATypeTag.SERIALIZED_NULL_TYPE_TAG;
+ }
+
+ @Override
+ protected boolean skipStep(byte[] state, int start) {
+ ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..8e11bee
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlKurtosisAggregateDescriptor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableGlobalSqlKurtosisAggregateDescriptor
+ extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableGlobalSqlKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_GLOBAL_SQL_KURTOSIS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableGlobalSqlKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlKurtosisAggregateFunction.java
new file mode 100644
index 0000000..441290c
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlKurtosisAggregateFunction.java
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableGlobalSqlKurtosisAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableGlobalSqlKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processPartialResults(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishKurtFinalResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..a5590e4
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlSkewnessAggregateDescriptor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableGlobalSqlSkewnessAggregateDescriptor
+ extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableGlobalSqlSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_GLOBAL_SQL_SKEWNESS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableGlobalSqlSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlSkewnessAggregateFunction.java
new file mode 100644
index 0000000..0190a75
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlSkewnessAggregateFunction.java
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableGlobalSqlSkewnessAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableGlobalSqlSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processPartialResults(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishSkewFinalResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlStddevAggregateDescriptor.java
index b3270d9..c015b19 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlStddevAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_GLOBAL_SQL_STDDEV;
+ return BuiltinFunctions.SERIAL_GLOBAL_SQL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlStddevAggregateFunction.java
index 8bfd405..d9bdbca 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlStddevAggregateFunction.java
@@ -70,8 +70,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlVarAggregateDescriptor.java
index 878b8ce..9c8a1fb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlVarAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_GLOBAL_SQL_VAR;
+ return BuiltinFunctions.SERIAL_GLOBAL_SQL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlVarAggregateFunction.java
index c00fee3..740466a 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalSqlVarAggregateFunction.java
@@ -70,8 +70,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalStddevAggregateDescriptor.java
index ae78504..1ff0193 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalStddevAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_GLOBAL_STDDEV;
+ return BuiltinFunctions.SERIAL_GLOBAL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalStddevAggregateFunction.java
index b83762d..7560471 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalStddevAggregateFunction.java
@@ -79,8 +79,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalVarAggregateDescriptor.java
index f0130ec..da4de61 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalVarAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_GLOBAL_VAR;
+ return BuiltinFunctions.SERIAL_GLOBAL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalVarAggregateFunction.java
index 4f33735..4849735 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalVarAggregateFunction.java
@@ -79,8 +79,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..81d7c2c
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateKurtosisAggregateDescriptor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableIntermediateKurtosisAggregateDescriptor
+ extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableIntermediateKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_INTERMEDIATE_KURTOSIS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableIntermediateKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateKurtosisAggregateFunction.java
new file mode 100644
index 0000000..913fd26
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateKurtosisAggregateFunction.java
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableIntermediateKurtosisAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableIntermediateKurtosisAggregateFunction(IScalarEvaluatorFactory[] args,
+ IHyracksTaskContext context, SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processPartialResults(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ state[start + AGG_TYPE_OFFSET] = ATypeTag.SERIALIZED_NULL_TYPE_TAG;
+ }
+
+ @Override
+ protected boolean skipStep(byte[] state, int start) {
+ ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..54b1394
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSkewnessAggregateDescriptor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableIntermediateSkewnessAggregateDescriptor
+ extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableIntermediateSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_INTERMEDIATE_SKEWNESS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableIntermediateSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSkewnessAggregateFunction.java
new file mode 100644
index 0000000..7c74fdd
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSkewnessAggregateFunction.java
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableIntermediateSkewnessAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableIntermediateSkewnessAggregateFunction(IScalarEvaluatorFactory[] args,
+ IHyracksTaskContext context, SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processPartialResults(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ state[start + AGG_TYPE_OFFSET] = ATypeTag.SERIALIZED_NULL_TYPE_TAG;
+ }
+
+ @Override
+ protected boolean skipStep(byte[] state, int start) {
+ ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..6c6841b
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlKurtosisAggregateDescriptor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableIntermediateSqlKurtosisAggregateDescriptor
+ extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableIntermediateSqlKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_INTERMEDIATE_SQL_KURTOSIS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableIntermediateSqlKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlKurtosisAggregateFunction.java
new file mode 100644
index 0000000..a88e843
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlKurtosisAggregateFunction.java
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableIntermediateSqlKurtosisAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableIntermediateSqlKurtosisAggregateFunction(IScalarEvaluatorFactory[] args,
+ IHyracksTaskContext context, SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processPartialResults(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..8de8850
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlSkewnessAggregateDescriptor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableIntermediateSqlSkewnessAggregateDescriptor
+ extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableIntermediateSqlSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_INTERMEDIATE_SQL_SKEWNESS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableIntermediateSqlSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlSkewnessAggregateFunction.java
new file mode 100644
index 0000000..c1136da
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlSkewnessAggregateFunction.java
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableIntermediateSqlSkewnessAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableIntermediateSqlSkewnessAggregateFunction(IScalarEvaluatorFactory[] args,
+ IHyracksTaskContext context, SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processPartialResults(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlStddevAggregateDescriptor.java
index 094bc18..0bf76fb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlStddevAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_INTERMEDIATE_SQL_STDDEV;
+ return BuiltinFunctions.SERIAL_INTERMEDIATE_SQL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlStddevAggregateFunction.java
index 859cace..6bad42c 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlStddevAggregateFunction.java
@@ -64,7 +64,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlVarAggregateDescriptor.java
index b158e1a..918c998 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlVarAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_INTERMEDIATE_SQL_VAR;
+ return BuiltinFunctions.SERIAL_INTERMEDIATE_SQL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlVarAggregateFunction.java
index c14dd54..8d51f91 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlVarAggregateFunction.java
@@ -64,7 +64,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateStddevAggregateDescriptor.java
index 346241c..d06a86c 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateStddevAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_INTERMEDIATE_STDDEV;
+ return BuiltinFunctions.SERIAL_INTERMEDIATE_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateStddevAggregateFunction.java
index cea4625..def8dad 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateStddevAggregateFunction.java
@@ -73,8 +73,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateVarAggregateDescriptor.java
index 377c6d2..6d84a23 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateVarAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_INTERMEDIATE_VAR;
+ return BuiltinFunctions.SERIAL_INTERMEDIATE_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateVarAggregateFunction.java
index dab221e..b6d4db5 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateVarAggregateFunction.java
@@ -73,8 +73,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..219348a
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableKurtosisAggregateDescriptor.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableKurtosisAggregateDescriptor extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_KURTOSIS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) throws AlgebricksException {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableKurtosisAggregateFunction.java
new file mode 100644
index 0000000..7e7762f
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableKurtosisAggregateFunction.java
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableKurtosisAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processDataValues(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishKurtFinalResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finish(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ state[start + AGG_TYPE_OFFSET] = ATypeTag.SERIALIZED_NULL_TYPE_TAG;
+ }
+
+ @Override
+ protected boolean skipStep(byte[] state, int start) {
+ ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..9dc07a4
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalKurtosisAggregateDescriptor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableLocalKurtosisAggregateDescriptor
+ extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableLocalKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_LOCAL_KURTOSIS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableLocalKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalKurtosisAggregateFunction.java
new file mode 100644
index 0000000..ba4d2ae
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalKurtosisAggregateFunction.java
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableLocalKurtosisAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableLocalKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processDataValues(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finish(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ state[start + AGG_TYPE_OFFSET] = ATypeTag.SERIALIZED_NULL_TYPE_TAG;
+ }
+
+ @Override
+ protected boolean skipStep(byte[] state, int start) {
+ ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..666753e
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSkewnessAggregateDescriptor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableLocalSkewnessAggregateDescriptor
+ extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableLocalSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_LOCAL_SKEWNESS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableLocalSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSkewnessAggregateFunction.java
new file mode 100644
index 0000000..71a0dde
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSkewnessAggregateFunction.java
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableLocalSkewnessAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableLocalSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processDataValues(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finish(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ state[start + AGG_TYPE_OFFSET] = ATypeTag.SERIALIZED_NULL_TYPE_TAG;
+ }
+
+ @Override
+ protected boolean skipStep(byte[] state, int start) {
+ ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..782013d
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlKurtosisAggregateDescriptor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableLocalSqlKurtosisAggregateDescriptor
+ extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableLocalSqlKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_LOCAL_SQL_KURTOSIS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableLocalSqlKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlKurtosisAggregateFunction.java
new file mode 100644
index 0000000..95692e4
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlKurtosisAggregateFunction.java
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableLocalSqlKurtosisAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableLocalSqlKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processDataValues(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finish(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..c40d383
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlSkewnessAggregateDescriptor.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableLocalSqlSkewnessAggregateDescriptor
+ extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableLocalSqlSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_LOCAL_SQL_SKEWNESS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableLocalSqlSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlSkewnessAggregateFunction.java
new file mode 100644
index 0000000..e209249
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlSkewnessAggregateFunction.java
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableLocalSqlSkewnessAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableLocalSqlSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processDataValues(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishPartialResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finish(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlStddevAggregateDescriptor.java
index 41b64ed..21e6ba1 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlStddevAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_LOCAL_SQL_STDDEV;
+ return BuiltinFunctions.SERIAL_LOCAL_SQL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlStddevAggregateFunction.java
index 6215511..8e9e2e2 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlStddevAggregateFunction.java
@@ -64,7 +64,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlVarAggregateDescriptor.java
index 2b0c565..749237d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlVarAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_LOCAL_SQL_VAR;
+ return BuiltinFunctions.SERIAL_LOCAL_SQL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlVarAggregateFunction.java
index 675d319..c5be51d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlVarAggregateFunction.java
@@ -64,7 +64,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalStddevAggregateDescriptor.java
index b8f36dd..577bf87 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalStddevAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_LOCAL_STDDEV;
+ return BuiltinFunctions.SERIAL_LOCAL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalStddevAggregateFunction.java
index bd5a80c..54a3a46 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalStddevAggregateFunction.java
@@ -73,7 +73,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalVarAggregateDescriptor.java
index 7337794..f7a44c8 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalVarAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_LOCAL_VAR;
+ return BuiltinFunctions.SERIAL_LOCAL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalVarAggregateFunction.java
index 04ceef3..9b1f58f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalVarAggregateFunction.java
@@ -73,7 +73,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..97feaab
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSkewnessAggregateDescriptor.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableSkewnessAggregateDescriptor extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_SKEWNESS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) throws AlgebricksException {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSkewnessAggregateFunction.java
new file mode 100644
index 0000000..ee2ce39
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSkewnessAggregateFunction.java
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableSkewnessAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processDataValues(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishSkewFinalResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finish(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ state[start + AGG_TYPE_OFFSET] = ATypeTag.SERIALIZED_NULL_TYPE_TAG;
+ }
+
+ @Override
+ protected boolean skipStep(byte[] state, int start) {
+ ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..26e7793
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlKurtosisAggregateDescriptor.java
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableSqlKurtosisAggregateDescriptor extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableSqlKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_SQL_KURTOSIS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableSqlKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlKurtosisAggregateFunction.java
new file mode 100644
index 0000000..b30bc42
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlKurtosisAggregateFunction.java
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableSqlKurtosisAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableSqlKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processDataValues(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishKurtFinalResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finish(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..a76ed62
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSkewnessAggregateDescriptor.java
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SerializableSqlSkewnessAggregateDescriptor extends AbstractSerializableAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SerializableSqlSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SERIAL_SQL_SKEWNESS;
+ }
+
+ @Override
+ public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
+ final IScalarEvaluatorFactory[] args) {
+ return new ISerializedAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SerializableSqlSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSkewnessAggregateFunction.java
new file mode 100644
index 0000000..9828ffe
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSkewnessAggregateFunction.java
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.runtime.aggregates.serializable.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+import java.io.DataOutput;
+
+public class SerializableSqlSkewnessAggregateFunction
+ extends AbstractSerializableSingleVariableStatisticsAggregateFunction {
+
+ public SerializableSqlSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
+ processDataValues(tuple, state, start, len);
+ }
+
+ @Override
+ public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finishSkewFinalResults(state, start, len, result);
+ }
+
+ @Override
+ public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
+ finish(state, start, len, result);
+ }
+
+ @Override
+ protected void processNull(byte[] state, int start) {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlStddevAggregateDescriptor.java
index a046242..b678056 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlStddevAggregateDescriptor.java
@@ -41,7 +41,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_SQL_STDDEV;
+ return BuiltinFunctions.SERIAL_SQL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlStddevAggregateFunction.java
index 299aa16..df87ad4 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlStddevAggregateFunction.java
@@ -69,8 +69,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlVarAggregateDescriptor.java
index 870b28c..5fb9004 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlVarAggregateDescriptor.java
@@ -41,7 +41,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_SQL_VAR;
+ return BuiltinFunctions.SERIAL_SQL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlVarAggregateFunction.java
index decdc13..37c9b41 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlVarAggregateFunction.java
@@ -68,8 +68,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableStddevAggregateDescriptor.java
index 30a0d1e..d4caf76 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableStddevAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_STDDEV;
+ return BuiltinFunctions.SERIAL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableStddevAggregateFunction.java
index c9df585..eee69a8 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableStddevAggregateFunction.java
@@ -77,8 +77,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableVarAggregateDescriptor.java
index bcb79c1..0419f69 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableVarAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SERIAL_VAR;
+ return BuiltinFunctions.SERIAL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableVarAggregateFunction.java
index 3e8d275..d897135 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableVarAggregateFunction.java
@@ -77,8 +77,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSingleVarStatisticsAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSingleVarStatisticsAggregateFunction.java
index e8cbca7..652af00 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSingleVarStatisticsAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSingleVarStatisticsAggregateFunction.java
@@ -53,7 +53,9 @@
*/
private static final int M1_FIELD_ID = 0;
private static final int M2_FIELD_ID = 1;
- private static final int COUNT_FIELD_ID = 2;
+ private static final int M3_FIELD_ID = 2;
+ private static final int M4_FIELD_ID = 3;
+ private static final int COUNT_FIELD_ID = 4;
private final ARecordType recType;
@@ -70,10 +72,16 @@
private DataOutput m1BytesOutput = new DataOutputStream(m1Bytes);
private ByteArrayAccessibleOutputStream m2Bytes = new ByteArrayAccessibleOutputStream();
private DataOutput m2BytesOutput = new DataOutputStream(m2Bytes);
+ private ByteArrayAccessibleOutputStream m3Bytes = new ByteArrayAccessibleOutputStream();
+ private DataOutput m3BytesOutput = new DataOutputStream(m3Bytes);
+ private ByteArrayAccessibleOutputStream m4Bytes = new ByteArrayAccessibleOutputStream();
+ private DataOutput m4BytesOutput = new DataOutputStream(m4Bytes);
private ByteArrayAccessibleOutputStream countBytes = new ByteArrayAccessibleOutputStream();
private DataOutput countBytesOutput = new DataOutputStream(countBytes);
private IScalarEvaluator evalM1 = new AccessibleByteArrayEval(m1Bytes);
private IScalarEvaluator evalM2 = new AccessibleByteArrayEval(m2Bytes);
+ private IScalarEvaluator evalM3 = new AccessibleByteArrayEval(m3Bytes);
+ private IScalarEvaluator evalM4 = new AccessibleByteArrayEval(m4Bytes);
private IScalarEvaluator evalCount = new AccessibleByteArrayEval(countBytes);
private ClosedRecordConstructorEval recordEval;
@@ -91,15 +99,19 @@
SourceLocation sourceLoc) throws HyracksDataException {
super(sourceLoc);
eval = args[0].createScalarEvaluator(context);
- recType = new ARecordType(null, new String[] { "m1", "m2", "count" },
- new IAType[] { BuiltinType.ADOUBLE, BuiltinType.ADOUBLE, BuiltinType.AINT64 }, false);
- recordEval = new ClosedRecordConstructorEval(recType, new IScalarEvaluator[] { evalM1, evalM2, evalCount });
+ recType =
+ new ARecordType(null,
+ new String[] { "m1", "m2", "m3", "m4", "count" }, new IAType[] { BuiltinType.ADOUBLE,
+ BuiltinType.ADOUBLE, BuiltinType.ADOUBLE, BuiltinType.ADOUBLE, BuiltinType.AINT64 },
+ false);
+ recordEval = new ClosedRecordConstructorEval(recType,
+ new IScalarEvaluator[] { evalM1, evalM2, evalM3, evalM4, evalCount });
}
@Override
public void init() throws HyracksDataException {
aggType = ATypeTag.SYSTEM_NULL;
- moments.set(0, 0, 0);
+ moments.set(0, 0, 0, 0, 0, getM3Flag(), getM4Flag());
}
@Override
@@ -115,6 +127,10 @@
protected abstract void processNull();
+ protected abstract boolean getM3Flag();
+
+ protected abstract boolean getM4Flag();
+
protected void processDataValues(IFrameTupleReference tuple) throws HyracksDataException {
if (skipStep()) {
return;
@@ -191,6 +207,12 @@
m2Bytes.reset();
aDouble.setValue(moments.getM2());
doubleSerde.serialize(aDouble, m2BytesOutput);
+ m3Bytes.reset();
+ aDouble.setValue(moments.getM3());
+ doubleSerde.serialize(aDouble, m3BytesOutput);
+ m4Bytes.reset();
+ aDouble.setValue(moments.getM4());
+ doubleSerde.serialize(aDouble, m4BytesOutput);
countBytes.reset();
aInt64.setValue(moments.getCount());
longSerde.serialize(aInt64, countBytesOutput);
@@ -225,12 +247,18 @@
nullBitmapSize, false);
int offset2 = ARecordSerializerDeserializer.getFieldOffsetById(serBytes, offset, M2_FIELD_ID,
nullBitmapSize, false);
- int offset3 = ARecordSerializerDeserializer.getFieldOffsetById(serBytes, offset, COUNT_FIELD_ID,
+ int offset3 = ARecordSerializerDeserializer.getFieldOffsetById(serBytes, offset, M3_FIELD_ID,
+ nullBitmapSize, false);
+ int offset4 = ARecordSerializerDeserializer.getFieldOffsetById(serBytes, offset, M4_FIELD_ID,
+ nullBitmapSize, false);
+ int offset5 = ARecordSerializerDeserializer.getFieldOffsetById(serBytes, offset, COUNT_FIELD_ID,
nullBitmapSize, false);
double temp_m1 = ADoubleSerializerDeserializer.getDouble(serBytes, offset1);
double temp_m2 = ADoubleSerializerDeserializer.getDouble(serBytes, offset2);
- long temp_count = AInt64SerializerDeserializer.getLong(serBytes, offset3);
- moments.combine(temp_m1, temp_m2, temp_count);
+ double temp_m3 = ADoubleSerializerDeserializer.getDouble(serBytes, offset3);
+ double temp_m4 = ADoubleSerializerDeserializer.getDouble(serBytes, offset4);
+ long temp_count = AInt64SerializerDeserializer.getLong(serBytes, offset5);
+ moments.combine(temp_m1, temp_m2, temp_m3, temp_m4, temp_count);
break;
default:
throw new UnsupportedItemTypeException(sourceLoc, "intermediate/global-single-var-statistics",
@@ -268,6 +296,40 @@
result.set(resultStorage);
}
+ protected void finishSkewFinalResults(IPointable result) throws HyracksDataException {
+ resultStorage.reset();
+ try {
+ long count = moments.getCount();
+ double m2 = moments.getM2();
+ if (count <= 2 || aggType == ATypeTag.NULL || (m2 < Double.MIN_VALUE && m2 > -Double.MIN_VALUE)) {
+ nullSerde.serialize(ANull.NULL, resultStorage.getDataOutput());
+ } else {
+ aDouble.setValue(Math.sqrt(count) * moments.getM3() / Math.pow(m2, 1.5));
+ doubleSerde.serialize(aDouble, resultStorage.getDataOutput());
+ }
+ } catch (IOException e) {
+ throw HyracksDataException.create(e);
+ }
+ result.set(resultStorage);
+ }
+
+ protected void finishKurtFinalResults(IPointable result) throws HyracksDataException {
+ resultStorage.reset();
+ try {
+ long count = moments.getCount();
+ double m2 = moments.getM2();
+ if (count <= 2 || aggType == ATypeTag.NULL || (m2 < Double.MIN_VALUE && m2 > -Double.MIN_VALUE)) {
+ nullSerde.serialize(ANull.NULL, resultStorage.getDataOutput());
+ } else {
+ aDouble.setValue(moments.getM4() * count / (m2 * m2) - 3);
+ doubleSerde.serialize(aDouble, resultStorage.getDataOutput());
+ }
+ } catch (IOException e) {
+ throw HyracksDataException.create(e);
+ }
+ result.set(resultStorage);
+ }
+
protected boolean skipStep() {
return false;
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..4f15fa0
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalKurtosisAggregateDescriptor.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class GlobalKurtosisAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new GlobalKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.GLOBAL_KURTOSIS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new GlobalKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalKurtosisAggregateFunction.java
new file mode 100644
index 0000000..4cf4481
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalKurtosisAggregateFunction.java
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class GlobalKurtosisAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public GlobalKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processPartialResults(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishKurtFinalResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ protected void processNull() {
+ aggType = ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean skipStep() {
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..fa8b699
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSkewnessAggregateDescriptor.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class GlobalSkewnessAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new GlobalSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.GLOBAL_SKEWNESS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new GlobalSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSkewnessAggregateFunction.java
new file mode 100644
index 0000000..9813507
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSkewnessAggregateFunction.java
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class GlobalSkewnessAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public GlobalSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processPartialResults(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishSkewFinalResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ protected void processNull() {
+ aggType = ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean skipStep() {
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..c38da4a
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlKurtosisAggregateDescriptor.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class GlobalSqlKurtosisAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new GlobalSqlKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.GLOBAL_SQL_KURTOSIS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new GlobalSqlKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlKurtosisAggregateFunction.java
new file mode 100644
index 0000000..0364d28
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlKurtosisAggregateFunction.java
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class GlobalSqlKurtosisAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public GlobalSqlKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processPartialResults(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishKurtFinalResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ protected void processNull() {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..f656cb9
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlSkewnessAggregateDescriptor.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class GlobalSqlSkewnessAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new GlobalSqlSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.GLOBAL_SQL_SKEWNESS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new GlobalSqlSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlSkewnessAggregateFunction.java
new file mode 100644
index 0000000..cf404fe
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlSkewnessAggregateFunction.java
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class GlobalSqlSkewnessAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public GlobalSqlSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processPartialResults(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishSkewFinalResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ protected void processNull() {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlStddevAggregateDescriptor.java
index 4a8607a..422b83e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlStddevAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.GLOBAL_SQL_STDDEV;
+ return BuiltinFunctions.GLOBAL_SQL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlStddevAggregateFunction.java
index 8ae5796..60b0aae 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlStddevAggregateFunction.java
@@ -68,8 +68,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlVarAggregateDescriptor.java
index f1ead82..7f1182a 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlVarAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.GLOBAL_SQL_VAR;
+ return BuiltinFunctions.GLOBAL_SQL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlVarAggregateFunction.java
index a999c33..da09384 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlVarAggregateFunction.java
@@ -68,8 +68,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalStddevAggregateDescriptor.java
index 015abb5..20a9e69 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalStddevAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.GLOBAL_STDDEV;
+ return BuiltinFunctions.GLOBAL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalStddevAggregateFunction.java
index e459b6d..394ed29 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalStddevAggregateFunction.java
@@ -75,8 +75,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalVarAggregateDescriptor.java
index 83b7b87..3401e03 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalVarAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.GLOBAL_VAR;
+ return BuiltinFunctions.GLOBAL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalVarAggregateFunction.java
index 9ee5008..535c243 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalVarAggregateFunction.java
@@ -75,8 +75,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..42ca6f7
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateKurtosisAggregateDescriptor.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class IntermediateKurtosisAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new IntermediateKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.INTERMEDIATE_KURTOSIS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new IntermediateKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateKurtosisAggregateFunction.java
new file mode 100644
index 0000000..0d26408
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateKurtosisAggregateFunction.java
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class IntermediateKurtosisAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public IntermediateKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processPartialResults(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ protected void processNull() {
+ aggType = ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean skipStep() {
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..1f9338f
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSkewnessAggregateDescriptor.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class IntermediateSkewnessAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new IntermediateSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.INTERMEDIATE_SKEWNESS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new IntermediateSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSkewnessAggregateFunction.java
new file mode 100644
index 0000000..bf8bcaf
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSkewnessAggregateFunction.java
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class IntermediateSkewnessAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public IntermediateSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processPartialResults(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ protected void processNull() {
+ aggType = ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean skipStep() {
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..95c8ef0
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlKurtosisAggregateDescriptor.java
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class IntermediateSqlKurtosisAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new IntermediateSqlKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.INTERMEDIATE_SQL_KURTOSIS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new IntermediateSqlKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlKurtosisAggregateFunction.java
new file mode 100644
index 0000000..b0aa52d
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlKurtosisAggregateFunction.java
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class IntermediateSqlKurtosisAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public IntermediateSqlKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processPartialResults(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ protected void processNull() {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..d238b25
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlSkewnessAggregateDescriptor.java
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class IntermediateSqlSkewnessAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new IntermediateSqlSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.INTERMEDIATE_SQL_SKEWNESS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new IntermediateSqlSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlSkewnessAggregateFunction.java
new file mode 100644
index 0000000..6891521
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlSkewnessAggregateFunction.java
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class IntermediateSqlSkewnessAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public IntermediateSqlSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processPartialResults(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ protected void processNull() {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlStddevAggregateDescriptor.java
index 6d979da..5319044 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlStddevAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.INTERMEDIATE_SQL_STDDEV;
+ return BuiltinFunctions.INTERMEDIATE_SQL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlStddevAggregateFunction.java
index 5711d0a..4f8af15 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlStddevAggregateFunction.java
@@ -62,7 +62,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlVarAggregateDescriptor.java
index 8f01239..c0a8072 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlVarAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.INTERMEDIATE_SQL_VAR;
+ return BuiltinFunctions.INTERMEDIATE_SQL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlVarAggregateFunction.java
index efcb334..ada2873 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateSqlVarAggregateFunction.java
@@ -62,7 +62,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateStddevAggregateDescriptor.java
index 34248d1..dcb9ce5 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateStddevAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.INTERMEDIATE_STDDEV;
+ return BuiltinFunctions.INTERMEDIATE_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateStddevAggregateFunction.java
index 77b5bf0..69c06b4 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateStddevAggregateFunction.java
@@ -70,8 +70,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateVarAggregateDescriptor.java
index 6da3083..0965352 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateVarAggregateDescriptor.java
@@ -43,7 +43,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.INTERMEDIATE_VAR;
+ return BuiltinFunctions.INTERMEDIATE_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateVarAggregateFunction.java
index 214ae47..ee5f65f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateVarAggregateFunction.java
@@ -69,8 +69,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/KurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/KurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..bcea554
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/KurtosisAggregateDescriptor.java
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class KurtosisAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new KurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new KurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/KurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/KurtosisAggregateFunction.java
new file mode 100644
index 0000000..e2e3cbd
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/KurtosisAggregateFunction.java
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class KurtosisAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public KurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processDataValues(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishKurtFinalResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finish(result);
+ }
+
+ @Override
+ protected void processNull() {
+ aggType = ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean skipStep() {
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..77dd321
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalKurtosisAggregateDescriptor.java
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class LocalKurtosisAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new LocalKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.LOCAL_KURTOSIS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new LocalKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalKurtosisAggregateFunction.java
new file mode 100644
index 0000000..9fd44b0
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalKurtosisAggregateFunction.java
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class LocalKurtosisAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public LocalKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processDataValues(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finish(result);
+ }
+
+ @Override
+ protected void processNull() {
+ aggType = ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean skipStep() {
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..39df55d
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSkewnessAggregateDescriptor.java
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class LocalSkewnessAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new LocalSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.LOCAL_SKEWNESS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new LocalSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSkewnessAggregateFunction.java
new file mode 100644
index 0000000..7904a0a
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSkewnessAggregateFunction.java
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class LocalSkewnessAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public LocalSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processDataValues(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finish(result);
+ }
+
+ @Override
+ protected void processNull() {
+ aggType = ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean skipStep() {
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..69cfca4
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlKurtosisAggregateDescriptor.java
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class LocalSqlKurtosisAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new LocalSqlKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.LOCAL_SQL_KURTOSIS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new LocalSqlKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlKurtosisAggregateFunction.java
new file mode 100644
index 0000000..5006f73
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlKurtosisAggregateFunction.java
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class LocalSqlKurtosisAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public LocalSqlKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processDataValues(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finish(result);
+ }
+
+ @Override
+ protected void processNull() {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..e2691ab
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlSkewnessAggregateDescriptor.java
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class LocalSqlSkewnessAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new LocalSqlSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.LOCAL_SQL_SKEWNESS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new LocalSqlSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlSkewnessAggregateFunction.java
new file mode 100644
index 0000000..504d506
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlSkewnessAggregateFunction.java
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class LocalSqlSkewnessAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public LocalSqlSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processDataValues(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finish(result);
+ }
+
+ @Override
+ protected void processNull() {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlStddevAggregateDescriptor.java
index 34d2e72..61df257 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlStddevAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.LOCAL_SQL_STDDEV;
+ return BuiltinFunctions.LOCAL_SQL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlStddevAggregateFunction.java
index 205d931..da02806 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlStddevAggregateFunction.java
@@ -62,7 +62,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlVarAggregateDescriptor.java
index 035abbb..3396632 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlVarAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.LOCAL_SQL_VAR;
+ return BuiltinFunctions.LOCAL_SQL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlVarAggregateFunction.java
index 85fd011..5e39502 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSqlVarAggregateFunction.java
@@ -62,7 +62,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalStddevAggregateDescriptor.java
index 9cd6b5d..7319c54 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalStddevAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.LOCAL_STDDEV;
+ return BuiltinFunctions.LOCAL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalStddevAggregateFunction.java
index c9cf9a7..ff217e6 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalStddevAggregateFunction.java
@@ -69,8 +69,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalVarAggregateDescriptor.java
index f25364a..916d3a4 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalVarAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.LOCAL_VAR;
+ return BuiltinFunctions.LOCAL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalVarAggregateFunction.java
index 41ec26d..c2a3208 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalVarAggregateFunction.java
@@ -69,8 +69,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..988d971
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SkewnessAggregateDescriptor.java
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SkewnessAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SkewnessAggregateFunction.java
new file mode 100644
index 0000000..742f4aa
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SkewnessAggregateFunction.java
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class SkewnessAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public SkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processDataValues(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishSkewFinalResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finish(result);
+ }
+
+ @Override
+ protected void processNull() {
+ aggType = ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean skipStep() {
+ return aggType == ATypeTag.NULL;
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlKurtosisAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlKurtosisAggregateDescriptor.java
new file mode 100644
index 0000000..de063aa
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlKurtosisAggregateDescriptor.java
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SqlKurtosisAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SqlKurtosisAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SQL_KURTOSIS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SqlKurtosisAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlKurtosisAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlKurtosisAggregateFunction.java
new file mode 100644
index 0000000..ffbfcd1
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlKurtosisAggregateFunction.java
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class SqlKurtosisAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public SqlKurtosisAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processDataValues(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishKurtFinalResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ protected void processNull() {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return true;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.KURTOSIS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlSkewnessAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlSkewnessAggregateDescriptor.java
new file mode 100644
index 0000000..665fb11
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlSkewnessAggregateDescriptor.java
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class SqlSkewnessAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
+
+ private static final long serialVersionUID = 1L;
+ public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+ @Override
+ public IFunctionDescriptor createFunctionDescriptor() {
+ return new SqlSkewnessAggregateDescriptor();
+ }
+ };
+
+ @Override
+ public FunctionIdentifier getIdentifier() {
+ return BuiltinFunctions.SQL_SKEWNESS;
+ }
+
+ @Override
+ public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+ return new IAggregateEvaluatorFactory() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
+ throws HyracksDataException {
+ return new SqlSkewnessAggregateFunction(args, ctx, sourceLoc);
+ }
+ };
+ }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlSkewnessAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlSkewnessAggregateFunction.java
new file mode 100644
index 0000000..7ee1d8c
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlSkewnessAggregateFunction.java
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+package org.apache.asterix.runtime.aggregates.std;
+
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class SqlSkewnessAggregateFunction extends AbstractSingleVarStatisticsAggregateFunction {
+
+ public SqlSkewnessAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context,
+ SourceLocation sourceLoc) throws HyracksDataException {
+ super(args, context, sourceLoc);
+ }
+
+ @Override
+ public void step(IFrameTupleReference tuple) throws HyracksDataException {
+ processDataValues(tuple);
+ }
+
+ @Override
+ public void finish(IPointable result) throws HyracksDataException {
+ finishSkewFinalResults(result);
+ }
+
+ @Override
+ public void finishPartial(IPointable result) throws HyracksDataException {
+ finishPartialResults(result);
+ }
+
+ @Override
+ protected void processNull() {
+ }
+
+ @Override
+ protected boolean getM3Flag() {
+ return true;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
+
+ @Override
+ protected FunctionIdentifier getFunctionIdentifier() {
+ return BuiltinFunctions.SKEWNESS;
+ }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlStddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlStddevAggregateDescriptor.java
index 0124aec..91a84e6 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlStddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlStddevAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SQL_STDDEV;
+ return BuiltinFunctions.SQL_STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlStddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlStddevAggregateFunction.java
index 97807a0..39b0c9d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlStddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlStddevAggregateFunction.java
@@ -68,7 +68,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlVarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlVarAggregateDescriptor.java
index aaa4863..6857e59 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlVarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlVarAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.SQL_VAR;
+ return BuiltinFunctions.SQL_VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlVarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlVarAggregateFunction.java
index e1c8793..e25b546 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlVarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlVarAggregateFunction.java
@@ -68,7 +68,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/StddevAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/StddevAggregateDescriptor.java
index 07dcbd0..86ddb59 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/StddevAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/StddevAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/StddevAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/StddevAggregateFunction.java
index 553562e..be743d8 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/StddevAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/StddevAggregateFunction.java
@@ -75,8 +75,17 @@
if (isPop) {
return BuiltinFunctions.STDDEV_POP;
} else {
- return BuiltinFunctions.STDDEV;
+ return BuiltinFunctions.STDDEV_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/VarAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/VarAggregateDescriptor.java
index 5e36fba..2592420 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/VarAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/VarAggregateDescriptor.java
@@ -42,7 +42,7 @@
@Override
public FunctionIdentifier getIdentifier() {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
@Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/VarAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/VarAggregateFunction.java
index aed39ee..4c9f55f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/VarAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/VarAggregateFunction.java
@@ -75,8 +75,17 @@
if (isPop) {
return BuiltinFunctions.VAR_POP;
} else {
- return BuiltinFunctions.VAR;
+ return BuiltinFunctions.VAR_SAMP;
}
}
+ @Override
+ protected boolean getM3Flag() {
+ return false;
+ }
+
+ @Override
+ protected boolean getM4Flag() {
+ return false;
+ }
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/utils/SingleVarFunctionsUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/utils/SingleVarFunctionsUtil.java
index 3ce6a39..7528c59 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/utils/SingleVarFunctionsUtil.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/utils/SingleVarFunctionsUtil.java
@@ -29,7 +29,11 @@
public class SingleVarFunctionsUtil {
private double m1;
private double m2;
+ private double m3;
+ private double m4;
private long count;
+ private boolean m3Flag;
+ private boolean m4Flag;
public SingleVarFunctionsUtil() {
m1 = 0.0;
@@ -42,18 +46,27 @@
*
* @param moment1 first moment (mean) of the data sample
* @param moment2 second moment of the data sample
+ * @param moment3 third moment of the data sample
+ * @param moment4 fourth moment of the data sample
* @param cnt number of samples
+ * @param moment3Flag boolean flag to update the value of the third moment when adding values to the data sample
+ * @param moment4Flag boolean flag to update the value of the fourth moment when adding values to the data sample
*/
- public void set(double moment1, double moment2, long cnt) {
+ public void set(double moment1, double moment2, double moment3, double moment4, long cnt, boolean moment3Flag,
+ boolean moment4Flag) {
m1 = moment1;
m2 = moment2;
+ m3 = moment3;
+ m4 = moment4;
count = cnt;
+ m3Flag = moment3Flag;
+ m4Flag = moment4Flag;
}
/**
* Update the central moments after adding val to your data sample
*
- * @param val value to add to the data sample
+ * @param val value to add to the data sample
*/
public void push(double val) {
count++;
@@ -61,6 +74,13 @@
double delta_n = delta / count;
double term1 = delta * delta_n * (count - 1);
m1 += delta / count;
+ if (m4Flag) {
+ m4 += term1 * delta_n * delta_n * (count * count - 3 * count + 3);
+ m4 += 6 * delta_n * delta_n * m2 - 4 * delta_n * m3;
+ }
+ if (m3Flag) {
+ m3 += term1 * delta_n * (count - 2) - 3 * delta_n * m2;
+ }
m2 += term1;
}
@@ -69,11 +89,24 @@
*
* @param moment1 first moment (mean) of the data sample
* @param moment2 second moment of the data sample
+ * @param moment3 third moment of the data sample
+ * @param moment4 fourth moment of the data sample
* @param cnt number of samples
*/
- public void combine(double moment1, double moment2, long cnt) {
+ public void combine(double moment1, double moment2, double moment3, double moment4, long cnt) {
double delta = moment1 - m1;
long combined_count = count + cnt;
+ if (m3Flag) {
+ double delta3 = delta * delta * delta;
+ if (m4Flag) {
+ m4 += moment4 + delta3 * delta * count * cnt * (count * count - count * cnt + cnt * cnt)
+ / (combined_count * combined_count * combined_count);
+ m4 += 6 * delta * delta * (count * count * moment2 + cnt * cnt * m2) / (combined_count * combined_count)
+ + 4 * delta * (count * moment3 - cnt * m3) / combined_count;
+ }
+ m3 += moment3 + delta3 * count * cnt * (count - cnt) / (combined_count * combined_count);
+ m3 += 3 * delta * (count * moment2 - cnt * m2) / combined_count;
+ }
m1 = (count * m1 + cnt * moment1) / combined_count;
m2 += moment2 + delta * delta * count * cnt / combined_count;
count = combined_count;
@@ -87,6 +120,14 @@
return m2;
}
+ public double getM3() {
+ return m3;
+ }
+
+ public double getM4() {
+ return m4;
+ }
+
public long getCount() {
return count;
}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/functions/FunctionCollection.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/functions/FunctionCollection.java
index 3d87d75..71305ca 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/functions/FunctionCollection.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/functions/FunctionCollection.java
@@ -34,12 +34,16 @@
import org.apache.asterix.runtime.aggregates.collections.LocalFirstElementAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.scalar.ScalarAvgAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.scalar.ScalarCountAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.scalar.ScalarKurtosisAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.scalar.ScalarMaxAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.scalar.ScalarMinAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.scalar.ScalarSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.scalar.ScalarSqlAvgAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.scalar.ScalarSqlCountAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.scalar.ScalarSqlKurtosisAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.scalar.ScalarSqlMaxAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.scalar.ScalarSqlMinAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.scalar.ScalarSqlSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.scalar.ScalarSqlStddevAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.scalar.ScalarSqlStddevPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.scalar.ScalarSqlSumAggregateDescriptor;
@@ -53,7 +57,11 @@
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableAvgAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableCountAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableGlobalAvgAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableGlobalKurtosisAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableGlobalSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableGlobalSqlAvgAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableGlobalSqlKurtosisAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableGlobalSqlSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableGlobalSqlStddevAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableGlobalSqlStddevPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableGlobalSqlSumAggregateDescriptor;
@@ -65,7 +73,11 @@
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableGlobalVarAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableGlobalVarPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableIntermediateAvgAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableIntermediateKurtosisAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableIntermediateSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableIntermediateSqlAvgAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableIntermediateSqlKurtosisAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableIntermediateSqlSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableIntermediateSqlStddevAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableIntermediateSqlStddevPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableIntermediateSqlSumAggregateDescriptor;
@@ -76,8 +88,13 @@
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableIntermediateSumAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableIntermediateVarAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableIntermediateVarPopAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableKurtosisAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableLocalAvgAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableLocalKurtosisAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableLocalSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableLocalSqlAvgAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableLocalSqlKurtosisAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableLocalSqlSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableLocalSqlStddevAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableLocalSqlStddevPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableLocalStddevAggregateDescriptor;
@@ -88,8 +105,11 @@
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableLocalSqlVarPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableLocalVarAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableLocalVarPopAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableSqlAvgAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableSqlCountAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableSqlKurtosisAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.serializable.std.SerializableSqlSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableSqlStddevAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableSqlStddevPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.serializable.std.SerializableSqlSumAggregateDescriptor;
@@ -108,7 +128,11 @@
import org.apache.asterix.runtime.aggregates.std.IntermediateSqlSumAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.IntermediateSumAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.RangeMapAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.GlobalKurtosisAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.GlobalSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.GlobalSqlAvgAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.GlobalSqlKurtosisAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.GlobalSqlSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.GlobalSqlStddevAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.GlobalSqlStddevPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.GlobalStddevAggregateDescriptor;
@@ -118,7 +142,11 @@
import org.apache.asterix.runtime.aggregates.std.GlobalVarAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.GlobalVarPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.IntermediateAvgAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.IntermediateKurtosisAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.IntermediateSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.IntermediateSqlAvgAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.IntermediateSqlKurtosisAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.IntermediateSqlSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.IntermediateSqlStddevAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.IntermediateSqlStddevPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.IntermediateStddevAggregateDescriptor;
@@ -127,13 +155,18 @@
import org.apache.asterix.runtime.aggregates.std.IntermediateSqlVarPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.IntermediateVarAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.IntermediateVarPopAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.KurtosisAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.LocalAvgAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.LocalKurtosisAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.LocalMaxAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.LocalMinAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.LocalSamplingAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.LocalSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.LocalSqlAvgAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.LocalSqlKurtosisAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.LocalSqlMaxAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.LocalSqlMinAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.LocalSqlSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.LocalSqlStddevAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.LocalSqlStddevPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.LocalSqlSumAggregateDescriptor;
@@ -146,10 +179,13 @@
import org.apache.asterix.runtime.aggregates.std.LocalVarPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.MaxAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.MinAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.SkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.SqlAvgAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.SqlCountAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.SqlKurtosisAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.SqlMaxAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.SqlMinAggregateDescriptor;
+import org.apache.asterix.runtime.aggregates.std.SqlSkewnessAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.SqlStddevAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.SqlStddevPopAggregateDescriptor;
import org.apache.asterix.runtime.aggregates.std.SqlSumAggregateDescriptor;
@@ -555,6 +591,14 @@
fc.add(LocalVarPopAggregateDescriptor.FACTORY);
fc.add(IntermediateVarPopAggregateDescriptor.FACTORY);
fc.add(GlobalVarPopAggregateDescriptor.FACTORY);
+ fc.add(KurtosisAggregateDescriptor.FACTORY);
+ fc.add(LocalKurtosisAggregateDescriptor.FACTORY);
+ fc.add(IntermediateKurtosisAggregateDescriptor.FACTORY);
+ fc.add(GlobalKurtosisAggregateDescriptor.FACTORY);
+ fc.add(SkewnessAggregateDescriptor.FACTORY);
+ fc.add(LocalSkewnessAggregateDescriptor.FACTORY);
+ fc.add(IntermediateSkewnessAggregateDescriptor.FACTORY);
+ fc.add(GlobalSkewnessAggregateDescriptor.FACTORY);
// serializable aggregates
fc.add(SerializableCountAggregateDescriptor.FACTORY);
@@ -582,6 +626,14 @@
fc.add(SerializableLocalVarPopAggregateDescriptor.FACTORY);
fc.add(SerializableIntermediateVarPopAggregateDescriptor.FACTORY);
fc.add(SerializableGlobalVarPopAggregateDescriptor.FACTORY);
+ fc.add(SerializableKurtosisAggregateDescriptor.FACTORY);
+ fc.add(SerializableLocalKurtosisAggregateDescriptor.FACTORY);
+ fc.add(SerializableIntermediateKurtosisAggregateDescriptor.FACTORY);
+ fc.add(SerializableGlobalKurtosisAggregateDescriptor.FACTORY);
+ fc.add(SerializableSkewnessAggregateDescriptor.FACTORY);
+ fc.add(SerializableLocalSkewnessAggregateDescriptor.FACTORY);
+ fc.add(SerializableIntermediateSkewnessAggregateDescriptor.FACTORY);
+ fc.add(SerializableGlobalSkewnessAggregateDescriptor.FACTORY);
// scalar aggregates
fc.add(ScalarCountAggregateDescriptor.FACTORY);
@@ -595,6 +647,8 @@
fc.add(ScalarStddevPopAggregateDescriptor.FACTORY);
fc.add(ScalarVarAggregateDescriptor.FACTORY);
fc.add(ScalarVarPopAggregateDescriptor.FACTORY);
+ fc.add(ScalarKurtosisAggregateDescriptor.FACTORY);
+ fc.add(ScalarSkewnessAggregateDescriptor.FACTORY);
// SQL aggregates
fc.add(SqlCountAggregateDescriptor.FACTORY);
@@ -626,6 +680,14 @@
fc.add(LocalSqlVarPopAggregateDescriptor.FACTORY);
fc.add(IntermediateSqlVarPopAggregateDescriptor.FACTORY);
fc.add(GlobalSqlVarPopAggregateDescriptor.FACTORY);
+ fc.add(SqlKurtosisAggregateDescriptor.FACTORY);
+ fc.add(LocalSqlKurtosisAggregateDescriptor.FACTORY);
+ fc.add(IntermediateSqlKurtosisAggregateDescriptor.FACTORY);
+ fc.add(GlobalSqlKurtosisAggregateDescriptor.FACTORY);
+ fc.add(SqlSkewnessAggregateDescriptor.FACTORY);
+ fc.add(LocalSqlSkewnessAggregateDescriptor.FACTORY);
+ fc.add(IntermediateSqlSkewnessAggregateDescriptor.FACTORY);
+ fc.add(GlobalSqlSkewnessAggregateDescriptor.FACTORY);
// SQL serializable aggregates
fc.add(SerializableSqlCountAggregateDescriptor.FACTORY);
@@ -653,6 +715,14 @@
fc.add(SerializableLocalSqlVarPopAggregateDescriptor.FACTORY);
fc.add(SerializableIntermediateSqlVarPopAggregateDescriptor.FACTORY);
fc.add(SerializableGlobalSqlVarPopAggregateDescriptor.FACTORY);
+ fc.add(SerializableSqlKurtosisAggregateDescriptor.FACTORY);
+ fc.add(SerializableLocalSqlKurtosisAggregateDescriptor.FACTORY);
+ fc.add(SerializableIntermediateSqlKurtosisAggregateDescriptor.FACTORY);
+ fc.add(SerializableGlobalSqlKurtosisAggregateDescriptor.FACTORY);
+ fc.add(SerializableSqlSkewnessAggregateDescriptor.FACTORY);
+ fc.add(SerializableLocalSqlSkewnessAggregateDescriptor.FACTORY);
+ fc.add(SerializableIntermediateSqlSkewnessAggregateDescriptor.FACTORY);
+ fc.add(SerializableGlobalSqlSkewnessAggregateDescriptor.FACTORY);
// SQL scalar aggregates
fc.add(ScalarSqlCountAggregateDescriptor.FACTORY);
@@ -664,6 +734,8 @@
fc.add(ScalarSqlStddevPopAggregateDescriptor.FACTORY);
fc.add(ScalarSqlVarAggregateDescriptor.FACTORY);
fc.add(ScalarSqlVarPopAggregateDescriptor.FACTORY);
+ fc.add(ScalarSqlKurtosisAggregateDescriptor.FACTORY);
+ fc.add(ScalarSqlSkewnessAggregateDescriptor.FACTORY);
// window functions
fc.add(DenseRankRunningAggregateDescriptor.FACTORY);