Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redshift notation for SET is not supported #1708

Closed
zaza opened this issue Jan 5, 2023 · 3 comments
Closed

Redshift notation for SET is not supported #1708

zaza opened this issue Jan 5, 2023 · 3 comments

Comments

@zaza
Copy link
Contributor

zaza commented Jan 5, 2023

In Redshift the syntax for SET statements is SET x TO y, for example: SET enable_case_sensitive_identifier to true

This format is not supported and fails with

net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "true" "TRUE"
    at line 1, column 41.

Was expecting one of:

    "&"
    ","
    "::"
    ";"
    "<<"
    ">>"
    "["
    "^"
    "|"
    <EOF>

	at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatement(CCJSqlParserUtil.java:263)
	at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:81)
	at net.sf.jsqlparser.test.TestUtils.assertSqlCanBeParsedAndDeparsed(TestUtils.java:94)
	at net.sf.jsqlparser.test.TestUtils.assertSqlCanBeParsedAndDeparsed(TestUtils.java:81)
	at net.sf.jsqlparser.test.TestUtils.assertSqlCanBeParsedAndDeparsed(TestUtils.java:67)
	at net.sf.jsqlparser.statement.SetStatementTest.setTo(SetStatementTest.java:76)
...
@wumpz
Copy link
Member

wumpz commented Jan 12, 2023

This is not supported. PRs are welcome.

@manticore-projects
Copy link
Contributor

Duplicate #1945

@manticore-projects
Copy link
Contributor

See solution at #1945

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants