mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-25 23:49:58 +00:00
chore: update toolchain to 2025-05-19 (#6124)
* chore: update toolchain to 2025-05-19 * chore: update nix sha * chore: rebase main and fix
This commit is contained in:
@@ -79,6 +79,7 @@ clippy.implicit_clone = "warn"
|
|||||||
clippy.result_large_err = "allow"
|
clippy.result_large_err = "allow"
|
||||||
clippy.large_enum_variant = "allow"
|
clippy.large_enum_variant = "allow"
|
||||||
clippy.doc_overindented_list_items = "allow"
|
clippy.doc_overindented_list_items = "allow"
|
||||||
|
clippy.uninlined_format_args = "allow"
|
||||||
rust.unknown_lints = "deny"
|
rust.unknown_lints = "deny"
|
||||||
rust.unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }
|
rust.unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
rustToolchain = fenix.packages.${system}.fromToolchainName {
|
rustToolchain = fenix.packages.${system}.fromToolchainName {
|
||||||
name = (lib.importTOML ./rust-toolchain.toml).toolchain.channel;
|
name = (lib.importTOML ./rust-toolchain.toml).toolchain.channel;
|
||||||
sha256 = "sha256-arzEYlWLGGYeOhECHpBxQd2joZ4rPKV3qLNnZ+eql6A=";
|
sha256 = "sha256-tJJr8oqX3YD+ohhPK7jlt/7kvKBnBqJVjYtoFr520d4=";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2025-04-15"
|
channel = "nightly-2025-05-19"
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ impl DfAccumulator for UddSketchState {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// meaning instantiate as `uddsketch_merge`
|
// meaning instantiate as `uddsketch_merge`
|
||||||
DataType::Binary => self.merge_batch(&[array.clone()])?,
|
DataType::Binary => self.merge_batch(std::slice::from_ref(array))?,
|
||||||
_ => {
|
_ => {
|
||||||
return not_impl_err!(
|
return not_impl_err!(
|
||||||
"UDDSketch functions do not support data type: {}",
|
"UDDSketch functions do not support data type: {}",
|
||||||
|
|||||||
@@ -468,8 +468,8 @@ mod tests {
|
|||||||
let empty_values = vec![""];
|
let empty_values = vec![""];
|
||||||
let empty_input = Arc::new(StringVector::from_slice(&empty_values)) as VectorRef;
|
let empty_input = Arc::new(StringVector::from_slice(&empty_values)) as VectorRef;
|
||||||
|
|
||||||
let ipv4_result = ipv4_func.eval(&ctx, &[empty_input.clone()]);
|
let ipv4_result = ipv4_func.eval(&ctx, std::slice::from_ref(&empty_input));
|
||||||
let ipv6_result = ipv6_func.eval(&ctx, &[empty_input.clone()]);
|
let ipv6_result = ipv6_func.eval(&ctx, std::slice::from_ref(&empty_input));
|
||||||
|
|
||||||
assert!(ipv4_result.is_err());
|
assert!(ipv4_result.is_err());
|
||||||
assert!(ipv6_result.is_err());
|
assert!(ipv6_result.is_err());
|
||||||
@@ -478,7 +478,7 @@ mod tests {
|
|||||||
let invalid_values = vec!["not an ip", "192.168.1.256", "zzzz::ffff"];
|
let invalid_values = vec!["not an ip", "192.168.1.256", "zzzz::ffff"];
|
||||||
let invalid_input = Arc::new(StringVector::from_slice(&invalid_values)) as VectorRef;
|
let invalid_input = Arc::new(StringVector::from_slice(&invalid_values)) as VectorRef;
|
||||||
|
|
||||||
let ipv4_result = ipv4_func.eval(&ctx, &[invalid_input.clone()]);
|
let ipv4_result = ipv4_func.eval(&ctx, std::slice::from_ref(&invalid_input));
|
||||||
|
|
||||||
assert!(ipv4_result.is_err());
|
assert!(ipv4_result.is_err());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ mod tests {
|
|||||||
let input = Arc::new(StringVector::from_slice(&values)) as VectorRef;
|
let input = Arc::new(StringVector::from_slice(&values)) as VectorRef;
|
||||||
|
|
||||||
// Convert IPv6 addresses to binary
|
// Convert IPv6 addresses to binary
|
||||||
let binary_result = to_num.eval(&ctx, &[input.clone()]).unwrap();
|
let binary_result = to_num.eval(&ctx, std::slice::from_ref(&input)).unwrap();
|
||||||
|
|
||||||
// Convert binary to hex string representation (for ipv6_num_to_string)
|
// Convert binary to hex string representation (for ipv6_num_to_string)
|
||||||
let mut hex_strings = Vec::new();
|
let mut hex_strings = Vec::new();
|
||||||
|
|||||||
@@ -217,13 +217,10 @@ impl FlowRouteManager {
|
|||||||
current_flow_info: &DeserializedValueWithBytes<FlowInfoValue>,
|
current_flow_info: &DeserializedValueWithBytes<FlowInfoValue>,
|
||||||
flow_routes: I,
|
flow_routes: I,
|
||||||
) -> Result<Txn> {
|
) -> Result<Txn> {
|
||||||
let del_txns = current_flow_info
|
let del_txns = current_flow_info.flownode_ids().keys().map(|partition_id| {
|
||||||
.flownode_ids()
|
let key = FlowRouteKey::new(flow_id, *partition_id).to_bytes();
|
||||||
.iter()
|
Ok(TxnOp::Delete(key))
|
||||||
.map(|(partition_id, _)| {
|
});
|
||||||
let key = FlowRouteKey::new(flow_id, *partition_id).to_bytes();
|
|
||||||
Ok(TxnOp::Delete(key))
|
|
||||||
});
|
|
||||||
|
|
||||||
let put_txns = flow_routes.into_iter().map(|(partition_id, route)| {
|
let put_txns = flow_routes.into_iter().map(|(partition_id, route)| {
|
||||||
let key = FlowRouteKey::new(flow_id, partition_id).to_bytes();
|
let key = FlowRouteKey::new(flow_id, partition_id).to_bytes();
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ impl DataflowState {
|
|||||||
/// schedule all subgraph that need to run with time <= `as_of` and run_available()
|
/// schedule all subgraph that need to run with time <= `as_of` and run_available()
|
||||||
///
|
///
|
||||||
/// return true if any subgraph actually executed
|
/// return true if any subgraph actually executed
|
||||||
|
#[allow(clippy::swap_with_temporary)]
|
||||||
pub fn run_available_with_schedule(&mut self, df: &mut Dfir) -> bool {
|
pub fn run_available_with_schedule(&mut self, df: &mut Dfir) -> bool {
|
||||||
// first split keys <= as_of into another map
|
// first split keys <= as_of into another map
|
||||||
let mut before = self
|
let mut before = self
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ use crate::key::{DatanodeLeaseKey, FlownodeLeaseKey, LeaseValue};
|
|||||||
fn build_lease_filter(lease_secs: u64) -> impl Fn(&LeaseValue) -> bool {
|
fn build_lease_filter(lease_secs: u64) -> impl Fn(&LeaseValue) -> bool {
|
||||||
move |v: &LeaseValue| {
|
move |v: &LeaseValue| {
|
||||||
((time_util::current_time_millis() - v.timestamp_millis) as u64)
|
((time_util::current_time_millis() - v.timestamp_millis) as u64)
|
||||||
< lease_secs.checked_mul(1000).unwrap_or(u64::MAX)
|
< lease_secs.saturating_mul(1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -319,8 +319,8 @@ pub fn column_schema(
|
|||||||
columns: &HashMap<String, VectorRef>,
|
columns: &HashMap<String, VectorRef>,
|
||||||
) -> Result<Vec<ColumnSchema>> {
|
) -> Result<Vec<ColumnSchema>> {
|
||||||
columns
|
columns
|
||||||
.iter()
|
.keys()
|
||||||
.map(|(column_name, _vector)| {
|
.map(|column_name| {
|
||||||
let column_schema = table_info
|
let column_schema = table_info
|
||||||
.meta
|
.meta
|
||||||
.schema
|
.schema
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ impl StatementExecutor {
|
|||||||
.contains_key(LOGICAL_TABLE_METADATA_KEY)
|
.contains_key(LOGICAL_TABLE_METADATA_KEY)
|
||||||
{
|
{
|
||||||
return self
|
return self
|
||||||
.create_logical_tables(&[create_table.clone()], query_ctx)
|
.create_logical_tables(std::slice::from_ref(create_table), query_ctx)
|
||||||
.await?
|
.await?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.next()
|
.next()
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ mod test {
|
|||||||
// From prometheus `promql/functions_test.go` case `TestKahanSum`
|
// From prometheus `promql/functions_test.go` case `TestKahanSum`
|
||||||
#[test]
|
#[test]
|
||||||
fn test_kahan_sum() {
|
fn test_kahan_sum() {
|
||||||
let inputs = vec![1.0, 10.0f64.powf(100.0), 1.0, -1.0 * 10.0f64.powf(100.0)];
|
let inputs = vec![1.0, 10.0f64.powf(100.0), 1.0, -10.0f64.powf(100.0)];
|
||||||
|
|
||||||
let mut sum = 0.0;
|
let mut sum = 0.0;
|
||||||
let mut c = 0f64;
|
let mut c = 0f64;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
use std::any::Any;
|
use std::any::Any;
|
||||||
use std::collections::{BTreeMap, BTreeSet, VecDeque};
|
use std::collections::{BTreeMap, BTreeSet, VecDeque};
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
|
use std::slice::from_ref;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::task::{Context, Poll};
|
use std::task::{Context, Poll};
|
||||||
|
|
||||||
@@ -801,18 +802,18 @@ fn find_slice_from_range(
|
|||||||
// note that `data < max_val`
|
// note that `data < max_val`
|
||||||
// i,e, for max_val = 4, array = [5,3,2] should be start=1
|
// i,e, for max_val = 4, array = [5,3,2] should be start=1
|
||||||
// max_val = 4, array = [5, 4, 3, 2] should be start= 2
|
// max_val = 4, array = [5, 4, 3, 2] should be start= 2
|
||||||
let start = bisect::<false>(&[array.clone()], &[max_val.clone()], &[*opt])?;
|
let start = bisect::<false>(from_ref(array), from_ref(&max_val), &[*opt])?;
|
||||||
// min_val = 1, array = [3, 2, 1, 0], end = 3
|
// min_val = 1, array = [3, 2, 1, 0], end = 3
|
||||||
// min_val = 1, array = [3, 2, 0], end = 2
|
// min_val = 1, array = [3, 2, 0], end = 2
|
||||||
let end = bisect::<false>(&[array.clone()], &[min_val.clone()], &[*opt])?;
|
let end = bisect::<false>(from_ref(array), from_ref(&min_val), &[*opt])?;
|
||||||
(start, end)
|
(start, end)
|
||||||
} else {
|
} else {
|
||||||
// min_val = 1, array = [1, 2, 3], start = 0
|
// min_val = 1, array = [1, 2, 3], start = 0
|
||||||
// min_val = 1, array = [0, 2, 3], start = 1
|
// min_val = 1, array = [0, 2, 3], start = 1
|
||||||
let start = bisect::<true>(&[array.clone()], &[min_val.clone()], &[*opt])?;
|
let start = bisect::<true>(from_ref(array), from_ref(&min_val), &[*opt])?;
|
||||||
// max_val = 3, array = [1, 3, 4], end = 1
|
// max_val = 3, array = [1, 3, 4], end = 1
|
||||||
// max_val = 3, array = [1, 2, 4], end = 2
|
// max_val = 3, array = [1, 2, 4], end = 2
|
||||||
let end = bisect::<true>(&[array.clone()], &[max_val.clone()], &[*opt])?;
|
let end = bisect::<true>(from_ref(array), from_ref(&max_val), &[*opt])?;
|
||||||
(start, end)
|
(start, end)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user