File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -451,23 +451,17 @@ impl Parseable {
451451 . await ;
452452 }
453453
454- let time_partition_in_days = if !time_partition_limit. is_empty ( ) {
455- Some ( validate_time_partition_limit ( & time_partition_limit) ?)
456- } else {
457- None
458- } ;
459-
460- if let Some ( custom_partition) = & custom_partition {
461- validate_custom_partition ( custom_partition) ?;
462- }
463-
464- if !time_partition. is_empty ( ) && custom_partition. is_some ( ) {
454+ if !time_partition. is_empty ( ) || !time_partition_limit. is_empty ( ) {
465455 return Err ( StreamError :: Custom {
466- msg : "Cannot set both time partition and custom partition " . to_string ( ) ,
456+ msg : "Creating stream with time partition is not supported anymore " . to_string ( ) ,
467457 status : StatusCode :: BAD_REQUEST ,
468458 } ) ;
469459 }
470460
461+ if let Some ( custom_partition) = & custom_partition {
462+ validate_custom_partition ( custom_partition) ?;
463+ }
464+
471465 let schema = validate_static_schema (
472466 body,
473467 stream_name,
@@ -479,7 +473,7 @@ impl Parseable {
479473 self . create_stream (
480474 stream_name. to_string ( ) ,
481475 & time_partition,
482- time_partition_in_days ,
476+ None ,
483477 custom_partition. as_ref ( ) ,
484478 static_schema_flag,
485479 schema,
You can’t perform that action at this time.
0 commit comments