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

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 5f20d7c5d006797791a18c640cd84a5f7c5cadd4
Author: Guangdong Liu <[email protected]>
AuthorDate: Mon Jan 29 21:57:22 2024 +0800

    [regression test](stream load) test for `enable_profile` (#28534)
---
 .../data/load_p0/http_stream/test_http_stream.out  |  4 +++
 .../load_p0/http_stream/test_http_stream.groovy    | 39 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/regression-test/data/load_p0/http_stream/test_http_stream.out 
b/regression-test/data/load_p0/http_stream/test_http_stream.out
index 68fbf64f4bf..7ce24eea095 100644
--- a/regression-test/data/load_p0/http_stream/test_http_stream.out
+++ b/regression-test/data/load_p0/http_stream/test_http_stream.out
@@ -616,3 +616,7 @@
 1      test
 2      test
 
+-- !sql18 --
+1      test
+2      test
+
diff --git a/regression-test/suites/load_p0/http_stream/test_http_stream.groovy 
b/regression-test/suites/load_p0/http_stream/test_http_stream.groovy
index d6534432070..781732988e5 100644
--- a/regression-test/suites/load_p0/http_stream/test_http_stream.groovy
+++ b/regression-test/suites/load_p0/http_stream/test_http_stream.groovy
@@ -815,5 +815,44 @@ suite("test_http_stream", "p0") {
     } finally {
         try_sql "DROP TABLE IF EXISTS ${tableName17}"
     }
+
+    //  test enable_profile
+    def tableName18 = "test_http_stream_enable_profile"
+
+    try {
+        sql """
+       CREATE TABLE IF NOT EXISTS ${tableName18} (
+        `k1` int(11) NULL,
+        `k2` VARCHAR(20) NULL
+        ) ENGINE=OLAP
+        DUPLICATE KEY(`k1`)
+        DISTRIBUTED BY HASH(`k1`) BUCKETS 3
+        PROPERTIES (
+        "replication_allocation" = "tag.location.default: 1"
+        );
+        """
+
+        streamLoad {
+            set 'version', '1'
+            set 'enable_profile','true'
+            set 'sql', """
+                    insert into ${db}.${tableName18} select c1, c2 from 
http_stream("format"="csv", "column_separator"="|", "trim_double_quotes"="true")
+                    """
+            time 10000
+            file '../stream_load/trim_double_quotes.csv'
+            check { result, exception, startTime, endTime ->
+                if (exception != null) {
+                    throw exception
+                }
+                log.info("http_stream result: ${result}".toString())
+                def json = parseJson(result)
+                assertEquals("success", json.Status.toLowerCase())
+            }
+        }
+
+        qt_sql18 "select * from ${tableName18} order by k1"
+    } finally {
+        try_sql "DROP TABLE IF EXISTS ${tableName18}"
+    }
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to