Skip to content

Commit 3f3ba74

Browse files
Remove old schema compat
1 parent b518e25 commit 3f3ba74

File tree

3 files changed

+5
-309
lines changed

3 files changed

+5
-309
lines changed

kernel/src/schema_compat.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
use std::collections::HashSet;
22

3-
use crate::{
4-
schema::{DataType, StructField, StructType},
5-
utils::require,
6-
DeltaResult, Error,
7-
};
3+
use crate::schema::{DataType, StructField, StructType};
4+
use crate::utils::require;
5+
use crate::{DeltaResult, Error};
86

97
struct NullabilityCheck {
108
nullable: bool,
119
read_nullable: bool,
1210
}
11+
1312
impl NullabilityCheck {
1413
fn is_compatible(&self) -> DeltaResult<()> {
1514
// The case to avoid is when the read_schema is non-nullable and the existing one is nullable.
@@ -46,6 +45,7 @@ impl StructField {
4645
}
4746
}
4847
impl StructType {
48+
#[allow(unused)]
4949
pub(crate) fn can_read_as(&self, read_type: &StructType) -> DeltaResult<()> {
5050
// Delta tables do not allow fields that differ in name only by case
5151
let names: HashSet<&String> = self.fields.keys().collect();
@@ -66,7 +66,6 @@ impl StructType {
6666
),
6767
}
6868
}
69-
7069
Ok(())
7170
}
7271
}

kernel/src/table_changes/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ mod physical_to_logical;
5252
mod resolve_dvs;
5353
pub mod scan;
5454
mod scan_file;
55-
mod schema_compat;
5655

5756
static CHANGE_TYPE_COL_NAME: &str = "_change_type";
5857
static COMMIT_VERSION_COL_NAME: &str = "_commit_version";

kernel/src/table_changes/schema_compat.rs

-302
This file was deleted.

0 commit comments

Comments
 (0)