diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateTableStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateTableStmt.java index ba095175f7..97073c088e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateTableStmt.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateTableStmt.java @@ -412,9 +412,8 @@ public class CreateTableStmt extends DdlStmt { } keysDesc.analyze(columnDefs); - if (!CollectionUtils.isEmpty(keysDesc.getClusterKeysColumnNames()) && !enableUniqueKeyMergeOnWrite) { - throw new AnalysisException("Cluster keys only support unique keys table which enabled " - + PropertyAnalyzer.ENABLE_UNIQUE_KEY_MERGE_ON_WRITE); + if (!CollectionUtils.isEmpty(keysDesc.getClusterKeysColumnNames())) { + throw new AnalysisException("Cluster key is not supported"); } for (int i = 0; i < keysDesc.keysColumnSize(); ++i) { columnDefs.get(i).setIsKey(true); diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/KeysDesc.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/KeysDesc.java index 654db1b4a5..ec331cb47c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/KeysDesc.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/KeysDesc.java @@ -90,11 +90,7 @@ public class KeysDesc implements Writable { } if (clusterKeysColumnNames != null) { - if (type != KeysType.UNIQUE_KEYS) { - throw new AnalysisException("Cluster keys only support unique keys table."); - } - clusterKeysColumnIds = Lists.newArrayList(); - analyzeClusterKeys(cols); + throw new AnalysisException("Cluster key is not supported"); } for (int i = 0; i < keysColumnNames.size(); ++i) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateTableInfo.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateTableInfo.java index 2572cf0987..15a8b2ba58 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateTableInfo.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateTableInfo.java @@ -393,10 +393,8 @@ public class CreateTableInfo { } validateKeyColumns(); - if (!clusterKeysColumnNames.isEmpty() && !isEnableMergeOnWrite) { - throw new AnalysisException( - "Cluster keys only support unique keys table which enabled " - + PropertyAnalyzer.ENABLE_UNIQUE_KEY_MERGE_ON_WRITE); + if (!clusterKeysColumnNames.isEmpty()) { + throw new AnalysisException("Cluster key is not supported"); } for (int i = 0; i < keys.size(); ++i) { columns.get(i).setIsKey(true); @@ -690,44 +688,7 @@ public class CreateTableInfo { } if (!clusterKeysColumnNames.isEmpty()) { - if (keysType != KeysType.UNIQUE_KEYS) { - throw new AnalysisException("Cluster keys only support unique keys table."); - } - clusterKeysColumnIds = Lists.newArrayList(); - for (int i = 0; i < clusterKeysColumnNames.size(); ++i) { - String name = clusterKeysColumnNames.get(i); - // check if key is duplicate - for (int j = 0; j < i; j++) { - if (clusterKeysColumnNames.get(j).equalsIgnoreCase(name)) { - throw new AnalysisException("Duplicate cluster key column[" + name + "]."); - } - } - // check if key exists and generate key column ids - for (int j = 0; j < columns.size(); j++) { - if (columns.get(j).getName().equalsIgnoreCase(name)) { - columns.get(j).setClusterKeyId(clusterKeysColumnIds.size()); - clusterKeysColumnIds.add(j); - break; - } - if (j == columns.size() - 1) { - throw new AnalysisException( - "Key cluster column[" + name + "] doesn't exist."); - } - } - } - - int minKeySize = keys.size() < clusterKeysColumnNames.size() ? keys.size() - : clusterKeysColumnNames.size(); - boolean sameKey = true; - for (int i = 0; i < minKeySize; ++i) { - if (!keys.get(i).equalsIgnoreCase(clusterKeysColumnNames.get(i))) { - sameKey = false; - break; - } - } - if (sameKey) { - throw new AnalysisException("Unique keys and cluster keys should be different."); - } + throw new AnalysisException("Cluster key is not supported"); } for (int i = 0; i < keys.size(); ++i) { diff --git a/regression-test/data/compaction/test_compaction_uniq_cluster_keys_with_delete.out b/regression-test/data/compaction/test_compaction_uniq_cluster_keys_with_delete.out deleted file mode 100644 index ea06a5aa3c..0000000000 --- a/regression-test/data/compaction/test_compaction_uniq_cluster_keys_with_delete.out +++ /dev/null @@ -1,15 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !select_default -- -2 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2017-10-01T11:11:11.140 2017-10-01T11:11:11.120111 2020-01-03T00:00 1 32 20 - --- !select_default1 -- -3 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 \N \N \N \N 2020-01-05T00:00 1 34 20 - --- !select_default2 -- -3 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 \N \N \N \N 2020-01-05T00:00 1 34 20 -4 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 \N \N \N \N 2020-01-05T00:00 1 34 20 - --- !select_default3 -- -3 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 \N \N \N \N 2020-01-05T00:00 1 34 20 -4 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 \N \N \N \N 2020-01-05T00:00 1 34 20 - diff --git a/regression-test/data/compaction/test_compaction_uniq_keys_cluster_key.out b/regression-test/data/compaction/test_compaction_uniq_keys_cluster_key.out deleted file mode 100644 index 0ab6761ce2..0000000000 --- a/regression-test/data/compaction/test_compaction_uniq_keys_cluster_key.out +++ /dev/null @@ -1,13 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !select_default -- -1 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 2017-10-01T11:11:11.160 2017-10-01T11:11:11.100111 2020-01-02T00:00 1 31 19 -2 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2017-10-01T11:11:11.140 2017-10-01T11:11:11.120111 2020-01-03T00:00 1 32 20 -3 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 \N \N \N \N 2020-01-05T00:00 1 34 20 -4 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 \N \N \N \N 2020-01-05T00:00 1 34 20 - --- !select_default2 -- -1 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 2017-10-01T11:11:11.160 2017-10-01T11:11:11.100111 2020-01-02T00:00 1 31 19 -2 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2017-10-01T11:11:11.140 2017-10-01T11:11:11.120111 2020-01-03T00:00 1 32 20 -3 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 \N \N \N \N 2020-01-05T00:00 1 34 20 -4 2017-10-01 2017-10-01 2017-10-01T11:11:11.110 2017-10-01T11:11:11.110111 Beijing 10 1 \N \N \N \N 2020-01-05T00:00 1 34 20 - diff --git a/regression-test/data/point_query_p0/test_point_query_cluster_key.out b/regression-test/data/point_query_p0/test_point_query_cluster_key.out deleted file mode 100644 index f92dc58341..0000000000 --- a/regression-test/data/point_query_p0/test_point_query_cluster_key.out +++ /dev/null @@ -1,151 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !point_select -- -1231 119291.110000000 ddd laooq \N 2020-01-01 12:36:38 \N 1022-01-01 \N 1.111 \N [119181.111100000, 819019.119100000, null] - --- !point_select -- -1231 119291.110000000 ddd laooq \N 2020-01-01 12:36:38 \N 1022-01-01 \N 1.111 \N [119181.111100000, 819019.119100000, null] - --- !point_select -- -1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 90696620686827832.374 [1.100000000, 2.200000000, 3.300000000, 4.400000000, 5.500000000] [] - --- !point_select -- -1232 12222.991211350 xxx laooq 2023-01-02 2020-01-01 12:36:38 522.762 2022-01-01 true 212.111 \N \N - --- !point_select -- -251 120939.111300000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa laooq 2030-01-02 2020-01-01 12:36:38 251.0 7022-01-01 true 90696620686827832.374 [11111.000000000] [] - --- !point_select -- -252 120939.111300000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa laooq 2030-01-02 2020-01-01 12:36:38 252.0 7022-01-01 false 90696620686827832.374 \N [0.000000000] - --- !point_select -- -298 120939.111300000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa laooq 2030-01-02 2020-01-01 12:36:38 298.0 7022-01-01 true 90696620686827832.374 [] [] - --- !point_select -- -1235 991129292901.111380000 dd \N 2120-01-02 2020-01-01 12:36:38 652.692 5022-01-01 false 90696620686827832.374 [119181.111100000] ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"] - --- !point_select -- -646464 6C616F6F71 - --- !point_select -- -646464 6C616F6F71 - --- !point_select -- -646464 6C616F6F71 - --- !point_select -- -1235 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 true 1.111 [119291.192910000] ["111", "222", "333"] 1 - --- !point_select -- -1235 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 true 1.111 [119291.192910000] ["111", "222", "333"] 1 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 0 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 0 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 0 - --- !sql -- -1231 119291.110000000 ddd laooq \N 2020-01-01T12:36:38 \N 1022-01-01 \N 1.111 [119181.111100000, 819019.119100000, null] \N 0 0 - --- !sql -- -1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01T12:36:38 22.822 7022-01-01 false 90696620686827832.374 [1.100000000, 2.200000000, 3.300000000, 4.400000000, 5.500000000] [] 0 0 - --- !sql -- -6120202020646464 6C616F6F71 32.92200050354004 - --- !sql -- -0 1 2 3 - --- !point_select -- -1231 119291.110000000 ddd laooq \N 2020-01-01 12:36:38 \N 1022-01-01 \N 1.111 \N [119181.111100000, 819019.119100000, null] - --- !point_select -- -1231 119291.110000000 ddd laooq \N 2020-01-01 12:36:38 \N 1022-01-01 \N 1.111 \N [119181.111100000, 819019.119100000, null] - --- !point_select -- -1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 90696620686827832.374 [1.100000000, 2.200000000, 3.300000000, 4.400000000, 5.500000000] [] - --- !point_select -- -1232 12222.991211350 xxx laooq 2023-01-02 2020-01-01 12:36:38 522.762 2022-01-01 true 212.111 \N \N - --- !point_select -- -251 120939.111300000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa laooq 2030-01-02 2020-01-01 12:36:38 251.0 7022-01-01 true 90696620686827832.374 [11111.000000000] [] - --- !point_select -- -252 120939.111300000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa laooq 2030-01-02 2020-01-01 12:36:38 252.0 7022-01-01 false 90696620686827832.374 \N [0.000000000] - --- !point_select -- -298 120939.111300000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa laooq 2030-01-02 2020-01-01 12:36:38 298.0 7022-01-01 true 90696620686827832.374 [] [] - --- !point_select -- -1235 991129292901.111380000 dd \N 2120-01-02 2020-01-01 12:36:38 652.692 5022-01-01 false 90696620686827832.374 [119181.111100000] ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"] - --- !point_select -- -646464 6C616F6F71 - --- !point_select -- -646464 6C616F6F71 - --- !point_select -- -646464 6C616F6F71 - --- !point_select -- -1235 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 true 1.111 [119291.192910000] ["111", "222", "333"] 1 - --- !point_select -- -1235 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 true 1.111 [119291.192910000] ["111", "222", "333"] 1 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 0 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 0 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 - --- !point_select -- -1235 120939.111300000 a ddd xxxxxx 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 false 1929111.111 [119291.192910000] ["111", "222", "333"] 2 0 - --- !sql -- -1231 119291.110000000 ddd laooq \N 2020-01-01T12:36:38 \N 1022-01-01 \N 1.111 [119181.111100000, 819019.119100000, null] \N 0 0 - --- !sql -- -1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01T12:36:38 22.822 7022-01-01 false 90696620686827832.374 [1.100000000, 2.200000000, 3.300000000, 4.400000000, 5.500000000] [] 0 0 - --- !sql -- -6120202020646464 6C616F6F71 32.92200050354004 - --- !sql -- -0 1 2 3 - diff --git a/regression-test/data/unique_with_mow_p0/cluster_key/test_delete_sign_delete_bitmap.out b/regression-test/data/unique_with_mow_p0/cluster_key/test_delete_sign_delete_bitmap.out deleted file mode 100644 index 687aeab54a..0000000000 --- a/regression-test/data/unique_with_mow_p0/cluster_key/test_delete_sign_delete_bitmap.out +++ /dev/null @@ -1,54 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !sql -- -1 1 1 1 1 -2 2 2 2 2 -3 3 3 3 3 -4 4 4 4 4 -5 5 5 5 5 - --- !after_delete -- -2 2 2 2 2 -4 4 4 4 4 - --- !1 -- -1 1 1 1 1 0 -1 1 1 1 1 1 -2 2 2 2 2 0 -3 3 3 3 3 0 -3 3 3 3 3 1 -4 4 4 4 4 0 -5 5 5 5 5 0 -5 5 5 5 5 1 - --- !2 -- -2 2 2 2 2 0 -4 4 4 4 4 0 - --- !sql -- -1 1 1 1 1 -2 2 2 2 2 -3 3 3 3 3 -4 4 4 4 4 -5 5 5 5 5 - --- !after_delete -- -2 2 2 2 2 -4 4 4 4 4 - --- !1 -- -1 1 1 1 1 0 -1 1 1 1 1 1 -2 2 2 2 2 0 -3 3 3 3 3 0 -3 3 3 3 3 1 -4 4 4 4 4 0 -5 5 5 5 5 0 -5 5 5 5 5 1 - --- !2 -- -1 1 1 1 1 1 -2 2 2 2 2 0 -3 3 3 3 3 1 -4 4 4 4 4 0 -5 5 5 5 5 1 - diff --git a/regression-test/data/unique_with_mow_p0/cluster_key/test_mow_with_null_sequence.out b/regression-test/data/unique_with_mow_p0/cluster_key/test_mow_with_null_sequence.out deleted file mode 100644 index 2c14cb05ec..0000000000 --- a/regression-test/data/unique_with_mow_p0/cluster_key/test_mow_with_null_sequence.out +++ /dev/null @@ -1,14 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !sql -- -a abc address2 2022-10-20 -aa1234 abc address4 2022-12-11 -aa1235 abc address6 \N -ab abc address6 2022-11-20 - --- !sql -- -a abc address2 100 -aa1234 abc address4 -1 -aa1235 abc address6 -1 -aa1236 abc address6 0 -ab abc address6 110 - diff --git a/regression-test/data/unique_with_mow_p0/cluster_key/test_schema_change.out b/regression-test/data/unique_with_mow_p0/cluster_key/test_schema_change.out deleted file mode 100644 index 7381d98730..0000000000 --- a/regression-test/data/unique_with_mow_p0/cluster_key/test_schema_change.out +++ /dev/null @@ -1,159 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 20 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 21 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 - --- !sql -- -5 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 - --- !sql -- -5 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 -6 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 -6 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 -7 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 25 - --- !sql -- -6 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 20 -6 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 -7 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 25 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 21 -6 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 -7 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 25 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 -6 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 -7 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 25 - --- !sql -- -5 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 - --- !sql -- -7 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 -6 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 -7 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 25 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 -6 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 -7 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 25 - --- !sql -- -6 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 20 -6 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 22 -7 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 25 - --- !sql -- -6 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 22 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 21 -6 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 22 -7 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 25 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 22 -6 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 22 -7 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 25 - --- !sql -- -5 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 22 - --- !sql -- -7 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 22 -6 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 22 -7 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 25 - --- !sql -- -1 2017-10-01 Beijing 10 1 2020-01-01T00:00 2020-01-01T00:00 1 \N 30 20 -2 2017-10-01 Beijing 10 1 2020-01-02T00:00 2020-01-02T00:00 1 \N 31 21 -3 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 20 -4 2017-10-01 Beijing 10 1 2020-01-03T00:00 2020-01-03T00:00 1 \N 32 22 -5 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 22 -6 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 22 -7 2017-10-01 Beijing 10 1 \N 2020-01-05T00:00 1 \N 34 25 - --- !sql -- -6 2017-10-01 Beijing 10 1 \N \N 2020-01-05T00:00 1 \N 34 22 - diff --git a/regression-test/data/unique_with_mow_p0/cluster_key/test_unique_mow_sequence.out b/regression-test/data/unique_with_mow_p0/cluster_key/test_unique_mow_sequence.out deleted file mode 100644 index 65b68e4152..0000000000 --- a/regression-test/data/unique_with_mow_p0/cluster_key/test_unique_mow_sequence.out +++ /dev/null @@ -1,25 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !sql -- -1 Customer#000000001 j5JsirBM9P MOROCCO 0 MOROCCO AFRICA 25-989-741-2988 BUILDING -2 Customer#000000002 487LW1dovn6Q4dMVym JORDAN 1 JORDAN MIDDLE EAST 23-768-687-3665 AUTOMOBILE -3 Customer#000000003 fkRGN8n ARGENTINA7 ARGENTINA AMERICA 11-719-748-3364 AUTOMOBILE -4 Customer#000000004 4u58h f EGYPT 4 EGYPT MIDDLE EAST 14-128-190-5944 MACHINERY -5 Customer#000000005 hwBtxkoBF qSW4KrI CANADA 5 CANADA AMERICA 13-750-942-6364 HOUSEHOLD - --- !sql -- -2996 Customer#000002996 PFd,H,pC PERU 1 PERU AMERICA 27-412-836-3763 FURNITURE -2997 Customer#000002997 LiVKxN3lQHLunID ALGERIA 0 ALGERIA AFRICA 10-600-583-9608 FURNITURE -2998 Customer#000002998 waJRUwjblh3sJbglX9gS9w PERU 7 PERU AMERICA 27-747-219-4938 AUTOMOBILE -2999 Customer#000002999 HaPy4sQ MiANd0pR5uA7 VIETNAM 5 VIETNAM ASIA 31-297-683-9811 MACHINERY -3000 Customer#000003000 ,5Yw1O EGYPT 4 EGYPT MIDDLE EAST 14-645-615-5901 FURNITURE - --- !sql -- -1 Customer#000000001 j5JsirBM9P MOROCCO 0 MOROCCO AFRICA 25-989-741-2988 BUILDING - --- !sql -- -3000 Customer#000003000 ,5Yw1O EGYPT 4 EGYPT MIDDLE EAST 14-645-615-5901 FURNITURE - --- !sql -- - --- !sql -- - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.1.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.1.out deleted file mode 100644 index 92604403fd..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.1.out +++ /dev/null @@ -1,4 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q1.1 -- -\N - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.2.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.2.out deleted file mode 100644 index 22731ac444..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.2.out +++ /dev/null @@ -1,4 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q1.2 -- -\N - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.3.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.3.out deleted file mode 100644 index 71908d1f12..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.3.out +++ /dev/null @@ -1,4 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q1.3 -- -\N - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.1.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.1.out deleted file mode 100644 index 9d56f6e633..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.1.out +++ /dev/null @@ -1,43 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q2.1 -- -29165996 1992 MFGR#121 -23120066 1992 MFGR#1210 -52982362 1992 MFGR#1211 -30954680 1992 MFGR#1212 -15288453 1992 MFGR#1213 -7655070 1992 MFGR#1214 -22246540 1992 MFGR#1215 -19716439 1992 MFGR#1216 -43666251 1992 MFGR#1217 -22759602 1992 MFGR#1218 -23318799 1992 MFGR#1219 -74056106 1992 MFGR#122 -51050565 1992 MFGR#1220 -38878674 1992 MFGR#1221 -16558051 1992 MFGR#1222 -26690787 1992 MFGR#1223 -76498594 1992 MFGR#1224 -32608903 1992 MFGR#1225 -47636685 1992 MFGR#1226 -27691433 1992 MFGR#1227 -32513490 1992 MFGR#1228 -35514258 1992 MFGR#1229 -17199862 1992 MFGR#123 -24678908 1992 MFGR#1230 -26231337 1992 MFGR#1231 -36330900 1992 MFGR#1232 -24946678 1992 MFGR#1233 -36431683 1992 MFGR#1234 -39368479 1992 MFGR#1235 -44456974 1992 MFGR#1236 -31443810 1992 MFGR#1237 -49003021 1992 MFGR#1238 -31379822 1992 MFGR#1239 -24245603 1992 MFGR#124 -49870826 1992 MFGR#1240 -28194770 1992 MFGR#125 -40503844 1992 MFGR#126 -36027836 1992 MFGR#127 -35881895 1992 MFGR#128 -21732451 1992 MFGR#129 - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.2.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.2.out deleted file mode 100644 index debe195012..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.2.out +++ /dev/null @@ -1,11 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q2.2 -- -28235270 1992 MFGR#2221 -64071827 1992 MFGR#2222 -48591160 1992 MFGR#2223 -20416501 1992 MFGR#2224 -74950776 1992 MFGR#2225 -60628045 1992 MFGR#2226 -39273349 1992 MFGR#2227 -66658087 1992 MFGR#2228 - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.3.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.3.out deleted file mode 100644 index 40b3220406..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.3.out +++ /dev/null @@ -1,4 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q2.3 -- -89380397 1992 MFGR#2239 - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.1.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.1.out deleted file mode 100644 index a50f6a20d5..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.1.out +++ /dev/null @@ -1,28 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q3.1 -- -JAPAN CHINA 1992 637991852 -VIETNAM CHINA 1992 621845377 -INDONESIA CHINA 1992 621316255 -CHINA CHINA 1992 614550901 -INDIA CHINA 1992 561966207 -INDIA INDONESIA 1992 487449629 -INDONESIA INDONESIA 1992 477417717 -JAPAN INDONESIA 1992 476513261 -JAPAN VIETNAM 1992 468999429 -INDONESIA JAPAN 1992 465870469 -VIETNAM INDONESIA 1992 462424521 -INDIA JAPAN 1992 412186106 -JAPAN JAPAN 1992 399179790 -VIETNAM JAPAN 1992 395247587 -JAPAN INDIA 1992 393835589 -CHINA INDONESIA 1992 352903905 -CHINA INDIA 1992 348359904 -VIETNAM VIETNAM 1992 342176333 -INDIA VIETNAM 1992 334582962 -INDIA INDIA 1992 329354089 -CHINA JAPAN 1992 327558220 -CHINA VIETNAM 1992 324763767 -INDONESIA INDIA 1992 310417666 -VIETNAM INDIA 1992 296225919 -INDONESIA VIETNAM 1992 278083418 - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.2.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.2.out deleted file mode 100644 index 1109fa3ce8..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.2.out +++ /dev/null @@ -1,51 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q3.2 -- -UNITED ST4 UNITED ST0 1992 34626982 -UNITED ST4 UNITED ST3 1992 29767238 -UNITED ST1 UNITED ST9 1992 25644597 -UNITED ST2 UNITED ST0 1992 23943154 -UNITED ST4 UNITED ST9 1992 21189183 -UNITED ST0 UNITED ST0 1992 18293852 -UNITED ST7 UNITED ST3 1992 17996772 -UNITED ST9 UNITED ST3 1992 17863433 -UNITED ST1 UNITED ST7 1992 17410800 -UNITED ST2 UNITED ST3 1992 15331073 -UNITED ST5 UNITED ST9 1992 14448179 -UNITED ST1 UNITED ST3 1992 13938002 -UNITED ST5 UNITED ST6 1992 12398029 -UNITED ST9 UNITED ST2 1992 12370917 -UNITED ST2 UNITED ST9 1992 12343455 -UNITED ST5 UNITED ST0 1992 12301234 -UNITED ST6 UNITED ST0 1992 11900889 -UNITED ST4 UNITED ST2 1992 11696334 -UNITED ST4 UNITED ST6 1992 11369008 -UNITED ST1 UNITED ST6 1992 11000283 -UNITED ST1 UNITED ST0 1992 10878084 -UNITED ST4 UNITED ST7 1992 10151573 -UNITED ST5 UNITED ST2 1992 9917834 -UNITED ST7 UNITED ST7 1992 9715656 -UNITED ST6 UNITED ST6 1992 8685228 -UNITED ST2 UNITED ST2 1992 8313714 -UNITED ST1 UNITED ST2 1992 8004700 -UNITED ST2 UNITED ST7 1992 7759164 -UNITED ST0 UNITED ST7 1992 7137641 -UNITED ST9 UNITED ST7 1992 6703890 -UNITED ST6 UNITED ST9 1992 6597261 -UNITED ST7 UNITED ST2 1992 6125476 -UNITED ST7 UNITED ST6 1992 6058017 -UNITED ST5 UNITED ST3 1992 5862031 -UNITED ST8 UNITED ST9 1992 5690491 -UNITED ST7 UNITED ST9 1992 5403152 -UNITED ST9 UNITED ST0 1992 4816370 -UNITED ST9 UNITED ST9 1992 4234523 -UNITED ST3 UNITED ST3 1992 4080199 -UNITED ST5 UNITED ST7 1992 3936271 -UNITED ST8 UNITED ST0 1992 3574169 -UNITED ST0 UNITED ST3 1992 3201624 -UNITED ST3 UNITED ST9 1992 2614811 -UNITED ST8 UNITED ST7 1992 2373825 -UNITED ST9 UNITED ST6 1992 2066609 -UNITED ST7 UNITED ST0 1992 1882015 -UNITED ST6 UNITED ST3 1992 1873819 -UNITED ST6 UNITED ST2 1992 291566 - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.3.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.3.out deleted file mode 100644 index 6f33841912..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.3.out +++ /dev/null @@ -1,4 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q3.3 -- -UNITED KI5 UNITED KI1 1992 4397192 - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.4.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.4.out deleted file mode 100644 index 3738fc2859..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.4.out +++ /dev/null @@ -1,3 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q3.4 -- - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.1.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.1.out deleted file mode 100644 index 00bc9ddd7c..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.1.out +++ /dev/null @@ -1,8 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q4.1 -- -1992 ARGENTINA 533196600 -1992 BRAZIL 684224630 -1992 CANADA 532686194 -1992 PERU 586223155 -1992 UNITED STATES 682387184 - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.2.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.2.out deleted file mode 100644 index 30fae3d4bf..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.2.out +++ /dev/null @@ -1,3 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q4.2 -- - diff --git a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.3.out b/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.3.out deleted file mode 100644 index 741016a89d..0000000000 --- a/regression-test/data/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.3.out +++ /dev/null @@ -1,3 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q4.3 -- - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.1.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.1.out deleted file mode 100644 index 92604403fd..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.1.out +++ /dev/null @@ -1,4 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q1.1 -- -\N - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.2.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.2.out deleted file mode 100644 index 22731ac444..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.2.out +++ /dev/null @@ -1,4 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q1.2 -- -\N - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.3.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.3.out deleted file mode 100644 index 71908d1f12..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.3.out +++ /dev/null @@ -1,4 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q1.3 -- -\N - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.1.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.1.out deleted file mode 100644 index 9d56f6e633..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.1.out +++ /dev/null @@ -1,43 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q2.1 -- -29165996 1992 MFGR#121 -23120066 1992 MFGR#1210 -52982362 1992 MFGR#1211 -30954680 1992 MFGR#1212 -15288453 1992 MFGR#1213 -7655070 1992 MFGR#1214 -22246540 1992 MFGR#1215 -19716439 1992 MFGR#1216 -43666251 1992 MFGR#1217 -22759602 1992 MFGR#1218 -23318799 1992 MFGR#1219 -74056106 1992 MFGR#122 -51050565 1992 MFGR#1220 -38878674 1992 MFGR#1221 -16558051 1992 MFGR#1222 -26690787 1992 MFGR#1223 -76498594 1992 MFGR#1224 -32608903 1992 MFGR#1225 -47636685 1992 MFGR#1226 -27691433 1992 MFGR#1227 -32513490 1992 MFGR#1228 -35514258 1992 MFGR#1229 -17199862 1992 MFGR#123 -24678908 1992 MFGR#1230 -26231337 1992 MFGR#1231 -36330900 1992 MFGR#1232 -24946678 1992 MFGR#1233 -36431683 1992 MFGR#1234 -39368479 1992 MFGR#1235 -44456974 1992 MFGR#1236 -31443810 1992 MFGR#1237 -49003021 1992 MFGR#1238 -31379822 1992 MFGR#1239 -24245603 1992 MFGR#124 -49870826 1992 MFGR#1240 -28194770 1992 MFGR#125 -40503844 1992 MFGR#126 -36027836 1992 MFGR#127 -35881895 1992 MFGR#128 -21732451 1992 MFGR#129 - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.2.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.2.out deleted file mode 100644 index debe195012..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.2.out +++ /dev/null @@ -1,11 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q2.2 -- -28235270 1992 MFGR#2221 -64071827 1992 MFGR#2222 -48591160 1992 MFGR#2223 -20416501 1992 MFGR#2224 -74950776 1992 MFGR#2225 -60628045 1992 MFGR#2226 -39273349 1992 MFGR#2227 -66658087 1992 MFGR#2228 - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.3.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.3.out deleted file mode 100644 index 40b3220406..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.3.out +++ /dev/null @@ -1,4 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q2.3 -- -89380397 1992 MFGR#2239 - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.1.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.1.out deleted file mode 100644 index a50f6a20d5..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.1.out +++ /dev/null @@ -1,28 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q3.1 -- -JAPAN CHINA 1992 637991852 -VIETNAM CHINA 1992 621845377 -INDONESIA CHINA 1992 621316255 -CHINA CHINA 1992 614550901 -INDIA CHINA 1992 561966207 -INDIA INDONESIA 1992 487449629 -INDONESIA INDONESIA 1992 477417717 -JAPAN INDONESIA 1992 476513261 -JAPAN VIETNAM 1992 468999429 -INDONESIA JAPAN 1992 465870469 -VIETNAM INDONESIA 1992 462424521 -INDIA JAPAN 1992 412186106 -JAPAN JAPAN 1992 399179790 -VIETNAM JAPAN 1992 395247587 -JAPAN INDIA 1992 393835589 -CHINA INDONESIA 1992 352903905 -CHINA INDIA 1992 348359904 -VIETNAM VIETNAM 1992 342176333 -INDIA VIETNAM 1992 334582962 -INDIA INDIA 1992 329354089 -CHINA JAPAN 1992 327558220 -CHINA VIETNAM 1992 324763767 -INDONESIA INDIA 1992 310417666 -VIETNAM INDIA 1992 296225919 -INDONESIA VIETNAM 1992 278083418 - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.2.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.2.out deleted file mode 100644 index 1109fa3ce8..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.2.out +++ /dev/null @@ -1,51 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q3.2 -- -UNITED ST4 UNITED ST0 1992 34626982 -UNITED ST4 UNITED ST3 1992 29767238 -UNITED ST1 UNITED ST9 1992 25644597 -UNITED ST2 UNITED ST0 1992 23943154 -UNITED ST4 UNITED ST9 1992 21189183 -UNITED ST0 UNITED ST0 1992 18293852 -UNITED ST7 UNITED ST3 1992 17996772 -UNITED ST9 UNITED ST3 1992 17863433 -UNITED ST1 UNITED ST7 1992 17410800 -UNITED ST2 UNITED ST3 1992 15331073 -UNITED ST5 UNITED ST9 1992 14448179 -UNITED ST1 UNITED ST3 1992 13938002 -UNITED ST5 UNITED ST6 1992 12398029 -UNITED ST9 UNITED ST2 1992 12370917 -UNITED ST2 UNITED ST9 1992 12343455 -UNITED ST5 UNITED ST0 1992 12301234 -UNITED ST6 UNITED ST0 1992 11900889 -UNITED ST4 UNITED ST2 1992 11696334 -UNITED ST4 UNITED ST6 1992 11369008 -UNITED ST1 UNITED ST6 1992 11000283 -UNITED ST1 UNITED ST0 1992 10878084 -UNITED ST4 UNITED ST7 1992 10151573 -UNITED ST5 UNITED ST2 1992 9917834 -UNITED ST7 UNITED ST7 1992 9715656 -UNITED ST6 UNITED ST6 1992 8685228 -UNITED ST2 UNITED ST2 1992 8313714 -UNITED ST1 UNITED ST2 1992 8004700 -UNITED ST2 UNITED ST7 1992 7759164 -UNITED ST0 UNITED ST7 1992 7137641 -UNITED ST9 UNITED ST7 1992 6703890 -UNITED ST6 UNITED ST9 1992 6597261 -UNITED ST7 UNITED ST2 1992 6125476 -UNITED ST7 UNITED ST6 1992 6058017 -UNITED ST5 UNITED ST3 1992 5862031 -UNITED ST8 UNITED ST9 1992 5690491 -UNITED ST7 UNITED ST9 1992 5403152 -UNITED ST9 UNITED ST0 1992 4816370 -UNITED ST9 UNITED ST9 1992 4234523 -UNITED ST3 UNITED ST3 1992 4080199 -UNITED ST5 UNITED ST7 1992 3936271 -UNITED ST8 UNITED ST0 1992 3574169 -UNITED ST0 UNITED ST3 1992 3201624 -UNITED ST3 UNITED ST9 1992 2614811 -UNITED ST8 UNITED ST7 1992 2373825 -UNITED ST9 UNITED ST6 1992 2066609 -UNITED ST7 UNITED ST0 1992 1882015 -UNITED ST6 UNITED ST3 1992 1873819 -UNITED ST6 UNITED ST2 1992 291566 - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.3.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.3.out deleted file mode 100644 index 6f33841912..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.3.out +++ /dev/null @@ -1,4 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q3.3 -- -UNITED KI5 UNITED KI1 1992 4397192 - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.4.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.4.out deleted file mode 100644 index 3738fc2859..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.4.out +++ /dev/null @@ -1,3 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q3.4 -- - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.1.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.1.out deleted file mode 100644 index 00bc9ddd7c..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.1.out +++ /dev/null @@ -1,8 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q4.1 -- -1992 ARGENTINA 533196600 -1992 BRAZIL 684224630 -1992 CANADA 532686194 -1992 PERU 586223155 -1992 UNITED STATES 682387184 - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.2.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.2.out deleted file mode 100644 index 30fae3d4bf..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.2.out +++ /dev/null @@ -1,3 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q4.2 -- - diff --git a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.3.out b/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.3.out deleted file mode 100644 index 741016a89d..0000000000 --- a/regression-test/data/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.3.out +++ /dev/null @@ -1,3 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !q4.3 -- - diff --git a/regression-test/suites/compaction/test_compaction_uniq_cluster_keys_with_delete.groovy b/regression-test/suites/compaction/test_compaction_uniq_cluster_keys_with_delete.groovy deleted file mode 100644 index 0a6199bb40..0000000000 --- a/regression-test/suites/compaction/test_compaction_uniq_cluster_keys_with_delete.groovy +++ /dev/null @@ -1,179 +0,0 @@ -// 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. - -import org.codehaus.groovy.runtime.IOGroovyMethods - -suite("test_compaction_uniq_cluster_keys_with_delete") { - def tableName = "test_compaction_uniq_cluster_keys_with_delete" - - try { - String backend_id; - def backendId_to_backendIP = [:] - def backendId_to_backendHttpPort = [:] - getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort); - - backend_id = backendId_to_backendIP.keySet()[0] - def (code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id)) - - logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err) - assertEquals(code, 0) - def configList = parseJson(out.trim()) - assert configList instanceof List - - boolean disableAutoCompaction = true - for (Object ele in (List) configList) { - assert ele instanceof List - if (((List) ele)[0] == "disable_auto_compaction") { - disableAutoCompaction = Boolean.parseBoolean(((List) ele)[2]) - } - } - - sql """ DROP TABLE IF EXISTS ${tableName} """ - sql """ - CREATE TABLE IF NOT EXISTS ${tableName} ( - `user_id` LARGEINT NOT NULL COMMENT "用户id", - `date` DATE NOT NULL COMMENT "数据灌入日期时间", - `datev2` DATEV2 NOT NULL COMMENT "数据灌入日期时间", - `datetimev2_1` DATETIMEV2(3) NOT NULL COMMENT "数据灌入日期时间", - `datetimev2_2` DATETIMEV2(6) NOT NULL COMMENT "数据灌入日期时间", - `city` VARCHAR(20) COMMENT "用户所在城市", - `age` SMALLINT COMMENT "用户年龄", - `sex` TINYINT COMMENT "用户性别", - `last_visit_date` DATETIME DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间", - `last_update_date` DATETIME DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次更新时间", - `datetime_val1` DATETIMEV2(3) DEFAULT "1970-01-01 00:00:00.111" COMMENT "用户最后一次访问时间", - `datetime_val2` DATETIME(6) DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次更新时间", - `last_visit_date_not_null` DATETIME NOT NULL DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间", - `cost` BIGINT DEFAULT "0" COMMENT "用户总消费", - `max_dwell_time` INT DEFAULT "0" COMMENT "用户最大停留时间", - `min_dwell_time` INT DEFAULT "99999" COMMENT "用户最小停留时间") - UNIQUE KEY(`user_id`, `date`, `datev2`, `datetimev2_1`, `datetimev2_2`, `city`, `age`, `sex`) - CLUSTER BY(`sex`, `date`, `cost`) - DISTRIBUTED BY HASH(`user_id`) - PROPERTIES ( - "replication_num" = "1", - "enable_unique_key_merge_on_write" = "true", - "enable_mow_light_delete" = "true" - ); - """ - - sql """ INSERT INTO ${tableName} VALUES - (1, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, '2020-01-01', '2020-01-01', '2017-10-01 11:11:11.170000', '2017-10-01 11:11:11.110111', '2020-01-01', 1, 30, 20) - """ - - sql """ INSERT INTO ${tableName} VALUES - (1, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, '2020-01-02', '2020-01-02', '2017-10-01 11:11:11.160000', '2017-10-01 11:11:11.100111', '2020-01-02', 1, 31, 19) - """ - - sql """ - DELETE FROM ${tableName} where user_id <= 5 - """ - - sql """ INSERT INTO ${tableName} VALUES - (2, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, '2020-01-02', '2020-01-02', '2017-10-01 11:11:11.150000', '2017-10-01 11:11:11.130111', '2020-01-02', 1, 31, 21) - """ - - sql """ INSERT INTO ${tableName} VALUES - (2, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, '2020-01-03', '2020-01-03', '2017-10-01 11:11:11.140000', '2017-10-01 11:11:11.120111', '2020-01-03', 1, 32, 20) - """ - - sql """ - DELETE FROM ${tableName} where user_id <= 1 - """ - - qt_select_default """ SELECT * FROM ${tableName} t ORDER BY user_id; """ - - sql """ INSERT INTO ${tableName} VALUES - (3, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, '2020-01-03', '2020-01-03', '2017-10-01 11:11:11.100000', '2017-10-01 11:11:11.140111', '2020-01-03', 1, 32, 22) - """ - - sql """ INSERT INTO ${tableName} VALUES - (3, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, '2020-01-04', '2020-01-04', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.150111', '2020-01-04', 1, 33, 21) - """ - - sql """ - DELETE FROM ${tableName} where user_id <= 2 - """ - - sql """ INSERT INTO ${tableName} VALUES - (3, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, NULL, NULL, NULL, NULL, '2020-01-05', 1, 34, 20) - """ - - qt_select_default1 """ SELECT * FROM ${tableName} t ORDER BY user_id; """ - - sql """ INSERT INTO ${tableName} VALUES - (4, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, NULL, NULL, NULL, NULL, '2020-01-05', 1, 34, 20) - """ - sql """sync""" - qt_select_default2 """ SELECT * FROM ${tableName} t ORDER BY user_id; """ - - //TabletId,ReplicaId,BackendId,SchemaHash,Version,LstSuccessVersion,LstFailedVersion,LstFailedTime,LocalDataSize,RemoteDataSize,RowCount,State,LstConsistencyCheckTime,CheckVersion,VersionCount,PathHash,MetaUrl,CompactionStatus - def tablets = sql_return_maparray """ show tablets from ${tableName}; """ - - // trigger compactions for all tablets in ${tableName} - for (def tablet in tablets) { - String tablet_id = tablet.TabletId - backend_id = tablet.BackendId - (code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id) - logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err) - assertEquals(code, 0) - def compactJson = parseJson(out.trim()) - if (compactJson.status.toLowerCase() == "fail") { - assertEquals(disableAutoCompaction, false) - logger.info("Compaction was done automatically!") - } - if (disableAutoCompaction) { - assertEquals("success", compactJson.status.toLowerCase()) - } - } - - // wait for all compactions done - for (def tablet in tablets) { - boolean running = true - do { - Thread.sleep(1000) - String tablet_id = tablet.TabletId - backend_id = tablet.BackendId - (code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id) - logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err) - assertEquals(code, 0) - def compactionStatus = parseJson(out.trim()) - assertEquals("success", compactionStatus.status.toLowerCase()) - running = compactionStatus.run_status - } while (running) - } - - def replicaNum = get_table_replica_num(tableName) - logger.info("get table replica num: " + replicaNum) - int rowCount = 0 - for (def tablet in tablets) { - String tablet_id = tablet.TabletId - (code, out, err) = curl("GET", tablet.CompactionStatus) - logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err) - assertEquals(code, 0) - def tabletJson = parseJson(out.trim()) - assert tabletJson.rowsets instanceof List - for (String rowset in (List) tabletJson.rowsets) { - rowCount += Integer.parseInt(rowset.split(" ")[1]) - } - } - assert (rowCount < 8 * replicaNum) - qt_select_default3 """ SELECT * FROM ${tableName} t ORDER BY user_id; """ - } finally { - try_sql("DROP TABLE IF EXISTS ${tableName}") - } -} diff --git a/regression-test/suites/compaction/test_compaction_uniq_keys_cluster_key.groovy b/regression-test/suites/compaction/test_compaction_uniq_keys_cluster_key.groovy deleted file mode 100644 index a0b896b77f..0000000000 --- a/regression-test/suites/compaction/test_compaction_uniq_keys_cluster_key.groovy +++ /dev/null @@ -1,162 +0,0 @@ -// 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. - -import org.codehaus.groovy.runtime.IOGroovyMethods - -suite("test_compaction_uniq_keys_cluster_key") { - def tableName = "compaction_uniq_keys_cluster_key" - - try { - String backend_id; - def backendId_to_backendIP = [:] - def backendId_to_backendHttpPort = [:] - getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort); - - backend_id = backendId_to_backendIP.keySet()[0] - def (code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id)) - - logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err) - assertEquals(code, 0) - def configList = parseJson(out.trim()) - assert configList instanceof List - - boolean disableAutoCompaction = true - for (Object ele in (List) configList) { - assert ele instanceof List - if (((List) ele)[0] == "disable_auto_compaction") { - disableAutoCompaction = Boolean.parseBoolean(((List) ele)[2]) - } - } - - sql """ DROP TABLE IF EXISTS ${tableName} """ - sql """ - CREATE TABLE IF NOT EXISTS ${tableName} ( - `user_id` LARGEINT NOT NULL COMMENT "用户id", - `date` DATE NOT NULL COMMENT "数据灌入日期时间", - `datev2` DATEV2 NOT NULL COMMENT "数据灌入日期时间", - `datetimev2_1` DATETIMEV2(3) NOT NULL COMMENT "数据灌入日期时间", - `datetimev2_2` DATETIMEV2(6) NOT NULL COMMENT "数据灌入日期时间", - `city` VARCHAR(20) COMMENT "用户所在城市", - `age` SMALLINT COMMENT "用户年龄", - `sex` TINYINT COMMENT "用户性别", - `last_visit_date` DATETIME DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间", - `last_update_date` DATETIME DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次更新时间", - `datetime_val1` DATETIMEV2(3) DEFAULT "1970-01-01 00:00:00.111" COMMENT "用户最后一次访问时间", - `datetime_val2` DATETIME(6) DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次更新时间", - `last_visit_date_not_null` DATETIME NOT NULL DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间", - `cost` BIGINT DEFAULT "0" COMMENT "用户总消费", - `max_dwell_time` INT DEFAULT "0" COMMENT "用户最大停留时间", - `min_dwell_time` INT DEFAULT "99999" COMMENT "用户最小停留时间") - UNIQUE KEY(`user_id`, `date`, `datev2`, `datetimev2_1`, `datetimev2_2`, `city`, `age`, `sex`) - CLUSTER BY(`last_visit_date_not_null`, `age`, `sex`, `city`) - DISTRIBUTED BY HASH(`user_id`) - PROPERTIES ( - "replication_num" = "1", - "enable_unique_key_merge_on_write" = "true" - ); - """ - - sql """ INSERT INTO ${tableName} VALUES - (1, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, '2020-01-01', '2020-01-01', '2017-10-01 11:11:11.170000', '2017-10-01 11:11:11.110111', '2020-01-01', 1, 30, 20) - """ - - sql """ INSERT INTO ${tableName} VALUES - (1, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, '2020-01-02', '2020-01-02', '2017-10-01 11:11:11.160000', '2017-10-01 11:11:11.100111', '2020-01-02', 1, 31, 19) - """ - - sql """ INSERT INTO ${tableName} VALUES - (2, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, '2020-01-02', '2020-01-02', '2017-10-01 11:11:11.150000', '2017-10-01 11:11:11.130111', '2020-01-02', 1, 31, 21) - """ - - sql """ INSERT INTO ${tableName} VALUES - (2, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, '2020-01-03', '2020-01-03', '2017-10-01 11:11:11.140000', '2017-10-01 11:11:11.120111', '2020-01-03', 1, 32, 20) - """ - - sql """ INSERT INTO ${tableName} VALUES - (3, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, '2020-01-03', '2020-01-03', '2017-10-01 11:11:11.100000', '2017-10-01 11:11:11.140111', '2020-01-03', 1, 32, 22) - """ - - sql """ INSERT INTO ${tableName} VALUES - (3, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, '2020-01-04', '2020-01-04', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.150111', '2020-01-04', 1, 33, 21) - """ - - sql """ INSERT INTO ${tableName} VALUES - (3, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, NULL, NULL, NULL, NULL, '2020-01-05', 1, 34, 20) - """ - - sql """ INSERT INTO ${tableName} VALUES - (4, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.110000', '2017-10-01 11:11:11.110111', 'Beijing', 10, 1, NULL, NULL, NULL, NULL, '2020-01-05', 1, 34, 20) - """ - - qt_select_default """ SELECT * FROM ${tableName} t ORDER BY user_id; """ - - //TabletId,ReplicaId,BackendId,SchemaHash,Version,LstSuccessVersion,LstFailedVersion,LstFailedTime,LocalDataSize,RemoteDataSize,RowCount,State,LstConsistencyCheckTime,CheckVersion,VersionCount,QueryHits,PathHash,MetaUrl,CompactionStatus - def tablets = sql_return_maparray """ show tablets from ${tableName}; """ - - // trigger compactions for all tablets in ${tableName} - for (def tablet in tablets) { - String tablet_id = tablet.TabletId - backend_id = tablet.BackendId - (code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id) - logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err) - assertEquals(code, 0) - def compactJson = parseJson(out.trim()) - if (compactJson.status.toLowerCase() == "fail") { - assertEquals(disableAutoCompaction, false) - logger.info("Compaction was done automatically!") - } - if (disableAutoCompaction) { - assertEquals("success", compactJson.status.toLowerCase()) - } - } - - // wait for all compactions done - for (def tablet in tablets) { - boolean running = true - do { - Thread.sleep(1000) - String tablet_id = tablet.TabletId - backend_id = tablet.BackendId - (code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id) - logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err) - assertEquals(code, 0) - def compactionStatus = parseJson(out.trim()) - assertEquals("success", compactionStatus.status.toLowerCase()) - running = compactionStatus.run_status - } while (running) - } - - def replicaNum = get_table_replica_num(tableName) - logger.info("get table replica num: " + replicaNum) - int rowCount = 0 - for (def tablet in tablets) { - String tablet_id = tablet.TabletId - (code, out, err) = curl("GET", tablet.CompactionStatus) - logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err) - assertEquals(code, 0) - def tabletJson = parseJson(out.trim()) - assert tabletJson.rowsets instanceof List - for (String rowset in (List) tabletJson.rowsets) { - rowCount += Integer.parseInt(rowset.split(" ")[1]) - } - } - assert (rowCount < 8 * replicaNum) - qt_select_default2 """ SELECT * FROM ${tableName} t ORDER BY user_id; """ - } finally { - // try_sql("DROP TABLE IF EXISTS ${tableName}") - } -} diff --git a/regression-test/suites/point_query_p0/test_point_query_cluster_key.groovy b/regression-test/suites/point_query_p0/test_point_query_cluster_key.groovy deleted file mode 100644 index 273cc8cec6..0000000000 --- a/regression-test/suites/point_query_p0/test_point_query_cluster_key.groovy +++ /dev/null @@ -1,264 +0,0 @@ -// 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. - -import java.math.BigDecimal; - -suite("test_point_query_cluster_key") { - def backendId_to_backendIP = [:] - def backendId_to_backendHttpPort = [:] - getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort); - def set_be_config = { key, value -> - for (String backend_id: backendId_to_backendIP.keySet()) { - def (code, out, err) = update_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), key, value) - logger.info("update config: code=" + code + ", out=" + out + ", err=" + err) - } - } - try { - set_be_config.call("disable_storage_row_cache", "false") - // nereids do not support point query now - sql """set enable_nereids_planner=true""" - - def user = context.config.jdbcUser - def password = context.config.jdbcPassword - def realDb = "regression_test_serving_p0" - def tableName = realDb + ".tbl_point_query_cluster_key" - sql "CREATE DATABASE IF NOT EXISTS ${realDb}" - - // Parse url - String jdbcUrl = context.config.jdbcUrl - String urlWithoutSchema = jdbcUrl.substring(jdbcUrl.indexOf("://") + 3) - def sql_ip = urlWithoutSchema.substring(0, urlWithoutSchema.indexOf(":")) - def sql_port - if (urlWithoutSchema.indexOf("/") >= 0) { - // e.g: jdbc:mysql://locahost:8080/?a=b - sql_port = urlWithoutSchema.substring(urlWithoutSchema.indexOf(":") + 1, urlWithoutSchema.indexOf("/")) - } else { - // e.g: jdbc:mysql://locahost:8080 - sql_port = urlWithoutSchema.substring(urlWithoutSchema.indexOf(":") + 1) - } - // set server side prepared statement url - def prepare_url = "jdbc:mysql://" + sql_ip + ":" + sql_port + "/" + realDb + "?&useServerPrepStmts=true" - - def generateString = {len -> - def str = "" - for (int i = 0; i < len; i++) { - str += "a" - } - return str - } - - def nprep_sql = { sql_str -> - def url_without_prep = "jdbc:mysql://" + sql_ip + ":" + sql_port + "/" + realDb - connect(user = user, password = password, url = url_without_prep) { - // set to false to invalid cache correcly - sql "set enable_memtable_on_sink_node = false" - sql sql_str - } - } - - sql """DROP TABLE IF EXISTS ${tableName}""" - test { - // abnormal case - sql """ - CREATE TABLE IF NOT EXISTS ${tableName} ( - `k1` int NULL COMMENT "" - ) ENGINE=OLAP - UNIQUE KEY(`k1`) - DISTRIBUTED BY HASH(`k1`) BUCKETS 1 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1", - "store_row_column" = "true", - "light_schema_change" = "false" - ) - """ - exception "errCode = 2, detailMessage = Row store column rely on light schema change, enable light schema change first" - } - - def create_table_sql = { property -> - return String.format(""" - CREATE TABLE IF NOT EXISTS ${tableName} ( - `k1` int(11) NULL COMMENT "", - `k2` decimalv3(27, 9) NULL COMMENT "", - `k3` varchar(300) NULL COMMENT "", - `k4` varchar(30) NULL COMMENT "", - `k5` date NULL COMMENT "", - `k6` datetime NULL COMMENT "", - `k7` float NULL COMMENT "", - `k8` datev2 NULL COMMENT "", - `k9` boolean NULL COMMENT "", - `k10` decimalv3(20, 3) NULL COMMENT "", - `k11` array NULL COMMENT "", - `k12` array NULL COMMENT "" - ) ENGINE=OLAP - UNIQUE KEY(`k1`, `k2`, `k3`) - CLUSTER BY(`k9`, `k5`, `k4`, `k2`) - DISTRIBUTED BY HASH(`k1`, k2, k3) BUCKETS 1 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1", - "store_row_column" = "true", - "enable_unique_key_merge_on_write" = "true", - "light_schema_change" = "true", - %s - "storage_format" = "V2") - """, property) - } - - for (int i = 0; i < 2; i++) { - tableName = realDb + ".tbl_point_query_cluster_key" + i - sql """DROP TABLE IF EXISTS ${tableName}""" - if (i == 0) { - def sql0 = create_table_sql("") - sql """ ${sql0} """ - } else { - def sql1 = create_table_sql("\"function_column.sequence_col\" = 'k6',") - sql """ ${sql1} """ - } - sql """ INSERT INTO ${tableName} VALUES(1231, 119291.11, "ddd", "laooq", null, "2020-01-01 12:36:38", null, "1022-01-01 11:30:38", null, 1.111112, [119181.1111, 819019.1191, null], null) """ - sql """ INSERT INTO ${tableName} VALUES(1232, 12222.99121135, "xxx", "laooq", "2023-01-02", "2020-01-01 12:36:38", 522.762, "2022-01-01 11:30:38", 1, 212.111, null, null) """ - sql """ INSERT INTO ${tableName} VALUES(1233, 1.392932911, "yyy", "laooq", "2024-01-02", "2020-01-01 12:36:38", 52.862, "3022-01-01 11:30:38", 0, 5973903488739435.668, [119181.1111, null, 819019.1191], ["dijiiixxx"]) """ - sql """ INSERT INTO ${tableName} VALUES(1234, 12919291.129191137, "xxddd", "laooq", "2025-01-02", "2020-01-01 12:36:38", 552.872, "4022-01-01 11:30:38", 1, 5973903488739435.668, [1888109181.192111, 192129019.1191], ["1", "2", "3"]) """ - sql """ INSERT INTO ${tableName} VALUES(1235, 991129292901.11138, "dd", null, "2120-01-02", "2020-01-01 12:36:38", 652.692, "5022-01-01 11:30:38", 0, 90696620686827832.374, [119181.1111], ["${generateString(251)}"]) """ - sql """ INSERT INTO ${tableName} VALUES(1236, 100320.11139, "laa ddd", "laooq", "2220-01-02", "2020-01-01 12:36:38", 2.7692, "6022-01-01 11:30:38", 1, 23698.299, [], ["${generateString(251)}"]) """ - sql """ INSERT INTO ${tableName} VALUES(1237, 120939.11130, "a ddd", "laooq", "2030-01-02", "2020-01-01 12:36:38", 22.822, "7022-01-01 11:30:38", 0, 90696620686827832.374, [1.1, 2.2, 3.3, 4.4, 5.5], []) """ - sql """ INSERT INTO ${tableName} VALUES(251, 120939.11130, "${generateString(251)}", "laooq", "2030-01-02", "2020-01-01 12:36:38", 251, "7022-01-01 11:30:38", 1, 90696620686827832.374, [11111], []) """ - sql """ INSERT INTO ${tableName} VALUES(252, 120939.11130, "${generateString(252)}", "laooq", "2030-01-02", "2020-01-01 12:36:38", 252, "7022-01-01 11:30:38", 0, 90696620686827832.374, [0], null) """ - sql """ INSERT INTO ${tableName} VALUES(298, 120939.11130, "${generateString(298)}", "laooq", "2030-01-02", "2020-01-01 12:36:38", 298, "7022-01-01 11:30:38", 1, 90696620686827832.374, [], []) """ - - def result1 = connect(user=user, password=password, url=prepare_url) { - def stmt = prepareStatement "select /*+ SET_VAR(enable_nereids_planner=true) */ * from ${tableName} where k1 = ? and k2 = ? and k3 = ?" - assertEquals(stmt.class, com.mysql.cj.jdbc.ServerPreparedStatement); - stmt.setInt(1, 1231) - stmt.setBigDecimal(2, new BigDecimal("119291.11")) - stmt.setString(3, "ddd") - qe_point_select stmt - stmt.setInt(1, 1231) - stmt.setBigDecimal(2, new BigDecimal("119291.11")) - stmt.setString(3, "ddd") - qe_point_select stmt - stmt.setInt(1, 1237) - stmt.setBigDecimal(2, new BigDecimal("120939.11130")) - stmt.setString(3, "a ddd") - qe_point_select stmt - - stmt.setInt(1, 1232) - stmt.setBigDecimal(2, new BigDecimal("12222.99121135")) - stmt.setString(3, 'xxx') - qe_point_select stmt - - stmt.setInt(1, 251) - stmt.setBigDecimal(2, new BigDecimal("120939.11130")) - stmt.setString(3, generateString(251)) - qe_point_select stmt - - stmt.setInt(1, 252) - stmt.setBigDecimal(2, new BigDecimal("120939.11130")) - stmt.setString(3, generateString(252)) - qe_point_select stmt - - stmt.setInt(1, 298) - stmt.setBigDecimal(2, new BigDecimal("120939.11130")) - stmt.setString(3, generateString(298)) - qe_point_select stmt - stmt.close() - - stmt = prepareStatement "select /*+ SET_VAR(enable_nereids_planner=true) */ * from ${tableName} where k1 = ? and k2 = ? and k3 = ?" - assertEquals(stmt.class, com.mysql.cj.jdbc.ServerPreparedStatement); - stmt.setInt(1, 1235) - stmt.setBigDecimal(2, new BigDecimal("991129292901.11138")) - stmt.setString(3, "dd") - qe_point_select stmt - - def stmt_fn = prepareStatement "select /*+ SET_VAR(enable_nereids_planner=true) */ hex(k3), hex(k4) from ${tableName} where k1 = ? and k2 =? and k3 = ?" - assertEquals(stmt_fn.class, com.mysql.cj.jdbc.ServerPreparedStatement); - stmt_fn.setInt(1, 1231) - stmt_fn.setBigDecimal(2, new BigDecimal("119291.11")) - stmt_fn.setString(3, "ddd") - qe_point_select stmt_fn - qe_point_select stmt_fn - qe_point_select stmt_fn - - nprep_sql """ - ALTER table ${tableName} ADD COLUMN new_column0 INT default "0"; - """ - sleep(1); - nprep_sql """ INSERT INTO ${tableName} VALUES(1235, 120939.11130, "a ddd", "laooq", "2030-01-02", "2020-01-01 12:36:38", 22.822, "7022-01-01 11:30:38", 1, 1.1111299, [119291.19291], ["111", "222", "333"], 1) """ - stmt.setBigDecimal(2, new BigDecimal("120939.11130")) - stmt.setString(3, "a ddd") - qe_point_select stmt - qe_point_select stmt - // invalidate cache - nprep_sql """ INSERT INTO ${tableName} VALUES(1235, 120939.11130, "a ddd", "xxxxxx", "2030-01-02", "2020-01-01 12:36:38", 22.822, "7022-01-01 11:30:38", 0, 1929111.1111,[119291.19291], ["111", "222", "333"], 2) """ - qe_point_select stmt - qe_point_select stmt - qe_point_select stmt - nprep_sql """ - ALTER table ${tableName} ADD COLUMN new_column1 INT default "0"; - """ - qe_point_select stmt - qe_point_select stmt - nprep_sql """ - ALTER table ${tableName} DROP COLUMN new_column1; - """ - qe_point_select stmt - qe_point_select stmt - - sql """ - ALTER table ${tableName} ADD COLUMN new_column1 INT default "0"; - """ - qe_point_select stmt - } - // disable useServerPrepStmts - def result2 = connect(user=user, password=password, url=context.config.jdbcUrl) { - qt_sql """select /*+ SET_VAR(enable_nereids_planner=true) */ * from ${tableName} where k1 = 1231 and k2 = 119291.11 and k3 = 'ddd'""" - qt_sql """select /*+ SET_VAR(enable_nereids_planner=true) */ * from ${tableName} where k1 = 1237 and k2 = 120939.11130 and k3 = 'a ddd'""" - qt_sql """select /*+ SET_VAR(enable_nereids_planner=true) */ hex(k3), hex(k4), k7 + 10.1 from ${tableName} where k1 = 1237 and k2 = 120939.11130 and k3 = 'a ddd'""" - // prepared text - // sql """ prepare stmt1 from select * from ${tableName} where k1 = % and k2 = % and k3 = % """ - // qt_sql """execute stmt1 using (1231, 119291.11, 'ddd')""" - // qt_sql """execute stmt1 using (1237, 120939.11130, 'a ddd')""" - - // sql """prepare stmt2 from select * from ${tableName} where k1 = % and k2 = % and k3 = %""" - // qt_sql """execute stmt2 using (1231, 119291.11, 'ddd')""" - // qt_sql """execute stmt2 using (1237, 120939.11130, 'a ddd')""" - tableName = "test_query_cluster_key" - sql """DROP TABLE IF EXISTS ${tableName}""" - sql """CREATE TABLE ${tableName} ( - `customer_key` bigint(20) NULL, - `customer_btm_value_0` text NULL, - `customer_btm_value_1` text NULL, - `customer_btm_value_2` text NULL - ) ENGINE=OLAP - UNIQUE KEY(`customer_key`) - CLUSTER BY(`customer_btm_value_1`) - COMMENT 'OLAP' - DISTRIBUTED BY HASH(`customer_key`) BUCKETS 16 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1", - "storage_format" = "V2", - "light_schema_change" = "true", - "store_row_column" = "true", - "enable_unique_key_merge_on_write" = "true", - "disable_auto_compaction" = "false" - );""" - sql """insert into ${tableName} values (0, "1", "2", "3")""" - qt_sql """select /*+ SET_VAR(enable_nereids_planner=true) */ * from ${tableName} where customer_key = 0""" - } - } - } finally { - set_be_config.call("disable_storage_row_cache", "true") - } -} \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p0/cluster_key/test_create_table.groovy b/regression-test/suites/unique_with_mow_p0/cluster_key/test_create_table.groovy index 6541943b10..e0c8f30556 100644 --- a/regression-test/suites/unique_with_mow_p0/cluster_key/test_create_table.groovy +++ b/regression-test/suites/unique_with_mow_p0/cluster_key/test_create_table.groovy @@ -22,153 +22,8 @@ suite("test_create_table") { try_sql("DROP TABLE IF EXISTS ${tableName}") } - - // mor unique table with cluster keys test { sql """ - CREATE TABLE `$tableName` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "" - ) - UNIQUE KEY (`c_custkey`) - CLUSTER BY (`c_name`, `c_address`) - DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1", - "enable_unique_key_merge_on_write" = "false" - ); - """ - // test mor table - exception "Cluster keys only support unique keys table which enabled enable_unique_key_merge_on_write" - } - - // mor unique table with cluster keys - test { - sql """ - CREATE TABLE `$tableName` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "" - ) - UNIQUE KEY (`c_custkey`) - CLUSTER BY (`c_name`, `c_address`) - DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1", - "enable_unique_key_merge_on_write" = "false" - ); - """ - exception "Cluster keys only support unique keys table which enabled enable_unique_key_merge_on_write" - } - - // mow unique table with invalid cluster keys - test { - sql """ - CREATE TABLE `$tableName` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "" - ) - UNIQUE KEY (`c_custkey`) - CLUSTER BY (`c_name`, `c_addresses`) - DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1", - "enable_unique_key_merge_on_write" = "true" - ); - """ - exception "Key cluster column[c_addresses] doesn't exist" - } - - // mow unique table with duplicate cluster keys - test { - sql """ - CREATE TABLE `$tableName` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "" - ) - UNIQUE KEY (`c_custkey`) - CLUSTER BY (`c_name`, `c_address`, `c_name`) - DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1", - "enable_unique_key_merge_on_write" = "true" - ); - """ - exception "Duplicate cluster key column[c_name]" - } - - // mow unique table with same cluster and unique keys - test { - sql """ - CREATE TABLE `$tableName` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "" - ) - UNIQUE KEY (`c_custkey`) - CLUSTER BY (`c_custkey`) - DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1", - "enable_unique_key_merge_on_write" = "true" - ); - """ - exception "Unique keys and cluster keys should be different" - } - - // mow unique table with short key is part of unique keys - test { - sql """ - CREATE TABLE `$tableName` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_age` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "" - ) - UNIQUE KEY (`c_custkey`, `c_age`, `c_name`) - CLUSTER BY (`c_custkey`, `c_age`, `c_address`) - DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1", - "enable_unique_key_merge_on_write" = "true", - "short_key" = "2" - ); - """ - exception "2 short keys is a part of unique keys" - } - - // mow unique table with short key is part of unique keys - test { - sql """ - CREATE TABLE `$tableName` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_age` int(11) NOT NULL COMMENT "", - `c_name` varchar(100) NOT NULL COMMENT "", - `c_address` varchar(100) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "" - ) - UNIQUE KEY (`c_custkey`, `c_age`, `c_name`, `c_address`) - CLUSTER BY (`c_custkey`, `c_age`, `c_name`, `c_city`) - DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1", - "enable_unique_key_merge_on_write" = "true" - ); - """ - exception "3 short keys is a part of unique keys" - } - - // success to create mow unique table with cluster keys - sql """ CREATE TABLE `$tableName` ( `c_custkey` int(11) NOT NULL COMMENT "", `c_name` varchar(26) NOT NULL COMMENT "", @@ -182,47 +37,27 @@ suite("test_create_table") { "replication_num" = "1", "enable_unique_key_merge_on_write" = "true" ); - """ + """ + exception "Cluster key is not supported" + } sql """set enable_nereids_planner=false;""" - // duplicate table with cluster keys test { sql """ - CREATE TABLE `$tableName` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "" - ) - DUPLICATE KEY (`c_custkey`) - CLUSTER BY (`c_name`, `c_address`) - DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1" - ); + CREATE TABLE `$tableName` ( + `c_custkey` int(11) NOT NULL COMMENT "", + `c_name` varchar(26) NOT NULL COMMENT "", + `c_address` varchar(41) NOT NULL COMMENT "", + `c_city` varchar(11) NOT NULL COMMENT "" + ) + UNIQUE KEY (`c_custkey`) + CLUSTER BY (`c_name`, `c_city`, `c_address`) + DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 1 + PROPERTIES ( + "replication_num" = "1", + "enable_unique_key_merge_on_write" = "true" + ); """ - exception "Syntax error" - } - - sql """set enable_nereids_planner=true;""" - sql """set enable_nereids_dml=true;""" - sql """set enable_fallback_to_original_planner=false;""" - // duplicate table with cluster keys - test { - sql """ - CREATE TABLE `$tableName` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "" - ) - DUPLICATE KEY (`c_custkey`) - CLUSTER BY (`c_name`, `c_address`) - DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1" - ); - """ - exception "Cluster keys only support unique keys table" + exception "Cluster key is not supported" } } diff --git a/regression-test/suites/unique_with_mow_p0/cluster_key/test_delete_sign_delete_bitmap.groovy b/regression-test/suites/unique_with_mow_p0/cluster_key/test_delete_sign_delete_bitmap.groovy deleted file mode 100644 index ea7e2c5e7d..0000000000 --- a/regression-test/suites/unique_with_mow_p0/cluster_key/test_delete_sign_delete_bitmap.groovy +++ /dev/null @@ -1,98 +0,0 @@ -// 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. - -suite('test_delete_sign_delete_bitmap') { - -// def tableName1 = "test_delete_sign_delete_bitmap1" -// sql "DROP TABLE IF EXISTS ${tableName1};" -// sql """ CREATE TABLE IF NOT EXISTS ${tableName1} ( -// `k1` int NOT NULL, -// `c1` int, -// `c2` int, -// `c3` int, -// `c4` int -// )UNIQUE KEY(k1) -// CLUSTER BY(c1, c2) -// DISTRIBUTED BY HASH(k1) BUCKETS 1 -// PROPERTIES ( -// "enable_unique_key_merge_on_write" = "true", -// "disable_auto_compaction" = "true", -// "replication_num" = "1" -// );""" -// -// sql "insert into ${tableName1} values(1,1,1,1,1),(2,2,2,2,2),(3,3,3,3,3),(4,4,4,4,4),(5,5,5,5,5);" -// qt_sql "select * from ${tableName1} order by k1,c1,c2,c3,c4;" -// // sql "insert into ${tableName1}(k1,c1,c2,c3,c4,__DORIS_DELETE_SIGN__) select k1,c1,c2,c3,c4,1 from ${tableName1} where k1 in (1,3,5);" -// sql """insert into ${tableName1}(k1,c1,c2,c3,c4,__DORIS_DELETE_SIGN__) values(1,1,1,1,1,1),(3,3,3,3,3,1),(5,5,5,5,5,1);""" -// sql "sync" -// qt_after_delete "select * from ${tableName1} order by k1,c1,c2,c3,c4;" -// sql "set skip_delete_sign=true;" -// sql "set skip_storage_engine_merge=true;" -// sql "set skip_delete_bitmap=true;" -// sql "sync" -// // skip_delete_bitmap=true, skip_delete_sign=true -// qt_1 "select k1,c1,c2,c3,c4,__DORIS_DELETE_SIGN__ from ${tableName1} order by k1,c1,c2,c3,c4,__DORIS_DELETE_SIGN__;" -// -// sql "set skip_delete_sign=true;" -// sql "set skip_delete_bitmap=false;" -// sql "sync" -// // skip_delete_bitmap=false, skip_delete_sign=true -// qt_2 "select k1,c1,c2,c3,c4,__DORIS_DELETE_SIGN__ from ${tableName1} order by k1,c1,c2,c3,c4,__DORIS_DELETE_SIGN__;" -// sql "drop table if exists ${tableName1};" -// -// -// sql "set skip_delete_sign=false;" -// sql "set skip_storage_engine_merge=false;" -// sql "set skip_delete_bitmap=false;" -// sql "sync" -// def tableName2 = "test_delete_sign_delete_bitmap2" -// sql "DROP TABLE IF EXISTS ${tableName2};" -// sql """ CREATE TABLE IF NOT EXISTS ${tableName2} ( -// `k1` int NOT NULL, -// `c1` int, -// `c2` int, -// `c3` int, -// `c4` int -// )UNIQUE KEY(k1) -// CLUSTER BY(c4, c3) -// DISTRIBUTED BY HASH(k1) BUCKETS 1 -// PROPERTIES ( -// "enable_unique_key_merge_on_write" = "true", -// "disable_auto_compaction" = "true", -// "replication_num" = "1", -// "function_column.sequence_col" = 'c4' -// );""" -// -// sql "insert into ${tableName2} values(1,1,1,1,1),(2,2,2,2,2),(3,3,3,3,3),(4,4,4,4,4),(5,5,5,5,5);" -// qt_sql "select * from ${tableName2} order by k1,c1,c2,c3,c4;" -// sql """insert into ${tableName2}(k1,c1,c2,c3,c4,__DORIS_DELETE_SIGN__) values(1,1,1,1,1,1),(3,3,3,3,3,1),(5,5,5,5,5,1);""" -// sql "sync" -// qt_after_delete "select * from ${tableName2} order by k1,c1,c2,c3,c4;" -// sql "set skip_delete_sign=true;" -// sql "set skip_storage_engine_merge=true;" -// sql "set skip_delete_bitmap=true;" -// sql "sync" -// // skip_delete_bitmap=true, skip_delete_sign=true -// qt_1 "select k1,c1,c2,c3,c4,__DORIS_DELETE_SIGN__ from ${tableName2} order by k1,c1,c2,c3,c4,__DORIS_DELETE_SIGN__;" -// -// sql "set skip_delete_sign=true;" -// sql "set skip_delete_bitmap=false;" -// sql "sync" -// // skip_delete_bitmap=false, skip_delete_sign=true -// qt_2 "select k1,c1,c2,c3,c4,__DORIS_DELETE_SIGN__ from ${tableName2} order by k1,c1,c2,c3,c4,__DORIS_DELETE_SIGN__;" -// sql "drop table if exists ${tableName2};" -} diff --git a/regression-test/suites/unique_with_mow_p0/cluster_key/test_mow_with_null_sequence.groovy b/regression-test/suites/unique_with_mow_p0/cluster_key/test_mow_with_null_sequence.groovy deleted file mode 100644 index bf3ce215a9..0000000000 --- a/regression-test/suites/unique_with_mow_p0/cluster_key/test_mow_with_null_sequence.groovy +++ /dev/null @@ -1,94 +0,0 @@ -// 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. - -suite("test_mow_with_null_sequence") { - def tableName = "test_null_sequence" - sql """ DROP TABLE IF EXISTS $tableName """ - sql """ - CREATE TABLE `$tableName` ( - `c_custkey` varchar(20) NOT NULL COMMENT "", - `c_name` varchar(20) NOT NULL COMMENT "", - `c_address` varchar(20) NOT NULL COMMENT "", - `c_date` date NULL COMMENT "" - ) - UNIQUE KEY (`c_custkey`) - CLUSTER BY(`c_name`, `c_date`) - DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 10 - PROPERTIES ( - "function_column.sequence_col" = 'c_date', - "replication_num" = "1", - "disable_auto_compaction" = "true", - "enable_unique_key_merge_on_write" = "true" - ); - """ - - - sql """ insert into $tableName values('a', 'abc', 'address1', NULL) """ - sql """ insert into $tableName values('a', 'abc', 'address2', '2022-10-20') """ - sql """ insert into $tableName values('a', 'abc', 'address3', NULL) """ - sql """ insert into $tableName values('ab', 'abc', 'address4', NULL) """ - sql """ insert into $tableName values('ab', 'abc', 'address5', '2022-10-20') """ - sql """ insert into $tableName values('ab', 'abc', 'address6', '2022-11-20') """ - sql """ insert into $tableName values('ab', 'abc', 'address6', '2022-11-15') """ - sql """ insert into $tableName values('aa1234', 'abc', 'address4', '2022-12-11') """ - sql """ insert into $tableName values('aa1234', 'abc', 'address5', NULL) """ - sql """ insert into $tableName values('aa1235', 'abc', 'address6', NULL) """ - - order_qt_sql "select * from $tableName" - - sql """ DROP TABLE IF EXISTS $tableName """ - - sql """ - CREATE TABLE `$tableName` ( - `c_custkey` varchar(20) NOT NULL COMMENT "", - `c_name` varchar(20) NOT NULL COMMENT "", - `c_address` varchar(20) NOT NULL COMMENT "", - `c_int` int NULL COMMENT "" - ) - UNIQUE KEY (`c_custkey`) - CLUSTER BY(`c_int`, `c_name`) - DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 10 - PROPERTIES ( - "function_column.sequence_col" = 'c_int', - "replication_num" = "1", - "disable_auto_compaction" = "true", - "enable_unique_key_merge_on_write" = "true" - ); - """ - sql """ insert into $tableName values('a', 'abc', 'address1', NULL) """ - sql """ insert into $tableName values('a', 'abc', 'address2', 100) """ - sql """ insert into $tableName values('a', 'abc', 'address3', NULL) """ - - sql """ insert into $tableName values('ab', 'abc', 'address4', NULL) """ - sql """ insert into $tableName values('ab', 'abc', 'address5', -10) """ - sql """ insert into $tableName values('ab', 'abc', 'address6', 110) """ - sql """ insert into $tableName values('ab', 'abc', 'address6', 100) """ - - sql """ insert into $tableName values('aa1234', 'abc', 'address4', -1) """ - sql """ insert into $tableName values('aa1234', 'abc', 'address5', NULL) """ - - sql """ insert into $tableName values('aa1235', 'abc', 'address6', NULL) """ - sql """ insert into $tableName values('aa1235', 'abc', 'address6', -1) """ - - sql """ insert into $tableName values('aa1236', 'abc', 'address6', NULL) """ - sql """ insert into $tableName values('aa1236', 'abc', 'address6', 0) """ - sql """ insert into $tableName values('aa1236', 'abc', 'address6', NULL) """ - - order_qt_sql "select * from $tableName" - - sql """ DROP TABLE IF EXISTS $tableName """ -} diff --git a/regression-test/suites/unique_with_mow_p0/cluster_key/test_pk_uk_case.groovy b/regression-test/suites/unique_with_mow_p0/cluster_key/test_pk_uk_case.groovy deleted file mode 100644 index f4bc7b2f20..0000000000 --- a/regression-test/suites/unique_with_mow_p0/cluster_key/test_pk_uk_case.groovy +++ /dev/null @@ -1,261 +0,0 @@ -// 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. - -import org.codehaus.groovy.runtime.IOGroovyMethods; -import java.util.Random; -import org.apache.commons.lang.RandomStringUtils; -import java.util.Date; -import java.text.SimpleDateFormat; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.util.Map; -import java.util.UUID; -import java.time.format.DateTimeFormatter; - -suite("test_pk_uk_case_cluster_key") { - def tableNamePk = "primary_key_pk_uk" - def tableNameUk = "unique_key_pk_uk" - - onFinish { - try_sql("DROP TABLE IF EXISTS ${tableNamePk}") - try_sql("DROP TABLE IF EXISTS ${tableNameUk}") - } - - sql """ DROP TABLE IF EXISTS ${tableNamePk} """ - sql """ - CREATE TABLE IF NOT EXISTS ${tableNamePk} ( - L_ORDERKEY INTEGER NOT NULL, - L_PARTKEY INTEGER NOT NULL, - L_SUPPKEY INTEGER NOT NULL, - L_LINENUMBER INTEGER NOT NULL, - L_QUANTITY DECIMAL(15,2) NOT NULL, - L_EXTENDEDPRICE DECIMAL(15,2) NOT NULL, - L_DISCOUNT DECIMAL(15,2) NOT NULL, - L_TAX DECIMAL(15,2) NOT NULL, - L_RETURNFLAG CHAR(1) NOT NULL, - L_LINESTATUS CHAR(1) NOT NULL, - L_SHIPDATE DATE NOT NULL, - L_COMMITDATE DATE NOT NULL, - L_RECEIPTDATE DATE NOT NULL, - L_SHIPINSTRUCT CHAR(60) NOT NULL, - L_SHIPMODE CHAR(60) NOT NULL, - L_COMMENT VARCHAR(60) NOT NULL - ) - UNIQUE KEY(L_ORDERKEY, L_PARTKEY, L_SUPPKEY, L_LINENUMBER) - CLUSTER BY(L_PARTKEY, L_RETURNFLAG) - DISTRIBUTED BY HASH(L_ORDERKEY) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1", - "disable_auto_compaction" = "true", - "enable_unique_key_merge_on_write" = "true", - "enable_mow_light_delete" = "true" - ) - """ - - sql """ DROP TABLE IF EXISTS ${tableNameUk} """ - sql """ - CREATE TABLE IF NOT EXISTS ${tableNameUk} ( - L_ORDERKEY INTEGER NOT NULL, - L_PARTKEY INTEGER NOT NULL, - L_SUPPKEY INTEGER NOT NULL, - L_LINENUMBER INTEGER NOT NULL, - L_QUANTITY DECIMAL(15,2) NOT NULL, - L_EXTENDEDPRICE DECIMAL(15,2) NOT NULL, - L_DISCOUNT DECIMAL(15,2) NOT NULL, - L_TAX DECIMAL(15,2) NOT NULL, - L_RETURNFLAG CHAR(1) NOT NULL, - L_LINESTATUS CHAR(1) NOT NULL, - L_SHIPDATE DATE NOT NULL, - L_COMMITDATE DATE NOT NULL, - L_RECEIPTDATE DATE NOT NULL, - L_SHIPINSTRUCT CHAR(60) NOT NULL, - L_SHIPMODE CHAR(60) NOT NULL, - L_COMMENT VARCHAR(60) NOT NULL - ) - UNIQUE KEY(L_ORDERKEY, L_PARTKEY, L_SUPPKEY, L_LINENUMBER) - DISTRIBUTED BY HASH(L_ORDERKEY) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1", - "disable_auto_compaction" = "true", - "enable_unique_key_merge_on_write" = "false" - ) - """ - - Random rd = new Random() - def order_key = rd.nextInt(1000) - def part_key = rd.nextInt(1000) - def sub_key = 13 - def line_num = 29 - def decimal = 111.11 - def city = RandomStringUtils.randomAlphabetic(10) - def name = UUID.randomUUID().toString() - def date = DateTimeFormatter.ofPattern("yyyy-MM-dd").format(LocalDateTime.now()) - for (int idx = 0; idx < 10; idx++) { - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - city = RandomStringUtils.randomAlphabetic(10) - name = UUID.randomUUID().toString() - sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - city = RandomStringUtils.randomAlphabetic(10) - name = UUID.randomUUID().toString() - sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - city = RandomStringUtils.randomAlphabetic(10) - name = UUID.randomUUID().toString() - sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - city = RandomStringUtils.randomAlphabetic(10) - name = UUID.randomUUID().toString() - sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - city = RandomStringUtils.randomAlphabetic(10) - name = UUID.randomUUID().toString() - sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - - // insert batch key - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - city = RandomStringUtils.randomAlphabetic(10) - name = UUID.randomUUID().toString() - sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city'), - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city'), - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city'), - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city'), - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city'), - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city'), - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - - sql "sync" - - // count(*) - def result0 = sql """ SELECT count(*) FROM ${tableNamePk}; """ - def result1 = sql """ SELECT count(*) FROM ${tableNameUk}; """ - logger.info("result:" + result0[0][0] + "|" + result1[0][0]) - assertEquals(result0[0], result1[0]) - if (result0[0][0]!=result1[0][0]) { - logger.info("result:" + result0[0][0] + "|" + result1[0][0]) - } - - result0 = sql """ SELECT - l_returnflag, - l_linestatus, - sum(l_quantity) AS sum_qty, - sum(l_extendedprice) AS sum_base_price, - sum(l_extendedprice * (1 - l_discount)) AS sum_disc_price, - sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) AS sum_charge, - avg(l_quantity) AS avg_qty, - avg(l_extendedprice) AS avg_price, - avg(l_discount) AS avg_disc, - count(*) AS count_order - FROM - ${tableNamePk} - GROUP BY - l_returnflag, - l_linestatus - ORDER BY - l_returnflag, - l_linestatus - """ - result1 = sql """ SELECT - l_returnflag, - l_linestatus, - sum(l_quantity) AS sum_qty, - sum(l_extendedprice) AS sum_base_price, - sum(l_extendedprice * (1 - l_discount)) AS sum_disc_price, - sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) AS sum_charge, - avg(l_quantity) AS avg_qty, - avg(l_extendedprice) AS avg_price, - avg(l_discount) AS avg_disc, - count(*) AS count_order - FROM - ${tableNameUk} - GROUP BY - l_returnflag, - l_linestatus - ORDER BY - l_returnflag, - l_linestatus - """ - assertEquals(result0.size(), result1.size()) - for (int i = 0; i < result0.size(); ++i) { - for (int j = 0; j < result0[0].size(); j++) { - logger.info("result: " + result0[i][j] + "|" + result1[i][j]) - assertEquals(result0[i][j], result1[i][j]) - } - } - - // delete - if (idx % 10 == 0) { - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - result0 = sql """ SELECT count(*) FROM ${tableNamePk} where L_ORDERKEY < $order_key and L_PARTKEY < $part_key; """ - result1 = sql """ SELECT count(*) FROM ${tableNameUk} where L_ORDERKEY < $order_key and L_PARTKEY < $part_key""" - logger.info("result:" + result0[0][0] + "|" + result1[0][0]) - sql "DELETE FROM ${tableNamePk} where L_ORDERKEY < $order_key and L_PARTKEY < $part_key" - sql "DELETE FROM ${tableNameUk} where L_ORDERKEY < $order_key and L_PARTKEY < $part_key" - } - } -} diff --git a/regression-test/suites/unique_with_mow_p0/cluster_key/test_primary_key_simple_case.groovy b/regression-test/suites/unique_with_mow_p0/cluster_key/test_primary_key_simple_case.groovy deleted file mode 100644 index 39efc150e7..0000000000 --- a/regression-test/suites/unique_with_mow_p0/cluster_key/test_primary_key_simple_case.groovy +++ /dev/null @@ -1,115 +0,0 @@ -// 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. - -import org.codehaus.groovy.runtime.IOGroovyMethods - -suite("test_primary_key_simple_case") { - def tableName = "cluster_key_test_primary_key_simple_case" - onFinish { - // try_sql("DROP TABLE IF EXISTS ${tableName}") - } - - sql """ DROP TABLE IF EXISTS ${tableName} """ - sql """ - CREATE TABLE IF NOT EXISTS ${tableName} ( - `user_id` LARGEINT NOT NULL COMMENT "用户id", - `date` DATE NOT NULL COMMENT "数据灌入日期时间", - `city` VARCHAR(20) COMMENT "用户所在城市", - `age` SMALLINT COMMENT "用户年龄", - `sex` TINYINT COMMENT "用户性别", - `last_visit_date` DATETIME DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间", - `last_update_date` DATETIME DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次更新时间", - `last_visit_date_not_null` DATETIME NOT NULL DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间", - `cost` BIGINT DEFAULT "0" COMMENT "用户总消费", - `max_dwell_time` INT DEFAULT "0" COMMENT "用户最大停留时间", - `min_dwell_time` INT DEFAULT "99999" COMMENT "用户最小停留时间") - UNIQUE KEY(`user_id`, `date`, `city`, `age`, `sex`) - CLUSTER BY(`user_id`, `age`, `cost`, `sex`) - DISTRIBUTED BY HASH(`user_id`) - PROPERTIES ( "replication_num" = "1", - "disable_auto_compaction" = "true", - "enable_unique_key_merge_on_write" = "true" - ); - """ - - sql """ INSERT INTO ${tableName} VALUES - (1, '2017-10-01', 'Beijing', 10, 1, '2020-01-01', '2020-01-01', '2020-01-01', 1, 30, 20) - """ - - sql """ INSERT INTO ${tableName} VALUES - (2, '2017-10-01', 'Beijing', 10, 1, '2020-01-02', '2020-01-02', '2020-01-02', 1, 31, 21) - """ - - sql """ INSERT INTO ${tableName} VALUES - (3, '2017-10-01', 'Beijing', 10, 1, '2020-01-03', '2020-01-03', '2020-01-03', 1, 32, 20) - """ - - sql """ INSERT INTO ${tableName} VALUES - (4, '2017-10-01', 'Beijing', 10, 1, '2020-01-03', '2020-01-03', '2020-01-03', 1, 32, 22) - """ - - sql """ INSERT INTO ${tableName} VALUES - (5, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 20) - """ - - def result = sql """ SELECT * FROM ${tableName} t ORDER BY user_id; """ - assertTrue(result.size() == 5) - assertTrue(result[0].size() == 11) - - // insert a duplicate key - sql """ INSERT INTO ${tableName} VALUES - (5, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 21) - """ - result = sql """ SELECT * FROM ${tableName} t ORDER BY user_id; """ - assertTrue(result.size() == 5) - assertTrue(result[4][10] == 21) - - // insert a duplicate key - sql """ INSERT INTO ${tableName} VALUES - (5, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 22) - """ - result = sql """ SELECT * FROM ${tableName} t ORDER BY user_id; """ - assertTrue(result.size() == 5) - logger.info("fuck: " + result.size()) - assertTrue(result[4][10] == 22) - - result = sql """ SELECT * FROM ${tableName} t where user_id = 5; """ - assertTrue(result.size() == 1) - assertTrue(result[0][10] == 22) - - result = sql """ SELECT COUNT(*) FROM ${tableName};""" - assertTrue(result.size() == 1) - assertTrue(result[0][0] == 5) - - // insert a new key - sql """ INSERT INTO ${tableName} VALUES - (6, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 22) - """ - result = sql """ SELECT * FROM ${tableName} t ORDER BY user_id; """ - assertTrue(result.size() == 6) - - // insert batch key - sql """ INSERT INTO ${tableName} VALUES - (7, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 22), - (7, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 23), - (7, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 24), - (7, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 25) - """ - result = sql """ SELECT * FROM ${tableName} t ORDER BY user_id; """ - assertTrue(result.size() == 7) - assertTrue(result[6][10] == 25) -} diff --git a/regression-test/suites/unique_with_mow_p0/cluster_key/test_schema_change.groovy b/regression-test/suites/unique_with_mow_p0/cluster_key/test_schema_change.groovy deleted file mode 100644 index 3dafd0d0a8..0000000000 --- a/regression-test/suites/unique_with_mow_p0/cluster_key/test_schema_change.groovy +++ /dev/null @@ -1,334 +0,0 @@ -// 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. - -import org.codehaus.groovy.runtime.IOGroovyMethods - -suite("test_schema_change") { - def tableName = "test_schema_change" - onFinish { - // try_sql("DROP TABLE IF EXISTS ${tableName}") - } - - def getAlterTableState = { - def retry = 0 - while (true) { - sleep(2000) - def state = sql "show alter table column where tablename = '${tableName}' order by CreateTime desc " - logger.info("alter table state: ${state}") - if (state.size()> 0 && state[0][9] == "FINISHED") { - return true - } - retry++ - if (retry >= 10) { - return false - } - } - return false - } - - sql """ DROP TABLE IF EXISTS ${tableName} """ - sql """ - CREATE TABLE IF NOT EXISTS ${tableName} ( - `user_id` LARGEINT NOT NULL COMMENT "用户id", - `date` DATE NOT NULL COMMENT "数据灌入日期时间", - `city` VARCHAR(20) COMMENT "用户所在城市", - `age` SMALLINT COMMENT "用户年龄", - `sex` TINYINT COMMENT "用户性别", - `last_visit_date` DATETIME DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间", - `last_update_date` DATETIME DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次更新时间", - `last_visit_date_not_null` DATETIME NOT NULL DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间", - `cost` BIGINT DEFAULT "0" COMMENT "用户总消费", - `comment` VARCHAR(5), - `max_dwell_time` INT DEFAULT "0" COMMENT "用户最大停留时间", - `min_dwell_time` INT DEFAULT "99999" COMMENT "用户最小停留时间") - UNIQUE KEY(`user_id`, `date`, `city`, `age`, `sex`) - CLUSTER BY(`cost`, `comment`) - DISTRIBUTED BY HASH(`user_id`) - PROPERTIES ( "replication_num" = "1", - "disable_auto_compaction" = "true", - "enable_unique_key_merge_on_write" = "true" - ); - """ - - // 1. add a value column(any position after key column) - for (int i = 0; i < 2; i++) { - if (i == 1) { - sql """ alter table ${tableName} ADD column score int after sex; """ - assertTrue(getAlterTableState(), "add column should success") - } - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (1, '2017-10-01', 'Beijing', 10, 1, '2020-01-01', '2020-01-01', '2020-01-01', 1, 30, 20) - """ - - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (2, '2017-10-01', 'Beijing', 10, 1, '2020-01-02', '2020-01-02', '2020-01-02', 1, 31, 21) - """ - - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (3, '2017-10-01', 'Beijing', 10, 1, '2020-01-03', '2020-01-03', '2020-01-03', 1, 32, 20) - """ - - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (4, '2017-10-01', 'Beijing', 10, 1, '2020-01-03', '2020-01-03', '2020-01-03', 1, 32, 22) - """ - - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (5, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 20) - """ - - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - - // insert a duplicate key - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (5, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 21) - """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - - // insert a duplicate key - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (5, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 22) - """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - - qt_sql """ - SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t - where user_id = 5; - """ - - qt_sql """ SELECT COUNT(*) FROM ${tableName};""" - - // insert a new key - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (6, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 22) - """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - - // insert batch key - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES - (7, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 22), - (7, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 23), - (7, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 24), - (7, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 25) - """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - qt_sql """ - SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_visit_date`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t - where user_id = 6 and sex = 1 ORDER BY user_id; - """ - } - - // 2. drop a value column - sql """ alter table ${tableName} DROP column last_visit_date; """ - assertTrue(getAlterTableState(), "drop column should success"); - { - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (1, '2017-10-01', 'Beijing', 10, 1, '2020-01-01', '2020-01-01', 1, 30, 20) - """ - - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (2, '2017-10-01', 'Beijing', 10, 1, '2020-01-02', '2020-01-02', 1, 31, 21) - """ - - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (3, '2017-10-01', 'Beijing', 10, 1, '2020-01-03', '2020-01-03', 1, 32, 20) - """ - - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (4, '2017-10-01', 'Beijing', 10, 1, '2020-01-03', '2020-01-03', 1, 32, 22) - """ - - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (5, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 20) - """ - - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t - where user_id = 6 and sex = 1 ORDER BY user_id; """ - - // insert a duplicate key - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (5, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 21) - """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - - // insert a duplicate key - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (5, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 22) - """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t - where user_id = 5; """ - - qt_sql """ SELECT COUNT(*) FROM ${tableName};""" - - // insert a new key - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (6, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 22) - """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - - // insert batch key - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES - (7, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 22), - (7, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 23), - (7, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 24), - (7, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 25) - """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - qt_sql """ SELECT * FROM ${tableName} t - where user_id = 6 and sex = 1 ORDER BY user_id; """ - } - - // 3.0 add a cluster key key column is not support - // 3.1 drop a cluster key column is not support - // unique table key column also can not be dropped: Can not drop key column in Unique data model table - test { - sql """ alter table ${tableName} DROP column cost; """ - exception "Can not drop cluster key column in Unique data model table" - } - - // 4. modify a cluster key column - test { - sql """ alter table ${tableName} MODIFY column `comment` varchar(20); """ - exception "Can not modify cluster key column" - } - - // 5. modify column order should success (Temporarily throw exception) - test { - sql """ - alter table ${tableName} ORDER BY (`user_id`, `date`, `city`, `age`, `sex`, `max_dwell_time`, `comment`, `min_dwell_time`, `last_visit_date_not_null`, `cost`, `score`, `last_update_date`); - """ - exception "Can not modify column order in Unique data model table" - } - /*assertTrue(getAlterTableState(), "alter column order should success"); - { - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (1, '2017-10-01', 'Beijing', 10, 1, '2020-01-01', '2020-01-01', 1, 30, 20) - """ - - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (2, '2017-10-01', 'Beijing', 10, 1, '2020-01-02', '2020-01-02', 1, 31, 21) - """ - - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (3, '2017-10-01', 'Beijing', 10, 1, '2020-01-03', '2020-01-03', 1, 32, 20) - """ - - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (4, '2017-10-01', 'Beijing', 10, 1, '2020-01-03', '2020-01-03', 1, 32, 22) - """ - - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (5, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 20) - """ - - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t - where user_id = 6 and sex = 1 ORDER BY user_id; """ - - // insert a duplicate key - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (5, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 21) - """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - - // insert a duplicate key - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (5, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 22) - """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t where user_id = 5; """ - - qt_sql """ SELECT COUNT(*) FROM ${tableName};""" - - // insert a new key - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES (6, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 22) - """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - - // insert batch key - sql """ INSERT INTO ${tableName} - (`user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, - `cost`, `max_dwell_time`, `min_dwell_time`) - VALUES - (7, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 22), - (7, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 23), - (7, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 24), - (7, '2017-10-01', 'Beijing', 10, 1, NULL, '2020-01-05', 1, 34, 25) - """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t ORDER BY user_id; """ - qt_sql """ SELECT `user_id`, `date`, `city`, `age`, `sex`, `last_update_date`, `last_visit_date_not_null`, `cost`, `comment`, `max_dwell_time`, `min_dwell_time` FROM ${tableName} t - where user_id = 6 and sex = 1 ORDER BY user_id; """ - }*/ -} diff --git a/regression-test/suites/unique_with_mow_p0/cluster_key/test_unique_mow_sequence.groovy b/regression-test/suites/unique_with_mow_p0/cluster_key/test_unique_mow_sequence.groovy deleted file mode 100644 index c3ded30c04..0000000000 --- a/regression-test/suites/unique_with_mow_p0/cluster_key/test_unique_mow_sequence.groovy +++ /dev/null @@ -1,85 +0,0 @@ -// 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. - -suite("test_unique_mow_sequence") { - def tableName = "test_mow_sequence" - sql """ DROP TABLE IF EXISTS $tableName """ - sql """ - CREATE TABLE `$tableName` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "", - `c_nation` varchar(16) NOT NULL COMMENT "", - `c_region` varchar(13) NOT NULL COMMENT "", - `c_phone` varchar(16) NOT NULL COMMENT "", - `c_mktsegment` varchar(11) NOT NULL COMMENT "" - ) - UNIQUE KEY (`c_custkey`) - CLUSTER BY (`c_nation`, `c_mktsegment`, `c_region`) - DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 10 - PROPERTIES ( - "function_column.sequence_type" = 'int', - "compression"="zstd", - "replication_num" = "1", - "disable_auto_compaction" = "true", - "enable_unique_key_merge_on_write" = "true" - ); - """ - - streamLoad { - table "${tableName}" - - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', 'c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use' - set 'function_column.sequence_col', 'c_custkey' - - file """${getS3Url()}/regression/ssb/sf0.1/customer.tbl.gz""" - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - - sql "sync" - - order_qt_sql "select * from $tableName where c_custkey < 6;" - - order_qt_sql "select * from $tableName where c_custkey > 2995;" - - qt_sql "select * from $tableName where c_custkey = 1;" - - qt_sql "select * from $tableName where c_custkey = 3000;" - - qt_sql "select * from $tableName where c_custkey = 3001;" - - qt_sql "select * from $tableName where c_custkey = 0;" -} diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/customer_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/customer_create.sql deleted file mode 100644 index 53c1b10332..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/customer_create.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE IF NOT EXISTS `customer` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "", - `c_nation` varchar(16) NOT NULL COMMENT "", - `c_region` varchar(13) NOT NULL COMMENT "", - `c_phone` varchar(16) NOT NULL COMMENT "", - `c_mktsegment` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`c_custkey`) -CLUSTER BY (`c_name`, `c_phone`, `c_city`) -DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 10 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true", -"enable_mow_light_delete" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/customer_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/customer_delete.sql deleted file mode 100644 index fe22a226fe..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/customer_delete.sql +++ /dev/null @@ -1 +0,0 @@ -truncate table customer; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/customer_part_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/customer_part_delete.sql deleted file mode 100644 index a9d1b34d68..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/customer_part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -delete from customer where c_custkey > 1500 ; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/customer_sequence_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/customer_sequence_create.sql deleted file mode 100644 index 2b560cfdac..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/customer_sequence_create.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE IF NOT EXISTS `customer` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "", - `c_nation` varchar(16) NOT NULL COMMENT "", - `c_region` varchar(13) NOT NULL COMMENT "", - `c_phone` varchar(16) NOT NULL COMMENT "", - `c_mktsegment` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`c_custkey`) -CLUSTER BY (`c_nation`, `c_phone`, `c_city`, `c_name`) -DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 10 -PROPERTIES ( -"function_column.sequence_type" = 'int', -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/date_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/date_create.sql deleted file mode 100644 index b96d1038c7..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/date_create.sql +++ /dev/null @@ -1,29 +0,0 @@ -CREATE TABLE IF NOT EXISTS `date` ( - `d_datekey` int(11) NOT NULL COMMENT "", - `d_date` varchar(20) NOT NULL COMMENT "", - `d_dayofweek` varchar(10) NOT NULL COMMENT "", - `d_month` varchar(11) NOT NULL COMMENT "", - `d_year` int(11) NOT NULL COMMENT "", - `d_yearmonthnum` int(11) NOT NULL COMMENT "", - `d_yearmonth` varchar(9) NOT NULL COMMENT "", - `d_daynuminweek` int(11) NOT NULL COMMENT "", - `d_daynuminmonth` int(11) NOT NULL COMMENT "", - `d_daynuminyear` int(11) NOT NULL COMMENT "", - `d_monthnuminyear` int(11) NOT NULL COMMENT "", - `d_weeknuminyear` int(11) NOT NULL COMMENT "", - `d_sellingseason` varchar(14) NOT NULL COMMENT "", - `d_lastdayinweekfl` int(11) NOT NULL COMMENT "", - `d_lastdayinmonthfl` int(11) NOT NULL COMMENT "", - `d_holidayfl` int(11) NOT NULL COMMENT "", - `d_weekdayfl` int(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`d_datekey`) -CLUSTER BY (`d_holidayfl`) -DISTRIBUTED BY HASH(`d_datekey`) BUCKETS 1 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true", -"enable_mow_light_delete" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/date_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/date_delete.sql deleted file mode 100644 index 12933cbbad..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/date_delete.sql +++ /dev/null @@ -1 +0,0 @@ -truncate table `date`; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/date_part_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/date_part_delete.sql deleted file mode 100644 index 0c21b27cc4..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/date_part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -delete from `date` where d_datekey >= '19920701' and d_datekey <= '19920731'; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/date_sequence_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/date_sequence_create.sql deleted file mode 100644 index 4ff7ba2208..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/date_sequence_create.sql +++ /dev/null @@ -1,29 +0,0 @@ -CREATE TABLE IF NOT EXISTS `date` ( - `d_datekey` int(11) NOT NULL COMMENT "", - `d_date` varchar(20) NOT NULL COMMENT "", - `d_dayofweek` varchar(10) NOT NULL COMMENT "", - `d_month` varchar(11) NOT NULL COMMENT "", - `d_year` int(11) NOT NULL COMMENT "", - `d_yearmonthnum` int(11) NOT NULL COMMENT "", - `d_yearmonth` varchar(9) NOT NULL COMMENT "", - `d_daynuminweek` int(11) NOT NULL COMMENT "", - `d_daynuminmonth` int(11) NOT NULL COMMENT "", - `d_daynuminyear` int(11) NOT NULL COMMENT "", - `d_monthnuminyear` int(11) NOT NULL COMMENT "", - `d_weeknuminyear` int(11) NOT NULL COMMENT "", - `d_sellingseason` varchar(14) NOT NULL COMMENT "", - `d_lastdayinweekfl` int(11) NOT NULL COMMENT "", - `d_lastdayinmonthfl` int(11) NOT NULL COMMENT "", - `d_holidayfl` int(11) NOT NULL COMMENT "", - `d_weekdayfl` int(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`d_datekey`) -CLUSTER BY (`d_yearmonth`, `d_holidayfl`) -DISTRIBUTED BY HASH(`d_datekey`) BUCKETS 1 -PROPERTIES ( -"function_column.sequence_type" = 'int', -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/lineorder_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/lineorder_create.sql deleted file mode 100644 index 37ba740fa0..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/lineorder_create.sql +++ /dev/null @@ -1,37 +0,0 @@ -CREATE TABLE IF NOT EXISTS `lineorder` ( - `lo_orderdate` int(11) NOT NULL COMMENT "", - `lo_orderkey` bigint(20) NOT NULL COMMENT "", - `lo_linenumber` bigint(20) NOT NULL COMMENT "", - `lo_custkey` int(11) NOT NULL COMMENT "", - `lo_partkey` int(11) NOT NULL COMMENT "", - `lo_suppkey` int(11) NOT NULL COMMENT "", - `lo_orderpriority` varchar(16) NOT NULL COMMENT "", - `lo_shippriority` int(11) NOT NULL COMMENT "", - `lo_quantity` bigint(20) NOT NULL COMMENT "", - `lo_extendedprice` bigint(20) NOT NULL COMMENT "", - `lo_ordtotalprice` bigint(20) NOT NULL COMMENT "", - `lo_discount` bigint(20) NOT NULL COMMENT "", - `lo_revenue` bigint(20) NOT NULL COMMENT "", - `lo_supplycost` bigint(20) NOT NULL COMMENT "", - `lo_tax` bigint(20) NOT NULL COMMENT "", - `lo_commitdate` bigint(20) NOT NULL COMMENT "", - `lo_shipmode` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`lo_orderdate`,`lo_orderkey`,`lo_linenumber`) -CLUSTER BY (`lo_orderdate`, `lo_suppkey`, `lo_shipmode`) -PARTITION BY RANGE(`lo_orderdate`) -(PARTITION p1992 VALUES [("-2147483648"), ("19930101")), -PARTITION p1993 VALUES [("19930101"), ("19940101")), -PARTITION p1994 VALUES [("19940101"), ("19950101")), -PARTITION p1995 VALUES [("19950101"), ("19960101")), -PARTITION p1996 VALUES [("19960101"), ("19970101")), -PARTITION p1997 VALUES [("19970101"), ("19980101")), -PARTITION p1998 VALUES [("19980101"), ("19990101"))) -DISTRIBUTED BY HASH(`lo_orderkey`) BUCKETS 48 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true", -"enable_mow_light_delete" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/lineorder_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/lineorder_delete.sql deleted file mode 100644 index 329e040060..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/lineorder_delete.sql +++ /dev/null @@ -1 +0,0 @@ -truncate table lineorder; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/lineorder_part_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/lineorder_part_delete.sql deleted file mode 100644 index abb7ded433..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/lineorder_part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -delete from lineorder where lo_orderkey >= 240001 and lo_orderkey <= 360000; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/lineorder_sequence_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/lineorder_sequence_create.sql deleted file mode 100644 index d639e7f2bb..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/lineorder_sequence_create.sql +++ /dev/null @@ -1,37 +0,0 @@ -CREATE TABLE IF NOT EXISTS `lineorder` ( - `lo_orderdate` int(11) NOT NULL COMMENT "", - `lo_orderkey` bigint(20) NOT NULL COMMENT "", - `lo_linenumber` bigint(20) NOT NULL COMMENT "", - `lo_custkey` int(11) NOT NULL COMMENT "", - `lo_partkey` int(11) NOT NULL COMMENT "", - `lo_suppkey` int(11) NOT NULL COMMENT "", - `lo_orderpriority` varchar(16) NOT NULL COMMENT "", - `lo_shippriority` int(11) NOT NULL COMMENT "", - `lo_quantity` bigint(20) NOT NULL COMMENT "", - `lo_extendedprice` bigint(20) NOT NULL COMMENT "", - `lo_ordtotalprice` bigint(20) NOT NULL COMMENT "", - `lo_discount` bigint(20) NOT NULL COMMENT "", - `lo_revenue` bigint(20) NOT NULL COMMENT "", - `lo_supplycost` bigint(20) NOT NULL COMMENT "", - `lo_tax` bigint(20) NOT NULL COMMENT "", - `lo_commitdate` bigint(20) NOT NULL COMMENT "", - `lo_shipmode` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`lo_orderdate`,`lo_orderkey`,`lo_linenumber`) -CLUSTER BY (`lo_quantity`, `lo_suppkey`) -PARTITION BY RANGE(`lo_orderdate`) -(PARTITION p1992 VALUES [("-2147483648"), ("19930101")), -PARTITION p1993 VALUES [("19930101"), ("19940101")), -PARTITION p1994 VALUES [("19940101"), ("19950101")), -PARTITION p1995 VALUES [("19950101"), ("19960101")), -PARTITION p1996 VALUES [("19960101"), ("19970101")), -PARTITION p1997 VALUES [("19970101"), ("19980101")), -PARTITION p1998 VALUES [("19980101"), ("19990101"))) -DISTRIBUTED BY HASH(`lo_orderkey`) BUCKETS 48 -PROPERTIES ( -"function_column.sequence_type" = 'int', -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/part_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/part_create.sql deleted file mode 100644 index f8b9438a19..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/part_create.sql +++ /dev/null @@ -1,21 +0,0 @@ -CREATE TABLE IF NOT EXISTS `part` ( - `p_partkey` int(11) NOT NULL COMMENT "", - `p_name` varchar(23) NOT NULL COMMENT "", - `p_mfgr` varchar(7) NOT NULL COMMENT "", - `p_category` varchar(8) NOT NULL COMMENT "", - `p_brand` varchar(10) NOT NULL COMMENT "", - `p_color` varchar(12) NOT NULL COMMENT "", - `p_type` varchar(26) NOT NULL COMMENT "", - `p_size` int(11) NOT NULL COMMENT "", - `p_container` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`p_partkey`) -CLUSTER BY (`p_color`, `p_name`) -DISTRIBUTED BY HASH(`p_partkey`) BUCKETS 10 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true", -"enable_mow_light_delete" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/part_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/part_delete.sql deleted file mode 100644 index 02c6abd253..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -truncate table `part`; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/part_part_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/part_part_delete.sql deleted file mode 100644 index 32ec2aa18b..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/part_part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -delete from `part` where p_partkey > 10000; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/part_sequence_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/part_sequence_create.sql deleted file mode 100644 index ab2b62a52d..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/part_sequence_create.sql +++ /dev/null @@ -1,21 +0,0 @@ -CREATE TABLE IF NOT EXISTS `part` ( - `p_partkey` int(11) NOT NULL COMMENT "", - `p_name` varchar(23) NOT NULL COMMENT "", - `p_mfgr` varchar(7) NOT NULL COMMENT "", - `p_category` varchar(8) NOT NULL COMMENT "", - `p_brand` varchar(10) NOT NULL COMMENT "", - `p_color` varchar(12) NOT NULL COMMENT "", - `p_type` varchar(26) NOT NULL COMMENT "", - `p_size` int(11) NOT NULL COMMENT "", - `p_container` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`p_partkey`) -CLUSTER BY (`p_size`) -DISTRIBUTED BY HASH(`p_partkey`) BUCKETS 10 -PROPERTIES ( -"function_column.sequence_type" = 'int', -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/supplier_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/supplier_create.sql deleted file mode 100644 index a40662617f..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/supplier_create.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE TABLE IF NOT EXISTS `supplier` ( - `s_suppkey` int(11) NOT NULL COMMENT "", - `s_name` varchar(26) NOT NULL COMMENT "", - `s_address` varchar(26) NOT NULL COMMENT "", - `s_city` varchar(11) NOT NULL COMMENT "", - `s_nation` varchar(16) NOT NULL COMMENT "", - `s_region` varchar(13) NOT NULL COMMENT "", - `s_phone` varchar(16) NOT NULL COMMENT "" -) -UNIQUE KEY (`s_suppkey`) -CLUSTER BY (`s_region`, `s_address`) -DISTRIBUTED BY HASH(`s_suppkey`) BUCKETS 10 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true", -"enable_mow_light_delete" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/supplier_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/supplier_delete.sql deleted file mode 100644 index 39e663134c..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/supplier_delete.sql +++ /dev/null @@ -1 +0,0 @@ -truncate table `supplier`; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/supplier_part_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/supplier_part_delete.sql deleted file mode 100644 index ac6a7030fd..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/supplier_part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -delete from `supplier` where s_suppkey > 100; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/supplier_sequence_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/supplier_sequence_create.sql deleted file mode 100644 index ef1136bbfd..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/ddl/supplier_sequence_create.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE IF NOT EXISTS `supplier` ( - `s_suppkey` int(11) NOT NULL COMMENT "", - `s_name` varchar(26) NOT NULL COMMENT "", - `s_address` varchar(26) NOT NULL COMMENT "", - `s_city` varchar(11) NOT NULL COMMENT "", - `s_nation` varchar(16) NOT NULL COMMENT "", - `s_region` varchar(13) NOT NULL COMMENT "", - `s_phone` varchar(16) NOT NULL COMMENT "" -) -UNIQUE KEY (`s_suppkey`) -CLUSTER BY (`s_region`, `s_city`, `s_name`) -DISTRIBUTED BY HASH(`s_suppkey`) BUCKETS 10 -PROPERTIES ( -"function_column.sequence_type" = 'int', -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true", -"enable_mow_light_delete" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/four/load_four_step.groovy b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/four/load_four_step.groovy deleted file mode 100644 index 49e7904191..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/four/load_four_step.groovy +++ /dev/null @@ -1,111 +0,0 @@ -// 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. - -// Most of the cases are copied from https://github.com/trinodb/trino/tree/master -// /testing/trino-product-tests/src/main/resources/sql-tests/testcases -// and modified by Doris. - -suite("load_four_step") { - def tables = ["customer": ["""c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use""", 3000, "c_custkey", 1500], - "date": ["""d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth, - d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear, - d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy""", 255, "d_datekey", 224], - "supplier": ["""s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy""", 200, "s_suppkey", 100]] - - tables.each { tableName, rows -> - sql """ DROP TABLE IF EXISTS $tableName """ - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_sequence_create.sql""").text - for (j in 0..<2) { - streamLoad { - table tableName - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', rows[0] - set 'function_column.sequence_col', rows[2] - - // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. - // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${getS3Url()}/regression/ssb/sf0.1/${tableName}.tbl.gz""" - - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - sql 'sync' - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == rows[1]) - } - } - sql """ set delete_without_partition = true; """ - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_part_delete.sql""").text - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == rows[3]) - } - streamLoad { - table tableName - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', rows[0] - set 'function_column.sequence_col', rows[2] - - // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. - // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${getS3Url()}/regression/ssb/sf0.1/${tableName}.tbl.gz""" - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - sql 'sync' - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == rows[1]) - } - } -} diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/one/load_one_step.groovy b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/one/load_one_step.groovy deleted file mode 100644 index 74ff14bf68..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/one/load_one_step.groovy +++ /dev/null @@ -1,63 +0,0 @@ -// 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. - - -suite("load_one_step") { - def tables = ["customer": ["""c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use""", 3000], - "date": ["""d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth, - d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear, - d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy""", 255], - "supplier": ["""s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy""", 200]] - - tables.each { tableName, rows -> - sql """ DROP TABLE IF EXISTS $tableName """ - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_create.sql""").text - streamLoad { - table "${tableName}" - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', "${rows[0]}" - - // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. - // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${getS3Url()}/regression/ssb/sf0.1/${tableName}.tbl.gz""" - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - sql 'sync' - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == rows[1]) - } - } -} diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/three/load_three_step.groovy b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/three/load_three_step.groovy deleted file mode 100644 index b33f77d9ef..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/three/load_three_step.groovy +++ /dev/null @@ -1,73 +0,0 @@ -// 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. - - -suite("load_three_step") { - def tables = ["customer": ["""c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use""", 3000, "c_custkey"], - "date": ["""d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth, - d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear, - d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy""", 255, "d_datekey"], - "supplier": ["""s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy""", 200, "s_suppkey"]] - - tables.each { tableName, rows -> - sql """ DROP TABLE IF EXISTS $tableName """ - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_sequence_create.sql""").text - for (j in 0..<2) { - streamLoad { - table tableName - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', rows[0] - set 'function_column.sequence_col', rows[2] - - // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. - // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${getS3Url()}/regression/ssb/sf0.1/${tableName}.tbl.gz""" - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - sql 'sync' - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == rows[1]) - } - } - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_delete.sql""").text - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == 0) - } - sql """ ANALYZE TABLE $tableName WITH SYNC """ - } -} diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/two/load_two_step.groovy b/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/two/load_two_step.groovy deleted file mode 100644 index 7b9a3ab0b8..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_load_zstd_c/two/load_two_step.groovy +++ /dev/null @@ -1,70 +0,0 @@ -// 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. - - -suite("load_two_step") { - def tables = ["customer": ["""c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use""", 3000, "c_custkey"], - "date": ["""d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth, - d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear, - d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy""", 255, "d_datekey"], - "supplier": ["""s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy""", 200, "s_suppkey"]] - - tables.each { tableName, rows -> - sql """ DROP TABLE IF EXISTS $tableName """ - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_sequence_create.sql""").text - streamLoad { - table tableName - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', rows[0] - set 'function_column.sequence_col', rows[2] - - // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. - // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${getS3Url()}/regression/ssb/sf0.1/${tableName}.tbl.gz""" - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - sql 'sync' - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == rows[1]) - } - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_delete.sql""").text - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == 0) - } - } -} diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/customer_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/customer_create.sql deleted file mode 100644 index 3640400704..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/customer_create.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE TABLE IF NOT EXISTS `customer` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "", - `c_nation` varchar(16) NOT NULL COMMENT "", - `c_region` varchar(13) NOT NULL COMMENT "", - `c_phone` varchar(16) NOT NULL COMMENT "", - `c_mktsegment` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`c_custkey`) -CLUSTER BY (`c_region`, `c_city`, `c_name`) -DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 10 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/customer_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/customer_delete.sql deleted file mode 100644 index 68a98512b2..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/customer_delete.sql +++ /dev/null @@ -1 +0,0 @@ -drop table if exists customer; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/date_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/date_create.sql deleted file mode 100644 index 6a06553782..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/date_create.sql +++ /dev/null @@ -1,28 +0,0 @@ -CREATE TABLE IF NOT EXISTS `date` ( - `d_datekey` int(11) NOT NULL COMMENT "", - `d_date` varchar(20) NOT NULL COMMENT "", - `d_dayofweek` varchar(10) NOT NULL COMMENT "", - `d_month` varchar(11) NOT NULL COMMENT "", - `d_year` int(11) NOT NULL COMMENT "", - `d_yearmonthnum` int(11) NOT NULL COMMENT "", - `d_yearmonth` varchar(9) NOT NULL COMMENT "", - `d_daynuminweek` int(11) NOT NULL COMMENT "", - `d_daynuminmonth` int(11) NOT NULL COMMENT "", - `d_daynuminyear` int(11) NOT NULL COMMENT "", - `d_monthnuminyear` int(11) NOT NULL COMMENT "", - `d_weeknuminyear` int(11) NOT NULL COMMENT "", - `d_sellingseason` varchar(14) NOT NULL COMMENT "", - `d_lastdayinweekfl` int(11) NOT NULL COMMENT "", - `d_lastdayinmonthfl` int(11) NOT NULL COMMENT "", - `d_holidayfl` int(11) NOT NULL COMMENT "", - `d_weekdayfl` int(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`d_datekey`) -CLUSTER BY (`d_year`, `d_month`, `d_weeknuminyear`) -DISTRIBUTED BY HASH(`d_datekey`) BUCKETS 1 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/date_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/date_delete.sql deleted file mode 100644 index c6cf155575..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/date_delete.sql +++ /dev/null @@ -1 +0,0 @@ -drop table if exists `date`; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/lineorder_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/lineorder_create.sql deleted file mode 100644 index d56c8aee33..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/lineorder_create.sql +++ /dev/null @@ -1,36 +0,0 @@ -CREATE TABLE IF NOT EXISTS `lineorder` ( - `lo_orderdate` int(11) NOT NULL COMMENT "", - `lo_orderkey` bigint(20) NOT NULL COMMENT "", - `lo_linenumber` bigint(20) NOT NULL COMMENT "", - `lo_custkey` int(11) NOT NULL COMMENT "", - `lo_partkey` int(11) NOT NULL COMMENT "", - `lo_suppkey` int(11) NOT NULL COMMENT "", - `lo_orderpriority` varchar(16) NOT NULL COMMENT "", - `lo_shippriority` int(11) NOT NULL COMMENT "", - `lo_quantity` bigint(20) NOT NULL COMMENT "", - `lo_extendedprice` bigint(20) NOT NULL COMMENT "", - `lo_ordtotalprice` bigint(20) NOT NULL COMMENT "", - `lo_discount` bigint(20) NOT NULL COMMENT "", - `lo_revenue` bigint(20) NOT NULL COMMENT "", - `lo_supplycost` bigint(20) NOT NULL COMMENT "", - `lo_tax` bigint(20) NOT NULL COMMENT "", - `lo_commitdate` bigint(20) NOT NULL COMMENT "", - `lo_shipmode` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`lo_orderdate`,`lo_orderkey`,`lo_linenumber`) -CLUSTER BY (`lo_orderdate`, `lo_orderpriority`) -PARTITION BY RANGE(`lo_orderdate`) -(PARTITION p1992 VALUES [("-2147483648"), ("19930101")), -PARTITION p1993 VALUES [("19930101"), ("19940101")), -PARTITION p1994 VALUES [("19940101"), ("19950101")), -PARTITION p1995 VALUES [("19950101"), ("19960101")), -PARTITION p1996 VALUES [("19960101"), ("19970101")), -PARTITION p1997 VALUES [("19970101"), ("19980101")), -PARTITION p1998 VALUES [("19980101"), ("19990101"))) -DISTRIBUTED BY HASH(`lo_orderkey`) BUCKETS 48 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/lineorder_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/lineorder_delete.sql deleted file mode 100644 index d8f94cfe9f..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/lineorder_delete.sql +++ /dev/null @@ -1 +0,0 @@ -drop table if exists lineorder; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/part_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/part_create.sql deleted file mode 100644 index 34a1555fa5..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/part_create.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE IF NOT EXISTS `part` ( - `p_partkey` int(11) NOT NULL COMMENT "", - `p_name` varchar(23) NOT NULL COMMENT "", - `p_mfgr` varchar(7) NOT NULL COMMENT "", - `p_category` varchar(8) NOT NULL COMMENT "", - `p_brand` varchar(10) NOT NULL COMMENT "", - `p_color` varchar(12) NOT NULL COMMENT "", - `p_type` varchar(26) NOT NULL COMMENT "", - `p_size` int(11) NOT NULL COMMENT "", - `p_container` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`p_partkey`) -CLUSTER BY (`p_category`, `p_brand`, `p_size`) -DISTRIBUTED BY HASH(`p_partkey`) BUCKETS 10 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/part_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/part_delete.sql deleted file mode 100644 index 4ad502e24d..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -drop table if exists `part`; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/supplier_create.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/supplier_create.sql deleted file mode 100644 index 662aca9847..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/supplier_create.sql +++ /dev/null @@ -1,18 +0,0 @@ -CREATE TABLE IF NOT EXISTS `supplier` ( - `s_suppkey` int(11) NOT NULL COMMENT "", - `s_name` varchar(26) NOT NULL COMMENT "", - `s_address` varchar(26) NOT NULL COMMENT "", - `s_city` varchar(11) NOT NULL COMMENT "", - `s_nation` varchar(16) NOT NULL COMMENT "", - `s_region` varchar(13) NOT NULL COMMENT "", - `s_phone` varchar(16) NOT NULL COMMENT "" -) -UNIQUE KEY (`s_suppkey`) -CLUSTER BY (`s_region`, `s_city`, `s_name`) -DISTRIBUTED BY HASH(`s_suppkey`) BUCKETS 10 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/supplier_delete.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/supplier_delete.sql deleted file mode 100644 index 72e1c39dae..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/ddl/supplier_delete.sql +++ /dev/null @@ -1 +0,0 @@ -drop table if exists `supplier`; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/load.groovy b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/load.groovy deleted file mode 100644 index 1715ac09c6..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/load.groovy +++ /dev/null @@ -1,80 +0,0 @@ -// 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. - -// Most of the cases are copied from https://github.com/trinodb/trino/tree/master -// /testing/trino-product-tests/src/main/resources/sql-tests/testcases -// and modified by Doris. - -// Note: To filter out tables from sql files, use the following one-liner comamnd -// sed -nr 's/.*tables: (.*)$/\1/gp' /path/to/*.sql | sed -nr 's/,/\n/gp' | sort | uniq -suite("load") { - def tables = ["customer", "lineorder", "part", "date", "supplier"] - def columns = ["""c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use""", - """lo_orderkey,lo_linenumber,lo_custkey,lo_partkey,lo_suppkey,lo_orderdate,lo_orderpriority, - lo_shippriority,lo_quantity,lo_extendedprice,lo_ordtotalprice,lo_discount, - lo_revenue,lo_supplycost,lo_tax,lo_commitdate,lo_shipmode,lo_dummy""", - """p_partkey,p_name,p_mfgr,p_category,p_brand,p_color,p_type,p_size,p_container,p_dummy""", - """d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth, - d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear, - d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy""", - """s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy"""] - - for (String table in tables) { - sql new File("""${context.file.parent}/ddl/${table}_delete.sql""").text - sql new File("""${context.file.parent}/ddl/${table}_create.sql""").text - } - def i = 0 - for (String tableName in tables) { - streamLoad { - // a default db 'regression_test' is specified in - // ${DORIS_HOME}/conf/regression-conf.groovy - table tableName - - // default label is UUID: - // set 'label' UUID.randomUUID().toString() - - // default column_separator is specify in doris fe config, usually is '\t'. - // this line change to ',' - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', columns[i] - - - // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. - // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${getS3Url()}/regression/ssb/sf0.1/${tableName}.tbl.gz""" - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - i++ - } -} diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.1.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.1.sql deleted file mode 100644 index 4ef15e93ea..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.1.sql +++ /dev/null @@ -1,24 +0,0 @@ --- 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. - -SELECT SUM(lo_extendedprice*lo_discount) AS -REVENUE -FROM lineorder, date -WHERE lo_orderdate = d_datekey -AND d_year = 1993 -AND lo_discount BETWEEN 1 AND 3 -AND lo_quantity < 25; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.2.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.2.sql deleted file mode 100644 index 1b8442bd93..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.2.sql +++ /dev/null @@ -1,24 +0,0 @@ --- 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. - -SELECT SUM(lo_extendedprice*lo_discount) AS -REVENUE -FROM lineorder, date -WHERE lo_orderdate = d_datekey -AND d_yearmonth = 'Jan1994' -AND lo_discount BETWEEN 4 AND 6 -AND lo_quantity BETWEEN 26 AND 35; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.3.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.3.sql deleted file mode 100644 index ed6e51b1cf..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q1.3.sql +++ /dev/null @@ -1,25 +0,0 @@ --- 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. - -SELECT SUM(lo_extendedprice*lo_discount) AS -REVENUE -FROM lineorder, date -WHERE lo_orderdate = d_datekey -AND d_weeknuminyear= 6 -AND d_year = 1994 -AND lo_discount BETWEEN 5 AND 7 -AND lo_quantity BETWEEN 26 AND 35; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.1.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.1.sql deleted file mode 100644 index e1a1f52d18..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.1.sql +++ /dev/null @@ -1,26 +0,0 @@ --- 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. - -SELECT SUM(lo_revenue), d_year, p_brand -FROM lineorder, date, part, supplier -WHERE lo_orderdate = d_datekey -AND lo_partkey = p_partkey -AND lo_suppkey = s_suppkey -AND p_category = 'MFGR#12' -AND s_region = 'AMERICA' -GROUP BY d_year, p_brand -ORDER BY d_year, p_brand; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.2.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.2.sql deleted file mode 100644 index 3db6170119..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.2.sql +++ /dev/null @@ -1,27 +0,0 @@ --- 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. - -SELECT SUM(lo_revenue), d_year, p_brand -FROM lineorder, date, part, supplier -WHERE lo_orderdate = d_datekey -AND lo_partkey = p_partkey -AND lo_suppkey = s_suppkey -AND p_brand BETWEEN 'MFGR#2221' -AND 'MFGR#2228' -AND s_region = 'ASIA' -GROUP BY d_year, p_brand -ORDER BY d_year, p_brand; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.3.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.3.sql deleted file mode 100644 index b70ca90666..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q2.3.sql +++ /dev/null @@ -1,26 +0,0 @@ --- 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. - -SELECT SUM(lo_revenue), d_year, p_brand -FROM lineorder, date, part, supplier -WHERE lo_orderdate = d_datekey -AND lo_partkey = p_partkey -AND lo_suppkey = s_suppkey -AND p_brand = 'MFGR#2239' -AND s_region = 'EUROPE' -GROUP BY d_year, p_brand -ORDER BY d_year, p_brand; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.1.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.1.sql deleted file mode 100644 index 70f17d789b..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.1.sql +++ /dev/null @@ -1,28 +0,0 @@ --- 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. - -SELECT c_nation, s_nation, d_year, -SUM(lo_revenue) AS REVENUE -FROM customer, lineorder, supplier, date -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_orderdate = d_datekey -AND c_region = 'ASIA' -AND s_region = 'ASIA' -AND d_year >= 1992 AND d_year <= 1997 -GROUP BY c_nation, s_nation, d_year -ORDER BY d_year ASC, REVENUE DESC; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.2.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.2.sql deleted file mode 100644 index a416fbea8b..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.2.sql +++ /dev/null @@ -1,28 +0,0 @@ --- 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. - -SELECT c_city, s_city, d_year, sum(lo_revenue) -AS REVENUE -FROM customer, lineorder, supplier, date -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_orderdate = d_datekey -AND c_nation = 'UNITED STATES' -AND s_nation = 'UNITED STATES' -AND d_year >= 1992 AND d_year <= 1997 -GROUP BY c_city, s_city, d_year -ORDER BY d_year ASC, REVENUE DESC; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.3.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.3.sql deleted file mode 100644 index 98e29b72e7..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.3.sql +++ /dev/null @@ -1,30 +0,0 @@ --- 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. - -SELECT c_city, s_city, d_year, SUM(lo_revenue) -AS REVENUE -FROM customer, lineorder, supplier, date -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_orderdate = d_datekey -AND (c_city='UNITED KI1' -OR c_city='UNITED KI5') -AND (s_city='UNITED KI1' -OR s_city='UNITED KI5') -AND d_year >= 1992 AND d_year <= 1997 -GROUP BY c_city, s_city, d_year -ORDER BY d_year ASC, REVENUE DESC; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.4.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.4.sql deleted file mode 100644 index 65fe992ca4..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q3.4.sql +++ /dev/null @@ -1,30 +0,0 @@ --- 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. - -SELECT c_city, s_city, d_year, SUM(lo_revenue) -AS REVENUE -FROM customer, lineorder, supplier, date -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_orderdate = d_datekey -AND (c_city='UNITED KI1' -OR c_city='UNITED KI5') -AND (s_city='UNITED KI1' -OR s_city='UNITED KI5') -AND d_yearmonth = 'Dec1997' -GROUP BY c_city, s_city, d_year -ORDER BY d_year ASC, REVENUE DESC; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.1.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.1.sql deleted file mode 100644 index bdcd730bf9..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.1.sql +++ /dev/null @@ -1,30 +0,0 @@ --- 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. - -SELECT d_year, c_nation, -SUM(lo_revenue - lo_supplycost) AS PROFIT -FROM date, customer, supplier, part, lineorder -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_partkey = p_partkey -AND lo_orderdate = d_datekey -AND c_region = 'AMERICA' -AND s_region = 'AMERICA' -AND (p_mfgr = 'MFGR#1' -OR p_mfgr = 'MFGR#2') -GROUP BY d_year, c_nation -ORDER BY d_year, c_nation; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.2.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.2.sql deleted file mode 100644 index 24c82cf682..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.2.sql +++ /dev/null @@ -1,31 +0,0 @@ --- 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. - -SELECT d_year, s_nation, p_category, -SUM(lo_revenue - lo_supplycost) AS PROFIT -FROM date, customer, supplier, part, lineorder -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_partkey = p_partkey -AND lo_orderdate = d_datekey -AND c_region = 'AMERICA' -AND s_region = 'AMERICA' -AND (d_year = 1997 OR d_year = 1998) -AND (p_mfgr = 'MFGR#1' -OR p_mfgr = 'MFGR#2') -GROUP BY d_year, s_nation, p_category -ORDER BY d_year, s_nation, p_category; diff --git a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.3.sql b/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.3.sql deleted file mode 100644 index 0dcc08bd26..0000000000 --- a/regression-test/suites/unique_with_mow_p0/ssb_unique_sql_zstd_cluster/sql/q4.3.sql +++ /dev/null @@ -1,29 +0,0 @@ --- 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. - -SELECT d_year, s_city, p_brand, -SUM(lo_revenue - lo_supplycost) AS PROFIT -FROM date, customer, supplier, part, lineorder -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_partkey = p_partkey -AND lo_orderdate = d_datekey -AND s_nation = 'UNITED STATES' -AND (d_year = 1997 OR d_year = 1998) -AND p_category = 'MFGR#14' -GROUP BY d_year, s_city, p_brand -ORDER BY d_year, s_city, p_brand; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/customer_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/customer_create.sql deleted file mode 100644 index 30df14525c..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/customer_create.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE IF NOT EXISTS `customer` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "", - `c_nation` varchar(16) NOT NULL COMMENT "", - `c_region` varchar(13) NOT NULL COMMENT "", - `c_phone` varchar(16) NOT NULL COMMENT "", - `c_mktsegment` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`c_custkey`) -CLUSTER BY (`c_region`, `c_phone`, `c_city`) -DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 10 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true", -"enable_mow_light_delete" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/customer_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/customer_delete.sql deleted file mode 100644 index fe22a226fe..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/customer_delete.sql +++ /dev/null @@ -1 +0,0 @@ -truncate table customer; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/customer_part_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/customer_part_delete.sql deleted file mode 100644 index a9d1b34d68..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/customer_part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -delete from customer where c_custkey > 1500 ; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/customer_sequence_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/customer_sequence_create.sql deleted file mode 100644 index 892384684b..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/customer_sequence_create.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE IF NOT EXISTS `customer` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "", - `c_nation` varchar(16) NOT NULL COMMENT "", - `c_region` varchar(13) NOT NULL COMMENT "", - `c_phone` varchar(16) NOT NULL COMMENT "", - `c_mktsegment` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`c_custkey`) -CLUSTER BY (`c_mktsegment`, `c_city`, `c_region`, `c_nation`) -DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 10 -PROPERTIES ( -"function_column.sequence_type" = 'int', -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/date_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/date_create.sql deleted file mode 100644 index ffd796f227..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/date_create.sql +++ /dev/null @@ -1,29 +0,0 @@ -CREATE TABLE IF NOT EXISTS `date` ( - `d_datekey` int(11) NOT NULL COMMENT "", - `d_date` varchar(20) NOT NULL COMMENT "", - `d_dayofweek` varchar(10) NOT NULL COMMENT "", - `d_month` varchar(11) NOT NULL COMMENT "", - `d_year` int(11) NOT NULL COMMENT "", - `d_yearmonthnum` int(11) NOT NULL COMMENT "", - `d_yearmonth` varchar(9) NOT NULL COMMENT "", - `d_daynuminweek` int(11) NOT NULL COMMENT "", - `d_daynuminmonth` int(11) NOT NULL COMMENT "", - `d_daynuminyear` int(11) NOT NULL COMMENT "", - `d_monthnuminyear` int(11) NOT NULL COMMENT "", - `d_weeknuminyear` int(11) NOT NULL COMMENT "", - `d_sellingseason` varchar(14) NOT NULL COMMENT "", - `d_lastdayinweekfl` int(11) NOT NULL COMMENT "", - `d_lastdayinmonthfl` int(11) NOT NULL COMMENT "", - `d_holidayfl` int(11) NOT NULL COMMENT "", - `d_weekdayfl` int(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`d_datekey`) -CLUSTER BY (`d_sellingseason`, `d_holidayfl`) -DISTRIBUTED BY HASH(`d_datekey`) BUCKETS 1 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true", -"enable_mow_light_delete" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/date_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/date_delete.sql deleted file mode 100644 index 12933cbbad..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/date_delete.sql +++ /dev/null @@ -1 +0,0 @@ -truncate table `date`; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/date_part_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/date_part_delete.sql deleted file mode 100644 index 0c21b27cc4..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/date_part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -delete from `date` where d_datekey >= '19920701' and d_datekey <= '19920731'; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/date_sequence_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/date_sequence_create.sql deleted file mode 100644 index 9ec46190c7..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/date_sequence_create.sql +++ /dev/null @@ -1,29 +0,0 @@ -CREATE TABLE IF NOT EXISTS `date` ( - `d_datekey` int(11) NOT NULL COMMENT "", - `d_date` varchar(20) NOT NULL COMMENT "", - `d_dayofweek` varchar(10) NOT NULL COMMENT "", - `d_month` varchar(11) NOT NULL COMMENT "", - `d_year` int(11) NOT NULL COMMENT "", - `d_yearmonthnum` int(11) NOT NULL COMMENT "", - `d_yearmonth` varchar(9) NOT NULL COMMENT "", - `d_daynuminweek` int(11) NOT NULL COMMENT "", - `d_daynuminmonth` int(11) NOT NULL COMMENT "", - `d_daynuminyear` int(11) NOT NULL COMMENT "", - `d_monthnuminyear` int(11) NOT NULL COMMENT "", - `d_weeknuminyear` int(11) NOT NULL COMMENT "", - `d_sellingseason` varchar(14) NOT NULL COMMENT "", - `d_lastdayinweekfl` int(11) NOT NULL COMMENT "", - `d_lastdayinmonthfl` int(11) NOT NULL COMMENT "", - `d_holidayfl` int(11) NOT NULL COMMENT "", - `d_weekdayfl` int(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`d_datekey`) -CLUSTER BY (`d_sellingseason`, `d_lastdayinweekfl`) -DISTRIBUTED BY HASH(`d_datekey`) BUCKETS 1 -PROPERTIES ( -"function_column.sequence_type" = 'int', -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/lineorder_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/lineorder_create.sql deleted file mode 100644 index 0945fe0af4..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/lineorder_create.sql +++ /dev/null @@ -1,37 +0,0 @@ -CREATE TABLE IF NOT EXISTS `lineorder` ( - `lo_orderdate` int(11) NOT NULL COMMENT "", - `lo_orderkey` bigint(20) NOT NULL COMMENT "", - `lo_linenumber` bigint(20) NOT NULL COMMENT "", - `lo_custkey` int(11) NOT NULL COMMENT "", - `lo_partkey` int(11) NOT NULL COMMENT "", - `lo_suppkey` int(11) NOT NULL COMMENT "", - `lo_orderpriority` varchar(16) NOT NULL COMMENT "", - `lo_shippriority` int(11) NOT NULL COMMENT "", - `lo_quantity` bigint(20) NOT NULL COMMENT "", - `lo_extendedprice` bigint(20) NOT NULL COMMENT "", - `lo_ordtotalprice` bigint(20) NOT NULL COMMENT "", - `lo_discount` bigint(20) NOT NULL COMMENT "", - `lo_revenue` bigint(20) NOT NULL COMMENT "", - `lo_supplycost` bigint(20) NOT NULL COMMENT "", - `lo_tax` bigint(20) NOT NULL COMMENT "", - `lo_commitdate` bigint(20) NOT NULL COMMENT "", - `lo_shipmode` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`lo_orderdate`,`lo_orderkey`,`lo_linenumber`) -CLUSTER BY (`lo_orderdate`, `lo_orderkey`, `lo_shipmode`) -PARTITION BY RANGE(`lo_orderdate`) -(PARTITION p1992 VALUES [("-2147483648"), ("19930101")), -PARTITION p1993 VALUES [("19930101"), ("19940101")), -PARTITION p1994 VALUES [("19940101"), ("19950101")), -PARTITION p1995 VALUES [("19950101"), ("19960101")), -PARTITION p1996 VALUES [("19960101"), ("19970101")), -PARTITION p1997 VALUES [("19970101"), ("19980101")), -PARTITION p1998 VALUES [("19980101"), ("19990101"))) -DISTRIBUTED BY HASH(`lo_orderkey`) BUCKETS 48 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true", -"enable_mow_light_delete" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/lineorder_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/lineorder_delete.sql deleted file mode 100644 index 329e040060..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/lineorder_delete.sql +++ /dev/null @@ -1 +0,0 @@ -truncate table lineorder; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/lineorder_part_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/lineorder_part_delete.sql deleted file mode 100644 index abb7ded433..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/lineorder_part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -delete from lineorder where lo_orderkey >= 240001 and lo_orderkey <= 360000; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/lineorder_sequence_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/lineorder_sequence_create.sql deleted file mode 100644 index a9b1d41156..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/lineorder_sequence_create.sql +++ /dev/null @@ -1,37 +0,0 @@ -CREATE TABLE IF NOT EXISTS `lineorder` ( - `lo_orderdate` int(11) NOT NULL COMMENT "", - `lo_orderkey` bigint(20) NOT NULL COMMENT "", - `lo_linenumber` bigint(20) NOT NULL COMMENT "", - `lo_custkey` int(11) NOT NULL COMMENT "", - `lo_partkey` int(11) NOT NULL COMMENT "", - `lo_suppkey` int(11) NOT NULL COMMENT "", - `lo_orderpriority` varchar(16) NOT NULL COMMENT "", - `lo_shippriority` int(11) NOT NULL COMMENT "", - `lo_quantity` bigint(20) NOT NULL COMMENT "", - `lo_extendedprice` bigint(20) NOT NULL COMMENT "", - `lo_ordtotalprice` bigint(20) NOT NULL COMMENT "", - `lo_discount` bigint(20) NOT NULL COMMENT "", - `lo_revenue` bigint(20) NOT NULL COMMENT "", - `lo_supplycost` bigint(20) NOT NULL COMMENT "", - `lo_tax` bigint(20) NOT NULL COMMENT "", - `lo_commitdate` bigint(20) NOT NULL COMMENT "", - `lo_shipmode` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`lo_orderdate`,`lo_orderkey`,`lo_linenumber`) -CLUSTER BY (`lo_supplycost`, `lo_orderdate`, `lo_orderkey`) -PARTITION BY RANGE(`lo_orderdate`) -(PARTITION p1992 VALUES [("-2147483648"), ("19930101")), -PARTITION p1993 VALUES [("19930101"), ("19940101")), -PARTITION p1994 VALUES [("19940101"), ("19950101")), -PARTITION p1995 VALUES [("19950101"), ("19960101")), -PARTITION p1996 VALUES [("19960101"), ("19970101")), -PARTITION p1997 VALUES [("19970101"), ("19980101")), -PARTITION p1998 VALUES [("19980101"), ("19990101"))) -DISTRIBUTED BY HASH(`lo_orderkey`) BUCKETS 48 -PROPERTIES ( -"function_column.sequence_type" = 'int', -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/part_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/part_create.sql deleted file mode 100644 index 86e906b4c2..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/part_create.sql +++ /dev/null @@ -1,21 +0,0 @@ -CREATE TABLE IF NOT EXISTS `part` ( - `p_partkey` int(11) NOT NULL COMMENT "", - `p_name` varchar(23) NOT NULL COMMENT "", - `p_mfgr` varchar(7) NOT NULL COMMENT "", - `p_category` varchar(8) NOT NULL COMMENT "", - `p_brand` varchar(10) NOT NULL COMMENT "", - `p_color` varchar(12) NOT NULL COMMENT "", - `p_type` varchar(26) NOT NULL COMMENT "", - `p_size` int(11) NOT NULL COMMENT "", - `p_container` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`p_partkey`) -CLUSTER BY (`p_color`, `p_name`, `p_category`) -DISTRIBUTED BY HASH(`p_partkey`) BUCKETS 10 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true", -"enable_mow_light_delete" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/part_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/part_delete.sql deleted file mode 100644 index 02c6abd253..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -truncate table `part`; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/part_part_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/part_part_delete.sql deleted file mode 100644 index 32ec2aa18b..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/part_part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -delete from `part` where p_partkey > 10000; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/part_sequence_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/part_sequence_create.sql deleted file mode 100644 index 5ba4038e12..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/part_sequence_create.sql +++ /dev/null @@ -1,21 +0,0 @@ -CREATE TABLE IF NOT EXISTS `part` ( - `p_partkey` int(11) NOT NULL COMMENT "", - `p_name` varchar(23) NOT NULL COMMENT "", - `p_mfgr` varchar(7) NOT NULL COMMENT "", - `p_category` varchar(8) NOT NULL COMMENT "", - `p_brand` varchar(10) NOT NULL COMMENT "", - `p_color` varchar(12) NOT NULL COMMENT "", - `p_type` varchar(26) NOT NULL COMMENT "", - `p_size` int(11) NOT NULL COMMENT "", - `p_container` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`p_partkey`) -CLUSTER BY (`p_size`, `p_type`, `p_partkey`) -DISTRIBUTED BY HASH(`p_partkey`) BUCKETS 10 -PROPERTIES ( -"function_column.sequence_type" = 'int', -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/supplier_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/supplier_create.sql deleted file mode 100644 index 404e4987b4..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/supplier_create.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE TABLE IF NOT EXISTS `supplier` ( - `s_suppkey` int(11) NOT NULL COMMENT "", - `s_name` varchar(26) NOT NULL COMMENT "", - `s_address` varchar(26) NOT NULL COMMENT "", - `s_city` varchar(11) NOT NULL COMMENT "", - `s_nation` varchar(16) NOT NULL COMMENT "", - `s_region` varchar(13) NOT NULL COMMENT "", - `s_phone` varchar(16) NOT NULL COMMENT "" -) -UNIQUE KEY (`s_suppkey`) -CLUSTER BY (`s_address`) -DISTRIBUTED BY HASH(`s_suppkey`) BUCKETS 10 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true", -"enable_mow_light_delete" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/supplier_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/supplier_delete.sql deleted file mode 100644 index 39e663134c..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/supplier_delete.sql +++ /dev/null @@ -1 +0,0 @@ -truncate table `supplier`; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/supplier_part_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/supplier_part_delete.sql deleted file mode 100644 index ac6a7030fd..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/supplier_part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -delete from `supplier` where s_suppkey > 100; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/supplier_sequence_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/supplier_sequence_create.sql deleted file mode 100644 index 74fa9c46ba..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/ddl/supplier_sequence_create.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE IF NOT EXISTS `supplier` ( - `s_suppkey` int(11) NOT NULL COMMENT "", - `s_name` varchar(26) NOT NULL COMMENT "", - `s_address` varchar(26) NOT NULL COMMENT "", - `s_city` varchar(11) NOT NULL COMMENT "", - `s_nation` varchar(16) NOT NULL COMMENT "", - `s_region` varchar(13) NOT NULL COMMENT "", - `s_phone` varchar(16) NOT NULL COMMENT "" -) -UNIQUE KEY (`s_suppkey`) -CLUSTER BY (`s_nation`, `s_region`, `s_city`, `s_name`) -DISTRIBUTED BY HASH(`s_suppkey`) BUCKETS 10 -PROPERTIES ( -"function_column.sequence_type" = 'int', -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true", -"enable_mow_light_delete" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/four/load_four_step.groovy b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/four/load_four_step.groovy deleted file mode 100644 index 81702248a8..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/four/load_four_step.groovy +++ /dev/null @@ -1,116 +0,0 @@ -// 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. - -// Most of the cases are copied from https://github.com/trinodb/trino/tree/master -// /testing/trino-product-tests/src/main/resources/sql-tests/testcases -// and modified by Doris. - -suite("load_four_step") { - def tables = ["customer": ["""c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use""", 3000, "c_custkey", 1500], - "lineorder": ["""lo_orderkey,lo_linenumber,lo_custkey,lo_partkey,lo_suppkey,lo_orderdate,lo_orderpriority, - lo_shippriority,lo_quantity,lo_extendedprice,lo_ordtotalprice,lo_discount, - lo_revenue,lo_supplycost,lo_tax,lo_commitdate,lo_shipmode,lo_dummy""", 600572, "lo_orderkey", 481137], - "part": ["""p_partkey,p_name,p_mfgr,p_category,p_brand,p_color,p_type,p_size,p_container,p_dummy""", 20000, "p_partkey", 10000], - "date": ["""d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth, - d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear, - d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy""", 255, "d_datekey", 224], - "supplier": ["""s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy""", 200, "s_suppkey", 100]] - - tables.each { tableName, rows -> - sql """ DROP TABLE IF EXISTS $tableName """ - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_sequence_create.sql""").text - for (j in 0..<2) { - streamLoad { - table tableName - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', rows[0] - set 'function_column.sequence_col', rows[2] - - // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. - // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${getS3Url()}/regression/ssb/sf0.1/${tableName}.tbl.gz""" - - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - sql 'sync' - int flag = 1 - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == rows[1]) - } - } - sql """ set delete_without_partition = true; """ - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_part_delete.sql""").text - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == rows[3]) - } - streamLoad { - table tableName - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', rows[0] - set 'function_column.sequence_col', rows[2] - - // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. - // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${getS3Url()}/regression/ssb/sf0.1/${tableName}.tbl.gz""" - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - sql 'sync' - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == rows[1]) - } - } -} diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/one/load_one_step.groovy b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/one/load_one_step.groovy deleted file mode 100644 index 31a8344d73..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/one/load_one_step.groovy +++ /dev/null @@ -1,67 +0,0 @@ -// 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. - - -suite("load_one_step") { - def tables = ["customer": ["""c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use""", 3000], - "lineorder": ["""lo_orderkey,lo_linenumber,lo_custkey,lo_partkey,lo_suppkey,lo_orderdate,lo_orderpriority, - lo_shippriority,lo_quantity,lo_extendedprice,lo_ordtotalprice,lo_discount, - lo_revenue,lo_supplycost,lo_tax,lo_commitdate,lo_shipmode,lo_dummy""", 600572], - "part": ["""p_partkey,p_name,p_mfgr,p_category,p_brand,p_color,p_type,p_size,p_container,p_dummy""", 20000], - "date": ["""d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth, - d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear, - d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy""", 255], - "supplier": ["""s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy""", 200]] - - tables.each { tableName, rows -> - sql """ DROP TABLE IF EXISTS $tableName """ - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_create.sql""").text - streamLoad { - table "${tableName}" - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', "${rows[0]}" - - // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. - // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${getS3Url()}/regression/ssb/sf0.1/${tableName}.tbl.gz""" - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - sql 'sync' - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == rows[1]) - } - } -} diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/three/load_three_step.groovy b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/three/load_three_step.groovy deleted file mode 100644 index aae1b16426..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/three/load_three_step.groovy +++ /dev/null @@ -1,76 +0,0 @@ -// 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. - - -suite("load_three_step") { - def tables = ["customer": ["""c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use""", 3000, "c_custkey"], - "lineorder": ["""lo_orderkey,lo_linenumber,lo_custkey,lo_partkey,lo_suppkey,lo_orderdate,lo_orderpriority, - lo_shippriority,lo_quantity,lo_extendedprice,lo_ordtotalprice,lo_discount, - lo_revenue,lo_supplycost,lo_tax,lo_commitdate,lo_shipmode,lo_dummy""", 600572, "lo_orderkey"], - "part": ["""p_partkey,p_name,p_mfgr,p_category,p_brand,p_color,p_type,p_size,p_container,p_dummy""", 20000, "p_partkey"], - "date": ["""d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth, - d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear, - d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy""", 255, "d_datekey"], - "supplier": ["""s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy""", 200, "s_suppkey"]] - - tables.each { tableName, rows -> - sql """ DROP TABLE IF EXISTS $tableName """ - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_sequence_create.sql""").text - for (j in 0..<2) { - streamLoad { - table tableName - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', rows[0] - set 'function_column.sequence_col', rows[2] - - // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. - // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${getS3Url()}/regression/ssb/sf0.1/${tableName}.tbl.gz""" - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - sql 'sync' - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == rows[1]) - } - } - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_delete.sql""").text - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == 0) - } - } -} diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/two/load_two_step.groovy b/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/two/load_two_step.groovy deleted file mode 100644 index f309aaeba3..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_load_zstd_c/two/load_two_step.groovy +++ /dev/null @@ -1,74 +0,0 @@ -// 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. - - -suite("load_two_step") { - def tables = ["customer": ["""c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use""", 3000, "c_custkey"], - "lineorder": ["""lo_orderkey,lo_linenumber,lo_custkey,lo_partkey,lo_suppkey,lo_orderdate,lo_orderpriority, - lo_shippriority,lo_quantity,lo_extendedprice,lo_ordtotalprice,lo_discount, - lo_revenue,lo_supplycost,lo_tax,lo_commitdate,lo_shipmode,lo_dummy""", 600572, "lo_orderkey"], - "part": ["""p_partkey,p_name,p_mfgr,p_category,p_brand,p_color,p_type,p_size,p_container,p_dummy""", 20000, "p_partkey"], - "date": ["""d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth, - d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear, - d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy""", 255, "d_datekey"], - "supplier": ["""s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy""", 200, "s_suppkey"]] - - tables.each { tableName, rows -> - sql """ DROP TABLE IF EXISTS $tableName """ - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_sequence_create.sql""").text - streamLoad { - table tableName - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', rows[0] - set 'function_column.sequence_col', rows[2] - - // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. - // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${getS3Url()}/regression/ssb/sf0.1/${tableName}.tbl.gz""" - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - sql 'sync' - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == rows[1]) - } - sql new File("""${context.file.parentFile.parent}/ddl/${tableName}_delete.sql""").text - for (int i = 1; i <= 5; i++) { - def loadRowCount = sql "select count(1) from ${tableName}" - logger.info("select ${tableName} numbers: ${loadRowCount[0][0]}".toString()) - assertTrue(loadRowCount[0][0] == 0) - } - } -} diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/customer_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/customer_create.sql deleted file mode 100644 index 8240bd709c..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/customer_create.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE TABLE IF NOT EXISTS `customer` ( - `c_custkey` int(11) NOT NULL COMMENT "", - `c_name` varchar(26) NOT NULL COMMENT "", - `c_address` varchar(41) NOT NULL COMMENT "", - `c_city` varchar(11) NOT NULL COMMENT "", - `c_nation` varchar(16) NOT NULL COMMENT "", - `c_region` varchar(13) NOT NULL COMMENT "", - `c_phone` varchar(16) NOT NULL COMMENT "", - `c_mktsegment` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`c_custkey`) -CLUSTER BY (`c_region`, `c_address`, `c_city`, `c_name`) -DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 10 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/customer_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/customer_delete.sql deleted file mode 100644 index 68a98512b2..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/customer_delete.sql +++ /dev/null @@ -1 +0,0 @@ -drop table if exists customer; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/date_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/date_create.sql deleted file mode 100644 index 1ff610fd69..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/date_create.sql +++ /dev/null @@ -1,28 +0,0 @@ -CREATE TABLE IF NOT EXISTS `date` ( - `d_datekey` int(11) NOT NULL COMMENT "", - `d_date` varchar(20) NOT NULL COMMENT "", - `d_dayofweek` varchar(10) NOT NULL COMMENT "", - `d_month` varchar(11) NOT NULL COMMENT "", - `d_year` int(11) NOT NULL COMMENT "", - `d_yearmonthnum` int(11) NOT NULL COMMENT "", - `d_yearmonth` varchar(9) NOT NULL COMMENT "", - `d_daynuminweek` int(11) NOT NULL COMMENT "", - `d_daynuminmonth` int(11) NOT NULL COMMENT "", - `d_daynuminyear` int(11) NOT NULL COMMENT "", - `d_monthnuminyear` int(11) NOT NULL COMMENT "", - `d_weeknuminyear` int(11) NOT NULL COMMENT "", - `d_sellingseason` varchar(14) NOT NULL COMMENT "", - `d_lastdayinweekfl` int(11) NOT NULL COMMENT "", - `d_lastdayinmonthfl` int(11) NOT NULL COMMENT "", - `d_holidayfl` int(11) NOT NULL COMMENT "", - `d_weekdayfl` int(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`d_datekey`) -CLUSTER BY (`d_weeknuminyear`, `d_month`) -DISTRIBUTED BY HASH(`d_datekey`) BUCKETS 1 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/date_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/date_delete.sql deleted file mode 100644 index c6cf155575..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/date_delete.sql +++ /dev/null @@ -1 +0,0 @@ -drop table if exists `date`; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/lineorder_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/lineorder_create.sql deleted file mode 100644 index 829b8d65bd..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/lineorder_create.sql +++ /dev/null @@ -1,36 +0,0 @@ -CREATE TABLE IF NOT EXISTS `lineorder` ( - `lo_orderdate` int(11) NOT NULL COMMENT "", - `lo_orderkey` bigint(20) NOT NULL COMMENT "", - `lo_linenumber` bigint(20) NOT NULL COMMENT "", - `lo_custkey` int(11) NOT NULL COMMENT "", - `lo_partkey` int(11) NOT NULL COMMENT "", - `lo_suppkey` int(11) NOT NULL COMMENT "", - `lo_orderpriority` varchar(16) NOT NULL COMMENT "", - `lo_shippriority` int(11) NOT NULL COMMENT "", - `lo_quantity` bigint(20) NOT NULL COMMENT "", - `lo_extendedprice` bigint(20) NOT NULL COMMENT "", - `lo_ordtotalprice` bigint(20) NOT NULL COMMENT "", - `lo_discount` bigint(20) NOT NULL COMMENT "", - `lo_revenue` bigint(20) NOT NULL COMMENT "", - `lo_supplycost` bigint(20) NOT NULL COMMENT "", - `lo_tax` bigint(20) NOT NULL COMMENT "", - `lo_commitdate` bigint(20) NOT NULL COMMENT "", - `lo_shipmode` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`lo_orderdate`,`lo_orderkey`,`lo_linenumber`) -CLUSTER BY (`lo_revenue`, `lo_orderdate`, `lo_orderpriority`) -PARTITION BY RANGE(`lo_orderdate`) -(PARTITION p1992 VALUES [("-2147483648"), ("19930101")), -PARTITION p1993 VALUES [("19930101"), ("19940101")), -PARTITION p1994 VALUES [("19940101"), ("19950101")), -PARTITION p1995 VALUES [("19950101"), ("19960101")), -PARTITION p1996 VALUES [("19960101"), ("19970101")), -PARTITION p1997 VALUES [("19970101"), ("19980101")), -PARTITION p1998 VALUES [("19980101"), ("19990101"))) -DISTRIBUTED BY HASH(`lo_orderkey`) BUCKETS 48 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/lineorder_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/lineorder_delete.sql deleted file mode 100644 index d8f94cfe9f..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/lineorder_delete.sql +++ /dev/null @@ -1 +0,0 @@ -drop table if exists lineorder; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/part_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/part_create.sql deleted file mode 100644 index 9dda02c7b7..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/part_create.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE IF NOT EXISTS `part` ( - `p_partkey` int(11) NOT NULL COMMENT "", - `p_name` varchar(23) NOT NULL COMMENT "", - `p_mfgr` varchar(7) NOT NULL COMMENT "", - `p_category` varchar(8) NOT NULL COMMENT "", - `p_brand` varchar(10) NOT NULL COMMENT "", - `p_color` varchar(12) NOT NULL COMMENT "", - `p_type` varchar(26) NOT NULL COMMENT "", - `p_size` int(11) NOT NULL COMMENT "", - `p_container` varchar(11) NOT NULL COMMENT "" -) -UNIQUE KEY (`p_partkey`) -CLUSTER BY (`p_color`, `p_container`) -DISTRIBUTED BY HASH(`p_partkey`) BUCKETS 10 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/part_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/part_delete.sql deleted file mode 100644 index 4ad502e24d..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/part_delete.sql +++ /dev/null @@ -1 +0,0 @@ -drop table if exists `part`; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/supplier_create.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/supplier_create.sql deleted file mode 100644 index b827e9b6db..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/supplier_create.sql +++ /dev/null @@ -1,18 +0,0 @@ -CREATE TABLE IF NOT EXISTS `supplier` ( - `s_suppkey` int(11) NOT NULL COMMENT "", - `s_name` varchar(26) NOT NULL COMMENT "", - `s_address` varchar(26) NOT NULL COMMENT "", - `s_city` varchar(11) NOT NULL COMMENT "", - `s_nation` varchar(16) NOT NULL COMMENT "", - `s_region` varchar(13) NOT NULL COMMENT "", - `s_phone` varchar(16) NOT NULL COMMENT "" -) -UNIQUE KEY (`s_suppkey`) -CLUSTER BY (`s_address`, `s_name`) -DISTRIBUTED BY HASH(`s_suppkey`) BUCKETS 10 -PROPERTIES ( -"compression"="zstd", -"replication_num" = "1", -"disable_auto_compaction" = "true", -"enable_unique_key_merge_on_write" = "true" -); diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/supplier_delete.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/supplier_delete.sql deleted file mode 100644 index 72e1c39dae..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/ddl/supplier_delete.sql +++ /dev/null @@ -1 +0,0 @@ -drop table if exists `supplier`; \ No newline at end of file diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/load.groovy b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/load.groovy deleted file mode 100644 index f348280242..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/load.groovy +++ /dev/null @@ -1,82 +0,0 @@ -// 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. - -// Most of the cases are copied from https://github.com/trinodb/trino/tree/master -// /testing/trino-product-tests/src/main/resources/sql-tests/testcases -// and modified by Doris. - -// Note: To filter out tables from sql files, use the following one-liner comamnd -// sed -nr 's/.*tables: (.*)$/\1/gp' /path/to/*.sql | sed -nr 's/,/\n/gp' | sort | uniq -suite("load") { - def tables = ["customer", "lineorder", "part", "date", "supplier"] - def columns = ["""c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use""", - """lo_orderkey,lo_linenumber,lo_custkey,lo_partkey,lo_suppkey,lo_orderdate,lo_orderpriority, - lo_shippriority,lo_quantity,lo_extendedprice,lo_ordtotalprice,lo_discount, - lo_revenue,lo_supplycost,lo_tax,lo_commitdate,lo_shipmode,lo_dummy""", - """p_partkey,p_name,p_mfgr,p_category,p_brand,p_color,p_type,p_size,p_container,p_dummy""", - """d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth, - d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear, - d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy""", - """s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy"""] - - for (String table in tables) { - sql new File("""${context.file.parent}/ddl/${table}_delete.sql""").text - sql new File("""${context.file.parent}/ddl/${table}_create.sql""").text - } - for (int j = 0; j < 10; j++) { - def i = 0 - for (String tableName in tables) { - streamLoad { - // a default db 'regression_test' is specified in - // ${DORIS_HOME}/conf/regression-conf.groovy - table tableName - - // default label is UUID: - // set 'label' UUID.randomUUID().toString() - - // default column_separator is specify in doris fe config, usually is '\t'. - // this line change to ',' - set 'column_separator', '|' - set 'compress_type', 'GZ' - set 'columns', columns[i] - - - // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. - // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${getS3Url()}/regression/ssb/sf0.1/${tableName}.tbl.gz""" - - time 10000 // limit inflight 10s - - // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows - - // if declared a check callback, the default check condition will ignore. - // So you must check all condition - check { result, exception, startTime, endTime -> - if (exception != null) { - throw exception - } - log.info("Stream load result: ${result}".toString()) - def json = parseJson(result) - assertEquals("success", json.Status.toLowerCase()) - assertEquals(json.NumberTotalRows, json.NumberLoadedRows) - assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) - } - } - i++ - } - } -} diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.1.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.1.sql deleted file mode 100644 index 4ef15e93ea..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.1.sql +++ /dev/null @@ -1,24 +0,0 @@ --- 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. - -SELECT SUM(lo_extendedprice*lo_discount) AS -REVENUE -FROM lineorder, date -WHERE lo_orderdate = d_datekey -AND d_year = 1993 -AND lo_discount BETWEEN 1 AND 3 -AND lo_quantity < 25; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.2.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.2.sql deleted file mode 100644 index 1b8442bd93..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.2.sql +++ /dev/null @@ -1,24 +0,0 @@ --- 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. - -SELECT SUM(lo_extendedprice*lo_discount) AS -REVENUE -FROM lineorder, date -WHERE lo_orderdate = d_datekey -AND d_yearmonth = 'Jan1994' -AND lo_discount BETWEEN 4 AND 6 -AND lo_quantity BETWEEN 26 AND 35; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.3.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.3.sql deleted file mode 100644 index ed6e51b1cf..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q1.3.sql +++ /dev/null @@ -1,25 +0,0 @@ --- 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. - -SELECT SUM(lo_extendedprice*lo_discount) AS -REVENUE -FROM lineorder, date -WHERE lo_orderdate = d_datekey -AND d_weeknuminyear= 6 -AND d_year = 1994 -AND lo_discount BETWEEN 5 AND 7 -AND lo_quantity BETWEEN 26 AND 35; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.1.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.1.sql deleted file mode 100644 index e1a1f52d18..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.1.sql +++ /dev/null @@ -1,26 +0,0 @@ --- 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. - -SELECT SUM(lo_revenue), d_year, p_brand -FROM lineorder, date, part, supplier -WHERE lo_orderdate = d_datekey -AND lo_partkey = p_partkey -AND lo_suppkey = s_suppkey -AND p_category = 'MFGR#12' -AND s_region = 'AMERICA' -GROUP BY d_year, p_brand -ORDER BY d_year, p_brand; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.2.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.2.sql deleted file mode 100644 index 3db6170119..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.2.sql +++ /dev/null @@ -1,27 +0,0 @@ --- 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. - -SELECT SUM(lo_revenue), d_year, p_brand -FROM lineorder, date, part, supplier -WHERE lo_orderdate = d_datekey -AND lo_partkey = p_partkey -AND lo_suppkey = s_suppkey -AND p_brand BETWEEN 'MFGR#2221' -AND 'MFGR#2228' -AND s_region = 'ASIA' -GROUP BY d_year, p_brand -ORDER BY d_year, p_brand; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.3.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.3.sql deleted file mode 100644 index b70ca90666..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q2.3.sql +++ /dev/null @@ -1,26 +0,0 @@ --- 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. - -SELECT SUM(lo_revenue), d_year, p_brand -FROM lineorder, date, part, supplier -WHERE lo_orderdate = d_datekey -AND lo_partkey = p_partkey -AND lo_suppkey = s_suppkey -AND p_brand = 'MFGR#2239' -AND s_region = 'EUROPE' -GROUP BY d_year, p_brand -ORDER BY d_year, p_brand; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.1.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.1.sql deleted file mode 100644 index 70f17d789b..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.1.sql +++ /dev/null @@ -1,28 +0,0 @@ --- 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. - -SELECT c_nation, s_nation, d_year, -SUM(lo_revenue) AS REVENUE -FROM customer, lineorder, supplier, date -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_orderdate = d_datekey -AND c_region = 'ASIA' -AND s_region = 'ASIA' -AND d_year >= 1992 AND d_year <= 1997 -GROUP BY c_nation, s_nation, d_year -ORDER BY d_year ASC, REVENUE DESC; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.2.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.2.sql deleted file mode 100644 index a416fbea8b..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.2.sql +++ /dev/null @@ -1,28 +0,0 @@ --- 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. - -SELECT c_city, s_city, d_year, sum(lo_revenue) -AS REVENUE -FROM customer, lineorder, supplier, date -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_orderdate = d_datekey -AND c_nation = 'UNITED STATES' -AND s_nation = 'UNITED STATES' -AND d_year >= 1992 AND d_year <= 1997 -GROUP BY c_city, s_city, d_year -ORDER BY d_year ASC, REVENUE DESC; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.3.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.3.sql deleted file mode 100644 index 98e29b72e7..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.3.sql +++ /dev/null @@ -1,30 +0,0 @@ --- 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. - -SELECT c_city, s_city, d_year, SUM(lo_revenue) -AS REVENUE -FROM customer, lineorder, supplier, date -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_orderdate = d_datekey -AND (c_city='UNITED KI1' -OR c_city='UNITED KI5') -AND (s_city='UNITED KI1' -OR s_city='UNITED KI5') -AND d_year >= 1992 AND d_year <= 1997 -GROUP BY c_city, s_city, d_year -ORDER BY d_year ASC, REVENUE DESC; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.4.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.4.sql deleted file mode 100644 index 65fe992ca4..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q3.4.sql +++ /dev/null @@ -1,30 +0,0 @@ --- 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. - -SELECT c_city, s_city, d_year, SUM(lo_revenue) -AS REVENUE -FROM customer, lineorder, supplier, date -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_orderdate = d_datekey -AND (c_city='UNITED KI1' -OR c_city='UNITED KI5') -AND (s_city='UNITED KI1' -OR s_city='UNITED KI5') -AND d_yearmonth = 'Dec1997' -GROUP BY c_city, s_city, d_year -ORDER BY d_year ASC, REVENUE DESC; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.1.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.1.sql deleted file mode 100644 index bdcd730bf9..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.1.sql +++ /dev/null @@ -1,30 +0,0 @@ --- 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. - -SELECT d_year, c_nation, -SUM(lo_revenue - lo_supplycost) AS PROFIT -FROM date, customer, supplier, part, lineorder -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_partkey = p_partkey -AND lo_orderdate = d_datekey -AND c_region = 'AMERICA' -AND s_region = 'AMERICA' -AND (p_mfgr = 'MFGR#1' -OR p_mfgr = 'MFGR#2') -GROUP BY d_year, c_nation -ORDER BY d_year, c_nation; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.2.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.2.sql deleted file mode 100644 index 24c82cf682..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.2.sql +++ /dev/null @@ -1,31 +0,0 @@ --- 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. - -SELECT d_year, s_nation, p_category, -SUM(lo_revenue - lo_supplycost) AS PROFIT -FROM date, customer, supplier, part, lineorder -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_partkey = p_partkey -AND lo_orderdate = d_datekey -AND c_region = 'AMERICA' -AND s_region = 'AMERICA' -AND (d_year = 1997 OR d_year = 1998) -AND (p_mfgr = 'MFGR#1' -OR p_mfgr = 'MFGR#2') -GROUP BY d_year, s_nation, p_category -ORDER BY d_year, s_nation, p_category; diff --git a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.3.sql b/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.3.sql deleted file mode 100644 index 0dcc08bd26..0000000000 --- a/regression-test/suites/unique_with_mow_p2/ssb_unique_sql_zstd_cluster/sql/q4.3.sql +++ /dev/null @@ -1,29 +0,0 @@ --- 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. - -SELECT d_year, s_city, p_brand, -SUM(lo_revenue - lo_supplycost) AS PROFIT -FROM date, customer, supplier, part, lineorder -WHERE lo_custkey = c_custkey -AND lo_suppkey = s_suppkey -AND lo_partkey = p_partkey -AND lo_orderdate = d_datekey -AND s_nation = 'UNITED STATES' -AND (d_year = 1997 OR d_year = 1998) -AND p_category = 'MFGR#14' -GROUP BY d_year, s_city, p_brand -ORDER BY d_year, s_city, p_brand; diff --git a/regression-test/suites/unique_with_mow_p2/test_pk_uk_case_cluster.groovy b/regression-test/suites/unique_with_mow_p2/test_pk_uk_case_cluster.groovy deleted file mode 100644 index 4accf1fb10..0000000000 --- a/regression-test/suites/unique_with_mow_p2/test_pk_uk_case_cluster.groovy +++ /dev/null @@ -1,256 +0,0 @@ -// 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. - -import org.codehaus.groovy.runtime.IOGroovyMethods; -import java.util.Random; -import org.apache.commons.lang.RandomStringUtils; -import java.util.Date; -import java.text.SimpleDateFormat; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.util.Map; -import java.util.UUID; -import java.time.format.DateTimeFormatter; - -suite("test_pk_uk_case_cluster") { - def tableNamePk = "primary_key_pk_uk_cluster" - def tableNameUk = "unique_key_pk_uk_cluster" - - onFinish { - try_sql("DROP TABLE IF EXISTS ${tableNamePk}") - try_sql("DROP TABLE IF EXISTS ${tableNameUk}") - } - - sql """ DROP TABLE IF EXISTS ${tableNamePk} """ - sql """ - CREATE TABLE IF NOT EXISTS ${tableNamePk} ( - L_ORDERKEY INTEGER NOT NULL, - L_PARTKEY INTEGER NOT NULL, - L_SUPPKEY INTEGER NOT NULL, - L_LINENUMBER INTEGER NOT NULL, - L_QUANTITY DECIMAL(15,2) NOT NULL, - L_EXTENDEDPRICE DECIMAL(15,2) NOT NULL, - L_DISCOUNT DECIMAL(15,2) NOT NULL, - L_TAX DECIMAL(15,2) NOT NULL, - L_RETURNFLAG CHAR(1) NOT NULL, - L_LINESTATUS CHAR(1) NOT NULL, - L_SHIPDATE DATE NOT NULL, - L_COMMITDATE DATE NOT NULL, - L_RECEIPTDATE DATE NOT NULL, - L_SHIPINSTRUCT CHAR(60) NOT NULL, - L_SHIPMODE CHAR(60) NOT NULL, - L_COMMENT VARCHAR(60) NOT NULL - ) - UNIQUE KEY(L_ORDERKEY, L_PARTKEY, L_SUPPKEY, L_LINENUMBER) - CLUSTER BY (L_PARTKEY, L_SUPPKEY, L_SHIPDATE) - DISTRIBUTED BY HASH(L_ORDERKEY) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1", - "enable_unique_key_merge_on_write" = "true", - "enable_mow_light_delete" = "true" - ) - """ - - sql """ DROP TABLE IF EXISTS ${tableNameUk} """ - sql """ - CREATE TABLE IF NOT EXISTS ${tableNameUk} ( - L_ORDERKEY INTEGER NOT NULL, - L_PARTKEY INTEGER NOT NULL, - L_SUPPKEY INTEGER NOT NULL, - L_LINENUMBER INTEGER NOT NULL, - L_QUANTITY DECIMAL(15,2) NOT NULL, - L_EXTENDEDPRICE DECIMAL(15,2) NOT NULL, - L_DISCOUNT DECIMAL(15,2) NOT NULL, - L_TAX DECIMAL(15,2) NOT NULL, - L_RETURNFLAG CHAR(1) NOT NULL, - L_LINESTATUS CHAR(1) NOT NULL, - L_SHIPDATE DATE NOT NULL, - L_COMMITDATE DATE NOT NULL, - L_RECEIPTDATE DATE NOT NULL, - L_SHIPINSTRUCT CHAR(60) NOT NULL, - L_SHIPMODE CHAR(60) NOT NULL, - L_COMMENT VARCHAR(60) NOT NULL - ) - UNIQUE KEY(L_ORDERKEY, L_PARTKEY, L_SUPPKEY, L_LINENUMBER) - DISTRIBUTED BY HASH(L_ORDERKEY) BUCKETS 1 - PROPERTIES ( - "replication_num" = "1", - "enable_unique_key_merge_on_write" = "false" - ) - """ - - Random rd = new Random() - def order_key = rd.nextInt(1000) - def part_key = rd.nextInt(1000) - def sub_key = 13 - def line_num = 29 - def decimal = rd.nextInt(1000) + 0.11 - def city = RandomStringUtils.randomAlphabetic(10) - def name = UUID.randomUUID().toString() - def date = DateTimeFormatter.ofPattern("yyyy-MM-dd").format(LocalDateTime.now()) - for (int idx = 0; idx < 500; idx++) { - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - city = RandomStringUtils.randomAlphabetic(10) - name = UUID.randomUUID().toString() - sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - city = RandomStringUtils.randomAlphabetic(10) - name = UUID.randomUUID().toString() - sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - city = RandomStringUtils.randomAlphabetic(10) - name = UUID.randomUUID().toString() - sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - city = RandomStringUtils.randomAlphabetic(10) - name = UUID.randomUUID().toString() - sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - city = RandomStringUtils.randomAlphabetic(10) - name = UUID.randomUUID().toString() - sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, - $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - - // insert batch key - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - city = RandomStringUtils.randomAlphabetic(10) - name = UUID.randomUUID().toString() - sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city'), - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city'), - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city'), - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city'), - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city'), - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city'), - ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') - """ - - sql "sync" - - // count(*) - def result0 = sql """ SELECT count(*) FROM ${tableNamePk}; """ - def result1 = sql """ SELECT count(*) FROM ${tableNameUk}; """ - logger.info("result:" + result0[0][0] + "|" + result1[0][0]) - assertEquals(result0[0], result1[0]) - - result0 = sql """ SELECT - l_returnflag, - l_linestatus, - sum(l_quantity) AS sum_qty, - sum(l_extendedprice) AS sum_base_price, - sum(l_extendedprice * (1 - l_discount)) AS sum_disc_price, - sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) AS sum_charge, - avg(l_quantity) AS avg_qty, - avg(l_extendedprice) AS avg_price, - avg(l_discount) AS avg_disc, - count(*) AS count_order - FROM - ${tableNamePk} - GROUP BY - l_returnflag, - l_linestatus - ORDER BY - l_returnflag, - l_linestatus - """ - result1 = sql """ SELECT - l_returnflag, - l_linestatus, - sum(l_quantity) AS sum_qty, - sum(l_extendedprice) AS sum_base_price, - sum(l_extendedprice * (1 - l_discount)) AS sum_disc_price, - sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) AS sum_charge, - avg(l_quantity) AS avg_qty, - avg(l_extendedprice) AS avg_price, - avg(l_discount) AS avg_disc, - count(*) AS count_order - FROM - ${tableNameUk} - GROUP BY - l_returnflag, - l_linestatus - ORDER BY - l_returnflag, - l_linestatus - """ - assertEquals(result0.size(), result1.size()) - for (int i = 0; i < result0.size(); ++i) { - for (int j = 0; j < result0[0].size(); j++) { - logger.info("result: " + result0[i][j] + "|" + result1[i][j]) - assertEquals(result0[i][j], result1[i][j]) - } - } - - // delete - if (idx % 10 == 0) { - order_key = rd.nextInt(10) - part_key = rd.nextInt(10) - result0 = sql """ SELECT count(*) FROM ${tableNamePk} where L_ORDERKEY < $order_key and L_PARTKEY < $part_key; """ - result1 = sql """ SELECT count(*) FROM ${tableNameUk} where L_ORDERKEY < $order_key and L_PARTKEY < $part_key""" - logger.info("result:" + result0[0][0] + "|" + result1[0][0]) - sql "DELETE FROM ${tableNamePk} where L_ORDERKEY < $order_key and L_PARTKEY < $part_key" - sql "DELETE FROM ${tableNameUk} where L_ORDERKEY < $order_key and L_PARTKEY < $part_key" - } - } -}