Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.22.0
-
None
-
None
Description
When using the new SQL hints feature:
select /*+ cpu */ x from test limit 2;
If one calls to SqlString() on the node:
node.toSqlString(CalciteSqlDialect.DEFAULT).toString()
We get:
'SELECT /*+ ("cpu") */ "x" FROM "test" FETCH NEXT 2 ROWS ONLY'
which is not valid SQL for a hint. It looks like the precedence options need to be modified when writing out the hint in SqlSelectOperator.unparse
We do some rewriting of the sql statement and then re-parse it, so this is preventing us from using hints. I am happy to submit a patch if I am headed in the right direction with the description above.