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 053e5935576 [fix](load) restore "use_new_load_scan_node" in property 
map for compatibility (#44285)
053e5935576 is described below

commit 053e5935576f017b4cbcdb7425902c7cb329080b
Author: Kaijie Chen <[email protected]>
AuthorDate: Tue Nov 26 23:40:07 2024 +0800

    [fix](load) restore "use_new_load_scan_node" in property map for 
compatibility (#44285)
    
    `LoadStmt#checkProperties()` will throw DdlException when encounter
    unknown properties.
    So we have to keep the deprecated property keys in the map for
    compatibility.
---
 .../src/main/java/org/apache/doris/analysis/LoadStmt.java   |  9 +++++++++
 .../load_p2/broker_load/test_s3_load_properties.groovy      | 13 +++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/LoadStmt.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/LoadStmt.java
index 3a2efe3c98c..9ceec9415e3 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/LoadStmt.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/LoadStmt.java
@@ -99,6 +99,9 @@ public class LoadStmt extends DdlStmt implements 
NotFallbackInParser {
     public static final String PRIORITY = "priority";
     public static final String LOAD_TO_SINGLE_TABLET = "load_to_single_tablet";
 
+    // deprecated, keeping this property to make LoadStmt#checkProperties() 
happy
+    public static final String USE_NEW_LOAD_SCAN_NODE = 
"use_new_load_scan_node";
+
     // for load data from Baidu Object Store(BOS)
     public static final String BOS_ENDPOINT = "bos_endpoint";
     public static final String BOS_ACCESSKEY = "bos_accesskey";
@@ -221,6 +224,12 @@ public class LoadStmt extends DdlStmt implements 
NotFallbackInParser {
                     return Boolean.valueOf(s);
                 }
             })
+            .put(USE_NEW_LOAD_SCAN_NODE, new Function<String, Boolean>() {
+                @Override
+                public @Nullable Boolean apply(@Nullable String s) {
+                    return Boolean.valueOf(s);
+                }
+            })
             .put(KEY_SKIP_LINES, new Function<String, Integer>() {
                 @Override
                 public @Nullable Integer apply(@Nullable String s) {
diff --git 
a/regression-test/suites/load_p2/broker_load/test_s3_load_properties.groovy 
b/regression-test/suites/load_p2/broker_load/test_s3_load_properties.groovy
index 9d73256d38c..fdc6971f475 100644
--- a/regression-test/suites/load_p2/broker_load/test_s3_load_properties.groovy
+++ b/regression-test/suites/load_p2/broker_load/test_s3_load_properties.groovy
@@ -187,6 +187,19 @@ suite("test_s3_load_properties", "p2") {
 //                "", "", "", "","").addProperties("skip_lines", "10"))
 //    }
 
+    /* ========================================================== deprecated 
properties ========================================================== */
+    for (String table : basicTables) {
+        attributesList.add(new 
LoadAttributes("s3://${s3BucketName}/regression/load/data/basic_data.csv",
+                "${table}", "LINES TERMINATED BY \"\n\"", "COLUMNS TERMINATED 
BY \"|\"", "FORMAT AS \"CSV\"", 
"(k00,k01,k02,k03,k04,k05,k06,k07,k08,k09,k10,k11,k12,k13,k14,k15,k16,k17,k18)",
+                "", "", "", "", "")).addProperties("use_new_load_scan_node", 
"true")
+    }
+
+    for (String table : basicTables) {
+        attributesList.add(new 
LoadAttributes("s3://${s3BucketName}/regression/load/data/basic_data.csv",
+                "${table}", "LINES TERMINATED BY \"\n\"", "COLUMNS TERMINATED 
BY \"|\"", "FORMAT AS \"CSV\"", 
"(k00,k01,k02,k03,k04,k05,k06,k07,k08,k09,k10,k11,k12,k13,k14,k15,k16,k17,k18)",
+                "", "", "", "", "")).addProperties("use_new_load_scan_node", 
"false")
+    }
+
     /* ========================================================== wrong column 
sep ========================================================== */
     for (String table : basicTables) {
         attributesList.add(new 
LoadAttributes("s3://${s3BucketName}/regression/load/data/basic_data.csv",


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

Reply via email to