Skip to content

Commit

Permalink
fix: cargo formatting run
Browse files Browse the repository at this point in the history
  • Loading branch information
mgattozzi committed Jan 9, 2024
1 parent 8624e24 commit 8ca585a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion import_export/src/file/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ impl RemoteExporter {
// Export the metadata for the table. Since all
// parquet_files are part of the same table, use the table_id
// from the first parquet_file
let table_id = parquet_files.first()
let table_id = parquet_files
.first()
.map(|parquet_file| parquet_file.table_id);
if let Some(table_id) = table_id {
self.export_table_metadata(&output_directory, table_id)
Expand Down
9 changes: 6 additions & 3 deletions iox_query_influxql/src/plan/expr_type_evaluator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ impl<'a> TypeEvaluator<'a> {
// These functions require a single numeric as input and return a float
name @ ("sin" | "cos" | "tan" | "atan" | "exp" | "log" | "ln" | "log2" | "log10"
| "sqrt") => {
match arg_types.first()
match arg_types
.first()
.ok_or_else(|| error::map::query(format!("{name} expects 1 argument")))?
{
Some(
Expand All @@ -309,7 +310,8 @@ impl<'a> TypeEvaluator<'a> {

// These functions require a single float as input and return a float
name @ ("asin" | "acos") => {
match arg_types.first()
match arg_types
.first()
.ok_or_else(|| error::map::query(format!("{name} expects 1 argument")))?
{
Some(VarRefDataType::Float) | None => Ok(Some(VarRefDataType::Float)),
Expand Down Expand Up @@ -345,7 +347,8 @@ impl<'a> TypeEvaluator<'a> {

// These functions return the same data type as their input
name @ ("abs" | "floor" | "ceil" | "round") => {
match arg_types.first()
match arg_types
.first()
.cloned()
.ok_or_else(|| error::map::query(format!("{name} expects 1 argument")))?
{
Expand Down
2 changes: 1 addition & 1 deletion query_functions/src/window.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod internal;

pub use internal::{Duration};
pub use internal::Duration;
use schema::TIME_DATA_TYPE;

use std::sync::Arc;
Expand Down
2 changes: 1 addition & 1 deletion service_grpc_flight/src/keep_alive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ mod tests {
} else {
s
};

(panic_on_stream_timeout(s, Duration::from_millis(250))) as _
}
}
3 changes: 2 additions & 1 deletion service_grpc_flight/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ impl Display for RunQuery {
}

impl IoxGetRequest {
const READ_INFO_TYPE_URL: &'static str = "type.googleapis.com/influxdata.iox.querier.v1.ReadInfo";
const READ_INFO_TYPE_URL: &'static str =
"type.googleapis.com/influxdata.iox.querier.v1.ReadInfo";

/// Create a new request to run the specified query
pub fn new(database: impl Into<String>, query: RunQuery, is_debug: bool) -> Self {
Expand Down

0 comments on commit 8ca585a

Please sign in to comment.