SQL commands like the sql below cannot be parsed, an exception occurs. SELECT * FROM EMP ORDER BY SALARY DESC OPTIMIZE FOR 20 ROWS; Exception: "net.sf.jsqlparser.parser.ParseException: Encountered " <S_IDENTIFIER> "OPTIMIZE "" at line 4, column 3. Was expecting one of: <EOF> "FOR" ..."
Activity
CodingFabian commentedon Mar 13, 2017
+1 here,
this seems to be trailing to statements:
e.g. in selects like:
LIMIT 1 OPTIMIZE FOR 1 ROWS
Documented in the DB2 documentation:
https://www.ibm.com/support/knowledgecenter/en/SSEPEK_10.0.0/sqlref/src/tpc/db2z_sql_optimizeforclause.html
https://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/perf/src/tpc/db2z_optimizefornrows.html
it seems to appear only at the end of a select statement.
implemented optimize for, fixes #348
Merge recent changes in the master from the master (#1)
Added support for DROP INDEX, ADD UNIQUE INDEX, ALGORITHM and USING (#…