diff --git a/pegjs/snowflake.pegjs b/pegjs/snowflake.pegjs index 0e440f66..4313a559 100644 --- a/pegjs/snowflake.pegjs +++ b/pegjs/snowflake.pegjs @@ -50,7 +50,7 @@ 'LEFT': true, 'LIKE': true, - 'LIMIT': true, + 'LIMIT': false, 'NOT': true, 'NULL': true, diff --git a/test/snowflake.spec.js b/test/snowflake.spec.js index d5989be1..4b564baa 100644 --- a/test/snowflake.spec.js +++ b/test/snowflake.spec.js @@ -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