mirror of
https://github.com/SigNoz/signoz.git
synced 2026-08-25 05:50:55 +01:00
#### Description - Every label lives in the `labels` JSON and reads back as `String` whatever data type the metadata claims, so `success = true` compared `String` with `Bool` and failed the whole query with ClickHouse error 386. The read is now cast with `accurateCastOrNull(..., 'Bool')`, which also matches the `1`/`True` spellings exporters write. - `IN`/`NOT IN` expand into `=`/`!=` chains like the logs and traces condition builders already do. The driver binds `IN (?)` as a single array literal, which needs one common supertype across the set, so a set mixing text with numbers or bools failed the same way. Each value is now type-matched on its own. - Intrinsic columns keep their own type and are compared as they are, which also stops `toFloat64OrNull()` being applied to `unix_milli`/`fingerprint` (error 43). #### Additional Information - A label value that isn't boolean text casts to NULL and so matches neither side of the comparison — `tests/integration/tests/queriermetrics/13_bool_label_filter.py` asserts that, alongside the statement-builder unit tests. - `BETWEEN` takes its cast from the lower bound: the where-clause visitor already rejects mixed-type operands (and bool ones outright), so both bounds are the same number-or-string type by the time the condition builder sees them.