This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new b8d3c5f07c1 [fix](case) fix export data consistency case (#32005)
b8d3c5f07c1 is described below

commit b8d3c5f07c1e9548aba40fdb7bf58381203c0e02
Author: walter <w41te...@gmail.com>
AuthorDate: Fri Mar 8 20:07:52 2024 +0800

    [fix](case) fix export data consistency case (#32005)
---
 .../export_p0/test_export_data_consistency.out     | 152 ---------------------
 .../export_p0/test_export_data_consistency.groovy  |  33 ++++-
 2 files changed, 30 insertions(+), 155 deletions(-)

diff --git a/regression-test/data/export_p0/test_export_data_consistency.out 
b/regression-test/data/export_p0/test_export_data_consistency.out
index 97135d2bb98..d130df70a1a 100644
--- a/regression-test/data/export_p0/test_export_data_consistency.out
+++ b/regression-test/data/export_p0/test_export_data_consistency.out
@@ -151,155 +151,3 @@
 149    ftw-149 167
 150    \N      \N
 
--- !select_load1 --
-1      ftw-1   19
-2      ftw-2   20
-3      ftw-3   21
-4      ftw-4   22
-5      ftw-5   23
-6      ftw-6   24
-7      ftw-7   25
-8      ftw-8   26
-9      ftw-9   27
-10     ftw-10  28
-11     ftw-11  29
-12     ftw-12  30
-13     ftw-13  31
-14     ftw-14  32
-15     ftw-15  33
-16     ftw-16  34
-17     ftw-17  35
-18     ftw-18  36
-19     ftw-19  37
-20     ftw-20  38
-21     ftw-21  39
-22     ftw-22  40
-23     ftw-23  41
-24     ftw-24  42
-25     ftw-25  43
-26     ftw-26  44
-27     ftw-27  45
-28     ftw-28  46
-29     ftw-29  47
-30     ftw-30  48
-31     ftw-31  49
-32     ftw-32  50
-33     ftw-33  51
-34     ftw-34  52
-35     ftw-35  53
-36     ftw-36  54
-37     ftw-37  55
-38     ftw-38  56
-39     ftw-39  57
-40     ftw-40  58
-41     ftw-41  59
-42     ftw-42  60
-43     ftw-43  61
-44     ftw-44  62
-45     ftw-45  63
-46     ftw-46  64
-47     ftw-47  65
-48     ftw-48  66
-49     ftw-49  67
-50     ftw-50  68
-51     ftw-51  69
-52     ftw-52  70
-53     ftw-53  71
-54     ftw-54  72
-55     ftw-55  73
-56     ftw-56  74
-57     ftw-57  75
-58     ftw-58  76
-59     ftw-59  77
-60     ftw-60  78
-61     ftw-61  79
-62     ftw-62  80
-63     ftw-63  81
-64     ftw-64  82
-65     ftw-65  83
-66     ftw-66  84
-67     ftw-67  85
-68     ftw-68  86
-69     ftw-69  87
-70     ftw-70  88
-71     ftw-71  89
-72     ftw-72  90
-73     ftw-73  91
-74     ftw-74  92
-75     ftw-75  93
-76     ftw-76  94
-77     ftw-77  95
-78     ftw-78  96
-79     ftw-79  97
-80     ftw-80  98
-81     ftw-81  99
-82     ftw-82  100
-83     ftw-83  101
-84     ftw-84  102
-85     ftw-85  103
-86     ftw-86  104
-87     ftw-87  105
-88     ftw-88  106
-89     ftw-89  107
-90     ftw-90  108
-91     ftw-91  109
-92     ftw-92  110
-93     ftw-93  111
-94     ftw-94  112
-95     ftw-95  113
-96     ftw-96  114
-97     ftw-97  115
-98     ftw-98  116
-99     ftw-99  117
-100    ftw-100 118
-101    ftw-101 119
-102    ftw-102 120
-103    ftw-103 121
-104    ftw-104 122
-105    ftw-105 123
-106    ftw-106 124
-107    ftw-107 125
-108    ftw-108 126
-109    ftw-109 127
-110    ftw-110 128
-111    ftw-111 129
-112    ftw-112 130
-113    ftw-113 131
-114    ftw-114 132
-115    ftw-115 133
-116    ftw-116 134
-117    ftw-117 135
-118    ftw-118 136
-119    ftw-119 137
-120    ftw-120 138
-121    ftw-121 139
-122    ftw-122 140
-123    ftw-123 141
-124    ftw-124 142
-125    ftw-125 143
-126    ftw-126 144
-127    ftw-127 145
-128    ftw-128 146
-129    ftw-129 147
-130    ftw-130 148
-131    ftw-131 149
-132    ftw-132 150
-133    ftw-133 151
-134    ftw-134 152
-135    ftw-135 153
-136    ftw-136 154
-137    ftw-137 155
-138    ftw-138 156
-139    ftw-139 157
-140    ftw-140 158
-141    ftw-141 159
-142    ftw-142 160
-143    ftw-143 161
-144    ftw-144 162
-145    ftw-145 163
-146    ftw-146 164
-147    ftw-147 165
-148    ftw-148 166
-149    ftw-149 167
-150    \N      \N
-
diff --git 
a/regression-test/suites/export_p0/test_export_data_consistency.groovy 
b/regression-test/suites/export_p0/test_export_data_consistency.groovy
index 87d2eb4a7b7..e388d869fff 100644
--- a/regression-test/suites/export_p0/test_export_data_consistency.groovy
+++ b/regression-test/suites/export_p0/test_export_data_consistency.groovy
@@ -153,11 +153,15 @@ suite("test_export_data_consistency", "p0") {
             );
         """
         // do insert in parallel
+        // [0, 20), [20, 70), [70, +inf)
+        // The export task should keep partition consistency.
         sql """INSERT INTO ${table_export_name} VALUES
             (10, 'test', 11),
-            (20, 'test', 21),
+            (15, 'test', 11),
+            (30, 'test', 21),
             (40, 'test', 51),
-            (80, 'test', 51)
+            (80, 'test', 51),
+            (90, 'test', 51)
             """
 
         // wait export
@@ -202,7 +206,30 @@ suite("test_export_data_consistency", "p0") {
             }
         }
 
-        qt_select_load1 """ SELECT * FROM ${table_load_name} t ORDER BY id; """
+        // The partition ranges are:
+        // [0, 20), [20, 70), [70, +inf)
+        // The export task should keep partition consistency.
+        def result = sql """ SELECT * FROM ${table_load_name} t WHERE id in 
(10,15,30,40,80,90) ORDER BY id; """
+        logger.info("result ${result}")
+        assert result.size == 6
+        if (result[0][1] == 'test') {
+            assert result[1][1] == 'test'
+        } else {
+            assert result[0][1] == 'ftw-10'
+            assert result[1][1] == 'ftw-15'
+        }
+        if (result[2][1] == 'test') {
+            assert result[3][1] == 'test'
+        } else {
+            assert result[2][1] == 'ftw-30'
+            assert result[3][1] == 'ftw-40'
+        }
+        if (result[4][1] == 'test') {
+            assert result[5][1] == 'test'
+        } else {
+            assert result[4][1] == 'ftw-80'
+            assert result[5][1] == 'ftw-90'
+        }
     } finally {
         try_sql("DROP TABLE IF EXISTS ${table_load_name}")
         delete_files.call("${outFilePath}")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to