You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++] Expose {Array,...}FromJSON as public APIs #45908
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++
Reacted by Enrico Minack, Benjamin Kietzman and Bryce Mecum
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.
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.
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.
Activity
pitrou commentedon Mar 24, 2025
What do you think @amoeba @zanmato1984 @bkietz ? This came to mind while reviewing #45411
(also FYI @EnricoMi )
bkietz commentedon Mar 24, 2025
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:
zanmato1984 commentedon Mar 25, 2025
+1 on making them public. Could be very useful in demoing things using arrow.
Maybe we can export them in libarrow_testing to avoid any performance expectations?
pitrou commentedon Mar 25, 2025
I'm not sure we expose
libarrow_testingfor 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.zanmato1984 commentedon Mar 25, 2025
Agreed. Another practical problem about
libarrow_testingjust came to me as well: we have multiple levels of data containers spread in multiple sub-libraries, e.g.Array/RecordBatch/Tablein arrow core andExecBatchin compute. We better export*FromJSONin the library where*belongs to, rather than exporting allFromJSONin one place where dependencies would become a mess.amoeba commentedon Apr 21, 2025
I created #46180 to move just the helpers in json_simple to make it as easy to review as possible.
GH-45908: [C++][Docs] Rename and expose basic {Array,...}FromJSON hel…
amoeba commentedon May 14, 2025
Issue resolved by pull request 46180
#46180
GH-46439: [C++] Rename internal Converter class in from_string.cc (#4…
GH-46439: [C++] Use result pattern for all FromJSONString Helpers (#4…
apacheGH-46439: [C++] Use result pattern for all FromJSONString Helpe…