This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch dev-1.1.2 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push: new 0fdf8b0d06 [improvement](error msg)improve the err msg returned when the key not in columns when create table (#11490) 0fdf8b0d06 is described below commit 0fdf8b0d062accf414db4f712f67a3214f8e551f Author: zy-kkk <zhong...@qq.com> AuthorDate: Thu Aug 4 11:20:49 2022 +0800 [improvement](error msg)improve the err msg returned when the key not in columns when create table (#11490) --- fe/fe-core/src/main/java/org/apache/doris/analysis/KeysDesc.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/KeysDesc.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/KeysDesc.java index c7b4f2377e..8624f42ca3 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/KeysDesc.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/KeysDesc.java @@ -71,6 +71,10 @@ public class KeysDesc implements Writable { for (int i = 0; i < keysColumnNames.size(); ++i) { String name = cols.get(i).getName(); if (!keysColumnNames.get(i).equalsIgnoreCase(name)) { + String keyName = keysColumnNames.get(i); + if (cols.stream().noneMatch(col -> col.getName().equalsIgnoreCase(keyName))) { + throw new AnalysisException("Key column[" + keyName + "] doesn't exist."); + } throw new AnalysisException("Key columns should be a ordered prefix of the schema."); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org