File tree Expand file tree Collapse file tree
main/jjtree/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/statement/create Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10507,6 +10507,7 @@ CreateIndex CreateIndex():
1050710507 CreateIndex createIndex = new CreateIndex();
1050810508 Table table = null;
1050910509 List<Index.ColumnParams> colNames;
10510+ List<String> includeColumns;
1051010511 String indexType;
1051110512 Index index = null;
1051210513 List<String> parameter = new ArrayList<String>();
@@ -10535,6 +10536,9 @@ CreateIndex CreateIndex():
1053510536 )
1053610537 )
1053710538 colNames = IndexColumnsWithParamsList()
10539+ [ <K_INCLUDE> includeColumns=ColumnsNamesList()
10540+ { tailParameters.add("INCLUDE (" + String.join(", ", includeColumns) + ")"); }
10541+ ]
1053810542 ( LOOKAHEAD(2) parameter=CreateParameter() { tailParameters.addAll(parameter); } )*
1053910543 {
1054010544 index.setColumns(colNames);
Original file line number Diff line number Diff line change @@ -174,4 +174,9 @@ public void testCreateIndexVisibility() throws JSQLParserException {
174174 assertSqlCanBeParsedAndDeparsed ("CREATE INDEX idx_a ON t1 (a) INVISIBLE" , true );
175175 assertSqlCanBeParsedAndDeparsed ("CREATE INDEX idx_a ON t1 (a) VISIBLE" , true );
176176 }
177+
178+ @ Test
179+ public void testCreateIndexIncludeIssue2459 () throws JSQLParserException {
180+ assertSqlCanBeParsedAndDeparsed ("CREATE INDEX idx_a ON t1 (a) INCLUDE (b, c)" );
181+ }
177182}
You can’t perform that action at this time.
0 commit comments