Skip to content

Commit 9e8cb22

Browse files
Removing redundant function
1 parent 71fb0c8 commit 9e8cb22

1 file changed

Lines changed: 0 additions & 46 deletions

File tree

src/types.rs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -194,22 +194,6 @@ pub fn build_read_schema_with_field_id_mapping(
194194
Ok((Schema::new(fields?), name_mapping))
195195
}
196196

197-
/// Returns true if all column names match (no renaming needed).
198-
pub fn schema_names_match(
199-
current_columns: &[DuckLakeTableColumn],
200-
parquet_field_ids: &HashMap<i32, String>,
201-
) -> bool {
202-
for col in current_columns {
203-
let field_id = col.column_id as i32;
204-
if let Some(parquet_name) = parquet_field_ids.get(&field_id)
205-
&& parquet_name != &col.column_name
206-
{
207-
return false;
208-
}
209-
}
210-
true
211-
}
212-
213197
#[cfg(test)]
214198
mod tests {
215199
use super::*;
@@ -288,36 +272,6 @@ mod tests {
288272
assert!(name_mapping.is_empty());
289273
}
290274

291-
#[test]
292-
fn test_schema_names_match() {
293-
let current_columns = vec![DuckLakeTableColumn {
294-
column_id: 1,
295-
column_name: "id".to_string(),
296-
column_type: "int32".to_string(),
297-
is_nullable: true,
298-
}];
299-
300-
let mut parquet_field_ids = HashMap::new();
301-
parquet_field_ids.insert(1, "id".to_string());
302-
303-
assert!(schema_names_match(&current_columns, &parquet_field_ids));
304-
}
305-
306-
#[test]
307-
fn test_schema_names_dont_match() {
308-
let current_columns = vec![DuckLakeTableColumn {
309-
column_id: 1,
310-
column_name: "userId".to_string(), // Renamed
311-
column_type: "int32".to_string(),
312-
is_nullable: true,
313-
}];
314-
315-
let mut parquet_field_ids = HashMap::new();
316-
parquet_field_ids.insert(1, "user_id".to_string()); // Original name
317-
318-
assert!(!schema_names_match(&current_columns, &parquet_field_ids));
319-
}
320-
321275
#[test]
322276
fn test_basic_types() {
323277
assert_eq!(

0 commit comments

Comments
 (0)