Skip to content

Commit 533d9d2

Browse files
update: remove time partition stream creation
gives error if user tries to create a stream with a time partition updating time partition limit is still allowed for older streams
1 parent 7596825 commit 533d9d2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/parseable/mod.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,12 @@ 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-
};
454+
if !time_partition.is_empty() || !time_partition_limit.is_empty() {
455+
return Err(StreamError::Custom {
456+
msg: "Creating stream with time partition is not supported anymore".to_string(),
457+
status: StatusCode::BAD_REQUEST,
458+
});
459+
}
459460

460461
if let Some(custom_partition) = &custom_partition {
461462
validate_custom_partition(custom_partition)?;
@@ -479,7 +480,7 @@ impl Parseable {
479480
self.create_stream(
480481
stream_name.to_string(),
481482
&time_partition,
482-
time_partition_in_days,
483+
None,
483484
custom_partition.as_ref(),
484485
static_schema_flag,
485486
schema,

0 commit comments

Comments
 (0)