Skip to content

Commit e91606f

Browse files
fix: custom partition validation (#1505)
add check to reject dataset creation / updation when field name contains period (.)
1 parent 95f9e21 commit e91606f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/parseable/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,5 +1015,15 @@ pub fn validate_custom_partition(custom_partition: &str) -> Result<(), CreateStr
10151015
status: StatusCode::BAD_REQUEST,
10161016
});
10171017
}
1018+
1019+
for partition in custom_partition_list.iter() {
1020+
if partition.contains('.') {
1021+
return Err(CreateStreamError::Custom {
1022+
msg: format!("custom partition field {partition} must not contain '.'"),
1023+
status: StatusCode::BAD_REQUEST,
1024+
});
1025+
}
1026+
}
1027+
10181028
Ok(())
10191029
}

0 commit comments

Comments
 (0)