aglinxinyuan opened a new issue, #4909: URL: https://github.com/apache/texera/issues/4909
`TupleUtils` (common/workflow-core/src/main/scala/org/apache/texera/amber/core/tuple/TupleUtils.scala) defines two public functions that handle Tuple ↔ JSON conversion (`tuple2json`, `json2tuple`), but has only a single round-trip exercise inside `TupleSpec` — no dedicated coverage of edge cases. Add a `TupleUtilsSpec` that pins: - `tuple2json`: one JSON field per schema attribute in the schema's declared order; `fieldVals` are indexed via `schema.getIndex(name)` so a reordered schema selects different slots; null field values become JSON null; empty schema → empty object. - `json2tuple`: schema inference from a flat JSON object's keys and types; round-trip with `tuple2json`; non-object roots (e.g. JSON arrays) yield an empty tuple rather than silently succeeding with a populated one; malformed JSON throws. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
