feat: add alter column nullable to non-nullable support#5589
Conversation
Code ReviewP1: Bug - Nested column validation will failIn When you call Suggestion: Consider using the batch's first (and only) column directly since the projection contains exactly one column: let col = batch.column(0);Or alternatively, extract the leaf field name from the path: let leaf_name = path.rsplit('.').next().unwrap_or(path);
let col = batch.column_by_name(leaf_name)...Recommendation: Add a test for nested columnsThe current tests only cover top-level columns. Given that Otherwise the implementation looks correct - the validation approach of scanning all data to check for nulls before allowing the schema change is sound. |
|
+1 on the review comment. Would like to have this supported in nested columns. |
wjones127
left a comment
There was a problem hiding this comment.
Add a test for nested columns for this feature.
| // TODO: in the future, we could check the values of the column to see if | ||
| // they are all non-null and thus the column could be made non-nullable. |
There was a problem hiding this comment.
Might want to remove this TODO before merging though, as it looks to be complete.
42ea514 to
b3f4d7a
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…#5589) This PR will add alter column nullable to non-nullable support --- **Parts of this PR were drafted with assistance from Codex (with `gpt-5.2`) and fully reviewed and edited by me. I take full responsibility for all changes.** --------- Co-authored-by: Will Jones <willjones127@gmail.com>
This PR will add alter column nullable to non-nullable support
Parts of this PR were drafted with assistance from Codex (with
gpt-5.2) and fully reviewed and edited by me. I take full responsibility for all changes.