This is an automated email from the ASF dual-hosted git repository.
wyk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push:
new a1b583e891 [ASTERIXDB-3289][TEST] Add test
a1b583e891 is described below
commit a1b583e891605fd4e324d015a0e13ca24bb63dec
Author: Wail Alkowaileet <[email protected]>
AuthorDate: Wed Oct 25 11:45:24 2023 -0700
[ASTERIXDB-3289][TEST] Add test
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
Add test for ASTERIXDB-3289
Change-Id: Iba7a4bbcd3b273953caab7f0e04f1a432fb2ab8e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17880
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Murtadha Hubail <[email protected]>
Tested-by: Wail Alkowaileet <[email protected]>
---
.../composite-pks/composite-pks.001.ddl.sqlpp | 28 ++++++++++
.../composite-pks/composite-pks.002.update.sqlpp | 63 ++++++++++++++++++++++
.../composite-pks/composite-pks.003.sleep.sqlpp | 20 +++++++
.../composite-pks/composite-pks.004.query.sqlpp | 24 +++++++++
.../column/composite-pks/composite-pks.004.adm | 27 ++++++++++
.../src/test/resources/runtimets/sqlpp_queries.xml | 5 ++
6 files changed, 167 insertions(+)
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/composite-pks/composite-pks.001.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/composite-pks/composite-pks.001.ddl.sqlpp
new file mode 100644
index 0000000000..f2b599e0fc
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/composite-pks/composite-pks.001.ddl.sqlpp
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+USE test;
+
+CREATE COLLECTION CompositeKey
+PRIMARY KEY (k1: string, k2: string)
+WITH {
+ "storage-format": {"format":"column"}
+};
\ No newline at end of file
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/composite-pks/composite-pks.002.update.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/composite-pks/composite-pks.002.update.sqlpp
new file mode 100644
index 0000000000..d21be802f8
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/composite-pks/composite-pks.002.update.sqlpp
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+/*
+ * Those are atomic UPSERT and each will produce a component
+ */
+
+UPSERT INTO CompositeKey (
+ {"k1": "1", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "2", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "3", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "4", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "5", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "6", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "7", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "8", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "9", "k2": "The quick brown fox jumps over the lazy dog"}
+);
+
+UPSERT INTO CompositeKey (
+ {"k1": "10", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "20", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "30", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "40", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "50", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "60", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "70", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "80", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "90", "k2": "The quick brown fox jumps over the lazy dog"}
+);
+
+UPSERT INTO CompositeKey (
+ {"k1": "11", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "21", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "31", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "41", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "51", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "61", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "71", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "81", "k2": "The quick brown fox jumps over the lazy dog"},
+ {"k1": "91", "k2": "The quick brown fox jumps over the lazy dog"}
+);
+
+-- Compact the dataset just in case the merge policy changes from 3 components
to trigger a merge
+COMPACT DATASET CompositeKey;
\ No newline at end of file
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/composite-pks/composite-pks.003.sleep.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/composite-pks/composite-pks.003.sleep.sqlpp
new file mode 100644
index 0000000000..c0e90c821a
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/composite-pks/composite-pks.003.sleep.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.
+ */
+
+5000
\ No newline at end of file
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/composite-pks/composite-pks.004.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/composite-pks/composite-pks.004.query.sqlpp
new file mode 100644
index 0000000000..f14acad3e6
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/composite-pks/composite-pks.004.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+
+SELECT VALUE c
+FROM CompositeKey c
+ORDER BY to_bigint(k1);
\ No newline at end of file
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/composite-pks/composite-pks.004.adm
b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/composite-pks/composite-pks.004.adm
new file mode 100644
index 0000000000..c38033d6d1
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/composite-pks/composite-pks.004.adm
@@ -0,0 +1,27 @@
+{ "k1": "1", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "2", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "3", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "4", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "5", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "6", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "7", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "8", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "9", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "10", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "11", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "20", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "21", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "30", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "31", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "40", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "41", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "50", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "51", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "60", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "61", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "70", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "71", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "80", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "81", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "90", "k2": "The quick brown fox jumps over the lazy dog" }
+{ "k1": "91", "k2": "The quick brown fox jumps over the lazy dog" }
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
b/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
index 0f537d7814..8df45999cd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
@@ -16160,6 +16160,11 @@
<output-dir compare="Text">nested-pk</output-dir>
</compilation-unit>
</test-case>
+ <test-case FilePath="column">
+ <compilation-unit name="composite-pks">
+ <output-dir compare="Text">composite-pks</output-dir>
+ </compilation-unit>
+ </test-case>
<test-case FilePath="column">
<compilation-unit name="meta/meta_after_gby">
<output-dir compare="Text">meta/meta_after_gby</output-dir>