LuciferYang opened a new pull request, #9769:
URL: https://github.com/apache/paimon/pull/9769

   ### Purpose
   
   close #9768
   
   `StringToArrayCastRule.splitArrayElements` and 
`StringToRowCastRule.splitRowFields` toggle quote state on a double quote but 
still append the character, so grouping quotes stay embedded in the parsed 
token: an `ARRAY<STRING>` default `["a,b", c]` silently stores the element 
`"a,b"` with literal quotes, and non-string element types fail parsing. The map 
rule already drops its grouping quotes.
   
   This PR skips the append when the quote toggles state, in both rules. An 
empty quoted token is dropped like in the map rule (empty-string elements are 
not expressible in this mini-language) — pinned by a test.
   
   ### Tests
   
   `CastExecutorTest`: `["a,b", c]` → `[a,b, c]`; `{"a,b", 2}` → row (`a,b`, 
2); `["", a]` → `[a]` (deliberate empty-token drop, consistent with the map 
rule). RED verified on master (elements carried literal quotes).
   
   ### API and Format
   
   Behavior change to the default-value mini-language: quotes were never usable 
as literal content (they were always both embedded and state-toggling, so no 
user could have intentionally relied on them). Defaults are stored as raw 
strings and re-parsed at write time, so quoted defaults materialize differently 
after upgrade — this is the fix.
   
   ### Documentation
   
   None.


-- 
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]

Reply via email to