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

 ##########
 File path: 
modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
 ##########
 @@ -1181,8 +1181,12 @@ 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);
 
 Review comment:
   do we have specific code for such case or may be we could add it?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to