Skip to content

Commit

Permalink
fix style problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed Sep 27, 2023
1 parent 67e499a commit 53cce1c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions query_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,23 @@ impl QueryEngineBuilder {
fn build_datafusion_query_engine(self) -> Result<QueryEngineRef> {
// Check if necessary component exists.
let config = self.config.with_context(|| InitNoCause {
msg: "config not found".to_string(),
msg: "config not found",
})?;

let df_function_registry = self.df_function_registry.with_context(|| InitNoCause {
msg: "df_function_registry not found".to_string(),
msg: "df_function_registry not found",
})?;

let df_runtime_config = self.df_runtime_config.with_context(|| InitNoCause {
msg: "df_runtime_config not found".to_string(),
msg: "df_runtime_config not found",
})?;

let catalog_manager = self.catalog_manager.with_context(|| InitNoCause {
msg: "catalog_manager not found".to_string(),
msg: "catalog_manager not found",
})?;

let remote_engine = self.remote_engine.with_context(|| InitNoCause {
msg: "remote_engine not found".to_string(),
msg: "remote_engine not found",
})?;

// Build engine.
Expand Down
4 changes: 2 additions & 2 deletions table_engine/src/remote/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use crate::{
partition::PartitionInfo,
table::{
ReadRequest as TableReadRequest, SchemaId, TableId, WriteRequest as TableWriteRequest,
NO_TIMEOUT,
},
};

Expand Down Expand Up @@ -335,8 +336,7 @@ impl From<RemoteExecuteRequest> for ceresdbproto::remote_engine::ExecutePlanRequ
let rest_duration_ms = if let Some(deadline) = value.context.deadline {
deadline.duration_since(Instant::now()).as_millis() as i64
} else {
// -1 means no deadline at all
-1
NO_TIMEOUT
};

let pb_context = ceresdbproto::remote_engine::ExecContext {
Expand Down
2 changes: 1 addition & 1 deletion table_engine/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ define_result!(Error);

/// Default partition num to scan in parallelism.
pub const DEFAULT_READ_PARALLELISM: usize = 8;
const NO_TIMEOUT: i64 = -1;
pub const NO_TIMEOUT: i64 = -1;

/// Schema id (24 bits)
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
Expand Down

0 comments on commit 53cce1c

Please sign in to comment.