http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32/stddev_int32.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..afbe777 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32/stddev_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_stddev(( + select element x + from [test.integer('1'),test.integer('2'),test.integer('3')] as x +));
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32_null/stddev_int32_null.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32_null/stddev_int32_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32_null/stddev_int32_null.1.ddl.sqlpp new file mode 100644 index 0000000..6788afc --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32_null/stddev_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 : bigint, + 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`)); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32_null/stddev_int32_null.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..a76ea4a --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int32_null/stddev_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; + + +{'stddev':test.array_stddev(( + select element x.int32Field + from Numeric as x +))}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64/stddev_int64.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64/stddev_int64.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64/stddev_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/stddev_int64/stddev_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; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64/stddev_int64.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..17e2285 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64/stddev_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_stddev(( + select element x + from [test.bigint('1'),test.bigint('2'),test.bigint('3')] as x +)); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64_null/stddev_int64_null.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64_null/stddev_int64_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64_null/stddev_int64_null.1.ddl.sqlpp new file mode 100644 index 0000000..6788afc --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64_null/stddev_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 : bigint, + 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`)); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64_null/stddev_int64_null.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..5ed6db6 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int64_null/stddev_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; + + +{'stddev':test.array_stddev(( + select element x.int64Field + from Numeric as x +))}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8/stddev_int8.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8/stddev_int8.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8/stddev_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/stddev_int8/stddev_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; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8/stddev_int8.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..6efdcaf --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8/stddev_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_stddev(( + select element x + from [test.tinyint('1'),test.tinyint('2'),test.tinyint('3')] as x +)); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8_null/stddev_int8_null.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8_null/stddev_int8_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8_null/stddev_int8_null.1.ddl.sqlpp new file mode 100644 index 0000000..6788afc --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8_null/stddev_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 : bigint, + 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`)); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8_null/stddev_int8_null.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..1001843 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_int8_null/stddev_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; + + +{'stddev':test.array_stddev(( + select element x.int8Field + from Numeric as x +))}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_mixed/stddev_mixed.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..69ad38c --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/stddev_mixed/stddev_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_avg over an ordered list with mixed types +* Expected Res : Failure +* Date : March 5th 2018 +*/ + +select element array_stddev(( + select element x + from [float('2.0'),'hello world',93847382783847382,date('2013-01-01')] as x +)); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null/agg_null.3.query.sqlpp ---------------------------------------------------------------------- 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 947d19b..062cb48 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]),'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}})}; +{'count1':strict_count([null]),'average1':strict_avg([null]),'sum1':strict_sum([null]),'min1':strict_min([null]),'max1':strict_max([null]),'stddev1':strict_stddev([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}})}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null_rec/agg_null_rec.3.query.sqlpp ---------------------------------------------------------------------- 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 62506cc..88c86f5 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,4 +40,7 @@ use test; )),'max':test.strict_max(( select element t.valplus from Test as t +)), 'stddev':test.strict_stddev(( + select element t.valplus + from Test as t ))}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_null_rec_1/agg_null_rec_1.3.query.sqlpp ---------------------------------------------------------------------- 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 47887d9..bf316da 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,4 +52,10 @@ use test; select element t from Test as t ) as i +)),'stddev':test.strict_stddev(( + select element i.val + from ( + select element t + from Test as t + ) as i ))}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_number/agg_number.3.query.sqlpp ---------------------------------------------------------------------- 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 5577347..e8385ca 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]),'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}})}; +{'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]),'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])}; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/agg_number_rec/agg_number_rec.3.query.sqlpp ---------------------------------------------------------------------- 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 c7d7eb1..391e49d 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,4 +40,7 @@ use test; )),'max':test.strict_max(( select element t.valplus from Test as t +)),'stddev':test.strict_stddev(( + select element t.valplus + from Test as t ))}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev/scalar_stddev.1.ddl.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..bc2d063 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev/scalar_stddev.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 avg without nulls. + * Success : Yes + */ + +drop dataverse test if exists; +create dataverse test; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev/scalar_stddev.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..e1d9437 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev/scalar_stddev.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 stddev without nulls. + * Success : Yes + */ + +use test; + + +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')]) +select element i +from [i8,i16,i32,i64,f,d] as i +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.1.ddl.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..cb061c2 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_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 avg with an empty list. + * Success : Yes + */ + +drop dataverse test if exists; +create dataverse test; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_empty.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..9dedcbd --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_empty/scalar_stddev_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 stddev with an empty list. + * Success : Yes + */ + +select element strict_stddev([]); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.1.ddl.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..03230ec --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_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 avg with nulls. + * Success : Yes + */ + +drop dataverse test if exists; +create dataverse test; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_null.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..e8a3d18 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/scalar_stddev_null/scalar_stddev_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 stddev with nulls. + * Success : Yes + */ + +use test; + + +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]) +select element i +from [i8,i16,i32,i64,f,d] as i +; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double/serial_stddev_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_stddev_double/serial_stddev_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; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.2.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double/serial_stddev_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_stddev_double/serial_stddev_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}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double/serial_stddev_double.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..c142973 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double/serial_stddev_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_stddev((select value g.val from g)) as stddev +from Test as t +/* +hash */ +group by t.gid as gid group as g(val as val); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_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_stddev_double_null/serial_stddev_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; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.2.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_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_stddev_double_null/serial_stddev_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}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_double_null.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..9d62353 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_double_null/serial_stddev_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_stddev((select value g.valplus from g)) as stddev +from Test as t +/* +hash */ +group by t.gid as gid group as g(valplus as valplus); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_empty/serial_stddev_empty.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_empty/serial_stddev_empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_empty/serial_stddev_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_stddev_empty/serial_stddev_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; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_empty/serial_stddev_empty.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..c142973 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_empty/serial_stddev_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_stddev((select value g.val from g)) as stddev +from Test as t +/* +hash */ +group by t.gid as gid group as g(val as val); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float/serial_stddev_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_stddev_float/serial_stddev_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; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.2.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float/serial_stddev_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_stddev_float/serial_stddev_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}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float/serial_stddev_float.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..c142973 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float/serial_stddev_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_stddev((select value g.val from g)) as stddev +from Test as t +/* +hash */ +group by t.gid as gid group as g(val as val); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_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_stddev_float_null/serial_stddev_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; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.2.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_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_stddev_float_null/serial_stddev_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}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_float_null.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..9d62353 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_float_null/serial_stddev_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_stddev((select value g.valplus from g)) as stddev +from Test as t +/* +hash */ +group by t.gid as gid group as g(valplus as valplus); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16/serial_stddev_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_stddev_int16/serial_stddev_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; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.2.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16/serial_stddev_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_stddev_int16/serial_stddev_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}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16/serial_stddev_int16.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..c142973 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16/serial_stddev_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_stddev((select value g.val from g)) as stddev +from Test as t +/* +hash */ +group by t.gid as gid group as g(val as val); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_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_stddev_int16_null/serial_stddev_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; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.2.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_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_stddev_int16_null/serial_stddev_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}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_int16_null.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..9d62353 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int16_null/serial_stddev_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_stddev((select value g.valplus from g)) as stddev +from Test as t +/* +hash */ +group by t.gid as gid group as g(valplus as valplus); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32/serial_stddev_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_stddev_int32/serial_stddev_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; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.2.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32/serial_stddev_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_stddev_int32/serial_stddev_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}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32/serial_stddev_int32.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..c142973 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32/serial_stddev_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_stddev((select value g.val from g)) as stddev +from Test as t +/* +hash */ +group by t.gid as gid group as g(val as val); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_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_stddev_int32_null/serial_stddev_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; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.2.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_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_stddev_int32_null/serial_stddev_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}; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_int32_null.3.query.sqlpp ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..9d62353 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int32_null/serial_stddev_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_stddev((select value g.valplus from g)) as stddev +from Test as t +/* +hash */ +group by t.gid as gid group as g(valplus as valplus); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ab4bed0c/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int64/serial_stddev_int64.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/serial_stddev_int64/serial_stddev_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_stddev_int64/serial_stddev_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;
