Preserve the JSON flag through group keys and partial-state serialization
PitfallVerified 30 Sep 2026Holds project: dftracer-utils
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.
Symptom#
A correlated lookup on a mixed-type JSON key can lose its by-value key semantics after a frame-plan group.
Cause#
The frame-plan group dropped the JSON flag of its key column. The trace-plan group kept it, so the two paths disagreed.
Fix#
Preserve the JSON flag in group_by key columns on every plan and carry it through the partial-state serializer. Do not restrict correlated keys to plain fields as a substitute for preserving metadata.
Evidence#
Inbox 8397caa9dd first reports the frame-plan limitation, then reports the fix in commit 8ffa7228 and removal of the plain-field restriction. The agent reports final-tree C++ tests in Arrow-on and Arrow-off builds and Python tests passed, excluding the separate genesis WIP test. It did not build each intermediate commit.
Also found by searching
- correlated lookup on mixed-type JSON key gives different results after frame-plan group_by than trace plan
- grouping by a JSON column loses its by-value comparison semantics on one execution path
- how do I keep the json flag of a key column through group_by and partial state serialization
- json metadata dropped in group keys, restrict correlated keys to plain fields as workaround?
- correlated lookup on mixed-type JSON key loses by-value semantics after group in frame plan
- group_by key column drops JSON flag, frame-plan group and trace-plan group disagree
- how do I keep the json flag on group key columns through partial state serialization
- correlated key restricted to plain fields workaround, why json column metadata lost