feat(go): reuse parsed fields across projections

This commit is contained in:
lingniu
2026-07-03 17:38:50 +08:00
parent 368b18fc96
commit 378a5d5e57
11 changed files with 620 additions and 64 deletions

View File

@@ -318,11 +318,11 @@ func jsonString(value any) string {
}
func parsedFieldsJSONString(env envelope.FrameEnvelope) string {
fieldsEnv, ok := realtime.BuildFieldsEnvelope(env)
if !ok || len(fieldsEnv.Fields) == 0 {
fields, _, ok := realtime.ParsedFieldsForEnvelope(env)
if !ok || len(fields) == 0 {
return ""
}
return jsonString(fieldsEnv.Fields)
return jsonString(fields)
}
func floatField(env envelope.FrameEnvelope, key string) (float64, bool) {