@@ -24,9 +24,10 @@ use serde_derive::{Deserialize, Serialize};
24
24
use serde_with:: { DeserializeFromStr , SerializeDisplay } ;
25
25
26
26
use super :: _serde:: DataFileSerde ;
27
- use super :: { Datum , FormatVersion , Schema , data_file_schema_v1, data_file_schema_v2} ;
27
+ use super :: {
28
+ Datum , FormatVersion , Schema , data_file_schema_v1, data_file_schema_v2, data_file_schema_v3,
29
+ } ;
28
30
use crate :: error:: Result ;
29
- use crate :: spec:: manifest:: data_file_schema_v3;
30
31
use crate :: spec:: { Struct , StructType } ;
31
32
use crate :: { Error , ErrorKind } ;
32
33
@@ -294,7 +295,6 @@ pub fn write_data_files_to_avro<W: Write>(
294
295
let avro_schema = match version {
295
296
FormatVersion :: V1 => data_file_schema_v1 ( partition_type) . unwrap ( ) ,
296
297
FormatVersion :: V2 => data_file_schema_v2 ( partition_type) . unwrap ( ) ,
297
- // Todo: Why unwrap here and not return the error?
298
298
FormatVersion :: V3 => data_file_schema_v3 ( partition_type) . unwrap ( ) ,
299
299
} ;
300
300
let mut writer = AvroWriter :: new ( & avro_schema, writer) ;
@@ -323,7 +323,6 @@ pub fn read_data_files_from_avro<R: Read>(
323
323
let avro_schema = match version {
324
324
FormatVersion :: V1 => data_file_schema_v1 ( partition_type) . unwrap ( ) ,
325
325
FormatVersion :: V2 => data_file_schema_v2 ( partition_type) . unwrap ( ) ,
326
- // Todo: Why unwrap here and not return the error?
327
326
FormatVersion :: V3 => data_file_schema_v3 ( partition_type) . unwrap ( ) ,
328
327
} ;
329
328
0 commit comments