From 17ea32610a22d697ccf4499ddd1cc6f90c5b1492 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:47:17 +0000 Subject: [PATCH] chore(deps): Bump itertools from 0.12.1 to 0.13.0 (#17075) Signed-off-by: dependabot[bot] Signed-off-by: Richard Chien Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Richard Chien --- Cargo.lock | 72 +++++++++---------- Cargo.toml | 2 +- src/expr/macro/src/gen.rs | 9 +-- .../src/optimizer/plan_node/logical_join.rs | 2 +- .../rule/apply_join_transpose_rule.rs | 2 +- src/frontend/src/utils/condition.rs | 27 +++---- 6 files changed, 55 insertions(+), 59 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e86fb54e58053..b7cef1fcec2ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2219,7 +2219,7 @@ dependencies = [ "bitflags 2.6.0", "cexpr", "clang-sys", - "itertools 0.12.1", + "itertools 0.10.5", "lazy_static", "lazycell", "log", @@ -8719,7 +8719,7 @@ dependencies = [ "byteorder", "bytes", "futures", - "itertools 0.12.1", + "itertools 0.13.0", "jsonwebtoken", "madsim-tokio", "openssl", @@ -9385,7 +9385,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.10.5", "proc-macro2", "quote", "syn 2.0.66", @@ -10187,7 +10187,7 @@ dependencies = [ "glob", "google-cloud-pubsub", "indicatif", - "itertools 0.12.1", + "itertools 0.13.0", "madsim-rdkafka", "madsim-tokio", "redis", @@ -10215,7 +10215,7 @@ dependencies = [ "dialoguer", "enum-iterator", "fs-err", - "itertools 0.12.1", + "itertools 0.13.0", ] [[package]] @@ -10238,7 +10238,7 @@ dependencies = [ "async-trait", "bincode 1.3.3", "bytes", - "itertools 0.12.1", + "itertools 0.13.0", "parking_lot 0.12.1", "prost 0.13.1", "risingwave_common", @@ -10270,7 +10270,7 @@ dependencies = [ "hashbrown 0.14.3", "hytra", "iceberg", - "itertools 0.12.1", + "itertools 0.13.0", "madsim-tokio", "madsim-tonic", "memcomparable", @@ -10324,7 +10324,7 @@ dependencies = [ "futures", "futures-async-stream", "hdrhistogram", - "itertools 0.12.1", + "itertools 0.13.0", "libc", "madsim-tokio", "nix 0.29.0", @@ -10452,7 +10452,7 @@ dependencies = [ "http-body 0.4.5", "humantime", "hytra", - "itertools 0.12.1", + "itertools 0.13.0", "itoa", "jsonbb", "libc", @@ -10571,7 +10571,7 @@ dependencies = [ "hyper 1.4.1", "hyper-util", "hytra", - "itertools 0.12.1", + "itertools 0.13.0", "libc", "mach2", "madsim-tokio", @@ -10595,7 +10595,7 @@ name = "risingwave_common_proc_macro" version = "2.1.0-alpha" dependencies = [ "bae", - "itertools 0.12.1", + "itertools 0.13.0", "proc-macro-error 1.0.4", "proc-macro2", "quote", @@ -10709,7 +10709,7 @@ dependencies = [ "futures-async-stream", "http 1.1.0", "hyper 1.4.1", - "itertools 0.12.1", + "itertools 0.13.0", "madsim-tokio", "madsim-tonic", "maplit", @@ -10794,7 +10794,7 @@ dependencies = [ "iceberg-catalog-rest", "icelake", "indexmap 2.2.6", - "itertools 0.12.1", + "itertools 0.13.0", "jni", "jsonbb", "jsonwebtoken", @@ -10883,7 +10883,7 @@ dependencies = [ "expect-test", "fs-err", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "jsonbb", "jsonschema-transpiler", "madsim-tokio", @@ -10917,7 +10917,7 @@ dependencies = [ "futures", "hex", "inquire", - "itertools 0.12.1", + "itertools 0.13.0", "madsim-etcd-client", "madsim-tokio", "madsim-tonic", @@ -10955,7 +10955,7 @@ dependencies = [ "criterion", "futures", "futures-async-stream", - "itertools 0.12.1", + "itertools 0.13.0", "madsim-tokio", "parking_lot 0.12.1", "paste", @@ -11022,7 +11022,7 @@ dependencies = [ "futures", "futures-async-stream", "futures-util", - "itertools 0.12.1", + "itertools 0.13.0", "linkme", "madsim-tokio", "num-traits", @@ -11066,7 +11066,7 @@ dependencies = [ "ginepro", "hex", "icelake", - "itertools 0.12.1", + "itertools 0.13.0", "jsonbb", "linkme", "madsim-tokio", @@ -11100,7 +11100,7 @@ dependencies = [ name = "risingwave_expr_macro" version = "0.1.0" dependencies = [ - "itertools 0.12.1", + "itertools 0.13.0", "proc-macro2", "quote", "syn 2.0.66", @@ -11136,7 +11136,7 @@ dependencies = [ "iana-time-zone", "iceberg", "icelake", - "itertools 0.12.1", + "itertools 0.13.0", "jsonbb", "linkme", "madsim-tokio", @@ -11205,7 +11205,7 @@ dependencies = [ "bytes", "easy-ext", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "parse-display", "prost 0.13.1", "risingwave_common", @@ -11230,7 +11230,7 @@ dependencies = [ "foyer", "futures", "futures-async-stream", - "itertools 0.12.1", + "itertools 0.13.0", "madsim-tokio", "parking_lot 0.12.1", "rand", @@ -11261,7 +11261,7 @@ dependencies = [ "foyer", "futures", "futures-async-stream", - "itertools 0.12.1", + "itertools 0.13.0", "madsim-tokio", "mockall", "parking_lot 0.12.1", @@ -11310,7 +11310,7 @@ dependencies = [ "foyer", "fs-err", "futures", - "itertools 0.12.1", + "itertools 0.13.0", "jni", "madsim-tokio", "paste", @@ -11386,7 +11386,7 @@ dependencies = [ "futures", "hex", "http 1.1.0", - "itertools 0.12.1", + "itertools 0.13.0", "jsonbb", "madsim-etcd-client", "madsim-tokio", @@ -11492,7 +11492,7 @@ dependencies = [ "either", "futures", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "madsim-etcd-client", "madsim-tokio", "madsim-tonic", @@ -11524,7 +11524,7 @@ dependencies = [ "async-trait", "either", "futures", - "itertools 0.12.1", + "itertools 0.13.0", "madsim-tokio", "madsim-tonic", "prost 0.13.1", @@ -11565,7 +11565,7 @@ dependencies = [ "hyper 0.14.27", "hyper-rustls 0.24.2", "hyper-tls 0.5.0", - "itertools 0.12.1", + "itertools 0.13.0", "madsim", "madsim-aws-sdk-s3", "madsim-tokio", @@ -11609,7 +11609,7 @@ version = "2.1.0-alpha" dependencies = [ "anyhow", "expect-test", - "itertools 0.12.1", + "itertools 0.13.0", "libtest-mimic", "madsim-tokio", "paste", @@ -11650,7 +11650,7 @@ dependencies = [ "futures", "http 1.1.0", "hyper 1.4.1", - "itertools 0.12.1", + "itertools 0.13.0", "lru 0.7.6", "madsim-tokio", "madsim-tonic", @@ -11717,7 +11717,7 @@ dependencies = [ "fail", "futures", "glob", - "itertools 0.12.1", + "itertools 0.13.0", "lru 0.7.6", "madsim", "madsim-aws-sdk-s3", @@ -11765,7 +11765,7 @@ version = "2.1.0-alpha" dependencies = [ "anyhow", "console", - "itertools 0.12.1", + "itertools 0.13.0", "libtest-mimic", "madsim-tokio", "matches", @@ -11788,7 +11788,7 @@ dependencies = [ "chrono", "clap", "expect-test", - "itertools 0.12.1", + "itertools 0.13.0", "libtest-mimic", "madsim-tokio", "rand", @@ -11854,7 +11854,7 @@ dependencies = [ "futures", "futures-async-stream", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "libc", "lz4", "mach2", @@ -11925,7 +11925,7 @@ dependencies = [ "futures-async-stream", "governor", "hytra", - "itertools 0.12.1", + "itertools 0.13.0", "jsonbb", "local_stats_alloc", "lru 0.7.6", @@ -12444,7 +12444,7 @@ dependencies = [ name = "rw_iter_util" version = "0.0.0" dependencies = [ - "itertools 0.12.1", + "itertools 0.13.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 9e871501e3e9f..a354deaae4d0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -158,7 +158,7 @@ deltalake = { git = "https://github.com/risingwavelabs/delta-rs", rev = "5c2dccd "s3-no-concurrent-write", "gcs", ] } -itertools = "0.12.0" +itertools = "0.13.0" jsonbb = "0.1.4" lru = { git = "https://github.com/risingwavelabs/lru-rs.git", rev = "2682b85" } parquet = { version = "53", features = ["async"] } diff --git a/src/expr/macro/src/gen.rs b/src/expr/macro/src/gen.rs index 8057f653c8d82..882ba15f81406 100644 --- a/src/expr/macro/src/gen.rs +++ b/src/expr/macro/src/gen.rs @@ -61,15 +61,8 @@ impl FunctionAttr { } let args = self.args.iter().map(|ty| types::expand_type_wildcard(ty)); let ret = types::expand_type_wildcard(&self.ret); - // multi_cartesian_product should emit an empty set if the input is empty. - let args_cartesian_product = - args.multi_cartesian_product() - .chain(match self.args.is_empty() { - true => vec![vec![]], - false => vec![], - }); let mut attrs = Vec::new(); - for (args, mut ret) in args_cartesian_product.cartesian_product(ret) { + for (args, mut ret) in args.multi_cartesian_product().cartesian_product(ret) { if ret == "auto" { ret = types::min_compatible_type(&args); } diff --git a/src/frontend/src/optimizer/plan_node/logical_join.rs b/src/frontend/src/optimizer/plan_node/logical_join.rs index 0f642e3c3e88a..d7e8eb79dd70d 100644 --- a/src/frontend/src/optimizer/plan_node/logical_join.rs +++ b/src/frontend/src/optimizer/plan_node/logical_join.rs @@ -134,7 +134,7 @@ impl LogicalJoin { .collect_input_refs(self.core.left.schema().len() + self.core.right.schema().len()); let index_group = input_refs .ones() - .group_by(|i| *i < self.core.left.schema().len()); + .chunk_by(|i| *i < self.core.left.schema().len()); let left_index = index_group .into_iter() .next() diff --git a/src/frontend/src/optimizer/rule/apply_join_transpose_rule.rs b/src/frontend/src/optimizer/rule/apply_join_transpose_rule.rs index fc6cbdd477539..4ae41ce3bd564 100644 --- a/src/frontend/src/optimizer/rule/apply_join_transpose_rule.rs +++ b/src/frontend/src/optimizer/rule/apply_join_transpose_rule.rs @@ -482,7 +482,7 @@ impl ApplyJoinTransposeRule { d_t2_bit_set.set_range(0..apply_left_len, true); d_t2_bit_set.set_range(apply_left_len + join_left_len..apply_len, true); - for (key, group) in &apply_on.into_iter().group_by(|expr| { + for (key, group) in &apply_on.into_iter().chunk_by(|expr| { let collect_bit_set = expr.collect_input_refs(apply_len); if collect_bit_set.is_subset(&d_t1_bit_set) { 0 diff --git a/src/frontend/src/utils/condition.rs b/src/frontend/src/utils/condition.rs index d78adcbd07a97..5bb53a84ae410 100644 --- a/src/frontend/src/utils/condition.rs +++ b/src/frontend/src/utils/condition.rs @@ -13,7 +13,7 @@ // limitations under the License. use std::collections::{BTreeMap, HashSet}; -use std::fmt::{self, Debug, Display}; +use std::fmt::{self, Debug}; use std::ops::Bound; use std::rc::Rc; use std::sync::LazyLock; @@ -504,7 +504,7 @@ impl Condition { }); let mut groups = vec![vec![]; pk_cols_num + 1]; - for (key, group) in &conjunctions.into_iter().group_by(|expr| { + for (key, group) in &conjunctions.into_iter().chunk_by(|expr| { let input_bits = expr.collect_input_refs(cols_num); if input_bits.count_ones(..) == 1 { let col_idx = input_bits.ones().next().unwrap(); @@ -802,7 +802,7 @@ impl Condition { { const EMPTY: Vec = vec![]; let mut groups = [EMPTY; N]; - for (key, group) in &self.conjunctions.into_iter().group_by(|expr| { + for (key, group) in &self.conjunctions.into_iter().chunk_by(|expr| { // i-th group let i = f(expr); assert!(i < N); @@ -904,16 +904,19 @@ impl ConditionDisplay<'_> { if self.condition.always_true() { write!(f, "true") } else { - self.condition - .conjunctions - .iter() - .format_with(" AND ", |expr, f| { - f(&ExprDisplay { - expr, - input_schema: self.input_schema, + write!( + f, + "{}", + self.condition + .conjunctions + .iter() + .format_with(" AND ", |expr, f| { + f(&ExprDisplay { + expr, + input_schema: self.input_schema, + }) }) - }) - .fmt(f) + ) } } }