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

fix issue#2058 file_format/json.rs attempt to subtract with overflow #2066

Merged
merged 2 commits into from
Mar 25, 2022
Merged

fix issue#2058 file_format/json.rs attempt to subtract with overflow #2066

merged 2 commits into from
Mar 25, 2022

Conversation

silence-coding
Copy link
Contributor

fix #2058

@github-actions github-actions bot added the datafusion Changes in the datafusion crate label Mar 23, 2022
@silence-coding
Copy link
Contributor Author

@alamb Please check it.

Copy link
Member

@Ted-Jiang Ted-Jiang left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution.

Copy link
Member

@xudong963 xudong963 left a comment

Choose a reason for hiding this comment

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

It'll be better to add a test for the fix :)

@xudong963 xudong963 added the bug Something isn't working label Mar 23, 2022
@alamb
Copy link
Contributor

alamb commented Mar 23, 2022

Thank you for the contribution @silence-coding

It'll be better to add a test for the fix :)

I agree with @xudong963 -- can you please provide a test (both to demonstrate what is wrong and help ensure we don't break it again in the future)?

Perhaps you can adapt the reproducer on #2058

@silence-coding
Copy link
Contributor Author

@alamb @xudong963 That's my problem. I forgot to write test cases.

@alamb
Copy link
Contributor

alamb commented Mar 24, 2022

Sadly I think #2023 added 3.json already -- can you fix this PR to use the name 4.json?

like:

--- a/datafusion/src/datasource/file_format/json.rs
+++ b/datafusion/src/datasource/file_format/json.rs
@@ -236,7 +236,7 @@ mod tests {
 
     #[tokio::test]
     async fn infer_schema_with_limit()  {
-        let filename = "tests/jsons/3.json";
+        let filename = "tests/jsons/4.json";
         let format = JsonFormat::default()
             .with_schema_infer_max_rec(Some(3));
         let file_schema = format
diff --git a/datafusion/tests/jsons/3.json b/datafusion/tests/jsons/4.json
similarity index 100%
rename from datafusion/tests/jsons/3.json
rename to datafusion/tests/jsons/4.json

to resolve the conflict?

@silence-coding
Copy link
Contributor Author

silence-coding commented Mar 25, 2022

@alamb fix with schema_infer_limit.json

@silence-coding
Copy link
Contributor Author

When will the next version be released?

@xudong963
Copy link
Member

When will the next version be released?

I think we can open an issue to discuss the next version release.

@alamb
Copy link
Contributor

alamb commented Mar 25, 2022

I think we can open an issue to discuss the next version release.

I created #2095 to start this conversation -- @silence-coding it would be great to hear your perspective if you are thinking of a release directly from master, or a release that has only bug fixes, or something else

@alamb
Copy link
Contributor

alamb commented Mar 25, 2022

Thanks again @silence-coding

@alamb alamb merged commit 8159294 into apache:master Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working datafusion Changes in the datafusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

file_format/json.rs attempt to subtract with overflow
4 participants