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 3a52bf70cd4afb..0105ae48fc829d 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 @@ private void analyzeSubquery(Analyzer analyzer) throws UserException { // 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 3d1b9da6fd2c0e..66f97b27e04755 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 1df4816be8a377..f6934cd65eb706 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 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 --