LuciferYang opened a new issue, #9768:
URL: https://github.com/apache/paimon/issues/9768

   ### Bug description
   
   `StringToArrayCastRule.splitArrayElements` and 
`StringToRowCastRule.splitRowFields` toggle quote state on a double quote but 
then still append the character, so quote characters stay embedded in the 
parsed token. A complex-type default value like `DEFAULT '["a,b", c]'` on an 
`ARRAY<STRING>` column silently stores the element `"a,b"` **with literal 
quotes** (and on non-string element types parsing fails).
   
   Quotes are meant to group a token across separators — the map rule 
(`StringToMapCastRule.splitMapEntries`) already drops them.
   
   ### Expected behavior
   
   `["a,b", c]` parses to elements `a,b` and `c` — grouping quotes are not part 
of the value.
   
   ### Steps
   
   `CREATE TABLE t (...) WITH ('fields.f.default'='["a,b", c]')` on an 
ARRAY<STRING> column (or the equivalent alter-column-default), then observe the 
materialized default on writes via DefaultValueRow.


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