mirror of
https://github.com/SigNoz/signoz.git
synced 2026-11-04 07:20:43 +00:00
#### Description - The querier reads a traces JSON number as `toFloat64OrNull(p::String)`: every numeric type and a numeric string read as Float64. Replaces the `dynamicType` gate around `accurateCastOrNull`. - The `toFloat64` collision cast leaves a read already starting `toFloat64OrNull(` bare. Why avoiding the `toFloat64` wrapper on json number queries? The wrapper exists for the map (`Bad get: has UInt64, requested Float64`) and hid the read from its skip index. #### Additional Information - A number-typed key now matches a value stored as a numeric string (`"404"`), and an integer above 2^53 reads rounded instead of NULL. #### Performance Impact Almost none ``` case: num = all values already numbers case: mixed = values are numbers and stringified mixed rows: 20M ┌──────────────────────────────────────────────────────┬───────┬─────────────┬─────────┐ │ Read │ num │ mixed │ ≈ │ │ │ │ │ ns/row │ ├──────────────────────────────────────────────────────┼───────┼─────────────┼─────────┤ │ new toFloat64OrNull(p::String) │ 0.56s │ 0.56s │ 28 │ ├──────────────────────────────────────────────────────┼───────┼─────────────┼─────────┤ │ old dynamicType gate (the QB wrapped it in │ 0.57s │ 0.77s │ 29 / 38 │ │ toFloat64) │ │ │ │ └──────────────────────────────────────────────────────┴───────┴─────────────┴─────────┘ ```