Browse Source
EntityAggregationCalculatedFieldState.toResult() serialized every metric result via ObjectNode.put(name, JacksonUtil.toString(value)), which produces a JSON *string* node even for numeric aggregation results (SUM/AVG/COUNT/...). When persisted (in particular with transport.json.type_cast_enabled=false, or for non-parsable values) the result lands in ts_kv.str_v, so server-side AVG/SUM aggregation returns no data in widgets/queries while COUNT/MIN/MAX still return. Serialize with JacksonUtil.valueToTree(...) so numeric results are emitted as numeric JSON nodes (-> dbl_v/long_v), mirroring RelatedEntitiesAggregationCalculatedFieldState. Genuine string MIN/MAX results over string telemetry are preserved as string nodes. The instanceof Number guard is retained (it only governs rounding).pull/15917/head
1 changed files with 1 additions and 1 deletions
Loading…
Reference in new issue