You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by dl...@apache.org on 2018/10/12 21:10:23 UTC

[04/10] asterixdb git commit: [ASTERIXDB-2459][FUN] Add sttdev() aggregate function

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..43263e5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.stddev@1[
+  (
+    SELECT ELEMENT [
+    FieldAccessor [
+      Variable [ Name=$g ]
+      Field=val
+    ]
+    ]
+    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 ]
+  (
+    val:=FunctionCall asterix.field-access-by-name@2[
+  Variable [ Name=$t ]
+  LiteralExpr [STRING] [val]
+]
+  )
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_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_stddev_int32_null/serial_stddev_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]]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.2.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.2.ast
new file mode 100644
index 0000000..916a59e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.2.ast
@@ -0,0 +1 @@
+DataverseUse test

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..f05d552
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.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]
+]
+  )
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_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_stddev_int64/serial_stddev_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]]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.2.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.2.ast
new file mode 100644
index 0000000..916a59e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.2.ast
@@ -0,0 +1 @@
+DataverseUse test

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..43263e5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.stddev@1[
+  (
+    SELECT ELEMENT [
+    FieldAccessor [
+      Variable [ Name=$g ]
+      Field=val
+    ]
+    ]
+    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 ]
+  (
+    val:=FunctionCall asterix.field-access-by-name@2[
+  Variable [ Name=$t ]
+  LiteralExpr [STRING] [val]
+]
+  )
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_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_stddev_int64_null/serial_stddev_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]]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.2.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.2.ast
new file mode 100644
index 0000000..916a59e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.2.ast
@@ -0,0 +1 @@
+DataverseUse test

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..f05d552
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int64_null/serial_stddev_int64_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.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]
+]
+  )
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_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_stddev_int8/serial_stddev_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]]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.2.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.2.ast
new file mode 100644
index 0000000..916a59e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.2.ast
@@ -0,0 +1 @@
+DataverseUse test

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..43263e5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8/serial_stddev_int8.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.stddev@1[
+  (
+    SELECT ELEMENT [
+    FieldAccessor [
+      Variable [ Name=$g ]
+      Field=val
+    ]
+    ]
+    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 ]
+  (
+    val:=FunctionCall asterix.field-access-by-name@2[
+  Variable [ Name=$t ]
+  LiteralExpr [STRING] [val]
+]
+  )
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_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_stddev_int8_null/serial_stddev_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]]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.2.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.2.ast
new file mode 100644
index 0000000..916a59e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.2.ast
@@ -0,0 +1 @@
+DataverseUse test

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..f05d552
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_int8_null/serial_stddev_int8_null.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.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]
+]
+  )
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.1.ast
new file mode 100644
index 0000000..a61c9df
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.1.ast
@@ -0,0 +1,9 @@
+DataverseUse test
+TypeDecl TestType [
+  open RecordType {
+    id : bigint,
+    gid : bigint,
+    val : double
+  }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.2.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.2.ast
new file mode 100644
index 0000000..916a59e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.2.ast
@@ -0,0 +1 @@
+DataverseUse test

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..f05d552
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/serial_stddev_mixed/serial_stddev_mixed.3.ast
@@ -0,0 +1,40 @@
+DataverseUse test
+Query:
+SELECT [
+Variable [ Name=$gid ]
+gid
+FunctionCall asterix.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]
+]
+  )
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double/stddev_double.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double/stddev_double.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double/stddev_double.1.ast
new file mode 100644
index 0000000..086bc5f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double/stddev_double.1.ast
@@ -0,0 +1,2 @@
+DataverseUse test
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double/stddev_double.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..b2fcbe8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double/stddev_double.3.ast
@@ -0,0 +1,19 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.stddev@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 ]
+    ]
+  )
+]
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double_null/stddev_double_null.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double_null/stddev_double_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double_null/stddev_double_null.1.ast
new file mode 100644
index 0000000..2b387f8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double_null/stddev_double_null.1.ast
@@ -0,0 +1,13 @@
+DataverseUse test
+TypeDecl NumericType [
+  open RecordType {
+    id : integer,
+    int8Field : tinyint?,
+    int16Field : smallint?,
+    int32Field : integer?,
+    int64Field : bigint?,
+    floatField : float?,
+    doubleField : double?
+  }
+]
+DatasetDecl Numeric(NumericType)is an external dataset

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double_null/stddev_double_null.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..433f0bc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_double_null/stddev_double_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [stddev]
+    :
+    FunctionCall asterix.stddev@1[
+      (
+        SELECT ELEMENT [
+        FieldAccessor [
+          Variable [ Name=$x ]
+          Field=doubleField
+        ]
+        ]
+        FROM [          FunctionCall asterix.dataset@1[
+            LiteralExpr [STRING] [test.Numeric]
+          ]
+          AS Variable [ Name=$x ]
+        ]
+      )
+    ]
+  )
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.1.ast
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..fe21498
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_01/stddev_empty_01.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.stddev@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]
+      ]
+  )
+]
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_02/stddev_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/stddev_empty_02/stddev_empty_02.1.ast
@@ -0,0 +1,8 @@
+DataverseUse test
+TypeDecl TestType [
+  closed RecordType {
+    id : integer,
+    val : double
+  }
+]
+DatasetDecl Test(TestType) partitioned by [[id]]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..6cb121c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_empty_02/stddev_empty_02.3.ast
@@ -0,0 +1,19 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.stddev@1[
+  (
+    SELECT ELEMENT [
+    FieldAccessor [
+      Variable [ Name=$x ]
+      Field=val
+    ]
+    ]
+    FROM [      FunctionCall asterix.dataset@1[
+        LiteralExpr [STRING] [test.Test]
+      ]
+      AS Variable [ Name=$x ]
+    ]
+  )
+]
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float/stddev_float.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float/stddev_float.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float/stddev_float.1.ast
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float/stddev_float.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..07e5c1a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float/stddev_float.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.stddev@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 ]
+    ]
+  )
+]
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
----------------------------------------------------------------------
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_nu.1.ast
new file mode 100644
index 0000000..2b387f8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.1.ast
@@ -0,0 +1,13 @@
+DataverseUse test
+TypeDecl NumericType [
+  open RecordType {
+    id : integer,
+    int8Field : tinyint?,
+    int16Field : smallint?,
+    int32Field : integer?,
+    int64Field : bigint?,
+    floatField : float?,
+    doubleField : double?
+  }
+]
+DatasetDecl Numeric(NumericType)is an external dataset

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..f78dba8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_float_null/stddev_float_nu.3.ast
@@ -0,0 +1,23 @@
+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 ]
+        ]
+      )
+    ]
+  )
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16/stddev_int16.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16/stddev_int16.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16/stddev_int16.1.ast
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16/stddev_int16.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..67d7880
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16/stddev_int16.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.stddev@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 ]
+    ]
+  )
+]
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.1.ast
new file mode 100644
index 0000000..2b387f8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.1.ast
@@ -0,0 +1,13 @@
+DataverseUse test
+TypeDecl NumericType [
+  open RecordType {
+    id : integer,
+    int8Field : tinyint?,
+    int16Field : smallint?,
+    int32Field : integer?,
+    int64Field : bigint?,
+    floatField : float?,
+    doubleField : double?
+  }
+]
+DatasetDecl Numeric(NumericType)is an external dataset

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..9f82ab2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int16_null/stddev_int16_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [stddev]
+    :
+    FunctionCall asterix.stddev@1[
+      (
+        SELECT ELEMENT [
+        FieldAccessor [
+          Variable [ Name=$x ]
+          Field=int16Field
+        ]
+        ]
+        FROM [          FunctionCall asterix.dataset@1[
+            LiteralExpr [STRING] [test.Numeric]
+          ]
+          AS Variable [ Name=$x ]
+        ]
+      )
+    ]
+  )
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32/stddev_int32.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32/stddev_int32.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32/stddev_int32.1.ast
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32/stddev_int32.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..f8eb00d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32/stddev_int32.3.ast
@@ -0,0 +1,18 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.stddev@1[
+  (
+    SELECT ELEMENT [
+    Variable [ Name=$x ]
+    ]
+    FROM [      OrderedListConstructor [
+        LiteralExpr [LONG] [1]
+        LiteralExpr [LONG] [2]
+        LiteralExpr [LONG] [3]
+      ]
+      AS Variable [ Name=$x ]
+    ]
+  )
+]
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.1.ast
new file mode 100644
index 0000000..2b387f8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.1.ast
@@ -0,0 +1,13 @@
+DataverseUse test
+TypeDecl NumericType [
+  open RecordType {
+    id : integer,
+    int8Field : tinyint?,
+    int16Field : smallint?,
+    int32Field : integer?,
+    int64Field : bigint?,
+    floatField : float?,
+    doubleField : double?
+  }
+]
+DatasetDecl Numeric(NumericType)is an external dataset

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..8863b52
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int32_null/stddev_int32_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [stddev]
+    :
+    FunctionCall asterix.stddev@1[
+      (
+        SELECT ELEMENT [
+        FieldAccessor [
+          Variable [ Name=$x ]
+          Field=int32Field
+        ]
+        ]
+        FROM [          FunctionCall asterix.dataset@1[
+            LiteralExpr [STRING] [test.Numeric]
+          ]
+          AS Variable [ Name=$x ]
+        ]
+      )
+    ]
+  )
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64/stddev_int64.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64/stddev_int64.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64/stddev_int64.1.ast
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64/stddev_int64.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..5ddf2ae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64/stddev_int64.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.stddev@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 ]
+    ]
+  )
+]
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.1.ast
new file mode 100644
index 0000000..2b387f8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.1.ast
@@ -0,0 +1,13 @@
+DataverseUse test
+TypeDecl NumericType [
+  open RecordType {
+    id : integer,
+    int8Field : tinyint?,
+    int16Field : smallint?,
+    int32Field : integer?,
+    int64Field : bigint?,
+    floatField : float?,
+    doubleField : double?
+  }
+]
+DatasetDecl Numeric(NumericType)is an external dataset

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..490ab20
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int64_null/stddev_int64_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [stddev]
+    :
+    FunctionCall asterix.stddev@1[
+      (
+        SELECT ELEMENT [
+        FieldAccessor [
+          Variable [ Name=$x ]
+          Field=int64Field
+        ]
+        ]
+        FROM [          FunctionCall asterix.dataset@1[
+            LiteralExpr [STRING] [test.Numeric]
+          ]
+          AS Variable [ Name=$x ]
+        ]
+      )
+    ]
+  )
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8/stddev_int8.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8/stddev_int8.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8/stddev_int8.1.ast
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8/stddev_int8.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..ca12465
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8/stddev_int8.3.ast
@@ -0,0 +1,24 @@
+DataverseUse test
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.stddev@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 ]
+    ]
+  )
+]
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.1.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.1.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.1.ast
new file mode 100644
index 0000000..2b387f8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.1.ast
@@ -0,0 +1,13 @@
+DataverseUse test
+TypeDecl NumericType [
+  open RecordType {
+    id : integer,
+    int8Field : tinyint?,
+    int16Field : smallint?,
+    int32Field : integer?,
+    int64Field : bigint?,
+    floatField : float?,
+    doubleField : double?
+  }
+]
+DatasetDecl Numeric(NumericType)is an external dataset

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..65e8156
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_int8_null/stddev_int8_null.3.ast
@@ -0,0 +1,23 @@
+DataverseUse test
+Query:
+RecordConstructor [
+  (
+    LiteralExpr [STRING] [stddev]
+    :
+    FunctionCall asterix.stddev@1[
+      (
+        SELECT ELEMENT [
+        FieldAccessor [
+          Variable [ Name=$x ]
+          Field=int8Field
+        ]
+        ]
+        FROM [          FunctionCall asterix.dataset@1[
+            LiteralExpr [STRING] [test.Numeric]
+          ]
+          AS Variable [ Name=$x ]
+        ]
+      )
+    ]
+  )
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_mixed/stddev_mixed.3.ast
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..6661e1d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/stddev_mixed/stddev_mixed.3.ast
@@ -0,0 +1,22 @@
+Query:
+SELECT ELEMENT [
+FunctionCall asterix.stddev@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 ]
+    ]
+  )
+]
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index 164fbf1..3236e62 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -206,6 +206,18 @@
       </compilation-unit>
     </test-case>
     <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>
