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

morningman 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 dcf8459313b [branch2.0](test) fix doris jdbc catalog test case (#27150)
dcf8459313b is described below

commit dcf8459313b632dfabaa51af87cb102985e62c92
Author: Mingyu Chen <[email protected]>
AuthorDate: Fri Nov 17 09:59:14 2023 +0800

    [branch2.0](test) fix doris jdbc catalog test case (#27150)
    
    1. Fix doris_jdbc_catalog test case out file
    2. Add log to debug 2 unstable test cases: pg_jdbc_catalog and 
oracle_jdbc_catalog
---
 .../src/main/java/org/apache/doris/analysis/NativeInsertStmt.java      | 3 ++-
 fe/fe-core/src/main/java/org/apache/doris/common/ErrorCode.java        | 2 +-
 .../data/external_table_p0/jdbc/test_doris_jdbc_catalog.out            | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/NativeInsertStmt.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/NativeInsertStmt.java
index 3a52bf70cd4..0105ae48fc8 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/NativeInsertStmt.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/NativeInsertStmt.java
@@ -583,7 +583,8 @@ public class NativeInsertStmt extends InsertStmt {
 
         // check if size of select item equal with columns mentioned in 
statement
         if (mentionedColumns.size() != queryStmt.getResultExprs().size()) {
-            
ErrorReport.reportAnalysisException(ErrorCode.ERR_WRONG_VALUE_COUNT);
+            
ErrorReport.reportAnalysisException(ErrorCode.ERR_WRONG_VALUE_COUNT,
+                    mentionedColumns.size(), 
queryStmt.getResultExprs().size());
         }
 
         if 
(analyzer.getContext().getSessionVariable().isEnableUniqueKeyPartialUpdate()) {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/ErrorCode.java 
b/fe/fe-core/src/main/java/org/apache/doris/common/ErrorCode.java
index 3d1b9da6fd2..66f97b27e04 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/ErrorCode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/ErrorCode.java
@@ -37,7 +37,7 @@ public enum ErrorCode {
     ERR_BAD_TABLE_ERROR(1051, new byte[]{'4', '2', 'S', '0', '2'}, "Unknown 
table '%s'"),
     ERR_NON_UNIQ_ERROR(1052, new byte[]{'2', '3', '0', '0', '0'}, "Column '%s' 
in field list is ambiguous"),
     ERR_BAD_FIELD_ERROR(1054, new byte[]{'4', '2', 'S', '2', '2'}, "Unknown 
column '%s' in '%s'"),
-    ERR_WRONG_VALUE_COUNT(1058, new byte[]{'2', '1', 'S', '0', '1'}, "Column 
count doesn't match value count"),
+    ERR_WRONG_VALUE_COUNT(1058, new byte[]{'2', '1', 'S', '0', '1'}, "Column 
count (%d) doesn't match value count (%d)"),
     ERR_DUP_FIELDNAME(1060, new byte[]{'4', '2', 'S', '2', '1'}, "Duplicate 
column name '%s'"),
     ERR_NONUNIQ_TABLE(1066, new byte[]{'4', '2', '0', '0', '0'}, "Not unique 
table/alias: '%s'"),
     ERR_NO_SUCH_THREAD(1094, new byte[]{'H', 'Y', '0', '0', '0'}, "Unknown 
thread id: %d"),
diff --git 
a/regression-test/data/external_table_p0/jdbc/test_doris_jdbc_catalog.out 
b/regression-test/data/external_table_p0/jdbc/test_doris_jdbc_catalog.out
index 1df4816be8a..f6934cd65eb 100644
--- a/regression-test/data/external_table_p0/jdbc/test_doris_jdbc_catalog.out
+++ b/regression-test/data/external_table_p0/jdbc/test_doris_jdbc_catalog.out
@@ -111,7 +111,7 @@ arr_string_col      ARRAY<TEXT>     Yes     false   \N      
NONE
 true   1       1       1       1       1       1.0     1.0     1.00000 
1.0000000000    2021-01-01      2021-01-01T00:00        a       a       {"a":1}
 
 -- !query_ctas_arr --
-1      [1]     [1]     [1]     [1]     [1]     [1]     [1]     [1]     
[1.00000]       [1.0000000000]  [2021-01-01]    [2021-01-01 00:00:00.000]       
["a"]   ["a"]   ["a"]
+1      [1]     [1]     [1]     [1]     [1]     [1]     [1]     [1]     
[1.00000]       [1.0000000000]  ["2021-01-01"]  ["2021-01-01 00:00:00.000"]     
["a"]   ["a"]   ["a"]
 2      \N      \N      \N      \N      \N      \N      \N      \N      \N      
\N      \N      \N      \N      \N      \N
 
 -- !sql --


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

Reply via email to