>From Wail Alkowaileet <[email protected]>: Wail Alkowaileet has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17549 )
Change subject: [NO ISSUE] Add tests for [ASTERIXDB-3194, ASTERIXDB-3193, ASTERIXDB-3191] ...................................................................... [NO ISSUE] Add tests for [ASTERIXDB-3194, ASTERIXDB-3193, ASTERIXDB-3191] - user model changes: no - storage format changes: no - interface changes: no Details: Add tests for ASTERIXDB-3194, ASTERIXDB-3193, and ASTERIXDB-3191 Change-Id: I6d462507822f22f1d00b9a8abda73ff089abe3b8 --- A asterixdb/asterix-app/src/test/resources/runtimets/results/column/multipart-dataverse/multipart-dataverse.002.plan A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/multipart-dataverse/multipart-dataverse.003.ddl.sqlpp M asterixdb/asterix-app/src/test/resources/runtimets/only_sqlpp.xml A asterixdb/asterix-app/src/test/resources/runtimets/results/column/metadata/metadata.002.adm A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/metadata/metadata.002.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/multipart-dataverse/multipart-dataverse.001.ddl.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/multipart-dataverse/multipart-dataverse.002.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/metadata/metadata.001.ddl.sqlpp 8 files changed, 219 insertions(+), 0 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/49/17549/1 diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/only_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/only_sqlpp.xml index 334dd52..fe558a7 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/only_sqlpp.xml +++ b/asterixdb/asterix-app/src/test/resources/runtimets/only_sqlpp.xml @@ -19,5 +19,15 @@ !--> <test-suite xmlns="urn:xml.testframework.asterix.apache.org" ResultOffsetPath="results" QueryOffsetPath="queries_sqlpp" QueryFileExtension=".sqlpp"> <test-group name="failed"> + <test-case FilePath="column"> + <compilation-unit name="multipart-dataverse"> + <output-dir compare="Text">multipart-dataverse</output-dir> + </compilation-unit> + </test-case> + <test-case FilePath="column"> + <compilation-unit name="metadata"> + <output-dir compare="Text">metadata</output-dir> + </compilation-unit> + </test-case> </test-group> </test-suite> diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/metadata/metadata.001.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/metadata/metadata.001.ddl.sqlpp new file mode 100644 index 0000000..3ba53c8 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/metadata/metadata.001.ddl.sqlpp @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT 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 ColumnType AS { + id: int +}; + +CREATE DATASET ColumnDataset1(ColumnType) +PRIMARY KEY id WITH { + "storage-format": {"format" : "column"} +}; + +CREATE DATASET ColumnDataset2(ColumnType) +PRIMARY KEY id WITH { + "storage-format": {"format" : "column", "max-tuple-count": 10} +}; + +CREATE DATASET ColumnDataset3(ColumnType) +PRIMARY KEY id WITH { + "storage-format": {"format" : "column", "free-space-tolerance": 0.11} +}; + +CREATE DATASET ColumnDataset4(ColumnType) +PRIMARY KEY id WITH { + "storage-format": {"format" : "column", "free-space-tolerance": 0.11, "max-tuple-count": 10} +}; + +CREATE DATASET RowDataset(ColumnType) +PRIMARY KEY id WITH { + "storage-format": {"format" : "row"} +}; \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/metadata/metadata.002.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/metadata/metadata.002.query.sqlpp new file mode 100644 index 0000000..4ef4e90 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/metadata/metadata.002.query.sqlpp @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +USE Metadata; + + +SELECT d.DatasetName, d.DatasetFormat +FROM `Dataset` d +WHERE d.DataverseName = "test" + AND (d.DatasetName = "RowDataset" OR d.DatasetName LIKE "ColumnDataset%") +ORDER BY d.DatasetName; \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/multipart-dataverse/multipart-dataverse.001.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/multipart-dataverse/multipart-dataverse.001.ddl.sqlpp new file mode 100644 index 0000000..a44e682 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/multipart-dataverse/multipart-dataverse.001.ddl.sqlpp @@ -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.test if exists; +CREATE DATAVERSE test.test; +USE test.test; + +CREATE TYPE ColumnType AS { + id: int +}; + +CREATE DATASET ColumnDataset(ColumnType) +PRIMARY KEY id WITH { + "storage-format": {"format" : "column"} +}; + +CREATE INDEX ageIdx on ColumnDataset(age:int); + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/multipart-dataverse/multipart-dataverse.002.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/multipart-dataverse/multipart-dataverse.002.query.sqlpp new file mode 100644 index 0000000..34c8870 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/multipart-dataverse/multipart-dataverse.002.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.test; + + +EXPLAIN +SELECT VALUE d +FROM ColumnDataset d +WHERE d.age > 2; \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/multipart-dataverse/multipart-dataverse.003.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/multipart-dataverse/multipart-dataverse.003.ddl.sqlpp new file mode 100644 index 0000000..41f2fa4 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/multipart-dataverse/multipart-dataverse.003.ddl.sqlpp @@ -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.test if exists; diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/metadata/metadata.002.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/metadata/metadata.002.adm new file mode 100644 index 0000000..4b0eed3 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/metadata/metadata.002.adm @@ -0,0 +1,5 @@ +{ "DatasetName": "ColumnDataset1", "DatasetFormat": { "Format": "COLUMN", "MaxTupleCount": 15000, "FreeSpaceTolerance": 0.15 } } +{ "DatasetName": "ColumnDataset2", "DatasetFormat": { "Format": "COLUMN", "MaxTupleCount": 10, "FreeSpaceTolerance": 0.15 } } +{ "DatasetName": "ColumnDataset3", "DatasetFormat": { "Format": "COLUMN", "MaxTupleCount": 15000, "FreeSpaceTolerance": 0.11 } } +{ "DatasetName": "ColumnDataset4", "DatasetFormat": { "Format": "COLUMN", "MaxTupleCount": 10, "FreeSpaceTolerance": 0.11 } } +{ "DatasetName": "RowDataset", "DatasetFormat": { "Format": "ROW" } } \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/multipart-dataverse/multipart-dataverse.002.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/multipart-dataverse/multipart-dataverse.002.plan new file mode 100644 index 0000000..c60ece3 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/multipart-dataverse/multipart-dataverse.002.plan @@ -0,0 +1,30 @@ +distribute result [$$d] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] +-- DISTRIBUTE_RESULT |PARTITIONED| + exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + select (gt($$d.getField("age"), 2)) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- STREAM_SELECT |PARTITIONED| + project ([$$d]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- STREAM_PROJECT |PARTITIONED| + exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + unnest-map [$$15, $$d] <- index-search("ColumnDataset", 0, "test/test", "ColumnDataset", false, false, 1, $$19, 1, $$19, true, true, true) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- BTREE_SEARCH |PARTITIONED| + exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + order (ASC, $$19) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- STABLE_SORT [$$19(ASC)] |PARTITIONED| + exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + project ([$$19]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- STREAM_PROJECT |PARTITIONED| + exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + unnest-map [$$18, $$19] <- index-search("ageIdx", 0, "test/test", "ColumnDataset", false, false, 1, $$17, 0, true, true, false) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- BTREE_SEARCH |PARTITIONED| + exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + assign [$$17] <- [2] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- ASSIGN |PARTITIONED| + empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0] + -- EMPTY_TUPLE_SOURCE |PARTITIONED| -- To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17549 To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Change-Id: I6d462507822f22f1d00b9a8abda73ff089abe3b8 Gerrit-Change-Number: 17549 Gerrit-PatchSet: 1 Gerrit-Owner: Wail Alkowaileet <[email protected]> Gerrit-MessageType: newchange
