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

json schema inference can't handle null field turned into object field in subsequent rows #5215

Closed
kskalski opened this issue Dec 17, 2023 · 1 comment · Fixed by #5216
Closed
Labels
arrow Changes to the arrow crate bug

Comments

@kskalski
Copy link
Contributor

Describe the bug
Such scenario produces
JsonError("Expected object json type, found: Any")

To Reproduce

    #[test]
    fn test_infer_from_null_then_object() {
        let data = r#"
            {"obj":null}
            {"obj":{"foo":1}}
        "#;
        let (inferred_schema, _) =
            infer_json_schema_from_seekable(Cursor::new(data), None).expect("infer");
    }

Expected behavior
Schema should be inferred and have struct data type for obj field

Additional context
arrow-rs master / v49.0.0

@tustvold
Copy link
Contributor

tustvold commented Jan 5, 2024

label_issue.py automatically added labels {'arrow'} from #5216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants