Skip to content

[Bug] Quoted array/row default values keep literal quote characters in parsed tokens #9768

Description

@LuciferYang

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions