ganeshashree commented on PR #58034:
URL: https://github.com/apache/spark/pull/58034#issuecomment-6129032199
Answering the two decision challenges from the latest review:
**Confirm CASE-named keys at the colon boundary:** Confirmed, and fixed.
`json_object(CAST(case AS STRING) : 1)` and `(case + 1)::string : v` did fail:
the separator check counted the parenthesized `case` column as CASE nesting
that no `END` cleared. Fixed by counting CASE/END only at paren-depth 0. A
colon nested in parens is already excluded by `depth`, and a nested CASE's
`END` is balanced in the same parens. Both parse now; added regression tests.
**Confirm named-marker keys in colon members:** Confirmed. `json_object('k'
:p : 1)` is a clean parse error (syntax error at the second `:`), never a
silent mis-split; it does not build a different key. Both the VALUE form (`'k'
:p VALUE 1`) and parenthesizing the key (`('k' :p) : 1`) yield `{"kx":1}`.
Documented the parenthesization/VALUE-form requirement at the
`jsonObjectColonKey` rule and added a characterization test.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]