@@ -98,6 +98,7 @@ pub async fn push_logs(
9898 & HashMap :: new ( ) ,
9999 size,
100100 schema_version,
101+ log_source,
101102 )
102103 . await ?;
103104 } else {
@@ -107,6 +108,7 @@ pub async fn push_logs(
107108 None ,
108109 custom_partition. as_ref ( ) ,
109110 schema_version,
111+ log_source,
110112 ) ?;
111113 let custom_partition = custom_partition. unwrap ( ) ;
112114 let custom_partition_list = custom_partition. split ( ',' ) . collect :: < Vec < & str > > ( ) ;
@@ -126,6 +128,7 @@ pub async fn push_logs(
126128 & custom_partition_values,
127129 size,
128130 schema_version,
131+ log_source,
129132 )
130133 . await ?;
131134 }
@@ -137,6 +140,7 @@ pub async fn push_logs(
137140 time_partition_limit,
138141 None ,
139142 schema_version,
143+ log_source,
140144 ) ?;
141145 for value in data {
142146 parsed_timestamp = get_parsed_timestamp ( & value, time_partition. as_ref ( ) . unwrap ( ) ) ?;
@@ -151,6 +155,7 @@ pub async fn push_logs(
151155 & HashMap :: new ( ) ,
152156 size,
153157 schema_version,
158+ log_source,
154159 )
155160 . await ?;
156161 }
@@ -161,6 +166,7 @@ pub async fn push_logs(
161166 time_partition_limit,
162167 custom_partition. as_ref ( ) ,
163168 schema_version,
169+ log_source,
164170 ) ?;
165171 let custom_partition = custom_partition. unwrap ( ) ;
166172 let custom_partition_list = custom_partition. split ( ',' ) . collect :: < Vec < & str > > ( ) ;
@@ -181,6 +187,7 @@ pub async fn push_logs(
181187 & custom_partition_values,
182188 size,
183189 schema_version,
190+ log_source,
184191 )
185192 . await ?;
186193 }
@@ -200,6 +207,7 @@ pub async fn create_process_record_batch(
200207 custom_partition_values : & HashMap < String , String > ,
201208 origin_size : u64 ,
202209 schema_version : SchemaVersion ,
210+ log_source : & LogSource ,
203211) -> Result < ( ) , PostError > {
204212 let ( rb, is_first_event) = get_stream_schema (
205213 stream_name,
@@ -208,7 +216,7 @@ pub async fn create_process_record_batch(
208216 static_schema_flag,
209217 time_partition,
210218 schema_version,
211- log_source,
219+ log_source,
212220 ) ?;
213221 event:: Event {
214222 rb,
@@ -234,6 +242,7 @@ pub fn get_stream_schema(
234242 static_schema_flag : Option < & String > ,
235243 time_partition : Option < & String > ,
236244 schema_version : SchemaVersion ,
245+ log_source : & LogSource ,
237246) -> Result < ( arrow_array:: RecordBatch , bool ) , PostError > {
238247 let hash_map = STREAM_INFO . read ( ) . unwrap ( ) ;
239248 let schema = hash_map
@@ -248,6 +257,7 @@ pub fn get_stream_schema(
248257 static_schema_flag,
249258 time_partition,
250259 schema_version,
260+ log_source,
251261 )
252262}
253263
0 commit comments