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 Reader Scalar to List Promotion Always NULL #3601

Closed
tustvold opened this issue Jan 24, 2023 · 2 comments
Closed

JSON Reader Scalar to List Promotion Always NULL #3601

tustvold opened this issue Jan 24, 2023 · 2 comments
Labels

Comments

@tustvold
Copy link
Contributor

Describe the bug

Decoder contains logic to promote a scalar value to a list, however, the logic that does so does not set the validity on the parent array.

if let Value::Array(a) = v {
    cur_offset += OffsetSize::from_usize(a.len()).unwrap();
    bit_util::set_bit(list_nulls, i);
} else if let Value::Null = v {
    // value is null, not incremented
} else {
    cur_offset += OffsetSize::one();
}

As such the resulting slices are always null

To Reproduce

Column d of mixed_arrays.json has a null count of 3 in the output, instead of 1.

Expected behavior

Additional context

@tustvold
Copy link
Contributor Author

This will likely be closed by #3610

@tustvold
Copy link
Contributor Author

tustvold commented Jun 9, 2023

The old reader has been removed, so this can be closed

@tustvold tustvold closed this as completed Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant