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

yiguolei 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 a7771ea507 [fix](planner) fix current_timestamp param type mismatch 
when doing stream load (#23092)
a7771ea507 is described below

commit a7771ea50728e47a94595b047af9398f44cd844d
Author: Siyang Tang <82279870+tangsiyang2...@users.noreply.github.com>
AuthorDate: Fri Aug 18 14:28:45 2023 +0800

    [fix](planner) fix current_timestamp param type mismatch when doing stream 
load (#23092)
    
    FileLoadScanNode did not analyze the default value expr, result in target 
param type int32 become int8 as the original IntLiteral type.
---
 .../org/apache/doris/planner/external/FileScanNode.java  |  1 +
 .../data/correctness_p0/test_current_timestamp.out       | 16 ++++++++--------
 .../correctness_p0/test_current_timestamp_streamload.csv |  3 ++-
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/planner/external/FileScanNode.java 
b/fe/fe-core/src/main/java/org/apache/doris/planner/external/FileScanNode.java
index f882a83337..63dd6d452a 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/planner/external/FileScanNode.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/planner/external/FileScanNode.java
@@ -175,6 +175,7 @@ public abstract class FileScanNode extends ExternalScanNode 
{
             if (column.getDefaultValue() != null) {
                 if (column.getDefaultValueExprDef() != null) {
                     expr = column.getDefaultValueExpr();
+                    expr.analyze(analyzer);
                 } else {
                     expr = new StringLiteral(column.getDefaultValue());
                 }
diff --git a/regression-test/data/correctness_p0/test_current_timestamp.out 
b/regression-test/data/correctness_p0/test_current_timestamp.out
index e66b4f88b9..3060140374 100644
--- a/regression-test/data/correctness_p0/test_current_timestamp.out
+++ b/regression-test/data/correctness_p0/test_current_timestamp.out
@@ -12,28 +12,28 @@
 4
 
 -- !stream_load_csv1 --
-4
+5
 
 -- !stream_load_csv2 --
-4
+5
 
 -- !stream_load_csv3 --
-4
+5
 
 -- !stream_load_csv4 --
-4
+5
 
 -- !stream_load_json1 --
-2
+3
 
 -- !stream_load_json2 --
-2
+3
 
 -- !stream_load_json3 --
-2
+3
 
 -- !stream_load_json4 --
-2
+3
 
 -- !stream_load_json5 --
 9      apache
diff --git 
a/regression-test/data/correctness_p0/test_current_timestamp_streamload.csv 
b/regression-test/data/correctness_p0/test_current_timestamp_streamload.csv
index 55f24a1c84..d78a3b3045 100644
--- a/regression-test/data/correctness_p0/test_current_timestamp_streamload.csv
+++ b/regression-test/data/correctness_p0/test_current_timestamp_streamload.csv
@@ -1,4 +1,5 @@
 5,ee
 6,ff
 7,gg
-8,hh
\ No newline at end of file
+8,hh
+9,


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

Reply via email to