@@ -23,7 +23,7 @@ use opentelemetry_proto::tonic::{
23
23
logs:: v1:: LogsData , metrics:: v1:: MetricsData , trace:: v1:: TracesData ,
24
24
} ;
25
25
use serde_json:: Value ;
26
- use std:: { collections:: HashMap , sync :: Arc } ;
26
+ use std:: collections:: HashMap ;
27
27
use tracing:: warn;
28
28
29
29
use crate :: {
@@ -39,7 +39,7 @@ use crate::{
39
39
} ,
40
40
} ,
41
41
otel:: { logs:: flatten_otel_logs, metrics:: flatten_otel_metrics, traces:: flatten_otel_traces} ,
42
- parseable:: { PARSEABLE , Stream } ,
42
+ parseable:: PARSEABLE ,
43
43
storage:: StreamType ,
44
44
utils:: json:: { convert_array_to_object, flatten:: convert_to_array} ,
45
45
} ;
@@ -268,7 +268,7 @@ fn verify_dataset_fields_count(stream_name: &str) -> Result<(), PostError> {
268
268
Ok ( ( ) )
269
269
}
270
270
271
- pub fn validate_stream_for_ingestion ( stream_name : & str ) -> Result < Arc < Stream > , PostError > {
271
+ pub fn validate_stream_for_ingestion ( stream_name : & str ) -> Result < ( ) , PostError > {
272
272
let stream = PARSEABLE . get_stream ( stream_name) ?;
273
273
274
274
// Validate that the stream's log source is compatible
@@ -283,12 +283,12 @@ pub fn validate_stream_for_ingestion(stream_name: &str) -> Result<Arc<Stream>, P
283
283
284
284
// Check for time partition
285
285
if stream. get_time_partition ( ) . is_some ( ) {
286
- return Err ( PostError :: CustomError (
287
- "Ingestion is not allowed to stream with time partition" . to_string ( ) ,
288
- ) ) ;
286
+ return Err ( PostError :: Invalid ( anyhow :: anyhow! (
287
+ "Ingestion with time partition is not supported in Parseable OSS"
288
+ ) ) ) ;
289
289
}
290
290
291
- Ok ( stream )
291
+ Ok ( ( ) )
292
292
}
293
293
294
294
#[ cfg( test) ]
0 commit comments