Skip to content

[C++] Expose {Array,...}FromJSON as public APIs #45908

Closed

Description

@pitrou

Describe the enhancement requested

The various XXXFromJSON functions have been initially written to ease writing our own unit tests, but they could actually be generally helpful for users to experiment with Arrow, write examples, etc. Perhaps we could expose them as public APIs?

We should just be careful to document that they are not meant for high-performance data ingestion.

Component(s)

C++

Activity

  1. pitrou commented on Mar 24, 2025

    @pitrou
    MemberAuthor

    What do you think @amoeba @zanmato1984 @bkietz ? This came to mind while reviewing #45411

    (also FYI @EnricoMi )

  2. bkietz commented on Mar 24, 2025

    @bkietz
    Member

    I think it'd be invaluable as an aid for documentation; most of the example input/outputs for the compute kernels for example use an informal JSON-ish format, illustrating that terse array definitions are useful in explanations.

    Related issues:

  3. zanmato1984 commented on Mar 25, 2025

    @zanmato1984
    Contributor

    +1 on making them public. Could be very useful in demoing things using arrow.

    We should just be careful to document that they are not meant for high-performance data ingestion.

    Maybe we can export them in libarrow_testing to avoid any performance expectations?

  4. pitrou commented on Mar 25, 2025

    @pitrou
    MemberAuthor

    Maybe we can export them in libarrow_testing to avoid any performance expectations?

    I'm not sure we expose libarrow_testing for public consumption. I would be lukewarm about that, since it contains a lot of disparate stuff, some of which we might not want to encourage reliance on.

  5. zanmato1984 commented on Mar 25, 2025

    @zanmato1984
    Contributor

    I'm not sure we expose libarrow_testing for public consumption. I would be lukewarm about that, since it contains a lot of disparate stuff, some of which we might not want to encourage reliance on.

    Agreed. Another practical problem about libarrow_testing just came to me as well: we have multiple levels of data containers spread in multiple sub-libraries, e.g. Array/RecordBatch/Table in arrow core and ExecBatch in compute. We better export *FromJSON in the library where * belongs to, rather than exporting all FromJSON in one place where dependencies would become a mess.

  6. amoeba commented on Apr 21, 2025

    @amoeba
    Member

    I created #46180 to move just the helpers in json_simple to make it as easy to review as possible.

  7. added a commit that references this issue on May 14, 2025
  8. added this to the 21.0.0 milestone on May 14, 2025
  9. amoeba commented on May 14, 2025

    @amoeba
    Member

    Issue resolved by pull request 46180
    #46180

  10. added 2 commits that reference this issue on Jun 3, 2025
  11. added a commit that references this issue on Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions