Skip to content

Commit 62aea42

Browse files
fix: alert path and query (#791)
Fixes - 1. alert path changed 2. check for all stream.json for query 3. cargo clippy changes
1 parent d4dcd0e commit 62aea42

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

server/src/catalog.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ pub trait Snapshot {
4141
}
4242

4343
pub trait ManifestFile {
44+
#[allow(unused)]
4445
fn file_name(&self) -> &str;
46+
#[allow(unused)]
4547
fn ingestion_size(&self) -> u64;
48+
#[allow(unused)]
4649
fn file_size(&self) -> u64;
4750
fn num_rows(&self) -> u64;
4851
fn columns(&self) -> &[Column];

server/src/option.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
use clap::error::ErrorKind;
2020
use clap::{command, Args, Command, FromArgMatches};
21-
21+
use core::fmt;
2222
use once_cell::sync::Lazy;
2323
use parquet::basic::{BrotliLevel, GzipLevel, ZstdLevel};
2424
use std::env;
@@ -234,9 +234,9 @@ impl Mode {
234234
}
235235
}
236236

237-
impl ToString for Mode {
238-
fn to_string(&self) -> String {
239-
self.to_str().to_string()
237+
impl fmt::Display for Mode {
238+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
239+
write!(f, "{}", self.to_str())
240240
}
241241
}
242242

server/src/query/stream_schema_provider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ impl TableProvider for StandardTableProvider {
328328
let obs = glob_storage
329329
.get_objects(
330330
Some(&path),
331-
Box::new(|file_name| file_name.ends_with("manifest.json")),
331+
Box::new(|file_name| file_name.ends_with("stream.json")),
332332
)
333333
.await;
334334
if let Ok(obs) = obs {

server/src/storage/object_storage.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ pub trait ObjectStorage: Sync + 'static {
293293
}
294294

295295
/// for future use
296+
#[allow(dead_code)]
296297
async fn get_stats_for_first_time(
297298
&self,
298299
stream_name: &str,
@@ -581,7 +582,7 @@ pub fn parseable_json_path() -> RelativePathBuf {
581582
/// TODO: Needs to be updated for distributed mode
582583
#[inline(always)]
583584
fn alert_json_path(stream_name: &str) -> RelativePathBuf {
584-
RelativePathBuf::from_iter([stream_name, ALERT_FILE_NAME])
585+
RelativePathBuf::from_iter([stream_name, STREAM_ROOT_DIRECTORY, ALERT_FILE_NAME])
585586
}
586587

587588
#[inline(always)]

0 commit comments

Comments
 (0)