Skip to content

Commit

Permalink
fix: warnings for influxdb3 build
Browse files Browse the repository at this point in the history
This commit fixes the warnings emitted by `cargo build` when compiling
influxdb3. Mainly it adds needed lifetimes and removes uneccesary
imports and functions calls.
  • Loading branch information
mgattozzi committed Jan 9, 2024
1 parent 6c2d5ab commit eac59f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions iox_query_influxql/src/window/derivative.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use arrow::datatypes::{DataType, TimeUnit};
use datafusion::common::{Result, ScalarValue};
use datafusion::logical_expr::{PartitionEvaluator, Signature, TypeSignature, Volatility};
use once_cell::sync::Lazy;
use std::borrow::Borrow;

use std::sync::Arc;

/// The name of the derivative window function.
Expand Down Expand Up @@ -99,7 +99,7 @@ impl PartitionEvaluator for DifferencePartitionEvaluator {
}

fn delta(curr: &ScalarValue, prev: &ScalarValue) -> Result<f64> {
match (curr.borrow(), prev.borrow()) {
match (curr, prev) {
(ScalarValue::Float64(Some(curr)), ScalarValue::Float64(Some(prev))) => Ok(*curr - *prev),
(ScalarValue::Int64(Some(curr)), ScalarValue::Int64(Some(prev))) => {
Ok(*curr as f64 - *prev as f64)
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, Window};
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/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl Display for RunQuery {
}

impl IoxGetRequest {
const READ_INFO_TYPE_URL: &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 eac59f5

Please sign in to comment.