File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
datafusion/datasource-avro/src Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 2020use std:: any:: Any ;
2121use std:: sync:: Arc ;
2222
23- use arrow:: datatypes:: { Schema , SchemaRef } ;
23+ use arrow:: datatypes:: SchemaRef ;
2424use arrow_avro:: reader:: { Reader , ReaderBuilder } ;
2525use arrow_avro:: schema:: AvroSchema ;
2626use datafusion_common:: error:: Result ;
@@ -52,8 +52,7 @@ impl AvroSource {
5252 }
5353
5454 fn open < R : std:: io:: Read > ( & self , reader : R ) -> Result < Reader < R > > {
55- let schema: & Schema = self . schema . as_ref ( ) . expect ( "Schema must set before open" ) ;
56- let avro_schema = AvroSchema :: try_from ( schema) ?;
55+ let avro_schema = AvroSchema :: try_from ( self . schema . expect ( "Schema must set before open" ) . as_ref ( ) ) ?;
5756 ReaderBuilder :: new ( )
5857 . with_reader_schema ( avro_schema)
5958 . with_batch_size ( self . batch_size . expect ( "Batch size must set before open" ) )
You can’t perform that action at this time.
0 commit comments