I am trying out Calcite against a DBMS that does not support the limit syntax in nested / sub queries. (The JOOQ blog captures more details / examples at: https://www.jooq.org/doc/3.1/manual/sql-building/sql-statements/select-statement/limit-clause/#N467A6 )
I'm interested in how I could have similar behaviour in Calcite. My starting attempt / thinking is that it needs a JDBC rule that re-writes / adjusts Sort operations based on the relevant SqlDialect. However I'm not sure if / how I can match only sorts within nested queries and avoid changing the root / non-nested limit operations. Is this the correct thinking? Is there any relevant examples to look at for this? Thanks Andrew
