Some SQL clauses are not universally compatible. For example, duckdb and other SQL engines support PERCENTILE_CONT for calculating percentiles, but Polars SQL requires an alternative QUANTILE_CONT approach.
In such cases, if there is no universal solution, readers should be able to provide its own idiomatic SQL for a given operation, and the stat calculations then call that method on a reader to build their SQL queries.
In general, we will still strive to generate SQL queries that are widely supported, where it is reasonable to do so. We should try not to rely on this mechanism too heavily.