-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: encode FixedSizeBinary in JSON as hex string (#5622)
* feat: encode FixedSizeBinary in JSON as hex Adds encoding support to the JSON writer for the FixedSizeBinary DataType A test was added as well * fix: properly encode fixed size binary as string The fixed size binary values were not being encoded with surrounding double quotes. This fixes that, and updates the added test to actually parse the written JSON as JSON, using serde_json, and make assertions against that. * chore: remove unused hex dep in arrow-json * refactor: check for null serialization of fixedsizebinary in JSON * refactor: extend explicit nulls to the FixedSizeBinaryEncoder Have the FixedSizeBinaryEncoder for the JSON writer handle explicit null values, based on the Writer's EncoderOptions. * refactor: borrow array in JSON fixed size binary encoder Changed the FixedSizeBinaryEncoder for the JSON writer to use a borrow of the FixedSizeBinaryArray being encoded, to follow other Encoder implementations, and to remove the use of clone. * refactor: remove need for clone in JSON encoder types BooleanEncoder and StringEncoder were changed to use borrows of their respective Array types, to avoid cloning. * refactor: remove null handling in JSON FixedSizeBinaryEncoder The FixedSizeBinaryEncoder does not need to handle nulls, as that will be handled by a parent encoder, i.e., list/map.
- Loading branch information
Showing
2 changed files
with
110 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters