Skip to content

Commit 131b123

Browse files
committed
fix: coderabbit suggestions
1 parent abf7432 commit 131b123

4 files changed

Lines changed: 16 additions & 7 deletions

File tree

Cargo.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,15 @@ assets-sha1 = "a7523ef819d38678275ae165c443564b2f9a3fc1"
219219

220220
[features]
221221
debug = []
222-
hotpath = ["dep:hotpath"]
222+
hotpath = [
223+
"dep:hotpath",
224+
"hotpath/hotpath",
225+
"hotpath/hotpath-cpu",
226+
"hotpath/hotpath-alloc",
227+
"hotpath/tokio",
228+
]
229+
hotpath-alloc = ["hotpath"]
230+
hotpath-cpu = ["hotpath"]
223231
kafka = [
224232
"rdkafka",
225233
"rdkafka/ssl-vendored",

src/cli.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,14 +559,14 @@ pub struct Options {
559559
)]
560560
pub max_field_statistics: usize,
561561

562-
// maximum limit to store the statistics for a field
562+
// collect statistics for dataset fields
563563
#[arg(
564564
long,
565-
env = "P_CALCULATE_FIELD_STATISTICS",
565+
env = "P_COLLECT_DATASET_STATS",
566566
default_value = "true",
567-
help = "Maximum number of field statistics to store"
567+
help = "Collect statistics for dataset fields"
568568
)]
569-
pub calculate_field_statistics: bool,
569+
pub collect_dataset_stats: bool,
570570

571571
#[arg(
572572
long,

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ use tracing_subscriber::util::SubscriberInitExt;
3232
use tracing_subscriber::{EnvFilter, Registry, fmt};
3333

3434
#[actix_web::main]
35+
#[cfg_attr(feature = "hotpath", hotpath::main)]
3536
async fn main() -> anyhow::Result<()> {
3637
init_logger();
3738
// Install the rustls crypto provider before any TLS operations.

src/storage/object_storage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ async fn upload_single_parquet_file(
184184
let manifest = catalog::create_from_parquet_file(absolute_path, &path)
185185
.map_err(|e| (path.clone(), ObjectStorageError::from(e)))?;
186186

187-
if PARSEABLE.options.calculate_field_statistics {
188-
// Calculate field stats if enabled
187+
if PARSEABLE.options.collect_dataset_stats {
188+
// collect field stats if enabled
189189
calculate_stats_if_enabled(&stream_name, &path, &schema, tenant_id).await;
190190
}
191191

0 commit comments

Comments
 (0)