This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 261385799e [fix](planner) fix current_timestamp param type mismatch
when doing stream load (#23092)
261385799e is described below
commit 261385799e4770b3cb7120611d07e9b5edb475eb
Author: Siyang Tang <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]