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

ParseException: Encountered unexpected token: "EXCHANGE" #1454

Closed
proteen opened this issue Jan 9, 2022 · 2 comments
Closed

ParseException: Encountered unexpected token: "EXCHANGE" #1454

proteen opened this issue Jan 9, 2022 · 2 comments
Assignees

Comments

@proteen
Copy link

proteen commented Jan 9, 2022

sql

alter table total_issue_info exchange partition P0001 with table total_issue_info_tmp

Expected Behavior

the sql runs well on Navicat, I expect jsqlparser parses it also well

Actual Behavior

net.sf.jsqlparser.JSQLParserException
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:51)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:40)
at com.spy.service.situation.SituationHandler.handle(SituationHandler.java:654)
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "exchange" <S_IDENTIFIER>
at line 1, column 34.

Was expecting one of:

"ADD"
"ALGORITHM"
"ALTER"
"CHANGE"
"DROP"
"MODIFY"

at net.sf.jsqlparser.parser.CCJSqlParser.generateParseException(CCJSqlParser.java:22439)

System

  • Database :5.7
  • Java Version :1.8
  • JSqlParser version:4.0
@manticore-projects
Copy link
Contributor

manticore-projects commented Jan 9, 2022

Confirmed,

the exchange partition ... with table ... clause of the alter table statement is not supported.
Oracle supports it: https://docs.oracle.com/database/121/VLDBG/GUID-09CE9F52-A5BE-4CFD-8164-867CAF96DDCF.htm

@manticore-projects
Copy link
Contributor

See UnsupportedStatements as explain in #1945 (unless you will sponsor or provide a specific implementation of this feature.)

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

No branches or pull requests

2 participants