-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.22.0
-
Fix Version/s: 1.23.0
-
Component/s: None
-
Labels:None
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.