Commit 8e4c296
authored
feat: add set_nullable support for ALTER TABLE (delta-io#2388)
## What changes are proposed in this pull request?
Adds the `SetNullable` operation to the ALTER TABLE framework, allowing
columns to be changed
from NOT NULL to nullable. Supports nested columns via `ColumnName`
paths.
`modify_field_at_path` function to recurse through struct and rebuild
bottom-up to update nullable field.
## How was this change tested?
- Unit tests for `modify_field_at_path`: top-level, nested, sibling
preservation, nonexistent
field, non-struct traversal, case-insensitive lookup
- Unit tests for `SetNullable` via `apply_schema_operations`:
required->nullable, already
nullable noop, deeply nested (3 levels), chained with add_column
- Integration tests in `kernel/tests/alter_table.rs`: set_nullable with
schema reload,
already-nullable noop, nonexistent column error, chained add_column +
set_nullable1 parent 7ced14e commit 8e4c296
4 files changed
Lines changed: 564 additions & 15 deletions
File tree
- kernel
- src
- schema
- transaction
- builder
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
820 | 870 | | |
821 | 871 | | |
822 | 872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
115 | 126 | | |
116 | 127 | | |
117 | 128 | | |
| |||
0 commit comments