Skip to content

Commit

Permalink
enh: allow widening column type to Text
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Fontanier committed Feb 20, 2024
1 parent 8e22320 commit 06cda42
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions core/src/databases/table_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,8 @@ impl TableSchema {
match (&our_column.value_type, &other_column.value_type) {
// Ints and Floats can be merged into Floats.
(Int, Float) | (Float, Int) => TableSchemaFieldType::Float,
// If the existing type is text, then any other type can be merged into it.
(Text, _) => Text,
// Other types are incompatible.
_ => Err(anyhow!(
"Cannot merge types {:?} and {:?}",
our_column.value_type,
other_column.value_type
))?,
// Otherwise we default to Text.
_ => Text,
};
}

Expand Down

0 comments on commit 06cda42

Please sign in to comment.