Skip to content

Add string coercion when decoding json #7453

Open
@cht42

Description

@cht42

When Spark decodes JSON data where values don't match the expected schema type, it silently coerces incompatible values to strings instead of failing or preserving the original structure.

When decoding the following JSON with a schema of map<string,string>: {"hello": [1,2,3]}, Spark automatically converts the array value to its string representation, resulting in {"hello": "[1,2,3]"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions