v.19.14Improvement
Correct Implementation of Ternary Logic for And/or
Correct implementation of ternary logic for AND/OR. #6048 (Alexander Kazakov)Why it matters
This feature addresses the proper evaluation of logical expressions involving three-valued (ternary) logic: TRUE, FALSE, and UNKNOWN (NULL). It ensures thatAND and OR operators correctly handle NULL values following ternary logic rules, improving query accuracy when dealing with nullable data.How to use it
Users benefit from this improvement transparently without needing configuration changes. Simply use logical expressions withAND and OR in queries, and ClickHouse applies correct ternary logic semantics automatically.