Skip to content

Add examples for JSON and BSON logical types #101

Closed

Description

@alamb

Recently, @emkornfield asked apache/parquet-site#153 (comment)

Just wanted to check for JSON and BSON other engines do support this with the caveat that they just pass through. Does polars not support them at all?

This was in the context of if polars supported a particular operation on such files However, there were no such files I could find in the parquet-testing repo that I could check with.

Thus I would like some example parquet files with JSON and BSON logical types, as specified https://parquet.apache.org/docs/file-format/types/logicaltypes/

These should be small files and come with a small readme that explains how they were created and what they contain

This would also help others implementing parquet to test their implementations with such files

Activity

  1. changed the title [-]Add examples for JSON and BSON encoded files[/-] [+]Add examples for JSON and BSON logical types[/+] on Feb 10, 2026
  2. emkornfield commented on Feb 10, 2026

    @emkornfield

    IIRC, I think Arrow C++ supports serializing canonical arrow JSON extension type to be marked with JSON (or at least there was an effort to do so that might have stalled).

  3. alamb commented on Feb 11, 2026

    @alamb
    ContributorAuthor

    I am pretty sure the Rust writer can also annotate a record batch with the correct logical types (if you write an Arrow array with the Json canonical type: https://docs.rs/arrow-schema/57.3.0/arrow_schema/extension/enum.CanonicalExtensionType.html#variant.Json

    I had a half written example to do this but I ran out of time

  4. nssalian commented on Jul 21, 2026

    @nssalian
    Contributor

    Happy to do this. @alamb do you mind assigning this to me?

  5. alamb commented on Jul 26, 2026

    @alamb
    ContributorAuthor

    Thanks @nssalian and @emkornfield -- for examples I would like to recommend:

    1. Keep the data small
    2. Make sure we have NULL value converage, as well as some JSON / BSON that have null as field values within non null fields
  6. nssalian commented on Jul 26, 2026

    @nssalian
    Contributor

    Thanks @alamb. That makes sense. I'll put up a PR for this next week.

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

Metadata

Metadata

Assignees

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