+      </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>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
       <compilation-unit name="agg_number">
         <output-dir compare="Text">agg_number</output-dir>
       </compilation-unit>
@@ -522,6 +534,21 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="aggregate">
+      <compilation-unit name="scalar_stddev">
+        <output-dir compare="Text">scalar_stddev</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="scalar_stddev_empty">
+        <output-dir compare="Text">scalar_stddev_empty</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="scalar_stddev_null">
+        <output-dir compare="Text">scalar_stddev_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
       <compilation-unit name="scalar_sum">
         <output-dir compare="Text">scalar_sum</output-dir>
       </compilation-unit>
@@ -537,6 +564,141 @@
       </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>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_double_null">
+        <output-dir compare="Text">serial_stddev_double_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_empty">
+        <output-dir compare="Text">serial_stddev_empty</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_float">
+        <output-dir compare="Text">serial_stddev_float</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_float_null">
+        <output-dir compare="Text">serial_stddev_float_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int16">
+        <output-dir compare="Text">serial_stddev_int16</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int16_null">
+        <output-dir compare="Text">serial_stddev_int16_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int32">
+        <output-dir compare="Text">serial_stddev_int32</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int32_null">
+        <output-dir compare="Text">serial_stddev_int32_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int64">
+        <output-dir compare="Text">serial_stddev_int64</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int64_null">
+        <output-dir compare="Text">serial_stddev_int64_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int8">
+        <output-dir compare="Text">serial_stddev_int8</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int8_null">
+        <output-dir compare="Text">serial_stddev_int8_null</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>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_double_null">
+        <output-dir compare="Text">stddev_double_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_empty_01">
+        <output-dir compare="Text">stddev_empty_01</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_empty_02">
+        <output-dir compare="Text">stddev_empty_02</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_float">
+        <output-dir compare="Text">stddev_float</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_float_null">
+        <output-dir compare="Text">stddev_float_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int16">
+        <output-dir compare="Text">stddev_int16</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int16_null">
+        <output-dir compare="Text">stddev_int16_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int32">
+        <output-dir compare="Text">stddev_int32</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int32_null">
+        <output-dir compare="Text">stddev_int32_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int64">
+        <output-dir compare="Text">stddev_int64</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int64_null">
+        <output-dir compare="Text">stddev_int64_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int8">
+        <output-dir compare="Text">stddev_int8</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int8_null">
+        <output-dir compare="Text">stddev_int8_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
       <compilation-unit name="sum_double">
         <output-dir compare="Text">sum_double</output-dir>
       </compilation-unit>
@@ -667,6 +829,18 @@
       </compilation-unit>
     </test-case>
     <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>
+      </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>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
       <compilation-unit name="agg_number">
         <output-dir compare="Text">agg_number</output-dir>
       </compilation-unit>
@@ -912,6 +1086,21 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="aggregate-sql">
+      <compilation-unit name="scalar_stddev">
+        <output-dir compare="Text">scalar_stddev</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="scalar_stddev_empty">
+        <output-dir compare="Text">scalar_stddev_empty</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="scalar_stddev_null">
+        <output-dir compare="Text">scalar_stddev_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
       <compilation-unit name="scalar_sum">
         <output-dir compare="Text">scalar_sum</output-dir>
       </compilation-unit>
@@ -927,6 +1116,141 @@
       </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>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_double_null">
+        <output-dir compare="Text">serial_stddev_double_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_empty">
+        <output-dir compare="Text">serial_stddev_empty</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_float">
+        <output-dir compare="Text">serial_stddev_float</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_float_null">
+        <output-dir compare="Text">serial_stddev_float_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int16">
+        <output-dir compare="Text">serial_stddev_int16</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int16_null">
+        <output-dir compare="Text">serial_stddev_int16_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int32">
+        <output-dir compare="Text">serial_stddev_int32</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int32_null">
+        <output-dir compare="Text">serial_stddev_int32_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int64">
+        <output-dir compare="Text">serial_stddev_int64</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int64_null">
+        <output-dir compare="Text">serial_stddev_int64_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int8">
+        <output-dir compare="Text">serial_stddev_int8</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int8_null">
+        <output-dir compare="Text">serial_stddev_int8_null</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>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_double_null">
+        <output-dir compare="Text">stddev_double_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_empty_01">
+        <output-dir compare="Text">stddev_empty_01</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_empty_02">
+        <output-dir compare="Text">stddev_empty_02</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_float">
+        <output-dir compare="Text">stddev_float</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_float_null">
+        <output-dir compare="Text">stddev_float_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int16">
+        <output-dir compare="Text">stddev_int16</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int16_null">
+        <output-dir compare="Text">stddev_int16_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int32">
+        <output-dir compare="Text">stddev_int32</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int32_null">
+        <output-dir compare="Text">stddev_int32_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int64">
+        <output-dir compare="Text">stddev_int64</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int64_null">
+        <output-dir compare="Text">stddev_int64_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int8">
+        <output-dir compare="Text">stddev_int8</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int8_null">
+        <output-dir compare="Text">stddev_int8_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
       <compilation-unit name="sum_double">
         <output-dir compare="Text">sum_double</output-dir>
       </compilation-unit>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp_parser.xml
