Skip to content

Commit

Permalink
Remove old schema compat
Browse files Browse the repository at this point in the history
  • Loading branch information
OussamaSaoudi-db committed Jan 3, 2025
1 parent b518e25 commit 3f3ba74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 309 deletions.
11 changes: 5 additions & 6 deletions kernel/src/schema_compat.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
use std::collections::HashSet;

use crate::{
schema::{DataType, StructField, StructType},
utils::require,
DeltaResult, Error,
};
use crate::schema::{DataType, StructField, StructType};
use crate::utils::require;
use crate::{DeltaResult, Error};

struct NullabilityCheck {
nullable: bool,
read_nullable: bool,
}

impl NullabilityCheck {
fn is_compatible(&self) -> DeltaResult<()> {
// The case to avoid is when the read_schema is non-nullable and the existing one is nullable.
Expand Down Expand Up @@ -46,6 +45,7 @@ impl StructField {
}
}
impl StructType {
#[allow(unused)]
pub(crate) fn can_read_as(&self, read_type: &StructType) -> DeltaResult<()> {
// Delta tables do not allow fields that differ in name only by case
let names: HashSet<&String> = self.fields.keys().collect();
Expand All @@ -66,7 +66,6 @@ impl StructType {
),
}
}

Ok(())
}
}
Expand Down
1 change: 0 additions & 1 deletion kernel/src/table_changes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ mod physical_to_logical;
mod resolve_dvs;
pub mod scan;
mod scan_file;
mod schema_compat;

static CHANGE_TYPE_COL_NAME: &str = "_change_type";
static COMMIT_VERSION_COL_NAME: &str = "_commit_version";
Expand Down
302 changes: 0 additions & 302 deletions kernel/src/table_changes/schema_compat.rs

This file was deleted.

0 comments on commit 3f3ba74

Please sign in to comment.