Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e32ae4b
initial commit
murali-db Sep 24, 2025
9a3bba8
nested
murali-db Sep 24, 2025
a620848
bug
murali-db Sep 24, 2025
6a53d53
fixes
murali-db Sep 24, 2025
60d5467
lint
murali-db Sep 24, 2025
54f3608
refactor: Use ColumnName instead of String for schema diff paths
murali-db Oct 1, 2025
94dd773
fix: Replace unwrap with expect for linter compliance
murali-db Oct 1, 2025
97a82c6
chore: Suppress dead code warnings for unused schema diff API
murali-db Oct 1, 2025
d1c091b
refactor: Add SchemaDiffArgs struct to prevent argument confusion
murali-db Oct 1, 2025
7d7a885
docs: Improve clarity of ancestor filtering comments
murali-db Oct 1, 2025
ab474ec
style: Run cargo fmt to fix formatting
murali-db Oct 1, 2025
db80c25
perf: Optimize build_added_ancestor_paths from O(n²) to O(n)
murali-db Oct 1, 2025
04c6ded
fix: Replace expect() with pattern matching for linter compliance
murali-db Oct 1, 2025
3ca8c09
refactor: Replace defensive check with debug assertions
murali-db Oct 1, 2025
b3d83f1
refactor: Simplify ancestor filtering by returning filtered fields di…
murali-db Oct 1, 2025
4a7bed8
Format: Fix line length in schema diff
murali-db Oct 1, 2025
aa6d86d
Optimize has_breaking_changes by computing once during construction
murali-db Oct 1, 2025
93db08d
Add comprehensive unit test coverage for schema diff
murali-db Oct 1, 2025
371c4ca
Fix clippy warning: remove redundant closure
murali-db Oct 1, 2025
5d97b9a
refactor: Move is_descendant_of to ColumnName impl
murali-db Oct 9, 2025
e7817bb
fix: Detect adding non-nullable fields as breaking changes
murali-db Oct 9, 2025
09511cd
refactor: Consolidate container type change logic into single function
murali-db Oct 9, 2025
2c00a75
perf: Use pop() instead of clone for single change type
murali-db Oct 9, 2025
0ab0018
docs: Add TODO for IcebergCompatV2 nested field ID validation
murali-db Oct 9, 2025
c1ca927
refactor: Rename compare_fields_with_paths to compute_field_update
murali-db Oct 9, 2025
f638185
fix: Enforce physical name consistency in schema diff
murali-db Oct 9, 2025
6f4d1ab
refactor: Remove PhysicalNameChanged from FieldChangeType enum
murali-db Oct 9, 2025
28d0fbe
refactor: Rename current/new to before/after in SchemaDiffArgs
murali-db Oct 9, 2025
a647a98
test: Add has_breaking_changes assertions to schema diff tests
murali-db Oct 9, 2025
9ebfcdc
Improve test coverage for schema diff nested changes
murali-db Oct 9, 2025
3b6dd76
Add test for doubly nested array type change detection
murali-db Oct 9, 2025
1494987
trigger PR update
murali-db Oct 9, 2025
ef43bdf
Run cargo fmt
murali-db Oct 9, 2025
a2adc16
Replace unwrap with expect for linter compliance
murali-db Oct 9, 2025
c851f7c
refactor: Use unwrap_or_else with unreachable for clippy compliance
murali-db Oct 9, 2025
e3b18af
Run cargo fmt
murali-db Oct 9, 2025
03088ac
refactor: Revert to cleaner slice pattern matching
murali-db Oct 15, 2025
d2f8630
refactor: Rename classify_type_change to classify_data_type_change
murali-db Oct 15, 2025
1e481e2
refactor: Add recursion to type change classification for arrays and …
murali-db Oct 15, 2025
adc6152
refactor: Extract container nullability check into helper function
murali-db Oct 15, 2025
0553e9d
fix: Improve map type change detection with better comments
murali-db Oct 15, 2025
0f4e329
refactor: Extract recursive container field collection into helper
murali-db Oct 15, 2025
d68b132
fix: Treat metadata changes as breaking
murali-db Oct 15, 2025
8853d3a
test: Add has_breaking_changes assertion to empty diff test
murali-db Oct 15, 2025
dc372da
Add comprehensive field count assertions to schema diff tests
murali-db Oct 15, 2025
5c683f5
Remove duplicate assertion in test_actual_struct_type_change_still_re…
murali-db Oct 15, 2025
649bf4c
Add breaking changes assertion after nested field check
murali-db Oct 15, 2025
5ee08ac
Add breaking changes check to test_array_with_struct_element_changes
murali-db Oct 15, 2025
064e6f2
Add breaking changes check to test_ancestor_filtering_with_mixed_changes
murali-db Oct 15, 2025
edc61cd
Add nested array nullability change tests
murali-db Oct 15, 2025
fedda34
Add cursed double-nesting test cases to schema diff tests
murali-db Oct 15, 2025
345ba84
Treat field removals as safe (non-breaking) changes
murali-db Oct 15, 2025
78da25e
Update kernel/src/schema/diff.rs
murali-db Oct 16, 2025
b80d01a
Update kernel/src/schema/diff.rs
murali-db Oct 16, 2025
4c9e5cb
Update kernel/src/schema/diff.rs
murali-db Oct 16, 2025
0abadda
refactor: Optimize schema diff and add nullability tests
murali-db Oct 16, 2025
f6226f5
style: Apply cargo fmt formatting
murali-db Oct 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions kernel/src/expressions/column_names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,26 @@ impl ColumnName {
pub fn into_inner(self) -> Vec<String> {
self.path
}

/// Returns the parent of this column name, or `None` if this is a top-level column.
///
/// # Examples
///
/// ```
/// # use delta_kernel::expressions::ColumnName;
/// let path = ColumnName::new(["user", "address", "street"]);
/// assert_eq!(path.parent(), Some(ColumnName::new(["user", "address"])));
///
/// let path = ColumnName::new(["user"]);
/// assert_eq!(path.parent(), None);
/// ```
pub fn parent(&self) -> Option<ColumnName> {
if self.path.len() > 1 {
Some(ColumnName::new(&self.path[..self.path.len() - 1]))
} else {
None
}
}
}

/// Creates a new column name from a path of field names. Each field name is taken as-is, and may
Expand Down
Loading
Loading