@@ -24,7 +24,7 @@ use std::{
2424 sync:: Arc ,
2525} ;
2626
27- use anyhow:: { anyhow, Error as AnyError } ;
27+ use anyhow:: anyhow;
2828use arrow_array:: RecordBatch ;
2929use arrow_schema:: { DataType , Field , Schema , TimeUnit } ;
3030use chrono:: { DateTime , Utc } ;
@@ -119,14 +119,14 @@ pub trait EventFormat: Sized {
119119 schema_version : SchemaVersion ,
120120 ) -> anyhow:: Result < ( EventSchema , IsFirstEvent ) > ;
121121
122- fn decode ( data : Self :: Data , schema : Arc < Schema > ) -> Result < RecordBatch , AnyError > ;
122+ fn decode ( data : Self :: Data , schema : Arc < Schema > ) -> anyhow :: Result < RecordBatch > ;
123123
124124 /// Updates inferred schema with `p_timestamp` field and ensures it adheres to expectations
125125 fn prepare_and_validate_schema (
126126 mut schema : EventSchema ,
127127 storage_schema : & HashMap < String , Arc < Field > > ,
128128 static_schema_flag : bool ,
129- ) -> Result < EventSchema , AnyError > {
129+ ) -> anyhow :: Result < EventSchema > {
130130 if get_field ( & schema, DEFAULT_TIMESTAMP_KEY ) . is_some ( ) {
131131 return Err ( anyhow ! ( "field {DEFAULT_TIMESTAMP_KEY} is a reserved field" , ) ) ;
132132 }
@@ -160,7 +160,7 @@ pub trait EventFormat: Sized {
160160 schema : & EventSchema ,
161161 time_partition : Option < & String > ,
162162 schema_version : SchemaVersion ,
163- ) -> Result < RecordBatch , AnyError > {
163+ ) -> anyhow :: Result < RecordBatch > {
164164 // prepare the record batch and new fields to be added
165165 let mut new_schema = Arc :: new ( Schema :: new ( schema. clone ( ) ) ) ;
166166 new_schema =
@@ -176,7 +176,7 @@ pub trait EventFormat: Sized {
176176 Ok ( rb)
177177 }
178178
179- fn into_event ( self , stream : & Stream ) -> Result < Event , AnyError > ;
179+ fn into_event ( self , stream : & Stream ) -> anyhow :: Result < Event > ;
180180}
181181
182182pub fn get_existing_field_names (
0 commit comments