Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move JSON Test Format To integration-testing #2724

Merged
merged 2 commits into from Sep 14, 2022

Conversation

tustvold
Copy link
Contributor

Which issue does this PR close?

Part of #2594
Part of #2300
Related to #2723

Rationale for this change

Collocates the code related to the integration tests, reducing coupling to serde_json, potentially improves compilation times.

What changes are included in this PR?

Follow on to #2598, this moves the JSON schema parsing logic to integration-testing. I had incorrectly assumed this was a canonical representation, however, it is a custom format specific to these tests - https://github.com/apache/arrow/blob/master/docs/source/format/Integration.rst#json-test-data-format. I therefore think it can be safely moved to live alongside the other logic.

Are there any user-facing changes?

Yes, these APIs were public, but I'm fairly confident they weren't in use, especially as the logic to actually parse the files themselves along with the array data, is not public.

@tustvold tustvold added the api-change Changes to the arrow API label Sep 13, 2022
@github-actions github-actions bot added the arrow Changes to the arrow crate label Sep 13, 2022
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea makes sense to me -- I only worry that someone perhaps was using the JSON serialization code for some other purpose.

If this turns out to be the case, we can always extract the schema parsing code into its own crate as well.

Thanks @tustvold

cc @nevi-me and @viirya

@tustvold tustvold merged commit 5146663 into apache:master Sep 14, 2022
@ursabot
Copy link

ursabot commented Sep 14, 2022

Benchmark runs are scheduled for baseline = 4f52a25 and contender = 5146663. 5146663 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Copy link
Member

@viirya viirya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The json format should be for integration test purpose. Although I think it may be possible like @alamb said that it is used for other purpose as it is public now, it is out of the design of the format and we can do extraction later if it is really needed.

@domoritz
Copy link
Member

I was using the JSON format for schemas in https://github.com/domoritz/csv2parquet. Could you provide a crate for reading/writing schemas from JSON? I don't need the same format.

@tustvold
Copy link
Contributor Author

@domoritz The schema types implement serde::Serialize and Deserialize, and can therefore be used directly with serde_json. Would that be workable?

@domoritz
Copy link
Member

That should probably work. Do you have a code snippet I could look at?

@tustvold
Copy link
Contributor Author

@domoritz
Copy link
Member

Perfect. That works!

@maxburke
Copy link
Contributor

maxburke commented Oct 7, 2022

@alamb was right, someone (my company) was using this code, and now we're broken when trying to move beyond arrow 22; specifically we are dependent on `Schema::from::<serde_json::Value>

@alamb
Copy link
Contributor

alamb commented Oct 11, 2022

Based on some discussions, I think the plan is that @tustvold was going to extract this code into its own crate for reuse.

I also believe @tustvold is out for a few days so I would expect a delayed response. Please let me know if it would be helpful to file a ticket for this issue

mildbyte added a commit to splitgraph/seafowl that referenced this pull request Oct 26, 2022
The actual 13.0.0 DF release uses Arrow 24.0.0, but we need to pick up 25.0.0,
since it brings back the Arrow Schema/Field-to-JSON serialization code (albeit
in a different crate for integration tests).

apache/arrow-rs#2868
apache/arrow-rs#2724
mildbyte added a commit to splitgraph/seafowl that referenced this pull request Oct 27, 2022
The actual 13.0.0 DF release uses Arrow 24.0.0, but we need to pick up 25.0.0,
since it brings back the Arrow Schema/Field-to-JSON serialization code (albeit
in a different crate for integration tests).

apache/arrow-rs#2868
apache/arrow-rs#2724
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-change Changes to the arrow API arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants