Skip to content

Commit 9d676b9

Browse files
committed
fixes #1137
1 parent ba9b8d7 commit 9d676b9

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Also I would like to know about needed examples or documentation stuff.
5757

5858
## Extensions in the latest SNAPSHOT version 4.1
5959

60+
* allow **skip**, **algorithm** as column name
6061
* support for functions in an interval expression
6162
* subArray support arr\[1:3\]
6263
* first support for tuples as simple expression **SELECT myfunc((f1, f2))**

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,9 @@ Not all names should be allowed for aliases.
13291329
String RelObjectNameWithoutValue() :
13301330
{ Token tk = null; }
13311331
{
1332-
(tk=<S_IDENTIFIER> | tk=<S_QUOTED_IDENTIFIER> | tk=<K_BYTE> | tk=<K_CHAR> | tk=<K_CHANGE> | tk=<K_CHARACTER>
1332+
(tk=<S_IDENTIFIER> | tk=<S_QUOTED_IDENTIFIER>
1333+
| tk=<K_ALGORITHM>
1334+
| tk=<K_BYTE> | tk=<K_CHAR> | tk=<K_CHANGE> | tk=<K_CHARACTER>
13331335
| tk=<K_CAST> | tk=<K_COMMENT> | tk=<K_DISABLE> | tk=<K_DESC>
13341336
| tk=<K_DO> | tk=<K_EXTRACT> | tk=<K_FIRST> | tk=<K_FOLLOWING>
13351337
| tk=<K_LAST> | tk=<K_LEADING> | tk=<K_MATERIALIZED> | tk=<K_NULLS> | tk=<K_PARTITION> | tk=<K_RANGE>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4485,4 +4485,9 @@ public void testColonDelimiterIssue1134() throws JSQLParserException {
44854485
public void testKeywordSkipIssue1136() throws JSQLParserException {
44864486
assertSqlCanBeParsedAndDeparsed("SELECT skip");
44874487
}
4488+
4489+
@Test
4490+
public void testKeywordAlgorithmIssue1137() throws JSQLParserException {
4491+
assertSqlCanBeParsedAndDeparsed("SELECT algorithm FROM tablename");
4492+
}
44884493
}

0 commit comments

Comments
 (0)