Skip to content

Causing Exception for three parentheses (I Guess) #375

@ghost

Description

[04:10:36|INFO|input.SqlReader:109] Parsing query sessions by file from dir: data/yelp
net.sf.jsqlparser.JSQLParserException
	at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatements(CCJSqlParserUtil.java:121)
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered " "(" "( "" at line 1, column 265.
Was expecting one of:
    "SELECT" ...
    "SELECT" ...
    "SELECT" ...
    "SELECT" ...
    "SELECT" ...
    "SELECT" ...
    "SELECT" ...

The SQL statement is:

select n.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules, c.relkind, c.oid, pg_get_expr(d.adbin, d.adrelid), case t.typtype when 'd' then t.typbasetype else 0 end, t.typtypmod, c.relhasoids from (((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace and c.relname = 'business' and n.nspname = 'public') inner join pg_catalog.pg_attribute a on (not a.attisdropped) and a.attnum > 0 and a.attrelid = c.oid) inner join pg_catalog.pg_type t on t.oid = a.atttypid) left outer join pg_attrdef d on a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum order by n.nspname, c.relname, attnum

Using version 0.9.4

This query works fine in postgres.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions