KonnexionsGmbH / KonnexionsGmbH/sqlparse

Error parsing base SELECT expression

Open
#187 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Erlang
Stars
46
Forks
15
PR merge metrics
No merged PRs in 30d

Description

```
1> {ok, Ast, _} = sql_lex:string("SELECT 1").
{ok,[{'SELECT',1},{'INTNUM',1,"1"}],1}
2> sqlparse:parse(Ast).
{error,{1,sqlparse,["syntax error before: ",[]]}}
3> {ok, Ast, _} = sql_lex:string("SELECT 1+2+3+4*1.2").
{ok,[{'SELECT',1},
{'INTNUM',1,"1"},
{'+',1},
{'INTNUM',1,"2"},
{'+',1},
{'INTNUM',1,"3"},
{'+',1},
{'INTNUM',1,"4"},
{'*',1},
{'APPROXNUM',1,"1.2"}],
1}
4> sqlparse:parse(Ast).
{error,{1,sqlparse,["syntax error before: ",[]]}}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the examples with sql_lex:string("SELECT 1") and sqlparse:parse(Ast), then inspect the parser entry point and grammar handling for SELECT expressions. Done means the shown base SELECT and arithmetic expression inputs parse successfully without syntax errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
erlang, sql
Domain
compilers, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.