Skip to content

Serialize FixedSizeBinary as HEX with JSON Writer #5620

@hiltontj

Description

@hiltontj

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

I would like to have FixedSizeBinary columns be serialized by the JSON writer as HEX, as they are for the CSV writer.

Describe the solution you'd like

Columns that are FixedSizeBinary be serialized as HEX strings. The CSV writer defaults to the default arrow-array formatter, which does this: https://github.com/apache/arrow-rs/blob/master/arrow-cast/src/display.rs#L746-L754

Describe alternatives you've considered

Alternatively, I could change my queries to potentially cast the column I am querying for, so this isn't a deal breaker for me, but I feel as though since the CSV and default formatters do this for me, the JSON should as well.

Additional context

The error returned originates from here: https://github.com/apache/arrow-rs/blob/master/arrow-json/src/writer/encoder.rs#L128

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowChanges to the arrow crateenhancementAny 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