ARROW-10987: [Rust] Interpret BinaryArray as JSON#8971
ARROW-10987: [Rust] Interpret BinaryArray as JSON#8971kflansburg wants to merge 3 commits intoapache:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8971 +/- ##
==========================================
+ Coverage 83.19% 83.21% +0.02%
==========================================
Files 199 200 +1
Lines 48661 48739 +78
==========================================
+ Hits 40482 40558 +76
- Misses 8179 8181 +2
Continue to review full report at Codecov.
|
b6d4cfb to
45bc767
Compare
|
Hi @kflansburg . Every array type in the arrow crate has an associated I can't find a type "JSON" in the arrow specification. Could you clarify how this new struct would fit? |
|
Hey @jorgecarleitao , Thanks for the info. It sounds, then, like this would be better suited as a method on FWIW, this is a light wrapper around |
|
Maybe @nevi-me can provide a better insight here, but IMO the conversion to_struct<T>(array: GenericBinaryArray<T>, schema: &Schema, error_on_invalid: bool) -> Result<StructArray>or something similar. |
|
I can see how this would be a kernel, however it should probably be named more specifically since there will an identical type signature for different formats (JSON, proto, etc.). |
|
Hi @kflansburg @jorgecarleitao , I offered the suggestion, so I should have been more explicit on how we could do this in a spec-compliant fashion. I apologise for that. The spec doesn't have a In order to take advantage of the JSON conversion, we could:
We'd have to look at the other language implementations, and also plan out the API so it can cover its intended use-cases adequately. I personally see the need to be able to convert a |
|
@nevi-me, Looking at PyArrow's implementation of extension types, they appear to be creating a new type (
The remaining concern I have here is that there appears to be no other libraries implementing this (JSON), so interoperability seems unlikely. Finally, you mention using |
|
What is the status of this PR? As part of trying to clean up the backlog of Rust PRs in this repo, I am going through seemingly stale PRs and pinging the authors to see if there are any plans to continue the work or conversation. |
d4608a9 to
356c300
Compare
|
No actionable feedback. |
Create lightweight wrapper,
JSONArrayto interpretBinaryArrayvalues as serialized JSON. Leverage recent work for inferring JSON schema to support conversion toStructArray.Example:
cc @nevi-me