From 06cda426faa7bd97a19fae1a4bfb6bd52465eb5a Mon Sep 17 00:00:00 2001 From: Henry Fontanier Date: Tue, 20 Feb 2024 17:16:07 +0100 Subject: [PATCH] enh: allow widening column type to Text --- core/src/databases/table_schema.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/core/src/databases/table_schema.rs b/core/src/databases/table_schema.rs index c9d9bdf4d066..ba168877db05 100644 --- a/core/src/databases/table_schema.rs +++ b/core/src/databases/table_schema.rs @@ -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, }; }