----------------------------------------------------------------------
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 010a6cc..f1cf5bb 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
@@ -122,6 +122,18 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_mixed">
+        <output-dir compare="AST">stddev_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_stddev_mixed">
+        <output-dir compare="AST">serial_stddev_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>
@@ -418,6 +430,21 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="aggregate">
+      <compilation-unit name="scalar_stddev">
+        <output-dir compare="AST">scalar_stddev</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="scalar_stddev_empty">
+        <output-dir compare="AST">scalar_stddev_empty</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="scalar_stddev_null">
+        <output-dir compare="AST">scalar_stddev_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
       <compilation-unit name="scalar_sum">
         <output-dir compare="AST">scalar_sum</output-dir>
       </compilation-unit>
@@ -433,6 +460,146 @@
       </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>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_double">
+        <output-dir compare="AST">serial_stddev_double</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_double_null">
+        <output-dir compare="AST">serial_stddev_double_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_empty">
+        <output-dir compare="AST">serial_stddev_empty</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_float">
+        <output-dir compare="AST">serial_stddev_float</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_float_null">
+        <output-dir compare="AST">serial_stddev_float_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int16">
+        <output-dir compare="AST">serial_stddev_int16</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int16_null">
+        <output-dir compare="AST">serial_stddev_int16_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int32">
+        <output-dir compare="AST">serial_stddev_int32</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int32_null">
+        <output-dir compare="AST">serial_stddev_int32_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int64">
+        <output-dir compare="AST">serial_stddev_int64</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int64_null">
+        <output-dir compare="AST">serial_stddev_int64_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_int8">
+        <output-dir compare="AST">serial_stddev_int8</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="serial_stddev_pop_int8_null">
+        <output-dir compare="AST">serial_stddev_pop_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>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_double_null">
+        <output-dir compare="AST">stddev_double_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_empty_01">
+        <output-dir compare="AST">stddev_empty_01</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_empty_02">
+        <output-dir compare="AST">stddev_empty_02</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_float">
+        <output-dir compare="AST">stddev_float</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_float_null">
+        <output-dir compare="AST">stddev_float_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int16">
+        <output-dir compare="AST">stddev_int16</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int16_null">
+        <output-dir compare="AST">stddev_int16_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int32">
+        <output-dir compare="AST">stddev_int32</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int32_null">
+        <output-dir compare="AST">stddev_int32_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int64">
+        <output-dir compare="AST">stddev_int64</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int64_null">
+        <output-dir compare="AST">stddev_int64_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int8">
+        <output-dir compare="AST">stddev_int8</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="stddev_int8_null">
+        <output-dir compare="AST">stddev_int8_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate">
       <compilation-unit name="sum_double">
         <output-dir compare="AST">sum_double</output-dir>
       </compilation-unit>
