http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_mixed/sum_mixed.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_mixed/sum_mixed.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_mixed/sum_mixed.2.update.aql new file mode 100644 index 0000000..bd244d0 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_mixed/sum_mixed.2.update.aql @@ -0,0 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_mixed/sum_mixed.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_mixed/sum_mixed.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_mixed/sum_mixed.3.query.aql new file mode 100644 index 0000000..1bee4db --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_mixed/sum_mixed.3.query.aql @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* +* Description : Run sum over an ordered list with mixed types +* Expected Res : Failure +* Date : Jun 2nd 2013 +*/ + +sum( + for $x in [float("2.0"), "hello world", 93847382783847382, date("2013-01-01")] + return $x +) + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_null-with-pred/sum_null-with-pred.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_null-with-pred/sum_null-with-pred.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_null-with-pred/sum_null-with-pred.1.ddl.aql new file mode 100644 index 0000000..63c3b67 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_null-with-pred/sum_null-with-pred.1.ddl.aql @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 : sum() aggregate function must return the numeric sum, when non null values are given as input to sum(). + * : Get the sum for those tuples which are non null for salary fields. + * Expected result : Success + * Date : July 20th 2012 + */ + +drop dataverse test if exists; +create dataverse test; + +use dataverse test; + +create type TestType as open { +id:int64, +sal:int64? +} + +create dataset tdst(TestType) primary key id; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_null-with-pred/sum_null-with-pred.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_null-with-pred/sum_null-with-pred.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_null-with-pred/sum_null-with-pred.2.update.aql new file mode 100644 index 0000000..6c98ade --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_null-with-pred/sum_null-with-pred.2.update.aql @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 : sum() aggregate function must return the numeric sum, when non null values are given as input to sum(). + * : Get the sum for those tuples which are non null for salary fields. + * Expected result : Success + * Date : July 20th 2012 + */ + +use dataverse test; + +insert into dataset tdst({"id":123,"sal":1000}); +insert into dataset tdst({"id":113,"sal":2000}); +insert into dataset tdst({"id":163,"sal":3000}); +insert into dataset tdst({"id":161,"sal":4000}); +insert into dataset tdst({"id":173,"sal":5000}); +insert into dataset tdst({"id":183,"sal":null}); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_null-with-pred/sum_null-with-pred.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_null-with-pred/sum_null-with-pred.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_null-with-pred/sum_null-with-pred.3.query.aql new file mode 100644 index 0000000..5c8570a --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_null-with-pred/sum_null-with-pred.3.query.aql @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : sum() aggregate function must return the numeric sum, when non null values are given as input to sum(). + * : Get the sum for those tuples which are non null for salary fields. + * Expected result : Success + * Date : July 20th 2012 + */ + +use dataverse test; +set import-private-functions 'true'; + +sum(for $l in dataset('tdst') +where "not"(is-null($l.sal)) +return $l.sal) http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_numeric_null/sum_numeric_null.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_numeric_null/sum_numeric_null.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_numeric_null/sum_numeric_null.1.ddl.aql new file mode 100644 index 0000000..eae6dbd --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_numeric_null/sum_numeric_null.1.ddl.aql @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 : Add numeric values with a null value, sum() aggregate function must return null. + * Expected result : Success + * Date : July 20th 2012 + */ + +drop dataverse test if exists; +create dataverse test; + +use dataverse test; + +create type TestType as open { +id:int32, +sal:int32? +} + +create dataset tdst(TestType) primary key id; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_numeric_null/sum_numeric_null.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_numeric_null/sum_numeric_null.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_numeric_null/sum_numeric_null.2.update.aql new file mode 100644 index 0000000..fed66b4 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_numeric_null/sum_numeric_null.2.update.aql @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Add numeric values with a null value, sum() aggregate function must return null. + * Expected result : Success + * Date : July 20th 2012 + */ + +use dataverse test; + +insert into dataset tdst({"id":123,"sal":345}); +insert into dataset tdst({"id":113,"sal":335}); +insert into dataset tdst({"id":163,"sal":315}); +insert into dataset tdst({"id":161,"sal":365}); +insert into dataset tdst({"id":173,"sal":385}); +insert into dataset tdst({"id":183,"sal":null}); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_numeric_null/sum_numeric_null.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_numeric_null/sum_numeric_null.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_numeric_null/sum_numeric_null.3.query.aql new file mode 100644 index 0000000..8a38364 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/sum_numeric_null/sum_numeric_null.3.query.aql @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Add numeric values with a null value, sum() aggregate function must return null. + * Expected result : Success + * Date : July 20th 2012 + */ + +use dataverse test; + +// In AQL +// sum(numeric + null) => null + +sum(for $l in dataset('tdst') +return $l.sal) http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.1.ddl.aql new file mode 100644 index 0000000..0930323 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.1.ddl.aql @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ +drop dataverse test if exists; +create dataverse test; + +use dataverse test; + +create type LineType as closed { + l_orderkey: int32, + l_partkey: int32, + l_suppkey: int32, + l_linenumber: int32, + l_quantity: double, + l_extendedprice: double, + l_discount: double, + l_tax: double, + l_returnflag: string, + l_linestatus: string, + l_shipdate: string, + l_commitdate: string, + l_receiptdate: string, + l_shipinstruct: string, + l_shipmode: string, + l_comment: string +} + +create type OrderType as closed { + o_orderkey: int32, + o_custkey: int32, + o_orderstatus: string, + o_totalprice: double, + o_orderdate: string, + o_orderpriority: string, + o_clerk: string, + o_shippriority: int32, + o_comment: string +} + +create type CustomerType as closed { + c_custkey: int32, + c_name: string, + c_address: string, + c_nationkey: int32, + c_phone: string, + c_acctbal: double, + c_mktsegment: string, + c_comment: string +} + + +create external dataset Line(LineType) +using localfs +(("path"="asterix_nc1://data/big-object/lineitem.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + +create external dataset Order(OrderType) +using localfs +(("path"="asterix_nc1://data/big-object/order.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + +create external dataset Customer(CustomerType) +using localfs +(("path"="asterix_nc1://data/big-object/customer.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.2.update.aql new file mode 100644 index 0000000..538b48c --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.2.update.aql @@ -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. + */ +/* +* Description : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.3.query.aql new file mode 100644 index 0000000..8afb57e --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby-2/big_object_groupby.3.query.aql @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ + +use dataverse test; + +for $i in dataset('Line') +group by $comment := $i.l_comment, $id := $i.l_orderkey with $i +order by $id, string-length($comment), $comment +return { + "id": $id, + "length": string-length($comment), + "comment": $comment} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.1.ddl.aql new file mode 100644 index 0000000..0930323 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.1.ddl.aql @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ +drop dataverse test if exists; +create dataverse test; + +use dataverse test; + +create type LineType as closed { + l_orderkey: int32, + l_partkey: int32, + l_suppkey: int32, + l_linenumber: int32, + l_quantity: double, + l_extendedprice: double, + l_discount: double, + l_tax: double, + l_returnflag: string, + l_linestatus: string, + l_shipdate: string, + l_commitdate: string, + l_receiptdate: string, + l_shipinstruct: string, + l_shipmode: string, + l_comment: string +} + +create type OrderType as closed { + o_orderkey: int32, + o_custkey: int32, + o_orderstatus: string, + o_totalprice: double, + o_orderdate: string, + o_orderpriority: string, + o_clerk: string, + o_shippriority: int32, + o_comment: string +} + +create type CustomerType as closed { + c_custkey: int32, + c_name: string, + c_address: string, + c_nationkey: int32, + c_phone: string, + c_acctbal: double, + c_mktsegment: string, + c_comment: string +} + + +create external dataset Line(LineType) +using localfs +(("path"="asterix_nc1://data/big-object/lineitem.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + +create external dataset Order(OrderType) +using localfs +(("path"="asterix_nc1://data/big-object/order.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + +create external dataset Customer(CustomerType) +using localfs +(("path"="asterix_nc1://data/big-object/customer.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.2.update.aql new file mode 100644 index 0000000..538b48c --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.2.update.aql @@ -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. + */ +/* +* Description : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.3.query.aql new file mode 100644 index 0000000..4fa4f3e --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_groupby/big_object_groupby.3.query.aql @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* +* Description : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ + +use dataverse test; + +set "compiler.groupmemory" "32MB" + +for $i in dataset('Line') +group by $partkey := $i.l_partkey with $i +order by $partkey +return { "partkey": $partkey, "lines": $i} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.1.ddl.aql new file mode 100644 index 0000000..0930323 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.1.ddl.aql @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ +drop dataverse test if exists; +create dataverse test; + +use dataverse test; + +create type LineType as closed { + l_orderkey: int32, + l_partkey: int32, + l_suppkey: int32, + l_linenumber: int32, + l_quantity: double, + l_extendedprice: double, + l_discount: double, + l_tax: double, + l_returnflag: string, + l_linestatus: string, + l_shipdate: string, + l_commitdate: string, + l_receiptdate: string, + l_shipinstruct: string, + l_shipmode: string, + l_comment: string +} + +create type OrderType as closed { + o_orderkey: int32, + o_custkey: int32, + o_orderstatus: string, + o_totalprice: double, + o_orderdate: string, + o_orderpriority: string, + o_clerk: string, + o_shippriority: int32, + o_comment: string +} + +create type CustomerType as closed { + c_custkey: int32, + c_name: string, + c_address: string, + c_nationkey: int32, + c_phone: string, + c_acctbal: double, + c_mktsegment: string, + c_comment: string +} + + +create external dataset Line(LineType) +using localfs +(("path"="asterix_nc1://data/big-object/lineitem.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + +create external dataset Order(OrderType) +using localfs +(("path"="asterix_nc1://data/big-object/order.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + +create external dataset Customer(CustomerType) +using localfs +(("path"="asterix_nc1://data/big-object/customer.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.2.update.aql new file mode 100644 index 0000000..538b48c --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.2.update.aql @@ -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. + */ +/* +* Description : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.3.query.aql new file mode 100644 index 0000000..687ab0f --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_join/big_object_join.3.query.aql @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ + +use dataverse test; + +for $c in dataset('Customer') +for $o in dataset('Order') +where $c.c_custkey = $o.o_custkey +order by $o.o_orderkey, $c.c_custkey +return { + "c_custkey": $c.c_custkey, + "o_orderkey": $o.o_orderkey, + "len_c_comment": string-length($c.c_comment), + "len_o_comment": string-length($o.o_comment), + "c_comment": $c.c_comment +} + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load/big_object_load.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load/big_object_load.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load/big_object_load.1.ddl.aql new file mode 100644 index 0000000..fb61634 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load/big_object_load.1.ddl.aql @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ +drop dataverse test if exists; +create dataverse test; + +use dataverse test; + +create type LineType as closed { + l_orderkey: int32, + l_partkey: int32, + l_suppkey: int32, + l_linenumber: int32, + l_quantity: double, + l_extendedprice: double, + l_discount: double, + l_tax: double, + l_returnflag: string, + l_linestatus: string, + l_shipdate: string, + l_commitdate: string, + l_receiptdate: string, + l_shipinstruct: string, + l_shipmode: string, + l_comment: string +} + +create type OrderType as closed { + o_orderkey: int32, + o_custkey: int32, + o_orderstatus: string, + o_totalprice: double, + o_orderdate: string, + o_orderpriority: string, + o_clerk: string, + o_shippriority: int32, + o_comment: string +} + +create type CustomerType as closed { + c_custkey: int32, + c_name: string, + c_address: string, + c_nationkey: int32, + c_phone: string, + c_acctbal: double, + c_mktsegment: string, + c_comment: string +} + + +create external dataset Line(LineType) +using localfs +(("path"="asterix_nc1://data/big-object/lineitem.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + +create external dataset Order(OrderType) +using localfs +(("path"="asterix_nc1://data/big-object/order.tbl.verylong.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + +create external dataset Customer(CustomerType) +using localfs +(("path"="asterix_nc1://data/big-object/customer.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load/big_object_load.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load/big_object_load.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load/big_object_load.2.update.aql new file mode 100644 index 0000000..538b48c --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load/big_object_load.2.update.aql @@ -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. + */ +/* +* Description : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load/big_object_load.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load/big_object_load.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load/big_object_load.3.query.aql new file mode 100644 index 0000000..9ae41eb --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load/big_object_load.3.query.aql @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ + +use dataverse test; + +for $o in dataset('Order') +return { + "custkey": $o.o_custkey, + "orderkey": $o.o_orderkey, + "len-comment": string-length($o.o_comment) +} + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load_20M/big_object_load_20M.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load_20M/big_object_load_20M.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load_20M/big_object_load_20M.1.ddl.aql new file mode 100644 index 0000000..77c8179 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load_20M/big_object_load_20M.1.ddl.aql @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : big_object_bulkload.aql + * Description : bulkload insert of large objects + * Expected Result : Success + * Date : 20th April 2016 + */ + +drop dataverse testdv2 if exists; +create dataverse testdv2; +use dataverse testdv2; + +create type testtype as closed { + id: int64, + name: string, + hobbies: {{string}} +} + +create dataset testds(testtype) primary key id; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load_20M/big_object_load_20M.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load_20M/big_object_load_20M.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load_20M/big_object_load_20M.2.update.aql new file mode 100644 index 0000000..39842e4 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load_20M/big_object_load_20M.2.update.aql @@ -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. + */ +/** + * + * Big object (20 MB) loading test + * Expected result: success + * + */ + +use dataverse testdv2; + + +set "compiler.sortmemory" "64MB" + +load dataset testds +using localfs +(("path"="asterix_nc1://target/data/big-object/big_object_20M.adm"),("format"="adm")); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load_20M/big_object_load_20M.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load_20M/big_object_load_20M.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load_20M/big_object_load_20M.3.query.aql new file mode 100644 index 0000000..23c1bed --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_load_20M/big_object_load_20M.3.query.aql @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse testdv2; + +for $d in dataset("testds") +where $d.id = 1 +return $d http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.1.ddl.aql new file mode 100644 index 0000000..669a784 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.1.ddl.aql @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. +* This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ +drop dataverse test if exists; +create dataverse test; + +use dataverse test; + +create type LineType as closed { + l_orderkey: int32, + l_partkey: int32, + l_suppkey: int32, + l_linenumber: int32, + l_quantity: double, + l_extendedprice: double, + l_discount: double, + l_tax: double, + l_returnflag: string, + l_linestatus: string, + l_shipdate: string, + l_commitdate: string, + l_receiptdate: string, + l_shipinstruct: string, + l_shipmode: string, + l_comment: string +} + +create type OrderType as closed { + o_orderkey: int32, + o_custkey: int32, + o_orderstatus: string, + o_totalprice: double, + o_orderdate: string, + o_orderpriority: string, + o_clerk: string, + o_shippriority: int32, + o_comment: string +} + +create type CustomerType as closed { + c_custkey: int32, + c_name: string, + c_address: string, + c_nationkey: int32, + c_phone: string, + c_acctbal: double, + c_mktsegment: string, + c_comment: string +} + + +create external dataset Line(LineType) +using localfs +(("path"="asterix_nc1://data/big-object/lineitem.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + +create external dataset Order(OrderType) +using localfs +(("path"="asterix_nc1://data/big-object/order.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + +create external dataset Customer(CustomerType) +using localfs +(("path"="asterix_nc1://data/big-object/customer.tbl.big"),("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|")); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.2.update.aql new file mode 100644 index 0000000..538b48c --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.2.update.aql @@ -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. + */ +/* +* Description : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. + This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.3.query.aql new file mode 100644 index 0000000..c772fc5 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_sort/big_object_sort.3.query.aql @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 : Create an external dataset that contains long comments fields, 10% of the records have a 32K size comments. +* This will trigger into the VSizeFrame path +* Expected Res : Success +* Date : Jun 16 2015 +*/ + +use dataverse test; + +for $o in dataset('Order') +order by $o.o_custkey, $o.o_orderkey +return { + "custkey": $o.o_custkey, + "orderkey": $o.o_orderkey, + "len-comment": string-length($o.o_comment), + "comment": $o.o_comment +} + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/concat/concat_01.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/concat/concat_01.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/concat/concat_01.1.ddl.aql new file mode 100644 index 0000000..d17ea60 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/concat/concat_01.1.ddl.aql @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/concat/concat_01.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/concat/concat_01.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/concat/concat_01.2.update.aql new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/concat/concat_01.2.update.aql @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/concat/concat_01.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/concat/concat_01.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/concat/concat_01.3.query.aql new file mode 100644 index 0000000..bc50b18 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/concat/concat_01.3.query.aql @@ -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 dataverse test; + +let $x := [ hex("aa"), hex("259911"), hex("bb"), hex("31")] +let $c := binary-concat($x) + +let $x1 := [] +let $c1 := binary-concat($x1) + +let $c2 := binary-concat([null]) +let $c3 := binary-concat([null, hex('55')]) +let $c4 := binary-concat([hex('aa'), null]) +let $c5 := binary-concat([hex('aa'), null, base64('asdf')]) +return [ $c = hex("AA259911bb31"), $c1 = hex(""), $c2 , $c3 , $c4 , $c5 ] http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/equal_join/equal_join.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/equal_join/equal_join.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/equal_join/equal_join.1.ddl.aql new file mode 100644 index 0000000..d64a31c --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/equal_join/equal_join.1.ddl.aql @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 dataverse test; + +create type UserType as closed { + id: int64, + name: string, + md5: binary +} + +create dataset User(UserType) + primary key id; + +create dataset UserCopy(UserType) + primary key id; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/equal_join/equal_join.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/equal_join/equal_join.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/equal_join/equal_join.2.update.aql new file mode 100644 index 0000000..4ce649c --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/equal_join/equal_join.2.update.aql @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +load dataset User +using localfs +(("path"="asterix_nc1://data/adm-load/usermd5.adm"),("format"="adm")) ; + +load dataset UserCopy +using localfs +(("path"="asterix_nc1://data/adm-load/usermd5copy.adm"),("format"="adm")) ; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/equal_join/equal_join.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/equal_join/equal_join.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/equal_join/equal_join.3.query.aql new file mode 100644 index 0000000..7ce50f2 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/equal_join/equal_join.3.query.aql @@ -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 dataverse test; + +for $c in dataset('User') +for $o in dataset('UserCopy') +where $c.md5 = $o.md5 +order by $c.id +return {"cid":$c.id, "oid": $o.id} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/find/find.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/find/find.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/find/find.1.ddl.aql new file mode 100644 index 0000000..d17ea60 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/find/find.1.ddl.aql @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/find/find.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/find/find.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/find/find.2.update.aql new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/find/find.2.update.aql @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/find/find.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/find/find.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/find/find.3.query.aql new file mode 100644 index 0000000..6e64f16 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/find/find.3.query.aql @@ -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. + */ +use dataverse test; + +let $x := hex("aabbccddaa") +let $r1 := find-binary($x, hex('')) = 0 +let $r2 := find-binary($x, hex('aa')) = 0 +let $r3 := find-binary($x, hex('aa'), 1) = 4 +let $r4 := find-binary($x, hex('aabb'), 0) = find-binary($x, hex('aabb')) +let $r5 := find-binary($x, hex('11')) = -1 +let $r6 := find-binary($x, hex('ccddaa')) = 2 +let $r7 := find-binary($x, hex('ccddaabb')) = -1 + +let $r8 := find-binary($x, null) +let $r9 := find-binary(null, null) +let $r0 := find-binary(null, $x) +return [ $r1 , $r2 , $r3 , $r4 , $r5 , $r6 , $r7, $r8, $r9 , $r0] http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/index_join/index_join.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/index_join/index_join.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/index_join/index_join.1.ddl.aql new file mode 100644 index 0000000..53393ab --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/index_join/index_join.1.ddl.aql @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 dataverse test; + +create type UserType as closed { + id: int64, + name: string, + md5: binary +} + +create dataset User(UserType) + primary key md5; + +create dataset UserCopy(UserType) + primary key md5; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/index_join/index_join.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/index_join/index_join.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/index_join/index_join.2.update.aql new file mode 100644 index 0000000..4ce649c --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/index_join/index_join.2.update.aql @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +load dataset User +using localfs +(("path"="asterix_nc1://data/adm-load/usermd5.adm"),("format"="adm")) ; + +load dataset UserCopy +using localfs +(("path"="asterix_nc1://data/adm-load/usermd5copy.adm"),("format"="adm")) ; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/index_join/index_join.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/index_join/index_join.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/index_join/index_join.3.query.aql new file mode 100644 index 0000000..7ce50f2 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/index_join/index_join.3.query.aql @@ -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 dataverse test; + +for $c in dataset('User') +for $o in dataset('UserCopy') +where $c.md5 = $o.md5 +order by $c.id +return {"cid":$c.id, "oid": $o.id} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/insert/insert.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/insert/insert.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/insert/insert.1.ddl.aql new file mode 100644 index 0000000..9653ac1 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/insert/insert.1.ddl.aql @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 dataverse test; + +create type UserTypeOpen as open{ + id: int64 +} + + +create type UserTypeClose as closed { + id: int64, + name: string, + md5: binary +} + +create dataset UserOpen(UserTypeOpen) + primary key id; + +create dataset UserCopyClose(UserTypeClose) + primary key md5; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/insert/insert.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/insert/insert.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/insert/insert.2.update.aql new file mode 100644 index 0000000..361f9f5 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/insert/insert.2.update.aql @@ -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. + */ +use dataverse test; + +load dataset UserOpen +using localfs +(("path"="asterix_nc1://data/adm-load/usermd5.adm"),("format"="adm")) ; + +load dataset UserCopyClose +using localfs +(("path"="asterix_nc1://data/adm-load/usermd5copy.adm"),("format"="adm")) ; + + +insert into dataset UserOpen( +for $l in dataset('UserCopyClose') + where $l.id>10 + return { + "id": $l.id, + "name": $l.name, + "md5": $l.md5 + } +); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/insert/insert.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/insert/insert.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/insert/insert.3.query.aql new file mode 100644 index 0000000..261f146 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/insert/insert.3.query.aql @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +for $c in dataset('UserOpen') +order by $c.id, $c.md5 +return $c http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/length/length.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/length/length.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/length/length.1.ddl.aql new file mode 100644 index 0000000..d17ea60 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/length/length.1.ddl.aql @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/length/length.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/length/length.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/length/length.2.update.aql new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/length/length.2.update.aql @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/length/length.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/length/length.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/length/length.3.query.aql new file mode 100644 index 0000000..4b56dc6 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/length/length.3.query.aql @@ -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. + */ +use dataverse test; + +let $c1 := binary-length(hex("00AA")) +let $c2 := binary-length(hex("")) +let $c3 := binary-length(null) +return {"result1": $c1, "result2": $c2, "result3": $c3} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/parse/parse.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/parse/parse.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/parse/parse.1.ddl.aql new file mode 100644 index 0000000..cbc5458 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/parse/parse.1.ddl.aql @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/parse/parse.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/parse/parse.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/parse/parse.2.update.aql new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/binary/parse/parse.2.update.aql @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */
