Skip to content

Commit

Permalink
Merge pull request #2089 from taozhi8833998/fix-limit-snowflake
Browse files Browse the repository at this point in the history
fix: limit is not reserved keyword in snowflake
  • Loading branch information
taozhi8833998 authored Aug 29, 2024
2 parents 7b38b2b + 9c6a2e4 commit 23753cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pegjs/snowflake.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

'LEFT': true,
'LIKE': true,
'LIMIT': true,
'LIMIT': false,

'NOT': true,
'NULL': true,
Expand Down
7 changes: 7 additions & 0 deletions test/snowflake.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,13 @@ describe('snowflake', () => {
'SELECT POSITION("3" IN split_part("W3Schools|com", "|", 11)) AS "MatchPosition"'
]
},
{
title: 'limit is not reserved keyword',
sql: [
'select * from tb where wins>=limit',
'SELECT * FROM "tb" WHERE "wins" >= "limit"',
]
},
]
SQL_LIST.forEach(sqlInfo => {
const { title, sql } = sqlInfo
Expand Down

0 comments on commit 23753cd

Please sign in to comment.