@@ -558,6 +725,18 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_mixed">
+        <output-dir compare="AST">serial_stddev_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="stddev_mixed">
+        <output-dir compare="AST">stddev_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>
@@ -773,6 +952,21 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="aggregate-sql">
+      <compilation-unit name="scalar_stddev">
+        <output-dir compare="AST">scalar_stddev</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="scalar_stddev_empty">
+        <output-dir compare="AST">scalar_stddev_empty</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="scalar_stddev_null">
+        <output-dir compare="AST">scalar_stddev_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
       <compilation-unit name="scalar_sum">
         <output-dir compare="AST">scalar_sum</output-dir>
       </compilation-unit>
@@ -788,6 +982,141 @@
       </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>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_double_null">
+        <output-dir compare="AST">serial_stddev_double_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_empty">
+        <output-dir compare="AST">serial_stddev_empty</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_float">
+        <output-dir compare="AST">serial_stddev_float</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_float_null">
+        <output-dir compare="AST">serial_stddev_float_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int16">
+        <output-dir compare="AST">serial_stddev_int16</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int16_null">
+        <output-dir compare="AST">serial_stddev_int16_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int32">
+        <output-dir compare="AST">serial_stddev_int32</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int32_null">
+        <output-dir compare="AST">serial_stddev_int32_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int64">
+        <output-dir compare="AST">serial_stddev_int64</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int64_null">
+        <output-dir compare="AST">serial_stddev_int64_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int8">
+        <output-dir compare="AST">serial_stddev_int8</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="serial_stddev_int8_null">
+        <output-dir compare="AST">serial_stddev_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>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_double_null">
+        <output-dir compare="AST">stddev_double_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_empty_01">
+        <output-dir compare="AST">stddev_empty_01</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_empty_02">
+        <output-dir compare="AST">stddev_empty_02</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_float">
+        <output-dir compare="AST">stddev_float</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_float_null">
+        <output-dir compare="AST">stddev_float_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int16">
+        <output-dir compare="AST">stddev_int16</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int16_null">
+        <output-dir compare="AST">stddev_int16_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int32">
+        <output-dir compare="AST">stddev_int32</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int32_null">
+        <output-dir compare="AST">stddev_int32_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int64">
+        <output-dir compare="AST">stddev_int64</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int64_null">
+        <output-dir compare="AST">stddev_int64_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int8">
+        <output-dir compare="AST">stddev_int8</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
+      <compilation-unit name="stddev_int8_null">
+        <output-dir compare="AST">stddev_int8_null</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="aggregate-sql">
       <compilation-unit name="sum_double">
         <output-dir compare="AST">sum_double</output-dir>
       </compilation-unit>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md
