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

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


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 216f5c8ec69 [Bug](stream-load) fix stream load failed on table with 
rollup (#29665) (#29757)
216f5c8ec69 is described below

commit 216f5c8ec69c10b70ed9d4963ca3c18c2a0ae4db
Author: Kang <[email protected]>
AuthorDate: Wed Jan 10 07:38:11 2024 +0800

    [Bug](stream-load) fix stream load failed on table with rollup (#29665) 
(#29757)
    
    Co-authored-by: Pxl <[email protected]>
---
 fe/fe-core/src/main/java/org/apache/doris/load/Load.java       |  3 +++
 regression-test/data/rollup_p0/a.csv                           |  1 +
 .../data/rollup_p0/test_materialized_view_load_open.out        | 10 ++++++++++
 3 files changed, 14 insertions(+)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/Load.java 
b/fe/fe-core/src/main/java/org/apache/doris/load/Load.java
index 6b03a388b4d..28969ea8a41 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/Load.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/Load.java
@@ -761,6 +761,9 @@ public class Load {
         Map<String, Expr> mvDefineExpr = Maps.newHashMap();
         for (Column column : tbl.getFullSchema()) {
             if (column.getDefineExpr() != null) {
+                if (column.getDefineExpr().getType().isInvalid()) {
+                    column.getDefineExpr().setType(column.getType());
+                }
                 mvDefineExpr.put(column.getName(), column.getDefineExpr());
             }
         }
diff --git a/regression-test/data/rollup_p0/a.csv 
b/regression-test/data/rollup_p0/a.csv
new file mode 100644
index 00000000000..b86612f31c6
--- /dev/null
+++ b/regression-test/data/rollup_p0/a.csv
@@ -0,0 +1 @@
+2010-05-21,1.5,test,1,1 
\ No newline at end of file
diff --git 
a/regression-test/data/rollup_p0/test_materialized_view_load_open.out 
b/regression-test/data/rollup_p0/test_materialized_view_load_open.out
new file mode 100644
index 00000000000..8d4b5bc83f6
--- /dev/null
+++ b/regression-test/data/rollup_p0/test_materialized_view_load_open.out
@@ -0,0 +1,10 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !select --
+2000-05-20     1.50    test    1       \N
+2010-05-20     1.50    test    1       1
+
+-- !select --
+2000-05-20     1.50    test    1       \N
+2010-05-20     1.50    test    1       1
+2010-05-21     1.50    test    1       1
+


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

Reply via email to