From 0b43e63bc40c5b466ad65e2460f1c76c063f43ae Mon Sep 17 00:00:00 2001 From: baishen Date: Thu, 19 Sep 2024 18:15:30 +0800 Subject: [PATCH 1/2] chore: bump proj4rs 0.1.4 --- Cargo.lock | 153 ++++++++---------- Cargo.toml | 2 +- src/query/sql/src/planner/binder/aggregate.rs | 1 + src/query/sql/src/planner/binder/window.rs | 1 + .../optimizer/decorrelate/flatten_scalar.rs | 1 + .../decorrelate/subquery_rewriter.rs | 3 + .../filter_selectivity_sample.rs | 1 + .../sql/src/planner/plans/scalar_expr.rs | 14 +- .../sql/src/planner/semantic/type_check.rs | 1 + 9 files changed, 85 insertions(+), 92 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2388d322e6ba..9b8718091355 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,7 +38,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cipher", "cpufeatures", ] @@ -60,7 +60,7 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "const-random", "getrandom 0.2.15", "once_cell", @@ -736,7 +736,7 @@ checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock 2.8.0", "autocfg", - "cfg-if 1.0.0", + "cfg-if", "concurrent-queue", "futures-lite 1.13.0", "log", @@ -755,7 +755,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ "async-lock 3.4.0", - "cfg-if 1.0.0", + "cfg-if", "concurrent-queue", "futures-io", "futures-lite 2.3.0", @@ -1418,7 +1418,7 @@ source = "git+https://github.com/rust-lang/backtrace-rs.git?rev=72265be#72265bea dependencies = [ "addr2line 0.22.0", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object 0.36.3", @@ -1663,7 +1663,7 @@ dependencies = [ "arrayref", "arrayvec 0.7.4", "cc", - "cfg-if 1.0.0", + "cfg-if", "constant_time_eq", ] @@ -2124,12 +2124,6 @@ dependencies = [ "nom", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -2360,7 +2354,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7fc6734af48458f72f5a3fa7b840903606427d98a710256e808f76a965047d9" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "clap", "is-terminal", "libc", @@ -2643,7 +2637,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e8227005286ec39567949b33df9896bcadfa6051bccca2488129f108ca23119" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -2800,7 +2794,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -3087,7 +3081,7 @@ version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "hashbrown 0.14.5", "lock_api", "once_cell", @@ -3626,7 +3620,7 @@ version = "0.1.0" dependencies = [ "ahash 0.8.11", "bumpalo", - "cfg-if 1.0.0", + "cfg-if", "databend-common-arrow", "databend-common-base", "ethnum", @@ -5962,7 +5956,7 @@ dependencies = [ "arrow-select", "async-trait", "bytes", - "cfg-if 1.0.0", + "cfg-if", "chrono", "dashmap", "delta_kernel", @@ -6148,7 +6142,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -6383,7 +6377,7 @@ version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -6548,7 +6542,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "home", "windows-sys 0.48.0", ] @@ -6728,7 +6722,7 @@ version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "rustix 0.38.34", "windows-sys 0.52.0", ] @@ -6769,7 +6763,7 @@ version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "libredox", "windows-sys 0.59.0", @@ -7440,7 +7434,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] @@ -7451,7 +7445,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -8409,7 +8403,7 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crunchy", "num-traits", ] @@ -8593,7 +8587,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" dependencies = [ "async-trait", - "cfg-if 1.0.0", + "cfg-if", "data-encoding", "enum-as-inner 0.6.0", "futures-channel", @@ -8616,7 +8610,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "futures-util", "hickory-proto", "ipconfig", @@ -9240,7 +9234,7 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -9642,7 +9636,7 @@ version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa 0.16.9", "elliptic-curve 0.13.8", "once_cell", @@ -9873,7 +9867,7 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-targets 0.52.6", ] @@ -10073,7 +10067,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "generator", "scoped-tls", "serde", @@ -10228,7 +10222,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "digest", ] @@ -10284,12 +10278,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "metainfo" version = "0.7.12" @@ -10403,7 +10391,7 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "downcast", "fragile", "lazy_static", @@ -10418,7 +10406,7 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "proc-macro2", "quote", "syn 1.0.109", @@ -10725,7 +10713,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", - "cfg-if 1.0.0", + "cfg-if", "libc", ] @@ -10736,7 +10724,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ "bitflags 2.6.0", - "cfg-if 1.0.0", + "cfg-if", "cfg_aliases 0.1.1", "libc", "memoffset", @@ -10749,7 +10737,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ "bitflags 2.6.0", - "cfg-if 1.0.0", + "cfg-if", "cfg_aliases 0.2.1", "libc", ] @@ -11171,7 +11159,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.6.0", - "cfg-if 1.0.0", + "cfg-if", "foreign-types 0.3.2", "libc", "once_cell", @@ -11483,7 +11471,7 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "instant", "libc", "redox_syscall 0.2.16", @@ -11497,7 +11485,7 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall 0.5.3", "smallvec", @@ -11951,7 +11939,7 @@ checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", "bitflags 1.3.2", - "cfg-if 1.0.0", + "cfg-if", "concurrent-queue", "libc", "log", @@ -11965,7 +11953,7 @@ version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite", @@ -12007,7 +11995,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "196ded5d4be535690899a4631cc9f18cdc41b7ebf24a79400f46f48e49a11059" dependencies = [ "backtrace", - "cfg-if 1.0.0", + "cfg-if", "findshlibs", "inferno", "libc", @@ -12252,9 +12240,9 @@ dependencies = [ [[package]] name = "proj4rs" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5847217d30c155a90885e9a2ad25aa8f572c5be36664e114182b4c317b2eb5bb" +checksum = "bbccb6509a01200fae853b9bbfff2498b6c6cfe6c9c262502cda71fa8a033806" dependencies = [ "console_log", "crs-definitions", @@ -12264,7 +12252,6 @@ dependencies = [ "thiserror", "wasm-bindgen", "web-sys", - "wee_alloc", ] [[package]] @@ -12519,7 +12506,7 @@ version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indoc", "libc", "memoffset", @@ -13209,7 +13196,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "cfg-if 1.0.0", + "cfg-if", "getrandom 0.2.15", "libc", "spin", @@ -13447,7 +13434,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ordered-multimap 0.4.3", ] @@ -13457,7 +13444,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e310ef0e1b6eeb79169a1171daf9abcb87a2e17c03bee2c4bb100b55c75409f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ordered-multimap 0.7.3", "trim-in-place", ] @@ -13686,7 +13673,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7803e8936da37efd9b6d4478277f4b2b9bb5cdb37a113e8d63222e58da647e63" dependencies = [ "bitflags 2.6.0", - "cfg-if 1.0.0", + "cfg-if", "clipboard-win", "fd-lock", "home", @@ -14056,7 +14043,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] @@ -14073,7 +14060,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] @@ -14368,7 +14355,7 @@ dependencies = [ "arrayref", "bumpalo", "bytes", - "cfg-if 1.0.0", + "cfg-if", "faststr", "itoa", "page_size", @@ -14717,7 +14704,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" dependencies = [ "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "psm", "winapi", @@ -15072,7 +15059,7 @@ version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "core-foundation-sys", "libc", "ntapi", @@ -15273,7 +15260,7 @@ version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand 2.1.0", "once_cell", "rustix 0.38.34", @@ -15352,7 +15339,7 @@ version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", ] @@ -15906,7 +15893,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "rand 0.8.5", "static_assertions", ] @@ -16231,7 +16218,7 @@ checksum = "2990d9ea5967266ea0ccf413a4aa5c42a93dbcfda9cb49a97de6931726b12566" dependencies = [ "anyhow", "cargo_metadata", - "cfg-if 1.0.0", + "cfg-if", "gix", "regex", "rustc_version", @@ -16430,7 +16417,7 @@ version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "wasm-bindgen-macro", ] @@ -16456,7 +16443,7 @@ version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -16554,7 +16541,7 @@ dependencies = [ "async-trait", "bincode 1.3.3", "bumpalo", - "cfg-if 1.0.0", + "cfg-if", "encoding_rs", "fxprof-processed-profile", "gimli 0.28.1", @@ -16595,7 +16582,7 @@ version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7515c4d24c8b55c0feab67e3d52a42f999fda8b9cfafbd69a82ed6bcf299d26e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -16646,7 +16633,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57ec2d9a4b9990bea53a5dfd689d48663dbd19a46903eaf73e2022b3d1ef20d3" dependencies = [ "anyhow", - "cfg-if 1.0.0", + "cfg-if", "cranelift-codegen", "cranelift-control", "cranelift-entity", @@ -16697,7 +16684,7 @@ checksum = "4dbdf3053e7e7ced0cd4ed76579995b62169a1a43696890584eae2de2e33bf54" dependencies = [ "anyhow", "cc", - "cfg-if 1.0.0", + "cfg-if", "rustix 0.38.34", "wasmtime-asm-macros", "wasmtime-versioned-export-macros", @@ -16722,7 +16709,7 @@ version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ede45379f3b4d395d8947006de8043801806099a240a26db553919b68e96ab15" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "windows-sys 0.52.0", ] @@ -16735,7 +16722,7 @@ checksum = "65019d29d175c567b84173f2adf3b7a3af6d5592f8fe510dccae55d2569ec0d2" dependencies = [ "anyhow", "cc", - "cfg-if 1.0.0", + "cfg-if", "encoding_rs", "indexmap 2.4.0", "libc", @@ -16876,18 +16863,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "whoami" version = "1.5.2" @@ -17281,7 +17256,7 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-sys 0.48.0", ] @@ -17291,7 +17266,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-sys 0.48.0", ] diff --git a/Cargo.toml b/Cargo.toml index d6e92d5e51f8..f7faebe11820 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -288,7 +288,7 @@ iceberg = { version = "0.3.0" } iceberg-catalog-hms = { version = "0.3.0" } iceberg-catalog-rest = { version = "0.3.0" } poem = { version = "3.0", features = ["openssl-tls", "multipart", "compression"] } -proj4rs = { version = "0.1.3", features = ["geo-types", "crs-definitions"] } +proj4rs = { version = "0.1.4", features = ["geo-types", "crs-definitions"] } prometheus-client = "0.22" prost = { version = "0.12.1" } prost-build = { version = "0.12.1" } diff --git a/src/query/sql/src/planner/binder/aggregate.rs b/src/query/sql/src/planner/binder/aggregate.rs index 2c5e7be098d4..720ac5045137 100644 --- a/src/query/sql/src/planner/binder/aggregate.rs +++ b/src/query/sql/src/planner/binder/aggregate.rs @@ -242,6 +242,7 @@ impl<'a> AggregateRewriter<'a> { ); let replaced_agg = AggregateFunction { + span: aggregate.span, display_name: aggregate.display_name.clone(), func_name: aggregate.func_name.clone(), distinct: aggregate.distinct, diff --git a/src/query/sql/src/planner/binder/window.rs b/src/query/sql/src/planner/binder/window.rs index 5682612dc2fa..5f978a7592d2 100644 --- a/src/query/sql/src/planner/binder/window.rs +++ b/src/query/sql/src/planner/binder/window.rs @@ -332,6 +332,7 @@ impl<'a> WindowRewriter<'a> { replaced_args.push(replaced_arg.into()); } WindowFuncType::Aggregate(AggregateFunction { + span: agg.span, display_name: agg.display_name.clone(), func_name: agg.func_name.clone(), distinct: agg.distinct, diff --git a/src/query/sql/src/planner/optimizer/decorrelate/flatten_scalar.rs b/src/query/sql/src/planner/optimizer/decorrelate/flatten_scalar.rs index 82098a8c9508..ff242dc062e4 100644 --- a/src/query/sql/src/planner/optimizer/decorrelate/flatten_scalar.rs +++ b/src/query/sql/src/planner/optimizer/decorrelate/flatten_scalar.rs @@ -58,6 +58,7 @@ impl SubqueryRewriter { args.push(self.flatten_scalar(arg, correlated_columns)?); } Ok(ScalarExpr::AggregateFunction(AggregateFunction { + span: agg.span, display_name: agg.display_name.clone(), func_name: agg.func_name.clone(), distinct: agg.distinct, diff --git a/src/query/sql/src/planner/optimizer/decorrelate/subquery_rewriter.rs b/src/query/sql/src/planner/optimizer/decorrelate/subquery_rewriter.rs index 90d1b16f50f3..6505729ba06f 100644 --- a/src/query/sql/src/planner/optimizer/decorrelate/subquery_rewriter.rs +++ b/src/query/sql/src/planner/optimizer/decorrelate/subquery_rewriter.rs @@ -449,6 +449,7 @@ impl SubqueryRewriter { group_items: vec![], aggregate_functions: vec![ScalarItem { scalar: AggregateFunction { + span: subquery.span, display_name: "count(*)".to_string(), func_name: "count".to_string(), distinct: false, @@ -644,6 +645,7 @@ impl SubqueryRewriter { // For some cases, empty result set will be occur, we should return null instead of empty set. // So let wrap an expression: `if(count()=0, null, any(subquery.output_column)` let count_func = ScalarExpr::AggregateFunction(AggregateFunction { + span: subquery.span, func_name: "count".to_string(), distinct: false, params: vec![], @@ -655,6 +657,7 @@ impl SubqueryRewriter { display_name: "count".to_string(), }); let any_func = ScalarExpr::AggregateFunction(AggregateFunction { + span: subquery.span, func_name: "any".to_string(), distinct: false, params: vec![], diff --git a/src/query/sql/src/planner/optimizer/dynamic_sample/filter_selectivity_sample.rs b/src/query/sql/src/planner/optimizer/dynamic_sample/filter_selectivity_sample.rs index 262bf06900f2..92ad3d882b28 100644 --- a/src/query/sql/src/planner/optimizer/dynamic_sample/filter_selectivity_sample.rs +++ b/src/query/sql/src/planner/optimizer/dynamic_sample/filter_selectivity_sample.rs @@ -118,6 +118,7 @@ fn create_count_aggregate(mode: AggregateMode) -> Aggregate { group_items: vec![], aggregate_functions: vec![ScalarItem { scalar: ScalarExpr::AggregateFunction(AggregateFunction { + span: None, func_name: "count".to_string(), distinct: false, params: vec![], diff --git a/src/query/sql/src/planner/plans/scalar_expr.rs b/src/query/sql/src/planner/plans/scalar_expr.rs index b453aec38676..ea4f0201cd61 100644 --- a/src/query/sql/src/planner/plans/scalar_expr.rs +++ b/src/query/sql/src/planner/plans/scalar_expr.rs @@ -190,11 +190,14 @@ impl ScalarExpr { .into_option()?; Some(Range { start, end }) }), + ScalarExpr::WindowFunction(expr) => expr.span, + ScalarExpr::AggregateFunction(expr) => expr.span, + ScalarExpr::LambdaFunction(expr) => expr.span, ScalarExpr::CastExpr(expr) => expr.span.or(expr.argument.span()), ScalarExpr::SubqueryExpr(expr) => expr.span, ScalarExpr::UDFCall(expr) => expr.span, ScalarExpr::UDFLambdaCall(expr) => expr.span, - _ => None, + ScalarExpr::AsyncFunctionCall(expr) => expr.span, } } @@ -225,6 +228,10 @@ impl ScalarExpr { self.evaluable = false; Ok(()) } + fn visit_async_function_call(&mut self, _: &'a AsyncFunctionCall) -> Result<()> { + self.evaluable = false; + Ok(()) + } } let mut visitor = EvaluableVisitor { evaluable: true }; @@ -595,8 +602,11 @@ impl<'a> TryFrom<&'a BinaryOperator> for ComparisonOp { } } -#[derive(Clone, PartialEq, Eq, Hash, Debug)] +#[derive(Clone, Debug, Educe)] +#[educe(PartialEq, Eq, Hash)] pub struct AggregateFunction { + #[educe(PartialEq(ignore), Eq(ignore), Hash(ignore))] + pub span: Span, pub func_name: String, pub distinct: bool, pub params: Vec, diff --git a/src/query/sql/src/planner/semantic/type_check.rs b/src/query/sql/src/planner/semantic/type_check.rs index 0f5bedf86789..3b7c06c9e05b 100644 --- a/src/query/sql/src/planner/semantic/type_check.rs +++ b/src/query/sql/src/planner/semantic/type_check.rs @@ -1763,6 +1763,7 @@ impl<'a> TypeChecker<'a> { let display_name = format!("{:#}", expr); let new_agg_func = AggregateFunction { + span, display_name, func_name, distinct: false, From 416dd77c2c5218f28fe26c3bc0efe21c4630db6c Mon Sep 17 00:00:00 2001 From: b41sh Date: Sat, 21 Sep 2024 21:49:37 +0800 Subject: [PATCH 2/2] fix --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index d7a8046b4da5..fa69ca151cd2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12504,7 +12504,7 @@ dependencies = [ "indoc", "libc", "memoffset", - "parking_lot 0.11.2", + "parking_lot 0.12.3", "portable-atomic", "pyo3-build-config", "pyo3-ffi",