Skip to content

With with values list doesn't parse. #1135

@Intektor

Description

@Intektor

Describe the bug
Using as (values ...) in a with doesn't parse.

To Reproduce

           with sample_data(day, value) as (values (0, 13), (1, 12), (2, 15), (3, 4), (4, 8), (5, 16))
            
           select day, value from sample_data
Exception in thread "main" net.sf.jsqlparser.JSQLParserException: Encountered unexpected token: "," ","
    at line 1, column 49.

Was expecting one of:

    ")"
    "EXCEPT"
    "INTERSECT"
    "MINUS"
    "ORDER"
    "UNION"

	at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatement(CCJSqlParserUtil.java:165)
	at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:59)
	at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:37)`

I tested the code on hyperdb, postgresql and sqlite and it works there.

System

  • java: 8
  • version: 4.0

Metadata

Metadata

Assignees

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