File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,6 @@ pub trait EventFormat: Sized {
103103 return Err ( anyhow ! ( "Schema mismatch" ) ) ;
104104 }
105105 new_schema = update_field_type_in_schema ( new_schema, None , time_partition, None ) ;
106- new_schema = Arc :: new ( Schema :: new ( override_num_fields_from_schema (
107- new_schema. fields ( ) . to_vec ( ) ,
108- ) ) ) ;
109106 let rb = Self :: decode ( data, new_schema. clone ( ) ) ?;
110107 let tags_arr = StringArray :: from_iter_values ( std:: iter:: repeat ( & tags) . take ( rb. num_rows ( ) ) ) ;
111108 let metadata_arr =
@@ -232,6 +229,11 @@ pub fn update_field_type_in_schema(
232229 log_records : Option < & Vec < Value > > ,
233230) -> Arc < Schema > {
234231 let mut updated_schema = inferred_schema. clone ( ) ;
232+
233+ // All number fields from inferred schema are forced into Float64
234+ updated_schema = Arc :: new ( Schema :: new ( override_num_fields_from_schema (
235+ updated_schema. fields ( ) . to_vec ( ) ,
236+ ) ) ) ;
235237 if let Some ( existing_schema) = existing_schema {
236238 let existing_fields = get_existing_fields ( inferred_schema. clone ( ) , Some ( existing_schema) ) ;
237239 let existing_timestamp_fields = get_existing_timestamp_fields ( existing_schema) ;
You can’t perform that action at this time.
0 commit comments