Skip to content

Commit 2320b1b

Browse files
committed
fixes #1185
1 parent 537452d commit 2320b1b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

nb-configuration.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
That way multiple projects can share the same settings (useful for formatting rules for example).
1414
Any value defined here will override the pom.xml file value but is only applicable to the current project.
1515
-->
16-
<netbeans.compile.on.save>all</netbeans.compile.on.save>
16+
<netbeans.compile.on.save>none</netbeans.compile.on.save>
1717
<com-junichi11-netbeans-changelf.enable>false</com-junichi11-netbeans-changelf.enable>
1818
<com-junichi11-netbeans-changelf.use-project>true</com-junichi11-netbeans-changelf.use-project>
1919
<com-junichi11-netbeans-changelf.lf-kind>LF</com-junichi11-netbeans-changelf.lf-kind>

src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ String RelObjectNameWithoutValue() :
13361336
(tk=<S_IDENTIFIER> | tk=<S_QUOTED_IDENTIFIER>
13371337
| tk=<K_ALGORITHM>
13381338
| tk=<K_BYTE> | tk=<K_CHAR> | tk=<K_CHANGE> | tk=<K_CHARACTER>
1339-
| tk=<K_CAST> | tk=<K_COMMENT> | tk=<K_DISABLE> | tk=<K_DESC>
1339+
| tk=<K_CAST> | tk=<K_COMMENT> | tk=<K_COSTS> | tk=<K_DISABLE> | tk=<K_DESC>
13401340
| tk=<K_DO> | tk=<K_EXTRACT> | tk=<K_FIRST> | tk=<K_FOLLOWING>
13411341
| tk=<K_LAST> | tk=<K_LEADING> | tk=<K_MATERIALIZED> | tk=<K_NULLS> | tk=<K_PARTITION> | tk=<K_RANGE>
13421342
| tk=<K_ROW> | tk=<K_ROWS> | tk=<K_SIBLINGS> | tk=<K_XML>

src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4515,4 +4515,9 @@ public void testProblematicDeparsingIssue1183() throws JSQLParserException {
45154515
public void testProblematicDeparsingIssue1183_2() throws JSQLParserException {
45164516
assertSqlCanBeParsedAndDeparsed("SELECT ARRAY_AGG(ID ORDER BY ID) OVER (ORDER BY ID)");
45174517
}
4518+
4519+
@Test
4520+
public void testKeywordCostsIssue1185() throws JSQLParserException {
4521+
assertSqlCanBeParsedAndDeparsed("WITH costs AS (SELECT * FROM MY_TABLE1 AS ALIAS_TABLE1) SELECT * FROM TESTSTMT");
4522+
}
45184523
}

0 commit comments

Comments
 (0)