@@ -224,12 +224,8 @@ pub fn update_field_type_in_schema(
224224
225225 if let Some ( log_records) = log_records {
226226 for log_record in log_records {
227- updated_schema = override_data_type (
228- updated_schema. clone ( ) ,
229- log_record. clone ( ) ,
230- & existing_field_names,
231- schema_version,
232- ) ;
227+ updated_schema =
228+ override_data_type ( updated_schema. clone ( ) , log_record. clone ( ) , schema_version) ;
233229 }
234230 }
235231
@@ -261,7 +257,6 @@ pub fn update_field_type_in_schema(
261257pub fn override_data_type (
262258 inferred_schema : Arc < Schema > ,
263259 log_record : Value ,
264- ignore_field_names : & HashSet < String > ,
265260 schema_version : SchemaVersion ,
266261) -> Arc < Schema > {
267262 let Value :: Object ( map) = log_record else {
@@ -281,7 +276,6 @@ pub fn override_data_type(
281276 . iter ( )
282277 . any ( |part| field_name. to_lowercase ( ) . contains ( part) )
283278 && field. data_type ( ) == & DataType :: Utf8
284- && !ignore_field_names. contains ( field_name)
285279 && ( DateTime :: parse_from_rfc3339 ( s) . is_ok ( )
286280 || DateTime :: parse_from_rfc2822 ( s) . is_ok ( ) ) =>
287281 {
@@ -293,10 +287,7 @@ pub fn override_data_type(
293287 )
294288 }
295289 // in V1 for new fields in json with inferred type number, cast as float64.
296- ( SchemaVersion :: V1 , Some ( Value :: Number ( _) ) )
297- if field. data_type ( ) . is_numeric ( )
298- && !ignore_field_names. contains ( field_name) =>
299- {
290+ ( SchemaVersion :: V1 , Some ( Value :: Number ( _) ) ) if field. data_type ( ) . is_numeric ( ) => {
300291 // Update the field's data type to Float64
301292 Field :: new ( field_name, DataType :: Float64 , true )
302293 }
0 commit comments