You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/02/11 13:20:30 UTC

[GitHub] [ignite] alamar commented on a change in pull request #7395: IGNITE-12433 checking column names for duplicates on create table statement

alamar commented on a change in pull request #7395: IGNITE-12433 checking column names for duplicates on create table statement
URL: https://github.com/apache/ignite/pull/7395#discussion_r377628351
 
 

 ##########
 File path: modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
 ##########
 @@ -1142,8 +1142,11 @@ private GridSqlCreateTable parseCreateTable(CreateTable createTbl) {
 
         LinkedHashMap<String, GridSqlColumn> cols = new LinkedHashMap<>(data.columns.size());
 
-        for (Column col : data.columns)
+        for (Column col : data.columns) {
+            if (cols.containsKey(col.getName()))
+                throw new IgniteSQLException("Duplicate column name: " + col.getName(), IgniteQueryErrorCode.PARSING);
             cols.put(col.getName(), parseColumn(col));
 
 Review comment:
   whitespace desired before this line

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services