You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
e.g. 'SELECT A FROM tbl1 \nwhere ;'
gets parsed to
[Statement{query: 'SELECT A FROM tbl1 \nwhere',originalQuery: 'SELECT A FROM tbl1 \nwhere ;',tree: '(statement (query (queryNoWith (queryTerm SELECT A FROM tbl1 where))))',type: 'SELECT',ctx: DefaultContext{parentCtx: [StatementsContext],invokingState: 250,children: [Array],start: [Pt],stop: [Pt],exception: null,parser: [_SqlBaseParser],ruleIndex: 3},exception: null,metadata: Metadata{tables: [],parameterizedProperties: {},withProperties: {}}}]
while 'SELECT A FROM tbl1 where ;'
leads to
[Statement{query: 'SELECT A FROM tbl1 where',originalQuery: 'SELECT A FROM tbl1 where ;',tree: '(statement (query (queryNoWith (queryTerm SELECT A FROM tbl1 where))))',type: 'SELECT',ctx: DefaultContext{parentCtx: [StatementsContext],invokingState: 250,children: [Array],start: [Pt],stop: [Pt],exception: null,parser: [_SqlBaseParser],ruleIndex: 3},exception: ParseError: noviablealternativeatinput'SELECT A FROM tbl1 where ;'atExceptionCollectorListener.syntaxError(file:///Users//sqlparsetest/node_modules/@cratedb/cratedb-sqlparse/dist/sqlparse.js:85513:19)atfile:///Users//sqlparsetest/node_modules/@cratedb/cratedb-sqlparse/dist/sqlparse.js:1647:37atArray.map(<anonymous>)
at Rt.syntaxError (file:///Users//sqlparsetest/node_modules/@cratedb/cratedb-sqlparse/dist/sqlparse.js:1647:22)
at _SqlBaseParser.notifyErrorListeners (file:///Users//sqlparsetest/node_modules/@cratedb/cratedb-sqlparse/dist/sqlparse.js:3569:39)
at Ae.reportNoViableAlternative (file:///Users//sqlparsetest/node_modules/@cratedb/cratedb-sqlparse/dist/sqlparse.js:3122:10)
at Ae.reportError (file:///Users//sqlparsetest/node_modules/@cratedb/cratedb-sqlparse/dist/sqlparse.js:3088:94)
at _SqlBaseParser.queryTerm (file:///Users//sqlparsetest/node_modules/@cratedb/cratedb-sqlparse/dist/sqlparse.js:62301:26)
at _SqlBaseParser.queryNoWith (file:///Users//sqlparsetest/node_modules/@cratedb/cratedb-sqlparse/dist/sqlparse.js:62028:12)
at _SqlBaseParser.query (file:///Users//sqlparsetest/node_modules/@cratedb/cratedb-sqlparse/dist/sqlparse.js:62007:12) {query: 'SELECT A FROM tbl1 where ;',msg: "no viable alternative at input 'SELECT A FROM tbl1 where ;'",offendingToken: [Pt],line: 1,column: 25,errorMessage: "[line 1:25 no viable alternative at input 'SELECT A FROM tbl1 where ;']",errorMessageVerbose: 'SELECT A FROM tbl1 where ;\n ^'},
metadata: Metadata {tables: [],parameterizedProperties: {},
withProperties: {}}}]
same behaviour can be witnessed with other keywords: 'SELECT 1\n limit ' --> parses 'SELECT 1\r limit ' --> parses 'SELECT 1\t limit ' --> fails 'SELECT 1 limit ' --> fails
The text was updated successfully, but these errors were encountered:
e.g.
'SELECT A FROM tbl1 \nwhere ;'
gets parsed to
while
'SELECT A FROM tbl1 where ;'
leads to
same behaviour can be witnessed with other keywords:
'SELECT 1\n limit '
--> parses'SELECT 1\r limit '
--> parses'SELECT 1\t limit '
--> fails'SELECT 1 limit '
--> failsThe text was updated successfully, but these errors were encountered: