Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions python/python/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2501,10 +2501,14 @@ def test_add_null_columns_with_conflict_names(tmp_path: Path):
assert len(fragments) == 1
assert len(fragments[0].data_files()) == 1

with pytest.raises(Exception, match=".*Column id already exists in the dataset.*"):
with pytest.raises(
Exception, match=".*Type conflicts between id\\(Int64\\) and id\\(Float32\\).*"
):
ds.add_columns(pa.field("id", pa.float32()))

with pytest.raises(Exception, match=".*Column id already exists in the dataset.*"):
with pytest.raises(
Exception, match=".*Type conflicts between id\\(Int64\\) and id\\(Float32\\).*"
):
ds.add_columns([pa.field("id", pa.float32()), pa.field("good", pa.int32())])


Expand Down
4 changes: 4 additions & 0 deletions rust/lance-encoding/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ impl LanceFileVersion {

Self::iter().filter(|&v| v != Self::Stable && v != Self::Next && v != Self::Legacy)
}

pub fn support_add_sub_column(&self) -> bool {
self > &Self::V2_1
}
}

impl std::fmt::Display for LanceFileVersion {
Expand Down
Loading