Skip to content

Commit 0966b08

Browse files
feat: static schema flag to stream-info API (#727)
1 parent 13cc00b commit 0966b08

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

server/src/handlers/http/logstream.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ use crate::alerts::Alerts;
2121
use crate::handlers::{STATIC_SCHEMA_FLAG, TIME_PARTITION_KEY};
2222
use crate::metadata::STREAM_INFO;
2323
use crate::option::CONFIG;
24+
use crate::static_schema::{convert_static_schema_to_arrow_schema, StaticSchema};
2425
use crate::storage::{retention::Retention, LogStream, StorageDir, StreamInfo};
25-
use crate::static_schema::{StaticSchema, convert_static_schema_to_arrow_schema};
2626
use crate::{catalog, event, stats};
2727
use crate::{metadata, validator};
2828
use actix_web::http::StatusCode;
@@ -434,6 +434,7 @@ pub async fn get_stream_info(req: HttpRequest) -> Result<impl Responder, StreamE
434434
first_event_at: stream_meta.first_event_at.clone(),
435435
time_partition: stream_meta.time_partition.clone(),
436436
cache_enabled: stream_meta.cache_enabled,
437+
static_schema_flag: stream_meta.static_schema_flag.clone(),
437438
};
438439

439440
Ok((web::Json(stream_info), StatusCode::OK))

server/src/storage.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ pub struct StreamInfo {
9999
pub cache_enabled: bool,
100100
#[serde(skip_serializing_if = "Option::is_none")]
101101
pub time_partition: Option<String>,
102+
#[serde(skip_serializing_if = "Option::is_none")]
103+
pub static_schema_flag: Option<String>,
102104
}
103105

104106
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]

0 commit comments

Comments
 (0)