In JDBC adapter for ClickHouse, implement Values by generating SELECT without FROM. In ClickHouseSqlDialect, the supportsAliasedValues() method should return false.
We use ClickHouseSqlDialect to do some sql optimize. For sql select 1, in the process of sqlNode → relNode → sqlNode, the sql string will be transformed to
Since clickhouse is not support AliasedValues, all we need to do is to extend ClickHouseSqlDialect and make `supportsAliasedValues` return false.
Maybe this kind of behavior can integrated into core?
If needed, the pull request is ready.