Currently, the gem support only standard WHERE clause. However, ClickHouse significantly benefits from the PREWHERE clause, which is more efficient for performance as it filters data before reading the remaining columns.
I would like to be able to use .prewhere() in the same way as .where() in ActiveRecord chains.
Smth like:
User.prewhere(active: true).where(name: "Ivan") => SELECT * FROM users PREWHERE active = 1 WHERE name = 'Ivan'
ref: https://clickhouse.com/docs/sql-reference/statements/select/prewhere