File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -242,22 +242,23 @@ pub async fn push_logs_unchecked(
242242 rb : RecordBatch ,
243243 stream : & Stream ,
244244) -> Result < event:: Event , PostError > {
245- let mut unchecked_event = event:: Event {
245+ let unchecked_event = event:: Event {
246246 origin_format : "json" ,
247247 origin_size : 0 ,
248248 time_partition : None ,
249249 is_first_event : true , // NOTE: Maybe should be false
250- partitions : HashMap :: new ( ) ,
250+ partitions : [ (
251+ get_schema_key ( & rb. schema ( ) . fields ) ,
252+ PartitionEvent {
253+ rb,
254+ parsed_timestamp : Utc :: now ( ) . naive_utc ( ) ,
255+ custom_partition_values : HashMap :: new ( ) , // should be an empty map for unchecked push
256+ } ,
257+ ) ]
258+ . into_iter ( )
259+ . collect ( ) ,
251260 stream_type : StreamType :: UserDefined ,
252261 } ;
253- unchecked_event. partitions . insert (
254- get_schema_key ( & rb. schema ( ) . fields ) ,
255- PartitionEvent {
256- rb,
257- parsed_timestamp : Utc :: now ( ) . naive_utc ( ) ,
258- custom_partition_values : HashMap :: new ( ) , // should be an empty map for unchecked push
259- } ,
260- ) ;
261262
262263 unchecked_event. process_unchecked ( stream) ?;
263264
You can’t perform that action at this time.
0 commit comments