Yes. The general pattern is to add a ‘boolean supportsXxx()’ method to SqlDialect, and make the JdbcYyyRule not generate a JdbcYyy if the relational expression contains an xxx and this particular dialect does not support it. Then add a test to RelToSqlConverterTest that covers several dialects.
(In this case xxx = windowed aggregates, and yyy = Project.) Julian > On Feb 22, 2018, at 2:53 AM, Pavel Gubin <pgu...@icloud.com> wrote: > > Not all JDBC datasources support window functions. But JdbcProject is > generated regardless of this fact. In the result we get SQL with window > function which gives an error when the execution is pushed to the JDBC > datasource. What is the best way to avoid such errors based on SQL dialect? > Avoid converting to JdbcProject if some unsupported features are used? > > Pavel