-
Notifications
You must be signed in to change notification settings - Fork 919
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
Allow ORC and Parquet writers to write nullable columns without nulls as non-nullable #13675
Allow ORC and Parquet writers to write nullable columns without nulls as non-nullable #13675
Conversation
cudf::io::orc_writer_options::builder(cudf::io::sink_info{filepath}, expected) | ||
.metadata(&expected_metadata); | ||
// Writer should be able to write a column without nulls as non-nullable | ||
EXPECT_NO_THROW(cudf::io::write_orc(out_opts)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit, either way is fine, but I don't think EXPECT_NO_THROW is required. If it throws and the exception is not caught, the test fails anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use it just to make it easier to see what we're checking. I prefer to have the macro for this reason.
…fea-write-no-nulls-as-non-nullable
…om/vuule/cudf into fea-write-no-nulls-as-non-nullable
/merge |
Description
Issue #7654, #13010
Writers have a strict check for nullability when applying the user metadata's nullability options, because checking the actual number of nulls is (was) not cheap.
Since we now create all columns with a known number of nulls, the
null_count
check became cheap and we have no reason to prevent columns without nulls to be written as non-nullable.This PR changes the condition to allow this case.
The PR does not address the issue with sliced columns, where it's not possible to write sliced column as non-nullable, even if the slice has no nulls. That check is still not cheap :)
Checklist