Skip to content

Commit

Permalink
fixes #1137
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpz committed Apr 10, 2021
1 parent ba9b8d7 commit 9d676b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Also I would like to know about needed examples or documentation stuff.

## Extensions in the latest SNAPSHOT version 4.1

* allow **skip**, **algorithm** as column name
* support for functions in an interval expression
* subArray support arr\[1:3\]
* first support for tuples as simple expression **SELECT myfunc((f1, f2))**
Expand Down
4 changes: 3 additions & 1 deletion src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,9 @@ Not all names should be allowed for aliases.
String RelObjectNameWithoutValue() :
{ Token tk = null; }
{
(tk=<S_IDENTIFIER> | tk=<S_QUOTED_IDENTIFIER> | tk=<K_BYTE> | tk=<K_CHAR> | tk=<K_CHANGE> | tk=<K_CHARACTER>
(tk=<S_IDENTIFIER> | tk=<S_QUOTED_IDENTIFIER>
| tk=<K_ALGORITHM>
| tk=<K_BYTE> | tk=<K_CHAR> | tk=<K_CHANGE> | tk=<K_CHARACTER>
| tk=<K_CAST> | tk=<K_COMMENT> | tk=<K_DISABLE> | tk=<K_DESC>
| tk=<K_DO> | tk=<K_EXTRACT> | tk=<K_FIRST> | tk=<K_FOLLOWING>
| tk=<K_LAST> | tk=<K_LEADING> | tk=<K_MATERIALIZED> | tk=<K_NULLS> | tk=<K_PARTITION> | tk=<K_RANGE>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4485,4 +4485,9 @@ public void testColonDelimiterIssue1134() throws JSQLParserException {
public void testKeywordSkipIssue1136() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed("SELECT skip");
}

@Test
public void testKeywordAlgorithmIssue1137() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed("SELECT algorithm FROM tablename");
}
}

0 comments on commit 9d676b9

Please sign in to comment.