Repository navigation
Exception parsing show statement #1702
Description
Activity
manticore-projects commented
on Dec 26, 2022 ContributorMore actionsGreetings.
Your syntax
show indexes from my_tableis not supported, since it does not apply to any SQL Standard or major RDBMS (as far as I know).Supported syntax are shown here.
You may want to provide or sponsor an implementation of this unsupported feature.
Please don't cross-post though.
jayant-kumar-yadav commented
on Dec 26, 2022 ContributorAuthorMore actionsMySql family DBs support this so I thought it would be there.
manticore-projects commented
on Dec 26, 2022 ContributorMore actionsLet me put it like this: We are mostly interested in parsing and understanding the actual logic of a SQL statement in order to find out about tables, columns, expressions, joins, where clauses etc.
Your statement does not yield any of such information (except maybe the table name). It is RDBMS specific syntax for analysis.
For that reason, it is not implemented yet. Nobody has had an interest so far, because its easier to just skip it.
However, you can provide a PR when this statement is important for you.
jayant-kumar-yadav commented
on Dec 28, 2022 ContributorAuthorMore actionsAdded PR #1704
- added a commit that references this issue
on May 16, 2023 manticore-projects commented
on May 16, 2023 ContributorMore actionsSolved via commit daa56ed with PR #1778
It does not make sense to implement all the various RDBMS specific syntax since the
SHOWstatement does not bear any value or interesting content. Although throwing exceptions is also annoying, soUnsupportedStatementis the way to go.If you are really interested in the content of the
UnsupportedStatementthen please use Regular Expressions on it.manticore-projects commented
on May 16, 2023 ContributorMore actions- added a commit that references this issue
on Jun 1, 2023 - added a commit that references this issue
on Jun 15, 2023 - added a commit that references this issue
on Jun 27, 2023
I am trying to parse "show indexes from my_table" and it is throwing ParseException :
net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "from" "FROM"
at line 1, column 14.
Was expecting one of: