Skip to content

Commit

Permalink
feat: static schema flag to stream-info API (#727)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsinhaparseable authored Mar 29, 2024
1 parent 13cc00b commit 0966b08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/handlers/http/logstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ use crate::alerts::Alerts;
use crate::handlers::{STATIC_SCHEMA_FLAG, TIME_PARTITION_KEY};
use crate::metadata::STREAM_INFO;
use crate::option::CONFIG;
use crate::static_schema::{convert_static_schema_to_arrow_schema, StaticSchema};
use crate::storage::{retention::Retention, LogStream, StorageDir, StreamInfo};
use crate::static_schema::{StaticSchema, convert_static_schema_to_arrow_schema};
use crate::{catalog, event, stats};
use crate::{metadata, validator};
use actix_web::http::StatusCode;
Expand Down Expand Up @@ -434,6 +434,7 @@ pub async fn get_stream_info(req: HttpRequest) -> Result<impl Responder, StreamE
first_event_at: stream_meta.first_event_at.clone(),
time_partition: stream_meta.time_partition.clone(),
cache_enabled: stream_meta.cache_enabled,
static_schema_flag: stream_meta.static_schema_flag.clone(),
};

Ok((web::Json(stream_info), StatusCode::OK))
Expand Down
2 changes: 2 additions & 0 deletions server/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ pub struct StreamInfo {
pub cache_enabled: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub time_partition: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub static_schema_flag: Option<String>,
}

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

0 comments on commit 0966b08

Please sign in to comment.