----------------------------------------------------------------------
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 921bc7e..2036bc4 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
@@ -110,7 +110,7 @@ SQL++ builtin aggregate functions (e.g., `ARRAY_MIN`, `ARRAY_MAX`,
         6.9
 
 
-### array_sql_min ###
+### array_min ###
  * Syntax:
 
         array_min(num_collection)
@@ -168,6 +168,34 @@ SQL++ builtin aggregate functions (e.g., `ARRAY_MIN`, `ARRAY_MAX`,
         3.4
 
 
+### array_stddev ###
+
+ * Syntax:
+
+        array_stddev(num_collection)
+
+ * Gets the standard deviation 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 average 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_stddev( [1.2, 2.3, 3.4, 0, null] );
+
+ * The expected result is:
+
+        1.4591664287073858
+
+
 ### strict_count ###
  * Syntax:
 
@@ -214,7 +242,7 @@ SQL++ builtin aggregate functions (e.g., `ARRAY_MIN`, `ARRAY_MAX`,
 
  * The expected result is:
 
-        [ 200.0 ]
+        200.0
 
 ### strict_sum ###
  * Syntax:
@@ -243,7 +271,7 @@ SQL++ builtin aggregate functions (e.g., `ARRAY_MIN`, `ARRAY_MAX`,
 
         600
 
-### array_min ###
+### strict_min ###
  * Syntax:
 
         strict_min(num_collection)
@@ -272,7 +300,7 @@ SQL++ builtin aggregate functions (e.g., `ARRAY_MIN`, `ARRAY_MAX`,
         5.0
 
 
-### array_max ###
+### strict_max ###
  * Syntax:
 
         strict_max(num_collection)
@@ -300,3 +328,27 @@ SQL++ builtin aggregate functions (e.g., `ARRAY_MIN`, `ARRAY_MAX`,
 
         100.0
 
+### strict_stddev ###
+ * Syntax:
+
+        strict_stddev(num_collection)
+
+ * Gets the standard deviation 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 average 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_stddev( [100, 200, 300] );
+
+ * The expected result is:
+
+        100.0