@@ -30,7 +30,7 @@ use std::{
3030use arrow_array:: RecordBatch ;
3131use arrow_ipc:: writer:: StreamWriter ;
3232use arrow_schema:: { Field , Fields , Schema } ;
33- use chrono:: { NaiveDateTime , Timelike , Utc } ;
33+ use chrono:: { NaiveDateTime , Timelike } ;
3434use derive_more:: { Deref , DerefMut } ;
3535use itertools:: Itertools ;
3636use parquet:: {
@@ -165,8 +165,7 @@ impl Stream {
165165 hostname. push_str ( id) ;
166166 }
167167 let filename = format ! (
168- "{}{stream_hash}.date={}.hour={:02}.minute={}.{}{hostname}.{ARROW_FILE_EXTENSION}" ,
169- Utc :: now( ) . format( "%Y%m%dT%H%M" ) ,
168+ "{stream_hash}.date={}.hour={:02}.minute={}.{}{hostname}.{ARROW_FILE_EXTENSION}" ,
170169 parsed_timestamp. date( ) ,
171170 parsed_timestamp. hour( ) ,
172171 minute_to_slot( parsed_timestamp. minute( ) , OBJECT_STORE_DATA_GRANULARITY ) . unwrap( ) ,
@@ -767,7 +766,7 @@ mod tests {
767766
768767 use arrow_array:: { Int32Array , StringArray , TimestampMillisecondArray } ;
769768 use arrow_schema:: { DataType , Field , TimeUnit } ;
770- use chrono:: { NaiveDate , TimeDelta } ;
769+ use chrono:: { NaiveDate , TimeDelta , Utc } ;
771770 use temp_dir:: TempDir ;
772771 use tokio:: time:: sleep;
773772
@@ -884,8 +883,7 @@ mod tests {
884883 ) ;
885884
886885 let expected_path = staging. data_path . join ( format ! (
887- "{}{stream_hash}.date={}.hour={:02}.minute={}.{}.{ARROW_FILE_EXTENSION}" ,
888- Utc :: now( ) . format( "%Y%m%dT%H%M" ) ,
886+ "{stream_hash}.date={}.hour={:02}.minute={}.{}.{ARROW_FILE_EXTENSION}" ,
889887 parsed_timestamp. date( ) ,
890888 parsed_timestamp. hour( ) ,
891889 minute_to_slot( parsed_timestamp. minute( ) , OBJECT_STORE_DATA_GRANULARITY ) . unwrap( ) ,
@@ -919,8 +917,7 @@ mod tests {
919917 ) ;
920918
921919 let expected_path = staging. data_path . join ( format ! (
922- "{}{stream_hash}.date={}.hour={:02}.minute={}.key1=value1.key2=value2.{}.{ARROW_FILE_EXTENSION}" ,
923- Utc :: now( ) . format( "%Y%m%dT%H%M" ) ,
920+ "{stream_hash}.date={}.hour={:02}.minute={}.key1=value1.key2=value2.{}.{ARROW_FILE_EXTENSION}" ,
924921 parsed_timestamp. date( ) ,
925922 parsed_timestamp. hour( ) ,
926923 minute_to_slot( parsed_timestamp. minute( ) , OBJECT_STORE_DATA_GRANULARITY ) . unwrap( ) ,
0 commit comments