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 column (or the equivalent alter-column-default), then observe the materialized default on writes via DefaultValueRow.
Bug description
StringToArrayCastRule.splitArrayElementsandStringToRowCastRule.splitRowFieldstoggle 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 likeDEFAULT '["a,b", c]'on anARRAY<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 elementsa,bandc— grouping quotes are not part of the value.Steps
CREATE TABLE t (...) WITH ('fields.f.default'='["a,b", c]')on an ARRAY column (or the equivalent alter-column-default), then observe the materialized default on writes via DefaultValueRow.