From de000bf4b28ba3688cbc1a9f64487d78eba86eb6 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Fri, 20 Oct 2023 16:45:25 +0800 Subject: [PATCH 01/12] fix all hard error Signed-off-by: Ruihang Xia --- Cargo.lock | 1282 ++++------------- Cargo.toml | 39 +- src/client/Cargo.toml | 3 +- src/common/datasource/Cargo.toml | 2 +- src/common/function/src/scalars/math/rate.rs | 9 +- src/common/grpc/src/flight.rs | 2 +- src/common/substrait/Cargo.toml | 2 +- src/datatypes/src/value.rs | 3 +- src/datatypes/src/vectors/helper.rs | 1 + src/query/src/datafusion.rs | 4 +- src/query/src/dist_plan/commutativity.rs | 1 + src/query/src/optimizer/type_conversion.rs | 3 +- src/query/src/query_engine/state.rs | 9 +- src/script/src/python/ffi_types/pair_tests.rs | 4 +- src/script/src/python/ffi_types/vector.rs | 69 +- src/script/src/python/pyo3/builtins.rs | 5 +- src/script/src/python/pyo3/vector_impl.rs | 57 +- src/script/src/python/rspython/builtins.rs | 10 +- src/script/src/python/rspython/vector_impl.rs | 33 +- src/servers/Cargo.toml | 2 +- src/sql/src/parsers/explain_parser.rs | 8 +- src/table/src/predicate.rs | 4 +- 22 files changed, 456 insertions(+), 1096 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 507fbf6601a6..cad502408b48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,10 +213,10 @@ dependencies = [ "datatypes", "greptime-proto", "paste", - "prost", + "prost 0.12.1", "snafu", - "tonic 0.9.2", - "tonic-build", + "tonic 0.10.2", + "tonic-build 0.9.2", ] [[package]] @@ -268,9 +268,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "arrow" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2feeebd77b34b0bc88f224e06d01c27da4733997cc4789a4e056196656cdc59a" +checksum = "7fab9e93ba8ce88a37d5a30dce4b9913b75413dc1ac56cb5d72e5a840543f829" dependencies = [ "ahash 0.8.3", "arrow-arith", @@ -291,9 +291,9 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7173f5dc49c0ecb5135f52565af33afd3fdc9a12d13bd6f9973e8b96305e4b2e" +checksum = "bc1d4e368e87ad9ee64f28b9577a3834ce10fe2703a26b28417d485bbbdff956" dependencies = [ "arrow-array", "arrow-buffer", @@ -306,9 +306,9 @@ dependencies = [ [[package]] name = "arrow-array" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63d7ea725f7d1f8bb2cffc53ef538557e95fc802e217d5be25122d402e22f3d0" +checksum = "d02efa7253ede102d45a4e802a129e83bcc3f49884cab795b1ac223918e4318d" dependencies = [ "ahash 0.8.3", "arrow-buffer", @@ -323,19 +323,20 @@ dependencies = [ [[package]] name = "arrow-buffer" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbe439e077f484e5000b9e1d47b5e4c0d15f2b311a8f5bcc682553d5d67a722" +checksum = "fda119225204141138cb0541c692fbfef0e875ba01bfdeaed09e9d354f9d6195" dependencies = [ + "bytes", "half 2.3.1", "num", ] [[package]] name = "arrow-cast" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93913cc14875770aa1eef5e310765e855effa352c094cb1c7c00607d0f37b4e1" +checksum = "1d825d51b9968868d50bc5af92388754056796dbc62a4e25307d588a1fc84dee" dependencies = [ "arrow-array", "arrow-buffer", @@ -351,9 +352,9 @@ dependencies = [ [[package]] name = "arrow-csv" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef55b67c55ed877e6fe7b923121c19dae5e31ca70249ea2779a17b58fb0fbd9a" +checksum = "43ef855dc6b126dc197f43e061d4de46b9d4c033aa51c2587657f7508242cef1" dependencies = [ "arrow-array", "arrow-buffer", @@ -370,9 +371,9 @@ dependencies = [ [[package]] name = "arrow-data" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4f4f4a3c54614126a71ab91f6631c9743eb4643d6e9318b74191da9dc6e028b" +checksum = "475a4c3699c8b4095ca61cecf15da6f67841847a5f5aac983ccb9a377d02f73a" dependencies = [ "arrow-buffer", "arrow-schema", @@ -382,9 +383,9 @@ dependencies = [ [[package]] name = "arrow-flight" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1128a9f099b4e8dc9a67aed274061f3cc95afd8b7aab98f2b44cb8b7b542b71" +checksum = "cd938ea4a0e8d0db2b9f47ebba792f73f6188f4289707caeaf93a3be705e5ed5" dependencies = [ "arrow-array", "arrow-buffer", @@ -395,16 +396,16 @@ dependencies = [ "bytes", "futures", "paste", - "prost", + "prost 0.12.1", "tokio", - "tonic 0.9.2", + "tonic 0.10.2", ] [[package]] name = "arrow-ipc" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41a3659f984a524ef1c2981d43747b24d8eec78e2425267fcd0ef34ce71cd18" +checksum = "1248005c8ac549f869b7a840859d942bf62471479c1a2d82659d453eebcd166a" dependencies = [ "arrow-array", "arrow-buffer", @@ -416,9 +417,9 @@ dependencies = [ [[package]] name = "arrow-json" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b95faa95a378f56ef32d84cc0104ea998c39ef7cd1faaa6b4cebf8ea92846d" +checksum = "f03d7e3b04dd688ccec354fe449aed56b831679f03e44ee2c1cfc4045067b69c" dependencies = [ "arrow-array", "arrow-buffer", @@ -436,9 +437,9 @@ dependencies = [ [[package]] name = "arrow-ord" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68549a4284d9f8b39586afb8d5ff8158b8f0286353a4844deb1d11cf1ba1f26" +checksum = "03b87aa408ea6a6300e49eb2eba0c032c88ed9dc19e0a9948489c55efdca71f4" dependencies = [ "arrow-array", "arrow-buffer", @@ -451,9 +452,9 @@ dependencies = [ [[package]] name = "arrow-row" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a75a4a757afc301ce010adadff54d79d66140c4282ed3de565f6ccb716a5cf3" +checksum = "114a348ab581e7c9b6908fcab23cb39ff9f060eb19e72b13f8fb8eaa37f65d22" dependencies = [ "ahash 0.8.3", "arrow-array", @@ -466,9 +467,9 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bebcb57eef570b15afbcf2d07d813eb476fde9f6dd69c81004d6476c197e87e" +checksum = "5d1d179c117b158853e0101bfbed5615e86fe97ee356b4af901f1c5001e1ce4b" dependencies = [ "bitflags 2.4.0", "serde", @@ -476,10 +477,11 @@ dependencies = [ [[package]] name = "arrow-select" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e2943fa433a48921e914417173816af64eef61c0a3d448280e6c40a62df221" +checksum = "d5c71e003202e67e9db139e5278c79f5520bb79922261dfe140e4637ee8b6108" dependencies = [ + "ahash 0.8.3", "arrow-array", "arrow-buffer", "arrow-data", @@ -489,9 +491,9 @@ dependencies = [ [[package]] name = "arrow-string" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbc92ed638851774f6d7af1ad900b92bc1486746497511868b4298fcbcfa35af" +checksum = "c4cebbb282d6b9244895f4a9a912e55e57bce112554c7fa91fcec5459cb421ab" dependencies = [ "arrow-array", "arrow-buffer", @@ -1060,26 +1062,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "bstr" -version = "1.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2f7349907b712260e64b0afe2f84692af14a454be26187d9df565c7f69266a" -dependencies = [ - "memchr", - "regex-automata 0.3.7", - "serde", -] - -[[package]] -name = "btoi" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd6407f73a9b8b6162d8a2ef999fe6afd7cc15902ebf42c5cd296addf17e0ad" -dependencies = [ - "num-traits", -] - [[package]] name = "build-data" version = "0.1.4" @@ -1313,16 +1295,15 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.28" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", - "time 0.1.43", "wasm-bindgen", "windows-targets 0.48.5", ] @@ -1532,15 +1513,15 @@ dependencies = [ "futures-util", "moka", "parking_lot 0.12.1", - "prost", + "prost 0.12.1", "rand", "session", "snafu", + "substrait 0.17.0", "substrait 0.4.1", - "substrait 0.7.5", "tokio", "tokio-stream", - "tonic 0.9.2", + "tonic 0.10.2", "tracing", "tracing-subscriber", ] @@ -1556,12 +1537,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "clru" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8191fa7302e03607ff0e237d4246cc043ff5b3cb9409d995172ba3bea16b807" - [[package]] name = "cmake" version = "0.1.50" @@ -1610,7 +1585,7 @@ dependencies = [ "nu-ansi-term", "partition", "plugins", - "prost", + "prost 0.12.1", "query", "rand", "regex", @@ -1790,11 +1765,11 @@ dependencies = [ "flatbuffers", "futures", "lazy_static", - "prost", + "prost 0.12.1", "rand", "snafu", "tokio", - "tonic 0.9.2", + "tonic 0.10.2", "tower", ] @@ -1874,7 +1849,7 @@ dependencies = [ "hyper", "lazy_static", "metrics", - "prost", + "prost 0.12.1", "regex", "serde", "serde_json", @@ -1934,7 +1909,7 @@ dependencies = [ "datatypes", "serde", "snafu", - "sqlparser 0.34.0", + "sqlparser 0.38.0 (git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=602d7878c9949e48512251c7f18695a50936e51c)", "sqlparser_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "statrs", "tokio", @@ -2079,8 +2054,8 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2895653b4d9f1538a83970077cb01dfc77a4810524e51a110944688e916b18e" dependencies = [ - "prost", - "prost-types", + "prost 0.11.9", + "prost-types 0.11.9", "tonic 0.9.2", "tracing-core", ] @@ -2097,7 +2072,7 @@ dependencies = [ "futures", "hdrhistogram", "humantime", - "prost-types", + "prost-types 0.11.9", "serde", "serde_json", "thread_local", @@ -2480,8 +2455,8 @@ dependencies = [ [[package]] name = "datafusion" -version = "27.0.0" -source = "git+https://github.com/waynexia/arrow-datafusion.git?rev=b6f3b28b6fe91924cc8dd3d83726b766f2a706ec#b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ "ahash 0.8.3", "arrow", @@ -2498,15 +2473,15 @@ dependencies = [ "datafusion-expr", "datafusion-optimizer", "datafusion-physical-expr", - "datafusion-row", + "datafusion-physical-plan", "datafusion-sql", "flate2", "futures", "glob", + "half 2.3.1", "hashbrown 0.14.0", "indexmap 2.0.0", "itertools 0.11.0", - "lazy_static", "log", "num_cpus", "object_store", @@ -2515,39 +2490,45 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rand", - "smallvec", - "sqlparser 0.35.0", + "sqlparser 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile", "tokio", "tokio-util", "url", "uuid", "xz2", - "zstd 0.12.4", + "zstd 0.13.0", ] [[package]] name = "datafusion-common" -version = "27.0.0" -source = "git+https://github.com/waynexia/arrow-datafusion.git?rev=b6f3b28b6fe91924cc8dd3d83726b766f2a706ec#b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ + "ahash 0.8.3", "arrow", "arrow-array", + "arrow-buffer", + "arrow-schema", "chrono", + "half 2.3.1", "num_cpus", "object_store", "parquet", - "sqlparser 0.35.0", + "sqlparser 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "datafusion-execution" -version = "27.0.0" -source = "git+https://github.com/waynexia/arrow-datafusion.git?rev=b6f3b28b6fe91924cc8dd3d83726b766f2a706ec#b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ + "arrow", + "chrono", "dashmap", "datafusion-common", "datafusion-expr", + "futures", "hashbrown 0.14.0", "log", "object_store", @@ -2559,22 +2540,22 @@ dependencies = [ [[package]] name = "datafusion-expr" -version = "27.0.0" -source = "git+https://github.com/waynexia/arrow-datafusion.git?rev=b6f3b28b6fe91924cc8dd3d83726b766f2a706ec#b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ "ahash 0.8.3", "arrow", + "arrow-array", "datafusion-common", - "lazy_static", - "sqlparser 0.35.0", + "sqlparser 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.25.0", "strum_macros 0.25.2", ] [[package]] name = "datafusion-optimizer" -version = "27.0.0" -source = "git+https://github.com/waynexia/arrow-datafusion.git?rev=b6f3b28b6fe91924cc8dd3d83726b766f2a706ec#b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ "arrow", "async-trait", @@ -2585,13 +2566,13 @@ dependencies = [ "hashbrown 0.14.0", "itertools 0.11.0", "log", - "regex-syntax 0.7.5", + "regex-syntax 0.8.2", ] [[package]] name = "datafusion-physical-expr" -version = "27.0.0" -source = "git+https://github.com/waynexia/arrow-datafusion.git?rev=b6f3b28b6fe91924cc8dd3d83726b766f2a706ec#b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ "ahash 0.8.3", "arrow", @@ -2604,13 +2585,11 @@ dependencies = [ "chrono", "datafusion-common", "datafusion-expr", - "datafusion-row", "half 2.3.1", "hashbrown 0.14.0", "hex", "indexmap 2.0.0", "itertools 0.11.0", - "lazy_static", "libc", "log", "md-5", @@ -2624,42 +2603,61 @@ dependencies = [ ] [[package]] -name = "datafusion-row" -version = "27.0.0" -source = "git+https://github.com/waynexia/arrow-datafusion.git?rev=b6f3b28b6fe91924cc8dd3d83726b766f2a706ec#b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" +name = "datafusion-physical-plan" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ + "ahash 0.8.3", "arrow", + "arrow-array", + "arrow-buffer", + "arrow-schema", + "async-trait", + "chrono", "datafusion-common", - "paste", + "datafusion-execution", + "datafusion-expr", + "datafusion-physical-expr", + "futures", + "half 2.3.1", + "hashbrown 0.14.0", + "indexmap 2.0.0", + "itertools 0.11.0", + "log", + "once_cell", + "parking_lot 0.12.1", + "pin-project-lite", "rand", + "tokio", + "uuid", ] [[package]] name = "datafusion-sql" -version = "27.0.0" -source = "git+https://github.com/waynexia/arrow-datafusion.git?rev=b6f3b28b6fe91924cc8dd3d83726b766f2a706ec#b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ "arrow", "arrow-schema", "datafusion-common", "datafusion-expr", "log", - "sqlparser 0.35.0", + "sqlparser 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "datafusion-substrait" -version = "27.0.0" -source = "git+https://github.com/waynexia/arrow-datafusion.git?rev=b6f3b28b6fe91924cc8dd3d83726b766f2a706ec#b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ "async-recursion", "chrono", "datafusion", "itertools 0.11.0", "object_store", - "prost", - "prost-types", - "substrait 0.12.4", + "prost 0.12.1", + "prost-types 0.12.1", + "substrait 0.17.0", "tokio", ] @@ -2712,7 +2710,7 @@ dependencies = [ "mito2", "object-store", "pin-project", - "prost", + "prost 0.12.1", "query", "reqwest", "secrecy", @@ -2729,7 +2727,7 @@ dependencies = [ "tokio", "tokio-stream", "toml 0.7.6", - "tonic 0.9.2", + "tonic 0.10.2", "tower", "tower-http", "url", @@ -2976,12 +2974,6 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" -[[package]] -name = "dunce" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" - [[package]] name = "dyn-clone" version = "1.0.13" @@ -3129,11 +3121,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4b0ea5ef6dc2388a4b1669fa32097249bc03a15417b97cb75e38afb309e4a89" dependencies = [ "http", - "prost", + "prost 0.11.9", "tokio", "tokio-stream", "tonic 0.9.2", - "tonic-build", + "tonic-build 0.9.2", "tower", "tower-service", ] @@ -3360,7 +3352,7 @@ dependencies = [ "opentelemetry-proto", "operator", "partition", - "prost", + "prost 0.12.1", "query", "raft-engine", "regex", @@ -3371,7 +3363,7 @@ dependencies = [ "session", "snafu", "sql", - "sqlparser 0.34.0", + "sqlparser 0.38.0 (git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=602d7878c9949e48512251c7f18695a50936e51c)", "storage", "store-api", "strfmt", @@ -3379,7 +3371,7 @@ dependencies = [ "table", "tokio", "toml 0.7.6", - "tonic 0.9.2", + "tonic 0.10.2", "tower", "uuid", ] @@ -3620,557 +3612,17 @@ checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "git2" -version = "0.17.2" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b989d6a7ca95a362cf2cfc5ad688b3a467be1f87e480b8dad07fee8c79b0044" +checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "libc", "libgit2-sys", "log", "url", ] -[[package]] -name = "gix" -version = "0.43.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c256ea71cc1967faaefdaad15f334146b7c806f12460dcafd3afed845c8c78dd" -dependencies = [ - "gix-actor", - "gix-attributes", - "gix-config", - "gix-credentials", - "gix-date", - "gix-diff", - "gix-discover", - "gix-features 0.28.1", - "gix-glob", - "gix-hash 0.10.4", - "gix-hashtable", - "gix-index", - "gix-lock", - "gix-mailmap", - "gix-object", - "gix-odb", - "gix-pack", - "gix-path", - "gix-prompt", - "gix-ref", - "gix-refspec", - "gix-revision", - "gix-sec", - "gix-tempfile", - "gix-traverse", - "gix-url", - "gix-validate", - "gix-worktree", - "log", - "once_cell", - "signal-hook", - "smallvec", - "thiserror", - "unicode-normalization", -] - -[[package]] -name = "gix-actor" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc22b0cdc52237667c301dd7cdc6ead8f8f73c9f824e9942c8ebd6b764f6c0bf" -dependencies = [ - "bstr 1.6.2", - "btoi", - "gix-date", - "itoa", - "nom", - "thiserror", -] - -[[package]] -name = "gix-attributes" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2231a25934a240d0a4b6f4478401c73ee81d8be52de0293eedbc172334abf3e1" -dependencies = [ - "bstr 1.6.2", - "gix-features 0.28.1", - "gix-glob", - "gix-path", - "gix-quote", - "thiserror", - "unicode-bom", -] - -[[package]] -name = "gix-bitmap" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ccab4bc576844ddb51b78d81b4a42d73e6229660fa614dfc3d3999c874d1959" -dependencies = [ - "thiserror", -] - -[[package]] -name = "gix-chunk" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b42ea64420f7994000130328f3c7a2038f639120518870436d31b8bde704493" -dependencies = [ - "thiserror", -] - -[[package]] -name = "gix-command" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f28f654184b5f725c5737c7e4f466cbd8f0102ac352d5257eeab19647ee4256" -dependencies = [ - "bstr 1.6.2", -] - -[[package]] -name = "gix-config" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbad5ce54a8fc997acc50febd89ec80fa6e97cb7f8d0654cb229936407489d8" -dependencies = [ - "bstr 1.6.2", - "gix-config-value", - "gix-features 0.28.1", - "gix-glob", - "gix-path", - "gix-ref", - "gix-sec", - "log", - "memchr", - "nom", - "once_cell", - "smallvec", - "thiserror", - "unicode-bom", -] - -[[package]] -name = "gix-config-value" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09154c0c8677e4da0ec35e896f56ee3e338e741b9599fae06075edd83a4081c" -dependencies = [ - "bitflags 1.3.2", - "bstr 1.6.2", - "gix-path", - "libc", - "thiserror", -] - -[[package]] -name = "gix-credentials" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "750b684197374518ea057e0a0594713e07683faa0a3f43c0f93d97f64130ad8d" -dependencies = [ - "bstr 1.6.2", - "gix-command", - "gix-config-value", - "gix-path", - "gix-prompt", - "gix-sec", - "gix-url", - "thiserror", -] - -[[package]] -name = "gix-date" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96271912ce39822501616f177dea7218784e6c63be90d5f36322ff3a722aae2" -dependencies = [ - "bstr 1.6.2", - "itoa", - "thiserror", - "time 0.3.28", -] - -[[package]] -name = "gix-diff" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "103a0fa79b0d438f5ecb662502f052e530ace4fe1fe8e1c83c0c6da76d728e67" -dependencies = [ - "gix-hash 0.10.4", - "gix-object", - "imara-diff", - "thiserror", -] - -[[package]] -name = "gix-discover" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eba8ba458cb8f4a6c33409b0fe650b1258655175a7ffd1d24fafd3ed31d880b" -dependencies = [ - "bstr 1.6.2", - "dunce", - "gix-hash 0.10.4", - "gix-path", - "gix-ref", - "gix-sec", - "thiserror", -] - -[[package]] -name = "gix-features" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b76f9a80f6dd7be66442ae86e1f534effad9546676a392acc95e269d0c21c22" -dependencies = [ - "crc32fast", - "flate2", - "gix-hash 0.10.4", - "libc", - "once_cell", - "prodash", - "sha1_smol", - "thiserror", - "walkdir", -] - -[[package]] -name = "gix-features" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf69b0f5c701cc3ae22d3204b671907668f6437ca88862d355eaf9bc47a4f897" -dependencies = [ - "gix-hash 0.11.4", - "libc", -] - -[[package]] -name = "gix-fs" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b37a1832f691fdc09910bd267f9a2e413737c1f9ec68c6e31f9e802616278a9" -dependencies = [ - "gix-features 0.29.0", -] - -[[package]] -name = "gix-glob" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e43efd776bc543f46f0fd0ca3d920c37af71a764a16f2aebd89765e9ff2993" -dependencies = [ - "bitflags 1.3.2", - "bstr 1.6.2", -] - -[[package]] -name = "gix-hash" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a258595457bc192d1f1c59d0d168a1e34e2be9b97a614e14995416185de41a7" -dependencies = [ - "hex", - "thiserror", -] - -[[package]] -name = "gix-hash" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b422ff2ad9a0628baaad6da468cf05385bf3f5ab495ad5a33cce99b9f41092f" -dependencies = [ - "hex", - "thiserror", -] - -[[package]] -name = "gix-hashtable" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e55e40dfd694884f0eb78796c5bddcf2f8b295dace47039099dd7e76534973" -dependencies = [ - "gix-hash 0.10.4", - "hashbrown 0.13.2", - "parking_lot 0.12.1", -] - -[[package]] -name = "gix-index" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "717ab601ece7921f59fe86849dbe27d44a46ebb883b5885732c4f30df4996177" -dependencies = [ - "bitflags 1.3.2", - "bstr 1.6.2", - "btoi", - "filetime", - "gix-bitmap", - "gix-features 0.28.1", - "gix-hash 0.10.4", - "gix-lock", - "gix-object", - "gix-traverse", - "itoa", - "memmap2", - "smallvec", - "thiserror", -] - -[[package]] -name = "gix-lock" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c693d7f05730fa74a7c467150adc7cea393518410c65f0672f80226b8111555" -dependencies = [ - "gix-tempfile", - "gix-utils", - "thiserror", -] - -[[package]] -name = "gix-mailmap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b66aea5e52875cd4915f4957a6f4b75831a36981e2ec3f5fad9e370e444fe1a" -dependencies = [ - "bstr 1.6.2", - "gix-actor", - "thiserror", -] - -[[package]] -name = "gix-object" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df068db9180ee935fbb70504848369e270bdcb576b05c0faa8b9fd3b86fc017" -dependencies = [ - "bstr 1.6.2", - "btoi", - "gix-actor", - "gix-features 0.28.1", - "gix-hash 0.10.4", - "gix-validate", - "hex", - "itoa", - "nom", - "smallvec", - "thiserror", -] - -[[package]] -name = "gix-odb" -version = "0.43.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83af2e3e36005bfe010927f0dff41fb5acc3e3d89c6f1174135b3a34086bda2" -dependencies = [ - "arc-swap", - "gix-features 0.28.1", - "gix-hash 0.10.4", - "gix-object", - "gix-pack", - "gix-path", - "gix-quote", - "parking_lot 0.12.1", - "tempfile", - "thiserror", -] - -[[package]] -name = "gix-pack" -version = "0.33.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9401911c7fe032ad7b31c6a6b5be59cb283d1d6c999417a8215056efe6d635f3" -dependencies = [ - "clru", - "gix-chunk", - "gix-diff", - "gix-features 0.28.1", - "gix-hash 0.10.4", - "gix-hashtable", - "gix-object", - "gix-path", - "gix-tempfile", - "gix-traverse", - "memmap2", - "parking_lot 0.12.1", - "smallvec", - "thiserror", -] - -[[package]] -name = "gix-path" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32370dce200bb951df013e03dff35b4233fc7a89458642b047629b91734a7e19" -dependencies = [ - "bstr 1.6.2", - "thiserror", -] - -[[package]] -name = "gix-prompt" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3034d4d935aef2c7bf719aaa54b88c520e82413118d886ae880a31d5bdee57" -dependencies = [ - "gix-command", - "gix-config-value", - "nix 0.26.4", - "parking_lot 0.12.1", - "thiserror", -] - -[[package]] -name = "gix-quote" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475c86a97dd0127ba4465fbb239abac9ea10e68301470c9791a6dd5351cdc905" -dependencies = [ - "bstr 1.6.2", - "btoi", - "thiserror", -] - -[[package]] -name = "gix-ref" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e909396ed3b176823991ccc391c276ae2a015e54edaafa3566d35123cfac9d" -dependencies = [ - "gix-actor", - "gix-features 0.28.1", - "gix-hash 0.10.4", - "gix-lock", - "gix-object", - "gix-path", - "gix-tempfile", - "gix-validate", - "memmap2", - "nom", - "thiserror", -] - -[[package]] -name = "gix-refspec" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aba332462bda2e8efeae4302b39a6ed01ad56ef772fd5b7ef197cf2798294d65" -dependencies = [ - "bstr 1.6.2", - "gix-hash 0.10.4", - "gix-revision", - "gix-validate", - "smallvec", - "thiserror", -] - -[[package]] -name = "gix-revision" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6f6ff53f888858afc24bf12628446a14279ceec148df6194481f306f553ad2" -dependencies = [ - "bstr 1.6.2", - "gix-date", - "gix-hash 0.10.4", - "gix-hashtable", - "gix-object", - "thiserror", -] - -[[package]] -name = "gix-sec" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ffa5bf0772f9b01de501c035b6b084cf9b8bb07dec41e3afc6a17336a65f47" -dependencies = [ - "bitflags 1.3.2", - "dirs", - "gix-path", - "libc", - "windows 0.43.0", -] - -[[package]] -name = "gix-tempfile" -version = "5.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71a0d32f34e71e86586124225caefd78dabc605d0486de580d717653addf182" -dependencies = [ - "gix-fs", - "libc", - "once_cell", - "parking_lot 0.12.1", - "signal-hook", - "signal-hook-registry", - "tempfile", -] - -[[package]] -name = "gix-traverse" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd9a4a07bb22168dc79c60e1a6a41919d198187ca83d8a5940ad8d7122a45df3" -dependencies = [ - "gix-hash 0.10.4", - "gix-hashtable", - "gix-object", - "thiserror", -] - -[[package]] -name = "gix-url" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a22b4b32ad14d68f7b7fb6458fa58d44b01797d94c1b8f4db2d9c7b3c366b5" -dependencies = [ - "bstr 1.6.2", - "gix-features 0.28.1", - "gix-path", - "home", - "thiserror", - "url", -] - -[[package]] -name = "gix-utils" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b85d89dc728613e26e0ed952a19583744e7f5240fcd4aa30d6c824ffd8b52f0f" -dependencies = [ - "fastrand 2.0.0", -] - -[[package]] -name = "gix-validate" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba9b3737b2cef3dcd014633485f0034b0f1a931ee54aeb7d8f87f177f3c89040" -dependencies = [ - "bstr 1.6.2", - "thiserror", -] - -[[package]] -name = "gix-worktree" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ec9a000b4f24af706c3cc680c7cda235656cbe3216336522f5692773b8a301" -dependencies = [ - "bstr 1.6.2", - "gix-attributes", - "gix-features 0.28.1", - "gix-glob", - "gix-hash 0.10.4", - "gix-index", - "gix-object", - "gix-path", - "io-close", - "thiserror", -] - [[package]] name = "glob" version = "0.3.1" @@ -4180,15 +3632,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "greptime-proto" version = "0.1.0" -source = "git+https://github.com/GreptimeTeam/greptime-proto.git?rev=1f1dd532a111e3834cc3019c5605e2993ffb9dc3#1f1dd532a111e3834cc3019c5605e2993ffb9dc3" +source = "git+https://github.com/GreptimeTeam/greptime-proto.git?rev=365922c3581ad954b3b3851af522b0ed0096970c#365922c3581ad954b3b3851af522b0ed0096970c" dependencies = [ - "prost", + "prost 0.12.1", "serde", "serde_json", "strum 0.25.0", "strum_macros 0.25.2", - "tonic 0.9.2", - "tonic-build", + "tonic 0.10.2", + "tonic-build 0.10.2", ] [[package]] @@ -4527,16 +3979,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" -[[package]] -name = "imara-diff" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98c1d0ad70fc91b8b9654b1f33db55e59579d3b3de2bffdced0fdb810570cb8" -dependencies = [ - "ahash 0.8.3", - "hashbrown 0.12.3", -] - [[package]] name = "include_dir" version = "0.7.3" @@ -4647,16 +4089,6 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1be380c410bf0595e94992a648ea89db4dd3f3354ba54af206fd2a68cf5ac8e" -[[package]] -name = "io-close" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cadcf447f06744f8ce713d2d6239bb5bde2c357a452397a9ed90c625da390bc" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "io-lifetimes" version = "1.0.11" @@ -4910,9 +4342,9 @@ checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libgit2-sys" -version = "0.15.2+1.6.4" +version = "0.16.1+1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a80df2e11fb4a61f4ba2ab42dbe7f74468da143f1a75c74e11dee7c813f694fa" +checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" dependencies = [ "cc", "libc", @@ -5298,7 +4730,7 @@ dependencies = [ "table", "tokio", "tokio-stream", - "tonic 0.9.2", + "tonic 0.10.2", "tower", "tracing", "tracing-subscriber", @@ -5339,7 +4771,7 @@ dependencies = [ "metrics", "once_cell", "parking_lot 0.12.1", - "prost", + "prost 0.12.1", "rand", "regex", "serde", @@ -5353,7 +4785,7 @@ dependencies = [ "tokio", "tokio-stream", "toml 0.7.6", - "tonic 0.9.2", + "tonic 0.10.2", "tower", "tracing", "tracing-subscriber", @@ -5538,7 +4970,7 @@ dependencies = [ "object-store", "parquet", "paste", - "prost", + "prost 0.12.1", "regex", "serde", "serde_json", @@ -5680,7 +5112,7 @@ dependencies = [ "smallvec", "subprocess", "thiserror", - "time 0.3.28", + "time", "uuid", ] @@ -5934,15 +5366,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "num_threads" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" -dependencies = [ - "libc", -] - [[package]] name = "number_prefix" version = "0.4.0" @@ -5979,16 +5402,16 @@ dependencies = [ [[package]] name = "object_store" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27c776db4f332b571958444982ff641d2531417a326ca368995073b639205d58" +checksum = "f930c88a43b1c3f6e776dfe495b4afab89882dbc81530c632db2ed65451ebcb4" dependencies = [ "async-trait", "bytes", "chrono", "futures", "humantime", - "itertools 0.10.5", + "itertools 0.11.0", "parking_lot 0.12.1", "percent-encoding", "snafu", @@ -6101,12 +5524,17 @@ dependencies = [ [[package]] name = "opentelemetry" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4b8347cc26099d3aeee044065ecc3ae11469796b4d65d065a23a584ed92a6f" +version = "0.21.0" +source = "git+https://github.com/waynexia/opentelemetry-rust.git?rev=33841b38dda79b15f2024952be5f32533325ca02#33841b38dda79b15f2024952be5f32533325ca02" dependencies = [ - "opentelemetry_api", - "opentelemetry_sdk", + "futures-core", + "futures-sink", + "indexmap 2.0.0", + "js-sys", + "once_cell", + "pin-project-lite", + "thiserror", + "urlencoding", ] [[package]] @@ -6126,15 +5554,13 @@ dependencies = [ [[package]] name = "opentelemetry-proto" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "045f8eea8c0fa19f7d48e7bc3128a39c2e5c533d5c61298c548dfefc1064474c" +version = "0.3.0" +source = "git+https://github.com/waynexia/opentelemetry-rust.git?rev=33841b38dda79b15f2024952be5f32533325ca02#33841b38dda79b15f2024952be5f32533325ca02" dependencies = [ - "futures", - "futures-util", - "opentelemetry 0.19.0", - "prost", - "tonic 0.8.3", + "opentelemetry 0.21.0", + "opentelemetry_sdk", + "prost 0.12.1", + "tonic 0.10.2", ] [[package]] @@ -6146,39 +5572,19 @@ dependencies = [ "opentelemetry 0.17.0", ] -[[package]] -name = "opentelemetry_api" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed41783a5bf567688eb38372f2b7a8530f5a607a4b49d38dd7573236c23ca7e2" -dependencies = [ - "fnv", - "futures-channel", - "futures-util", - "indexmap 1.9.3", - "once_cell", - "pin-project-lite", - "thiserror", - "urlencoding", -] - [[package]] name = "opentelemetry_sdk" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b3a2a91fdbfdd4d212c0dcc2ab540de2c2bcbbd90be17de7a7daf8822d010c1" +version = "0.20.0" +source = "git+https://github.com/waynexia/opentelemetry-rust.git?rev=33841b38dda79b15f2024952be5f32533325ca02#33841b38dda79b15f2024952be5f32533325ca02" dependencies = [ "async-trait", - "crossbeam-channel", - "dashmap", - "fnv", "futures-channel", "futures-executor", "futures-util", + "glob", "once_cell", - "opentelemetry_api", - "percent-encoding", - "rand", + "opentelemetry 0.21.0", + "ordered-float 4.1.1", "thiserror", ] @@ -6226,13 +5632,13 @@ dependencies = [ "session", "snafu", "sql", - "sqlparser 0.34.0", + "sqlparser 0.38.0 (git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=602d7878c9949e48512251c7f18695a50936e51c)", "storage", "store-api", "substrait 0.4.1", "table", "tokio", - "tonic 0.9.2", + "tonic 0.10.2", ] [[package]] @@ -6243,9 +5649,8 @@ checksum = "978aa494585d3ca4ad74929863093e87cac9790d81fe7aba2b3dc2890643a0fc" [[package]] name = "orc-rust" -version = "0.2.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b5b4b473b25ddddd0071cdec7f014cd256a2b14e66a0d92df677a84a777f32" +version = "0.2.42" +source = "git+https://github.com/WenyXu/orc-rs.git?rev=5f6399f759ba30cb46610d06027b507949a117ca#5f6399f759ba30cb46610d06027b507949a117ca" dependencies = [ "arrow", "bytes", @@ -6256,7 +5661,7 @@ dependencies = [ "futures-util", "lazy_static", "paste", - "prost", + "prost 0.11.9", "snafu", "tokio", "zigzag", @@ -6292,6 +5697,15 @@ dependencies = [ "serde", ] +[[package]] +name = "ordered-float" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "536900a8093134cf9ccf00a27deb3532421099e958d9dd431135d0c7543ca1e8" +dependencies = [ + "num-traits", +] + [[package]] name = "ordered-multimap" version = "0.4.3" @@ -6406,9 +5820,9 @@ dependencies = [ [[package]] name = "parquet" -version = "43.0.0" +version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7267a9607c3f955d4d0ac41b88a67cecc0d8d009173ad3da390699a6cb3750" +checksum = "0463cc3b256d5f50408c49a4be3a16674f4c8ceef60941709620a062b1f6bf4d" dependencies = [ "ahash 0.8.3", "arrow-array", @@ -6609,7 +6023,7 @@ dependencies = [ "ring", "stringprep", "thiserror", - "time 0.3.28", + "time", "tokio", "tokio-rustls 0.24.1", "tokio-util", @@ -6856,9 +6270,9 @@ dependencies = [ "nix 0.26.4", "once_cell", "parking_lot 0.12.1", - "prost", - "prost-build", - "prost-derive", + "prost 0.11.9", + "prost-build 0.11.9", + "prost-derive 0.11.9", "protobuf", "sha2", "smallvec", @@ -6990,12 +6404,6 @@ dependencies = [ "rustix 0.36.15", ] -[[package]] -name = "prodash" -version = "23.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9516b775656bc3e8985e19cd4b8c0c0de045095074e453d2c0a513b5f978392d" - [[package]] name = "prometheus" version = "0.13.3" @@ -7041,7 +6449,7 @@ dependencies = [ "greptime-proto", "metrics", "promql-parser", - "prost", + "prost 0.12.1", "query", "session", "snafu", @@ -7069,7 +6477,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" +dependencies = [ + "bytes", + "prost-derive 0.12.1", ] [[package]] @@ -7086,14 +6504,36 @@ dependencies = [ "multimap", "petgraph", "prettyplease 0.1.25", - "prost", - "prost-types", + "prost 0.11.9", + "prost-types 0.11.9", "regex", "syn 1.0.109", "tempfile", "which", ] +[[package]] +name = "prost-build" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bdf592881d821b83d471f8af290226c8d51402259e9bb5be7f9f8bdebbb11ac" +dependencies = [ + "bytes", + "heck", + "itertools 0.11.0", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease 0.2.12", + "prost 0.12.1", + "prost-types 0.12.1", + "regex", + "syn 2.0.29", + "tempfile", + "which", +] + [[package]] name = "prost-derive" version = "0.11.9" @@ -7107,13 +6547,35 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prost-derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" +dependencies = [ + "anyhow", + "itertools 0.11.0", + "proc-macro2", + "quote", + "syn 2.0.29", +] + [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost", + "prost 0.11.9", +] + +[[package]] +name = "prost-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e081b29f63d83a4bc75cfc9f3fe424f9156cf92d8a4f0c9407cce9a1b67327cf" +dependencies = [ + "prost 0.12.1", ] [[package]] @@ -7580,14 +7042,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] -name = "regress" -version = "0.5.0" +name = "regex-syntax" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d995d590bd8ec096d1893f414bf3f5e8b0ee4c9eed9a5642b9766ef2c8e2e8e9" -dependencies = [ - "hashbrown 0.13.2", - "memchr", -] +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "regress" @@ -8116,7 +7574,7 @@ source = "git+https://github.com/discord9/RustPython?rev=9ed5137412#9ed51374125b dependencies = [ "ascii", "bitflags 1.3.2", - "bstr 0.2.17", + "bstr", "cfg-if 1.0.0", "hexf-parse", "itertools 0.10.5", @@ -8151,7 +7609,7 @@ version = "0.2.0" source = "git+https://github.com/discord9/RustPython?rev=9ed5137412#9ed51374125b5f1a9e5cee5dd7e27023b8591f1e" dependencies = [ "bitflags 1.3.2", - "bstr 0.2.17", + "bstr", "itertools 0.10.5", "lz4_flex", "num-bigint", @@ -8304,7 +7762,7 @@ dependencies = [ "ascii", "atty", "bitflags 1.3.2", - "bstr 0.2.17", + "bstr", "caseless", "cfg-if 1.0.0", "chrono", @@ -8744,17 +8202,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_tokenstream" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797ba1d80299b264f3aac68ab5d12e5825a561749db4df7cd7c8083900c5d4e9" -dependencies = [ - "proc-macro2", - "serde", - "syn 1.0.109", -] - [[package]] name = "serde_tokenstream" version = "0.2.0" @@ -8793,7 +8240,7 @@ dependencies = [ "serde", "serde_json", "serde_with_macros", - "time 0.3.28", + "time", ] [[package]] @@ -8883,7 +8330,7 @@ dependencies = [ "postgres-types", "pprof", "promql-parser", - "prost", + "prost 0.12.1", "query", "rand", "regex", @@ -8909,7 +8356,7 @@ dependencies = [ "tokio-rustls 0.24.1", "tokio-stream", "tokio-test", - "tonic 0.9.2", + "tonic 0.10.2", "tonic-reflection", "tower", "tower-http", @@ -8951,12 +8398,6 @@ dependencies = [ "digest", ] -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[package]] name = "sha2" version = "0.10.7" @@ -8993,16 +8434,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -9050,7 +8481,7 @@ dependencies = [ "num-bigint", "num-traits", "thiserror", - "time 0.3.28", + "time", ] [[package]] @@ -9213,7 +8644,7 @@ dependencies = [ "once_cell", "regex", "snafu", - "sqlparser 0.34.0", + "sqlparser 0.38.0 (git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=602d7878c9949e48512251c7f18695a50936e51c)", "sqlparser_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "table", ] @@ -9265,24 +8696,24 @@ dependencies = [ [[package]] name = "sqlparser" -version = "0.34.0" -source = "git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=6cf9d23d5b8fbecd65efc1d9afb7e80ad7a424da#6cf9d23d5b8fbecd65efc1d9afb7e80ad7a424da" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0272b7bb0a225320170c99901b4b5fb3a4384e255a7f2cc228f61e2ba3893e75" dependencies = [ - "lazy_static", "log", - "regex", - "sqlparser 0.35.0", - "sqlparser_derive 0.1.1 (git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=6cf9d23d5b8fbecd65efc1d9afb7e80ad7a424da)", + "sqlparser_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sqlparser" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca597d77c98894be1f965f2e4e2d2a61575d4998088e655476c73715c54b2b43" +version = "0.38.0" +source = "git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=602d7878c9949e48512251c7f18695a50936e51c#602d7878c9949e48512251c7f18695a50936e51c" dependencies = [ + "lazy_static", "log", - "sqlparser_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex", + "sqlparser 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sqlparser_derive 0.1.1 (git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=602d7878c9949e48512251c7f18695a50936e51c)", ] [[package]] @@ -9299,7 +8730,7 @@ dependencies = [ [[package]] name = "sqlparser_derive" version = "0.1.1" -source = "git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=6cf9d23d5b8fbecd65efc1d9afb7e80ad7a424da#6cf9d23d5b8fbecd65efc1d9afb7e80ad7a424da" +source = "git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=602d7878c9949e48512251c7f18695a50936e51c#602d7878c9949e48512251c7f18695a50936e51c" dependencies = [ "proc-macro2", "quote", @@ -9489,7 +8920,7 @@ dependencies = [ "object-store", "parquet", "paste", - "prost", + "prost 0.12.1", "rand", "regex", "serde", @@ -9499,8 +8930,8 @@ dependencies = [ "table", "tokio", "tokio-util", - "tonic 0.9.2", - "tonic-build", + "tonic 0.10.2", + "tonic-build 0.9.2", "uuid", ] @@ -9661,55 +9092,33 @@ dependencies = [ "datatypes", "futures", "promql", - "prost", + "prost 0.12.1", "session", "snafu", - "substrait 0.12.4", + "substrait 0.17.0", "table", "tokio", ] [[package]] name = "substrait" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ae64fb7ad0670c7d6d53d57b1b91beb2212afc30e164cc8edb02d6b2cff32a" -dependencies = [ - "gix", - "heck", - "prettyplease 0.2.12", - "prost", - "prost-build", - "prost-types", - "schemars", - "semver", - "serde", - "serde_json", - "serde_yaml", - "syn 2.0.29", - "typify 0.0.11", - "walkdir", -] - -[[package]] -name = "substrait" -version = "0.12.4" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658f6cbbd29a250869b87e1bb5a4b42db534cacfc1c03284f2536cd36b6c1617" +checksum = "c27c547fb40b6cdf4acd9bae723bb36e9297d586d175c7d31ad9fee4a494c097" dependencies = [ "git2", "heck", "prettyplease 0.2.12", - "prost", - "prost-build", - "prost-types", + "prost 0.12.1", + "prost-build 0.12.1", + "prost-types 0.12.1", "schemars", "semver", "serde", "serde_json", "serde_yaml", "syn 2.0.29", - "typify 0.0.13", + "typify", "walkdir", ] @@ -9946,7 +9355,7 @@ dependencies = [ "operator", "partition", "paste", - "prost", + "prost 0.12.1", "query", "rand", "rstest", @@ -9966,7 +9375,7 @@ dependencies = [ "tempfile", "tokio", "tokio-postgres", - "tonic 0.9.2", + "tonic 0.10.2", "tower", "uuid", ] @@ -10097,16 +9506,6 @@ dependencies = [ "tikv-jemalloc-sys", ] -[[package]] -name = "time" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "time" version = "0.3.28" @@ -10115,8 +9514,6 @@ checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ "deranged", "itoa", - "libc", - "num_threads", "serde", "time-core", "time-macros", @@ -10363,14 +9760,13 @@ dependencies = [ [[package]] name = "tonic" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb" +checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" dependencies = [ - "async-stream", "async-trait", "axum", - "base64 0.13.1", + "base64 0.21.3", "bytes", "futures-core", "futures-util", @@ -10381,31 +9777,26 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost", - "prost-derive", + "prost 0.11.9", "tokio", "tokio-stream", - "tokio-util", "tower", "tower-layer", "tower-service", "tracing", - "tracing-futures", ] [[package]] name = "tonic" -version = "0.9.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" +checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" dependencies = [ "async-stream", "async-trait", "axum", "base64 0.21.3", "bytes", - "futures-core", - "futures-util", "h2", "http", "http-body", @@ -10413,7 +9804,8 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost", + "prost 0.12.1", + "rustls 0.21.7", "rustls-pemfile", "tokio", "tokio-rustls 0.24.1", @@ -10432,22 +9824,35 @@ checksum = "a6fdaae4c2c638bb70fe42803a26fbd6fc6ac8c72f5c59f67ecc2a2dcabf4b07" dependencies = [ "prettyplease 0.1.25", "proc-macro2", - "prost-build", + "prost-build 0.11.9", "quote", "syn 1.0.109", ] +[[package]] +name = "tonic-build" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" +dependencies = [ + "prettyplease 0.2.12", + "proc-macro2", + "prost-build 0.12.1", + "quote", + "syn 2.0.29", +] + [[package]] name = "tonic-reflection" -version = "0.9.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0543d7092032041fbeac1f2c84304537553421a11a623c2301b12ef0264862c7" +checksum = "3fa37c513df1339d197f4ba21d28c918b9ef1ac1768265f11ecb6b7f1cba1b76" dependencies = [ - "prost", - "prost-types", + "prost 0.12.1", + "prost-types 0.12.1", "tokio", "tokio-stream", - "tonic 0.9.2", + "tonic 0.10.2", ] [[package]] @@ -10533,7 +9938,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e" dependencies = [ "crossbeam-channel", - "time 0.3.28", + "time", "tracing-subscriber", ] @@ -10559,7 +9964,7 @@ dependencies = [ "log", "serde", "serde_json", - "time 0.3.28", + "time", "tracing", "tracing-core", "tracing-log", @@ -10693,42 +10098,14 @@ dependencies = [ "syn 2.0.29", ] -[[package]] -name = "typify" -version = "0.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bfde96849e25d7feef1bbf652e9cfc51deb63203fdc07b115b8bc3bcfe20b9" -dependencies = [ - "typify-impl 0.0.11", - "typify-macro 0.0.11", -] - [[package]] name = "typify" version = "0.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be9bb640c0eece20cac2028ebbc2ca1a3d17e3b1ddd98540309c309ed178d158" dependencies = [ - "typify-impl 0.0.13", - "typify-macro 0.0.13", -] - -[[package]] -name = "typify-impl" -version = "0.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95d27d749378ceab6ec22188ed7ad102205c89ddb92ab662371c850ffc71aa1a" -dependencies = [ - "heck", - "log", - "proc-macro2", - "quote", - "regress 0.5.0", - "schemars", - "serde_json", - "syn 1.0.109", - "thiserror", - "unicode-ident", + "typify-impl", + "typify-macro", ] [[package]] @@ -10741,7 +10118,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "regress 0.6.0", + "regress", "schemars", "serde_json", "syn 2.0.29", @@ -10749,22 +10126,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "typify-macro" -version = "0.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35db6fc2bd9220ecdac6eeb88158824b83610de3dda0c6d0f2142b49efd858b0" -dependencies = [ - "proc-macro2", - "quote", - "schemars", - "serde", - "serde_json", - "serde_tokenstream 0.1.7", - "syn 1.0.109", - "typify-impl 0.0.11", -] - [[package]] name = "typify-macro" version = "0.0.13" @@ -10776,9 +10137,9 @@ dependencies = [ "schemars", "serde", "serde_json", - "serde_tokenstream 0.2.0", + "serde_tokenstream", "syn 2.0.29", - "typify-impl 0.0.13", + "typify-impl", ] [[package]] @@ -10942,12 +10303,6 @@ version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" -[[package]] -name = "unicode-bom" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63ec69f541d875b783ca40184d655f2927c95f0bffd486faa83cd3ac3529ec32" - [[package]] name = "unicode-casing" version = "0.1.0" @@ -11096,7 +10451,7 @@ dependencies = [ "getset", "rustversion", "thiserror", - "time 0.3.28", + "time", ] [[package]] @@ -11351,21 +10706,6 @@ dependencies = [ "windows_x86_64_msvc 0.39.0", ] -[[package]] -name = "windows" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04662ed0e3e5630dfa9b26e4cb823b817f1a9addda855d973a9458c236556244" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows" version = "0.48.0" @@ -11649,6 +10989,15 @@ dependencies = [ "zstd-safe 6.0.6", ] +[[package]] +name = "zstd" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" +dependencies = [ + "zstd-safe 7.0.0", +] + [[package]] name = "zstd-safe" version = "5.0.2+zstd.1.5.2" @@ -11669,6 +11018,15 @@ dependencies = [ "zstd-sys", ] +[[package]] +name = "zstd-safe" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" +dependencies = [ + "zstd-sys", +] + [[package]] name = "zstd-sys" version = "2.0.8+zstd.1.5.5" diff --git a/Cargo.toml b/Cargo.toml index 49f275710d4b..b221213fc441 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,25 +61,25 @@ license = "Apache-2.0" [workspace.dependencies] aquamarine = "0.3" -arrow = { version = "43.0" } -arrow-array = "43.0" -arrow-flight = "43.0" -arrow-schema = { version = "43.0", features = ["serde"] } +arrow = { version = "47.0" } +arrow-array = "47.0" +arrow-flight = "47.0" +arrow-schema = { version = "47.0", features = ["serde"] } async-stream = "0.3" async-trait = "0.1" chrono = { version = "0.4", features = ["serde"] } -datafusion = { git = "https://github.com/waynexia/arrow-datafusion.git", rev = "b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" } -datafusion-common = { git = "https://github.com/waynexia/arrow-datafusion.git", rev = "b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" } -datafusion-expr = { git = "https://github.com/waynexia/arrow-datafusion.git", rev = "b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" } -datafusion-optimizer = { git = "https://github.com/waynexia/arrow-datafusion.git", rev = "b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" } -datafusion-physical-expr = { git = "https://github.com/waynexia/arrow-datafusion.git", rev = "b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" } -datafusion-sql = { git = "https://github.com/waynexia/arrow-datafusion.git", rev = "b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" } -datafusion-substrait = { git = "https://github.com/waynexia/arrow-datafusion.git", rev = "b6f3b28b6fe91924cc8dd3d83726b766f2a706ec" } +datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev = "26e43acac3a96cec8dd4c8365f22dfb1a84306e9" } +datafusion-common = { git = "https://github.com/apache/arrow-datafusion.git", rev = "26e43acac3a96cec8dd4c8365f22dfb1a84306e9" } +datafusion-expr = { git = "https://github.com/apache/arrow-datafusion.git", rev = "26e43acac3a96cec8dd4c8365f22dfb1a84306e9" } +datafusion-optimizer = { git = "https://github.com/apache/arrow-datafusion.git", rev = "26e43acac3a96cec8dd4c8365f22dfb1a84306e9" } +datafusion-physical-expr = { git = "https://github.com/apache/arrow-datafusion.git", rev = "26e43acac3a96cec8dd4c8365f22dfb1a84306e9" } +datafusion-sql = { git = "https://github.com/apache/arrow-datafusion.git", rev = "26e43acac3a96cec8dd4c8365f22dfb1a84306e9" } +datafusion-substrait = { git = "https://github.com/apache/arrow-datafusion.git", rev = "26e43acac3a96cec8dd4c8365f22dfb1a84306e9" } derive_builder = "0.12" etcd-client = "0.11" futures = "0.3" futures-util = "0.3" -greptime-proto = { git = "https://github.com/GreptimeTeam/greptime-proto.git", rev = "1f1dd532a111e3834cc3019c5605e2993ffb9dc3" } +greptime-proto = { git = "https://github.com/GreptimeTeam/greptime-proto.git", rev = "365922c3581ad954b3b3851af522b0ed0096970c" } humantime-serde = "1.1" itertools = "0.10" lazy_static = "1.4" @@ -87,10 +87,14 @@ meter-core = { git = "https://github.com/GreptimeTeam/greptime-meter.git", rev = metrics = "0.20" moka = "0.12" once_cell = "1.18" -opentelemetry-proto = { version = "0.2", features = ["gen-tonic", "metrics"] } -parquet = "43.0" +# opentelemetry-proto = { version = "0.2", features = ["gen-tonic", "metrics"] } +opentelemetry-proto = { git = "https://github.com/waynexia/opentelemetry-rust.git", rev = "33841b38dda79b15f2024952be5f32533325ca02", features = [ + "gen-tonic", + "metrics", +] } +parquet = "47.0" paste = "1.0" -prost = "0.11" +prost = "0.12" raft-engine = { git = "https://github.com/tikv/raft-engine.git", rev = "22dfb426cd994602b57725ef080287d3e53db479" } rand = "0.8" regex = "1.8" @@ -103,7 +107,8 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" smallvec = "1" snafu = { version = "0.7", features = ["backtraces"] } -sqlparser = { git = "https://github.com/GreptimeTeam/sqlparser-rs.git", rev = "6cf9d23d5b8fbecd65efc1d9afb7e80ad7a424da", features = [ +# on branch v0.38.x +sqlparser = { git = "https://github.com/GreptimeTeam/sqlparser-rs.git", rev = "602d7878c9949e48512251c7f18695a50936e51c", features = [ "visitor", ] } strum = { version = "0.25", features = ["derive"] } @@ -111,7 +116,7 @@ tempfile = "3" tokio = { version = "1.28", features = ["full"] } tokio-util = { version = "0.7", features = ["io-util", "compat"] } toml = "0.7" -tonic = { version = "0.9", features = ["tls"] } +tonic = { version = "0.10", features = ["tls"] } uuid = { version = "1", features = ["serde", "v4", "fast-rng"] } ## workspaces members api = { path = "src/api" } diff --git a/src/client/Cargo.toml b/src/client/Cargo.toml index 0323a6c4e597..032b34ebd29c 100644 --- a/src/client/Cargo.toml +++ b/src/client/Cargo.toml @@ -41,11 +41,10 @@ tonic.workspace = true common-grpc-expr = { workspace = true } datanode = { workspace = true } derive-new = "0.5" -prost.workspace = true substrait = { workspace = true } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } [dev-dependencies.substrait_proto] package = "substrait" -version = "0.7" +version = "0.17" diff --git a/src/common/datasource/Cargo.toml b/src/common/datasource/Cargo.toml index e6bff6953876..efe6aec63830 100644 --- a/src/common/datasource/Cargo.toml +++ b/src/common/datasource/Cargo.toml @@ -25,7 +25,7 @@ derive_builder.workspace = true futures.workspace = true lazy_static.workspace = true object-store = { workspace = true } -orc-rust = "0.2" +orc-rust = { git = "https://github.com/WenyXu/orc-rs.git", rev = "5f6399f759ba30cb46610d06027b507949a117ca" } paste = "1.0" regex = "1.7" serde.workspace = true diff --git a/src/common/function/src/scalars/math/rate.rs b/src/common/function/src/scalars/math/rate.rs index 6696ea1c0032..4b6e160916df 100644 --- a/src/common/function/src/scalars/math/rate.rs +++ b/src/common/function/src/scalars/math/rate.rs @@ -16,7 +16,8 @@ use std::fmt; use common_query::error::{self, Result}; use common_query::prelude::{Signature, Volatility}; -use datatypes::arrow::compute::kernels::{arithmetic, cast}; +use datafusion::arrow::compute::kernels::numeric; +use datatypes::arrow::compute::kernels::cast; use datatypes::arrow::datatypes::DataType; use datatypes::prelude::*; use datatypes::vectors::{Helper, VectorRef}; @@ -51,11 +52,11 @@ impl Function for RateFunction { let val = &columns[0].to_arrow_array(); let val_0 = val.slice(0, val.len() - 1); let val_1 = val.slice(1, val.len() - 1); - let dv = arithmetic::subtract_dyn(&val_1, &val_0).context(error::ArrowComputeSnafu)?; + let dv = numeric::sub(&val_1, &val_0).context(error::ArrowComputeSnafu)?; let ts = &columns[1].to_arrow_array(); let ts_0 = ts.slice(0, ts.len() - 1); let ts_1 = ts.slice(1, ts.len() - 1); - let dt = arithmetic::subtract_dyn(&ts_1, &ts_0).context(error::ArrowComputeSnafu)?; + let dt = numeric::sub(&ts_1, &ts_0).context(error::ArrowComputeSnafu)?; let dv = cast::cast(&dv, &DataType::Float64).context(error::TypeCastSnafu { typ: DataType::Float64, @@ -63,7 +64,7 @@ impl Function for RateFunction { let dt = cast::cast(&dt, &DataType::Float64).context(error::TypeCastSnafu { typ: DataType::Float64, })?; - let rate = arithmetic::divide_dyn(&dv, &dt).context(error::ArrowComputeSnafu)?; + let rate = numeric::div(&dv, &dt).context(error::ArrowComputeSnafu)?; let v = Helper::try_into_vector(&rate).context(error::FromArrowArraySnafu)?; Ok(v) diff --git a/src/common/grpc/src/flight.rs b/src/common/grpc/src/flight.rs index 9ecaaa6ae8cf..09f75b2c989d 100644 --- a/src/common/grpc/src/flight.rs +++ b/src/common/grpc/src/flight.rs @@ -241,7 +241,7 @@ mod test { .unwrap(); let flight_data = batches_to_flight_data( - arrow_schema, + &arrow_schema, vec![ batch1.clone().into_df_record_batch(), batch2.clone().into_df_record_batch(), diff --git a/src/common/substrait/Cargo.toml b/src/common/substrait/Cargo.toml index 6ebe26fa02c0..206347b5286b 100644 --- a/src/common/substrait/Cargo.toml +++ b/src/common/substrait/Cargo.toml @@ -27,7 +27,7 @@ table = { workspace = true } [dependencies.substrait_proto] package = "substrait" -version = "0.12" +version = "0.17" [dev-dependencies] datatypes = { workspace = true } diff --git a/src/datatypes/src/value.rs b/src/datatypes/src/value.rs index 287a27cb2837..64affdea7061 100644 --- a/src/datatypes/src/value.rs +++ b/src/datatypes/src/value.rs @@ -787,10 +787,11 @@ impl TryFrom for Value { .map(|x| Value::Duration(Duration::new(x, TimeUnit::Nanosecond))) .unwrap_or(Value::Null), ScalarValue::Decimal128(_, _, _) + | ScalarValue::Decimal256(_, _, _) | ScalarValue::Struct(_, _) | ScalarValue::Dictionary(_, _) => { return error::UnsupportedArrowTypeSnafu { - arrow_type: v.get_datatype(), + arrow_type: v.data_type(), } .fail() } diff --git a/src/datatypes/src/vectors/helper.rs b/src/datatypes/src/vectors/helper.rs index 8d3128411259..106aa17d3b16 100644 --- a/src/datatypes/src/vectors/helper.rs +++ b/src/datatypes/src/vectors/helper.rs @@ -219,6 +219,7 @@ impl Helper { ConstantVector::new(Arc::new(IntervalMonthDayNanoVector::from(vec![v])), length) } ScalarValue::Decimal128(_, _, _) + | ScalarValue::Decimal256(_, _, _) | ScalarValue::DurationSecond(_) | ScalarValue::DurationMillisecond(_) | ScalarValue::DurationMicrosecond(_) diff --git a/src/query/src/datafusion.rs b/src/query/src/datafusion.rs index e5822f3c2482..3448bd5994c0 100644 --- a/src/query/src/datafusion.rs +++ b/src/query/src/datafusion.rs @@ -103,7 +103,7 @@ impl DatafusionQueryEngine { query_ctx: QueryContextRef, ) -> Result { ensure!( - matches!(dml.op, WriteOp::Insert | WriteOp::Delete), + matches!(dml.op, WriteOp::InsertInto | WriteOp::Delete), UnsupportedExprSnafu { name: format!("DML op {}", dml.op), } @@ -132,7 +132,7 @@ impl DatafusionQueryEngine { .context(QueryExecutionSnafu)?; let rows = match dml.op { - WriteOp::Insert => { + WriteOp::InsertInto => { self.insert(&table_name, column_vectors, query_ctx.clone()) .await? } diff --git a/src/query/src/dist_plan/commutativity.rs b/src/query/src/dist_plan/commutativity.rs index 4258ef54de1f..5bb125e1ba18 100644 --- a/src/query/src/dist_plan/commutativity.rs +++ b/src/query/src/dist_plan/commutativity.rs @@ -106,6 +106,7 @@ impl Categorizer { LogicalPlan::DescribeTable(_) => Commutativity::Unsupported, LogicalPlan::Dml(_) => Commutativity::Unsupported, LogicalPlan::Ddl(_) => Commutativity::Unsupported, + LogicalPlan::Copy(_) => Commutativity::Unsupported, } } diff --git a/src/query/src/optimizer/type_conversion.rs b/src/query/src/optimizer/type_conversion.rs index debdb881374d..0b47fc2f0f55 100644 --- a/src/query/src/optimizer/type_conversion.rs +++ b/src/query/src/optimizer/type_conversion.rs @@ -105,7 +105,8 @@ impl AnalyzerRule for TypeConversionRule { | LogicalPlan::DescribeTable(_) | LogicalPlan::Unnest(_) | LogicalPlan::Statement(_) - | LogicalPlan::Ddl(_) => Ok(Transformed::No(plan)), + | LogicalPlan::Ddl(_) + | LogicalPlan::Copy(_) => Ok(Transformed::No(plan)), }) } diff --git a/src/query/src/query_engine/state.rs b/src/query/src/query_engine/state.rs index 7bc031d16e9b..22d5c0fec8cf 100644 --- a/src/query/src/query_engine/state.rs +++ b/src/query/src/query_engine/state.rs @@ -27,9 +27,8 @@ use datafusion::dataframe::DataFrame; use datafusion::error::Result as DfResult; use datafusion::execution::context::{QueryPlanner, SessionConfig, SessionState}; use datafusion::execution::runtime_env::RuntimeEnv; -use datafusion::physical_optimizer::dist_enforcement::EnforceDistribution; -use datafusion::physical_optimizer::repartition::Repartition; -use datafusion::physical_optimizer::sort_enforcement::EnforceSorting; +use datafusion::physical_optimizer::enforce_distribution::EnforceDistribution; +use datafusion::physical_optimizer::enforce_sorting::EnforceSorting; use datafusion::physical_optimizer::PhysicalOptimizerRule; use datafusion::physical_plan::ExecutionPlan; use datafusion::physical_planner::{DefaultPhysicalPlanner, ExtensionPlanner, PhysicalPlanner}; @@ -98,17 +97,15 @@ impl QueryEngineState { let state = SessionState::with_config_rt(session_config.clone(), runtime_env.clone()); state.physical_optimizers().to_vec() }; - // run the repartition and sort enforcement rules first. + // run the sort enforcement rules first. // And `EnforceSorting` is required to run after `EnforceDistribution`. Self::remove_physical_optimize_rule(&mut physical_optimizers, EnforceSorting {}.name()); Self::remove_physical_optimize_rule( &mut physical_optimizers, EnforceDistribution {}.name(), ); - Self::remove_physical_optimize_rule(&mut physical_optimizers, Repartition {}.name()); physical_optimizers.insert(0, Arc::new(EnforceSorting {})); physical_optimizers.insert(0, Arc::new(EnforceDistribution {})); - physical_optimizers.insert(0, Arc::new(Repartition {})); let session_state = SessionState::with_config_rt_and_catalog_list( session_config, diff --git a/src/script/src/python/ffi_types/pair_tests.rs b/src/script/src/python/ffi_types/pair_tests.rs index fe3ea978f9be..6ae4ca5df180 100644 --- a/src/script/src/python/ffi_types/pair_tests.rs +++ b/src/script/src/python/ffi_types/pair_tests.rs @@ -17,6 +17,7 @@ mod sample_testcases; use std::collections::HashMap; use std::sync::Arc; +use arrow::compute::kernels::numeric; use common_query::Output; use common_recordbatch::RecordBatch; use datafusion::arrow::array::Float64Array; @@ -140,7 +141,8 @@ fn check_equal(v0: VectorRef, v1: VectorRef) -> bool { let v1 = compute::cast(&v1, &ArrowDataType::Float64).unwrap(); let v1 = v1.as_any().downcast_ref::().unwrap(); - let res = compute::subtract(v0, v1).unwrap(); + let res = numeric::sub(v0, v1).unwrap(); + let res = res.as_any().downcast_ref::().unwrap(); res.iter().all(|v| { if let Some(v) = v { v.abs() <= 2.0 * f32::EPSILON as f64 diff --git a/src/script/src/python/ffi_types/vector.rs b/src/script/src/python/ffi_types/vector.rs index 7b8378f25bb1..4c6ff5f50c43 100644 --- a/src/script/src/python/ffi_types/vector.rs +++ b/src/script/src/python/ffi_types/vector.rs @@ -17,6 +17,8 @@ mod tests; use std::ops::Deref; use std::sync::Arc; +use arrow::array::Datum; +use arrow::compute::kernels::{cmp, numeric}; use datatypes::arrow::array::{ Array, ArrayRef, BooleanArray, Float64Array, Int64Array, UInt64Array, }; @@ -62,25 +64,24 @@ fn to_type_error(vm: &'_ VirtualMachine) -> impl FnOnce(String) -> PyBaseExcepti } /// Performs `val - arr`. -pub(crate) fn arrow_rsub(arr: &dyn Array, val: &dyn Array) -> Result { - arithmetic::subtract_dyn(val, arr).map_err(|e| format!("rsub error: {e}")) +pub(crate) fn arrow_rsub(arr: &dyn Datum, val: &dyn Datum) -> Result { + numeric::sub(val, arr).map_err(|e| format!("rsub error: {e}")) } /// Performs `val / arr` -pub(crate) fn arrow_rtruediv(arr: &dyn Array, val: &dyn Array) -> Result { - arithmetic::divide_dyn(val, arr).map_err(|e| format!("rtruediv error: {e}")) +pub(crate) fn arrow_rtruediv(arr: &dyn Datum, val: &dyn Datum) -> Result { + numeric::div(val, arr).map_err(|e| format!("rtruediv error: {e}")) } /// Performs `val / arr`, but cast to i64. -pub(crate) fn arrow_rfloordiv(arr: &dyn Array, val: &dyn Array) -> Result { - let array = - arithmetic::divide_dyn(val, arr).map_err(|e| format!("rfloordiv divide error: {e}"))?; +pub(crate) fn arrow_rfloordiv(arr: &dyn Datum, val: &dyn Datum) -> Result { + let array = numeric::div(val, arr).map_err(|e| format!("rfloordiv divide error: {e}"))?; compute::cast(&array, &ArrowDataType::Int64).map_err(|e| format!("rfloordiv cast error: {e}")) } -pub(crate) fn wrap_result(f: F) -> impl Fn(&dyn Array, &dyn Array) -> Result +pub(crate) fn wrap_result(f: F) -> impl Fn(&dyn Datum, &dyn Datum) -> Result where - F: Fn(&dyn Array, &dyn Array) -> ArrowResult, + F: Fn(&dyn Datum, &dyn Datum) -> ArrowResult, { move |left, right| f(left, right).map_err(|e| format!("arithmetic error {e}")) } @@ -88,11 +89,11 @@ where #[cfg(feature = "pyo3_backend")] pub(crate) fn wrap_bool_result( op_bool_arr: F, -) -> impl Fn(&dyn Array, &dyn Array) -> Result +) -> impl Fn(&dyn Datum, &dyn Datum) -> Result where - F: Fn(&dyn Array, &dyn Array) -> ArrowResult, + F: Fn(&dyn Datum, &dyn Datum) -> ArrowResult, { - move |a: &dyn Array, b: &dyn Array| -> Result { + move |a: &dyn Datum, b: &dyn Datum| -> Result { let array = op_bool_arr(a, b).map_err(|e| format!("logical op error: {e}"))?; Ok(Arc::new(array)) } @@ -209,7 +210,7 @@ impl PyVector { op: F, ) -> Result where - F: Fn(&dyn Array, &dyn Array) -> Result, + F: Fn(&dyn Datum, &dyn Datum) -> Result, { let right_type = right.data_type().as_arrow_type(); // assuming they are all 64 bit type if possible @@ -252,7 +253,7 @@ impl PyVector { )); }; - let result = op(left.as_ref(), right.as_ref())?; + let result = op(&left, &right.as_ref())?; Ok(Helper::try_into_vector(result.clone()) .map_err(|e| format!("Can't cast result into vector, result: {result:?}, err: {e:?}",))? @@ -267,7 +268,7 @@ impl PyVector { vm: &VirtualMachine, ) -> PyResult where - F: Fn(&dyn Array, &dyn Array) -> Result, + F: Fn(&dyn Datum, &dyn Datum) -> Result, { // the right operand only support PyInt or PyFloat, let right = { @@ -313,7 +314,7 @@ impl PyVector { op: F, ) -> Result where - F: Fn(&dyn Array, &dyn Array) -> Result, + F: Fn(&dyn Datum, &dyn Datum) -> Result, { let left = self.to_arrow_array(); let right = right.to_arrow_array(); @@ -326,7 +327,7 @@ impl PyVector { let left = cast(left, &target_type)?; let right = cast(right, &target_type)?; - let result = op(left.as_ref(), right.as_ref())?; + let result = op(&left, &right)?; Ok(Helper::try_into_vector(result.clone()) .map_err(|e| format!("Can't cast result into vector, result: {result:?}, err: {e:?}",))? @@ -341,7 +342,7 @@ impl PyVector { vm: &VirtualMachine, ) -> PyResult where - F: Fn(&dyn Array, &dyn Array) -> Result, + F: Fn(&dyn Datum, &dyn Datum) -> Result, { let right = other.downcast_ref::().ok_or_else(|| { vm.new_type_error(format!( @@ -453,17 +454,17 @@ impl PyVector { } /// get corresponding arrow op function according to given PyComaprsionOp -fn get_arrow_op(op: PyComparisonOp) -> impl Fn(&dyn Array, &dyn Array) -> ArrowResult { +fn get_arrow_op(op: PyComparisonOp) -> impl Fn(&dyn Datum, &dyn Datum) -> ArrowResult { let op_bool_arr = match op { - PyComparisonOp::Eq => comparison::eq_dyn, - PyComparisonOp::Ne => comparison::neq_dyn, - PyComparisonOp::Gt => comparison::gt_dyn, - PyComparisonOp::Lt => comparison::lt_dyn, - PyComparisonOp::Ge => comparison::gt_eq_dyn, - PyComparisonOp::Le => comparison::lt_eq_dyn, + PyComparisonOp::Eq => cmp::eq, + PyComparisonOp::Ne => cmp::neq, + PyComparisonOp::Gt => cmp::gt, + PyComparisonOp::Lt => cmp::lt, + PyComparisonOp::Ge => cmp::gt_eq, + PyComparisonOp::Le => cmp::lt_eq, }; - move |a: &dyn Array, b: &dyn Array| -> ArrowResult { + move |a: &dyn Datum, b: &dyn Datum| -> ArrowResult { let array = op_bool_arr(a, b)?; Ok(Arc::new(array)) } @@ -472,17 +473,17 @@ fn get_arrow_op(op: PyComparisonOp) -> impl Fn(&dyn Array, &dyn Array) -> ArrowR /// get corresponding arrow scalar op function according to given PyComaprsionOp fn get_arrow_scalar_op( op: PyComparisonOp, -) -> impl Fn(&dyn Array, &dyn Array) -> Result { +) -> impl Fn(&dyn Datum, &dyn Datum) -> Result { let op_bool_arr = match op { - PyComparisonOp::Eq => comparison::eq_dyn, - PyComparisonOp::Ne => comparison::neq_dyn, - PyComparisonOp::Gt => comparison::gt_dyn, - PyComparisonOp::Lt => comparison::lt_dyn, - PyComparisonOp::Ge => comparison::gt_eq_dyn, - PyComparisonOp::Le => comparison::lt_eq_dyn, + PyComparisonOp::Eq => cmp::eq, + PyComparisonOp::Ne => cmp::neq, + PyComparisonOp::Gt => cmp::gt, + PyComparisonOp::Lt => cmp::lt, + PyComparisonOp::Ge => cmp::gt_eq, + PyComparisonOp::Le => cmp::lt_eq, }; - move |a: &dyn Array, b: &dyn Array| -> Result { + move |a: &dyn Datum, b: &dyn Datum| -> Result { let array = op_bool_arr(a, b).map_err(|e| format!("scalar op error: {e}"))?; Ok(Arc::new(array)) } diff --git a/src/script/src/python/pyo3/builtins.rs b/src/script/src/python/pyo3/builtins.rs index 20d1c3644159..6051a5307b99 100644 --- a/src/script/src/python/pyo3/builtins.rs +++ b/src/script/src/python/pyo3/builtins.rs @@ -90,7 +90,7 @@ pub(crate) fn greptime_builtins(_py: Python<'_>, m: &PyModule) -> PyResult<()> { floor, ceil, round, - trunc, + // trunc, abs, signum, exp, @@ -281,7 +281,8 @@ fn sqrt(py: Python<'_>, val: PyObject) -> PyResult { ``` */ bind_call_unary_math_function!( - sqrt, sin, cos, tan, asin, acos, atan, floor, ceil, trunc, abs, signum, exp, ln, log2, log10 + sqrt, sin, cos, tan, asin, acos, atan, floor, ceil, abs, signum, exp, ln, log2, + log10 // trunc, ); /// return a random vector range from 0 to 1 and length of len diff --git a/src/script/src/python/pyo3/vector_impl.rs b/src/script/src/python/pyo3/vector_impl.rs index d50694a88bf7..b071defe57eb 100644 --- a/src/script/src/python/pyo3/vector_impl.rs +++ b/src/script/src/python/pyo3/vector_impl.rs @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use arrow::array::{make_array, ArrayData}; +use arrow::array::{make_array, ArrayData, Datum}; +use arrow::compute::kernels::{cmp, numeric}; use arrow::pyarrow::{FromPyArrow, ToPyArrow}; use datafusion::arrow::array::BooleanArray; use datafusion::arrow::compute; @@ -65,7 +66,7 @@ impl PyVector { op: F, ) -> PyResult where - F: Fn(&dyn Array, &dyn Array) -> Result + Send, + F: Fn(&dyn Datum, &dyn Datum) -> Result + Send, { let right = pyo3_obj_try_to_typed_val(right.as_ref(py), None)?; py.allow_threads(|| { @@ -81,7 +82,7 @@ impl PyVector { op: F, ) -> PyResult where - F: Fn(&dyn Array, &dyn Array) -> Result + Send, + F: Fn(&dyn Datum, &dyn Datum) -> Result + Send, { let right = right.extract::(py)?; py.allow_threads(|| { @@ -123,12 +124,12 @@ impl PyVector { } fn __richcmp__(&self, py: Python<'_>, other: PyObject, op: CompareOp) -> PyResult { let op_fn = match op { - CompareOp::Lt => comparison::lt_dyn, - CompareOp::Le => comparison::lt_eq_dyn, - CompareOp::Eq => comparison::eq_dyn, - CompareOp::Ne => comparison::neq_dyn, - CompareOp::Gt => comparison::gt_dyn, - CompareOp::Ge => comparison::gt_eq_dyn, + CompareOp::Lt => cmp::lt, + CompareOp::Le => cmp::lt_eq, + CompareOp::Eq => cmp::eq, + CompareOp::Ne => cmp::neq, + CompareOp::Gt => cmp::gt, + CompareOp::Ge => cmp::gt_eq, }; if pyo3_is_obj_scalar(other.as_ref(py)) { self.pyo3_scalar_arith_op(py, other, None, wrap_bool_result(op_fn)) @@ -139,9 +140,9 @@ impl PyVector { fn __add__(&self, py: Python<'_>, other: PyObject) -> PyResult { if pyo3_is_obj_scalar(other.as_ref(py)) { - self.pyo3_scalar_arith_op(py, other, None, wrap_result(arithmetic::add_dyn)) + self.pyo3_scalar_arith_op(py, other, None, wrap_result(numeric::add)) } else { - self.pyo3_vector_arith_op(py, other, None, wrap_result(arithmetic::add_dyn)) + self.pyo3_vector_arith_op(py, other, None, wrap_result(numeric::add)) } } fn __radd__(&self, py: Python<'_>, other: PyObject) -> PyResult { @@ -150,33 +151,23 @@ impl PyVector { fn __sub__(&self, py: Python<'_>, other: PyObject) -> PyResult { if pyo3_is_obj_scalar(other.as_ref(py)) { - self.pyo3_scalar_arith_op(py, other, None, wrap_result(arithmetic::subtract_dyn)) + self.pyo3_scalar_arith_op(py, other, None, wrap_result(numeric::sub)) } else { - self.pyo3_vector_arith_op(py, other, None, wrap_result(arithmetic::subtract_dyn)) + self.pyo3_vector_arith_op(py, other, None, wrap_result(numeric::sub)) } } fn __rsub__(&self, py: Python<'_>, other: PyObject) -> PyResult { if pyo3_is_obj_scalar(other.as_ref(py)) { - self.pyo3_scalar_arith_op( - py, - other, - None, - wrap_result(|a, b| arithmetic::subtract_dyn(b, a)), - ) + self.pyo3_scalar_arith_op(py, other, None, wrap_result(|a, b| numeric::sub(b, a))) } else { - self.pyo3_vector_arith_op( - py, - other, - None, - wrap_result(|a, b| arithmetic::subtract_dyn(b, a)), - ) + self.pyo3_vector_arith_op(py, other, None, wrap_result(|a, b| numeric::sub(b, a))) } } fn __mul__(&self, py: Python<'_>, other: PyObject) -> PyResult { if pyo3_is_obj_scalar(other.as_ref(py)) { - self.pyo3_scalar_arith_op(py, other, None, wrap_result(arithmetic::multiply_dyn)) + self.pyo3_scalar_arith_op(py, other, None, wrap_result(numeric::mul)) } else { - self.pyo3_vector_arith_op(py, other, None, wrap_result(arithmetic::multiply_dyn)) + self.pyo3_vector_arith_op(py, other, None, wrap_result(numeric::mul)) } } fn __rmul__(&self, py: Python<'_>, other: PyObject) -> PyResult { @@ -188,14 +179,14 @@ impl PyVector { py, other, Some(ArrowDataType::Float64), - wrap_result(arithmetic::divide_dyn), + wrap_result(numeric::div), ) } else { self.pyo3_vector_arith_op( py, other, Some(ArrowDataType::Float64), - wrap_result(arithmetic::divide_dyn), + wrap_result(numeric::div), ) } } @@ -208,7 +199,7 @@ impl PyVector { py, other, Some(ArrowDataType::Float64), - wrap_result(|a, b| arithmetic::divide_dyn(b, a)), + wrap_result(|a, b| numeric::div(b, a)), ) } } @@ -219,14 +210,14 @@ impl PyVector { py, other, Some(ArrowDataType::Int64), - wrap_result(arithmetic::divide_dyn), + wrap_result(numeric::div), ) } else { self.pyo3_vector_arith_op( py, other, Some(ArrowDataType::Int64), - wrap_result(arithmetic::divide_dyn), + wrap_result(numeric::div), ) } } @@ -239,7 +230,7 @@ impl PyVector { py, other, Some(ArrowDataType::Int64), - wrap_result(|a, b| arithmetic::divide_dyn(b, a)), + wrap_result(|a, b| numeric::div(b, a)), ) } } diff --git a/src/script/src/python/rspython/builtins.rs b/src/script/src/python/rspython/builtins.rs index 6b5e88f830d4..baf04b754894 100644 --- a/src/script/src/python/rspython/builtins.rs +++ b/src/script/src/python/rspython/builtins.rs @@ -553,11 +553,11 @@ pub(crate) mod greptime_builtin { try_into_py_obj(DFColValue::Array(result), vm) } - /// simple math function, the backing implement is datafusion's `trunc` math function - #[pyfunction] - fn trunc(val: PyObjectRef, vm: &VirtualMachine) -> PyResult { - bind_call_unary_math_function!(trunc, vm, val); - } + // /// simple math function, the backing implement is datafusion's `trunc` math function + // #[pyfunction] + // fn trunc(val: PyObjectRef, vm: &VirtualMachine) -> PyResult { + // bind_call_unary_math_function!(trunc, vm, val); + // } /// simple math function, the backing implement is datafusion's `abs` math function #[pyfunction] diff --git a/src/script/src/python/rspython/vector_impl.rs b/src/script/src/python/rspython/vector_impl.rs index 2f373c1c3bc4..a543c8295f21 100644 --- a/src/script/src/python/rspython/vector_impl.rs +++ b/src/script/src/python/rspython/vector_impl.rs @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +use arrow::compute::kernels::numeric; use common_time::date::Date; use common_time::datetime::DateTime; use common_time::timestamp::Timestamp; use crossbeam_utils::atomic::AtomicCell; use datatypes::arrow::array::{Array, BooleanArray}; use datatypes::arrow::compute; -use datatypes::arrow::compute::kernels::arithmetic; use datatypes::arrow::datatypes::DataType as ArrowDataType; use datatypes::data_type::{ConcreteDataType, DataType}; use datatypes::value::{self, OrderedFloat}; @@ -92,9 +92,9 @@ impl PyVector { fn add(zelf: PyObjectRef, other: PyObjectRef, vm: &VirtualMachine) -> PyResult { let zelf = obj_cast_to::(zelf, vm)?; if rspy_is_pyobj_scalar(&other, vm) { - zelf.rspy_scalar_arith_op(other, None, wrap_result(arithmetic::add_dyn), vm) + zelf.rspy_scalar_arith_op(other, None, wrap_result(numeric::add), vm) } else { - zelf.rspy_vector_arith_op(other, None, wrap_result(arithmetic::add_dyn), vm) + zelf.rspy_vector_arith_op(other, None, wrap_result(numeric::add), vm) } } @@ -102,9 +102,9 @@ impl PyVector { fn sub(zelf: PyObjectRef, other: PyObjectRef, vm: &VirtualMachine) -> PyResult { let zelf = obj_cast_to::(zelf, vm)?; if rspy_is_pyobj_scalar(&other, vm) { - zelf.rspy_scalar_arith_op(other, None, wrap_result(arithmetic::subtract_dyn), vm) + zelf.rspy_scalar_arith_op(other, None, wrap_result(numeric::sub), vm) } else { - zelf.rspy_vector_arith_op(other, None, wrap_result(arithmetic::subtract_dyn), vm) + zelf.rspy_vector_arith_op(other, None, wrap_result(numeric::sub), vm) } } @@ -114,12 +114,7 @@ impl PyVector { if rspy_is_pyobj_scalar(&other, vm) { zelf.rspy_scalar_arith_op(other, None, arrow_rsub, vm) } else { - zelf.rspy_vector_arith_op( - other, - None, - wrap_result(|a, b| arithmetic::subtract_dyn(b, a)), - vm, - ) + zelf.rspy_vector_arith_op(other, None, wrap_result(|a, b| numeric::sub(b, a)), vm) } } @@ -128,9 +123,9 @@ impl PyVector { fn mul(zelf: PyObjectRef, other: PyObjectRef, vm: &VirtualMachine) -> PyResult { let zelf = obj_cast_to::(zelf, vm)?; if rspy_is_pyobj_scalar(&other, vm) { - zelf.rspy_scalar_arith_op(other, None, wrap_result(arithmetic::multiply_dyn), vm) + zelf.rspy_scalar_arith_op(other, None, wrap_result(numeric::mul), vm) } else { - zelf.rspy_vector_arith_op(other, None, wrap_result(arithmetic::multiply_dyn), vm) + zelf.rspy_vector_arith_op(other, None, wrap_result(numeric::mul), vm) } } @@ -141,14 +136,14 @@ impl PyVector { zelf.rspy_scalar_arith_op( other, Some(ArrowDataType::Float64), - wrap_result(arithmetic::divide_dyn), + wrap_result(numeric::div), vm, ) } else { zelf.rspy_vector_arith_op( other, Some(ArrowDataType::Float64), - wrap_result(arithmetic::divide_dyn), + wrap_result(numeric::div), vm, ) } @@ -162,7 +157,7 @@ impl PyVector { self.rspy_vector_arith_op( other, Some(ArrowDataType::Float64), - wrap_result(|a, b| arithmetic::divide_dyn(b, a)), + wrap_result(|a, b| numeric::div(b, a)), vm, ) } @@ -175,14 +170,14 @@ impl PyVector { zelf.rspy_scalar_arith_op( other, Some(ArrowDataType::Int64), - wrap_result(arithmetic::divide_dyn), + wrap_result(numeric::div), vm, ) } else { zelf.rspy_vector_arith_op( other, Some(ArrowDataType::Int64), - wrap_result(arithmetic::divide_dyn), + wrap_result(numeric::div), vm, ) } @@ -197,7 +192,7 @@ impl PyVector { self.rspy_vector_arith_op( other, Some(ArrowDataType::Int64), - wrap_result(|a, b| arithmetic::divide_dyn(b, a)), + wrap_result(|a, b| numeric::div(b, a)), vm, ) } diff --git a/src/servers/Cargo.toml b/src/servers/Cargo.toml index 962375a2a255..6c8623a6927b 100644 --- a/src/servers/Cargo.toml +++ b/src/servers/Cargo.toml @@ -90,7 +90,7 @@ table = { workspace = true } tokio-rustls = "0.24" tokio-stream = { version = "0.1", features = ["net"] } tokio.workspace = true -tonic-reflection = "0.9" +tonic-reflection = "0.10" tonic.workspace = true tower = { version = "0.4", features = ["full"] } tower-http = { version = "0.3", features = ["full"] } diff --git a/src/sql/src/parsers/explain_parser.rs b/src/sql/src/parsers/explain_parser.rs index 701f137fffba..02825b8374d4 100644 --- a/src/sql/src/parsers/explain_parser.rs +++ b/src/sql/src/parsers/explain_parser.rs @@ -37,7 +37,9 @@ impl<'a> ParserContext<'a> { #[cfg(test)] mod tests { - use sqlparser::ast::{Query as SpQuery, Statement as SpStatement, WildcardAdditionalOptions}; + use sqlparser::ast::{ + GroupByExpr, Query as SpQuery, Statement as SpStatement, WildcardAdditionalOptions, + }; use super::*; use crate::dialect::GreptimeDbDialect; @@ -62,12 +64,14 @@ mod tests { alias: None, args: None, with_hints: vec![], + partitions: vec![], + version: None, }, joins: vec![], }], lateral_views: vec![], selection: None, - group_by: vec![], + group_by: GroupByExpr::Expressions(vec![]), cluster_by: vec![], distribute_by: vec![], sort_by: vec![], diff --git a/src/table/src/predicate.rs b/src/table/src/predicate.rs index cfb3b066a8d6..0e0ab420a333 100644 --- a/src/table/src/predicate.rs +++ b/src/table/src/predicate.rs @@ -330,7 +330,9 @@ impl<'a> TimeRangePredicateBuilder<'a> { | Operator::BitwiseXor | Operator::BitwiseShiftRight | Operator::BitwiseShiftLeft - | Operator::StringConcat => None, + | Operator::StringConcat + | Operator::ArrowAt + | Operator::AtArrow => None, } } From 1a1e583e0f47ea466d1e49a74a8f90244bf64fb2 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Wed, 25 Oct 2023 15:44:19 +0800 Subject: [PATCH 02/12] fix nextest Signed-off-by: Ruihang Xia --- src/datatypes/src/vectors/null.rs | 24 +++++++------------ src/query/src/datafusion.rs | 2 +- src/query/src/dist_plan/merge_scan.rs | 8 +++---- src/query/src/parser.rs | 6 +++-- .../ffi_types/pair_tests/sample_testcases.rs | 11 --------- src/script/src/python/rspython/builtins.rs | 1 + .../python/rspython/builtins/testcases.ron | 21 ---------------- .../src/statements/transform/type_alias.rs | 4 ++-- src/table/src/table/scan.rs | 4 +++- tests-integration/src/tests/instance_test.rs | 2 +- 10 files changed, 24 insertions(+), 59 deletions(-) diff --git a/src/datatypes/src/vectors/null.rs b/src/datatypes/src/vectors/null.rs index 88c6185eef6a..1b1a8d3be7b2 100644 --- a/src/datatypes/src/vectors/null.rs +++ b/src/datatypes/src/vectors/null.rs @@ -16,7 +16,7 @@ use std::any::Any; use std::fmt; use std::sync::Arc; -use arrow::array::{Array, ArrayData, ArrayRef, NullArray}; +use arrow::array::{Array, ArrayRef, NullArray}; use snafu::{ensure, OptionExt}; use crate::data_type::ConcreteDataType; @@ -44,10 +44,6 @@ impl NullVector { pub(crate) fn as_arrow(&self) -> &dyn Array { &self.array } - - fn to_array_data(&self) -> ArrayData { - self.array.to_data() - } } impl From for NullVector { @@ -74,14 +70,11 @@ impl Vector for NullVector { } fn to_arrow_array(&self) -> ArrayRef { - // TODO(yingwen): Replaced by clone after upgrading to arrow 28.0. - let data = self.to_array_data(); - Arc::new(NullArray::from(data)) + Arc::new(self.array.clone()) } fn to_boxed_arrow_array(&self) -> Box { - let data = self.to_array_data(); - Box::new(NullArray::from(data)) + Box::new(self.array.clone()) } fn validity(&self) -> Validity { @@ -93,7 +86,7 @@ impl Vector for NullVector { } fn null_count(&self) -> usize { - self.array.null_count() + self.array.len() } fn is_null(&self, _row: usize) -> bool { @@ -225,12 +218,11 @@ mod tests { assert_eq!(v.len(), 32); assert_eq!(0, v.memory_size()); - let arrow_arr = v.to_arrow_array(); - assert_eq!(arrow_arr.null_count(), 32); + assert_eq!(v.null_count(), 32); - let array2 = arrow_arr.slice(8, 16); - assert_eq!(array2.len(), 16); - assert_eq!(array2.null_count(), 16); + let vector2 = v.slice(8, 16); + assert_eq!(vector2.len(), 16); + assert_eq!(vector2.null_count(), 16); assert_eq!("NullVector", v.vector_type_name()); assert!(!v.is_const()); diff --git a/src/query/src/datafusion.rs b/src/query/src/datafusion.rs index 3448bd5994c0..8798285a6b6c 100644 --- a/src/query/src/datafusion.rs +++ b/src/query/src/datafusion.rs @@ -634,7 +634,7 @@ mod tests { true ) ); - assert_eq!("Limit: skip=0, fetch=20\n Aggregate: groupBy=[[]], aggr=[[SUM(numbers.number)]]\n TableScan: numbers projection=[number]", format!("{}", logical_plan.display_indent())); + assert_eq!("Limit: skip=0, fetch=20\n Aggregate: groupBy=[[]], aggr=[[SUM(CAST(numbers.number AS UInt64))]]\n TableScan: numbers projection=[number]", format!("{}", logical_plan.display_indent())); } #[tokio::test] diff --git a/src/query/src/dist_plan/merge_scan.rs b/src/query/src/dist_plan/merge_scan.rs index cc06f84d82f0..b47bf1949be6 100644 --- a/src/query/src/dist_plan/merge_scan.rs +++ b/src/query/src/dist_plan/merge_scan.rs @@ -32,7 +32,7 @@ use datafusion::physical_plan::metrics::{ Count, ExecutionPlanMetricsSet, MetricBuilder, MetricsSet, Time, }; use datafusion::physical_plan::{DisplayAs, DisplayFormatType, ExecutionPlan, Partitioning}; -use datafusion_common::{DataFusionError, Result, Statistics}; +use datafusion_common::{Result, Statistics}; use datafusion_expr::{Extension, LogicalPlan, UserDefinedLogicalNodeCore}; use datafusion_physical_expr::PhysicalSortExpr; use datatypes::schema::{Schema, SchemaRef}; @@ -263,13 +263,13 @@ impl ExecutionPlan for MergeScanExec { vec![] } + // DataFusion will swap children unconditionally. + // But since this node is leaf node, it's safe to just return self. fn with_new_children( self: Arc, _children: Vec>, ) -> Result> { - Err(DataFusionError::Execution( - "should not call `with_new_children` on MergeScanExec".to_string(), - )) + Ok(self.clone()) } fn execute( diff --git a/src/query/src/parser.rs b/src/query/src/parser.rs index a30f68392d39..92113290c8fb 100644 --- a/src/query/src/parser.rs +++ b/src/query/src/parser.rs @@ -256,12 +256,14 @@ mod test { ), \ alias: None, \ args: None, \ - with_hints: [] \ + with_hints: [], \ + version: None, \ + partitions: [] \ }, \ joins: [] }], \ lateral_views: [], \ selection: None, \ - group_by: [], \ + group_by: Expressions([]), \ cluster_by: [], \ distribute_by: [], \ sort_by: [], \ diff --git a/src/script/src/python/ffi_types/pair_tests/sample_testcases.rs b/src/script/src/python/ffi_types/pair_tests/sample_testcases.rs index 8902fcd7c9af..4c3a4f09e8f7 100644 --- a/src/script/src/python/ffi_types/pair_tests/sample_testcases.rs +++ b/src/script/src/python/ffi_types/pair_tests/sample_testcases.rs @@ -988,17 +988,6 @@ ret"# .to_string(), expect: vector!(Float64Vector, [0.0, 1.0, 1.0,]), }, - CodeBlockTestCase { - input: ronish! { - "values": vector!(Float64Vector, [0.3, 0.5, 1.1]) - }, - script: r#" -from greptime import * -ret = trunc(values) -ret"# - .to_string(), - expect: vector!(Float64Vector, [0.0, 0.0, 1.0,]), - }, CodeBlockTestCase { input: ronish! { "values": vector!(Float64Vector, [-0.3, 0.5, -1.1]) diff --git a/src/script/src/python/rspython/builtins.rs b/src/script/src/python/rspython/builtins.rs index baf04b754894..5d956bfe716b 100644 --- a/src/script/src/python/rspython/builtins.rs +++ b/src/script/src/python/rspython/builtins.rs @@ -553,6 +553,7 @@ pub(crate) mod greptime_builtin { try_into_py_obj(DFColValue::Array(result), vm) } + // // /// simple math function, the backing implement is datafusion's `trunc` math function // #[pyfunction] // fn trunc(val: PyObjectRef, vm: &VirtualMachine) -> PyResult { diff --git a/src/script/src/python/rspython/builtins/testcases.ron b/src/script/src/python/rspython/builtins/testcases.ron index 5254678ebfa0..8e637c6ed851 100644 --- a/src/script/src/python/rspython/builtins/testcases.ron +++ b/src/script/src/python/rspython/builtins/testcases.ron @@ -217,27 +217,6 @@ round(values)"#, ty: Float64 )) ), - TestCase( - input: { - "values": Var( - ty: Float64, - value: FloatVec([0.3, 0.5, 1.1]) - ) - }, - script: r#" -from greptime import * -trunc(values)"#, - expect: Ok(( - value: FloatVec( - [ - 0.0, - 0.0, - 1.0, - ], - ), - ty: Float64 - )) - ), TestCase( input: { "values": Var( diff --git a/src/sql/src/statements/transform/type_alias.rs b/src/sql/src/statements/transform/type_alias.rs index b86babd41488..e6a99ec85dec 100644 --- a/src/sql/src/statements/transform/type_alias.rs +++ b/src/sql/src/statements/transform/type_alias.rs @@ -324,7 +324,7 @@ CREATE TABLE data_types ( Statement::CreateTable(c) => { let expected = r#"CREATE TABLE data_types ( s STRING, - tint TINYINT, + tint INT8, sint SMALLINT, i INT, bint BIGINT, @@ -338,7 +338,7 @@ CREATE TABLE data_types ( ts0 TIMESTAMP(0), ts3 TIMESTAMP(3), ts6 TIMESTAMP(6), - ts9 TIMESTAMP(9) DEFAULT CURRENT_TIMESTAMP() NOT NULL, + ts9 TIMESTAMP(9) DEFAULT CURRENT_TIMESTAMP NOT NULL, TIME INDEX (ts9), PRIMARY KEY (s) ) diff --git a/src/table/src/table/scan.rs b/src/table/src/table/scan.rs index 6e04f92d0e1e..e2843891cba9 100644 --- a/src/table/src/table/scan.rs +++ b/src/table/src/table/scan.rs @@ -89,7 +89,9 @@ impl PhysicalPlan for StreamScanAdapter { } fn with_new_children(&self, _children: Vec) -> QueryResult { - unimplemented!() + Ok(Arc::new(Self::new( + self.stream.lock().unwrap().take().unwrap(), + ))) } fn execute( diff --git a/tests-integration/src/tests/instance_test.rs b/tests-integration/src/tests/instance_test.rs index 3e4073bb73a8..5e0ecf62af44 100644 --- a/tests-integration/src/tests/instance_test.rs +++ b/tests-integration/src/tests/instance_test.rs @@ -1337,7 +1337,7 @@ async fn test_insert_with_default_value_for_type(instance: Arc, type_n let create_sql = format!( r#"create table {table_name}( host string, - ts {type_name} DEFAULT CURRENT_TIMESTAMP, + ts {type_name} DEFAULT CURRENT_TIMESTAMP(), cpu double default 0, TIME INDEX (ts), PRIMARY KEY(host) From 89bc195e4c4b4b61753a7e451f79c3b15d3acd3b Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Wed, 25 Oct 2023 16:05:23 +0800 Subject: [PATCH 03/12] trivial changes Signed-off-by: Ruihang Xia --- tests/cases/standalone/common/basic.result | 12 +- tests/cases/standalone/common/basic.sql | 2 +- .../standalone/common/create/create.result | 2 +- .../cases/standalone/common/create/create.sql | 2 +- .../common/create/create_type_alias.sql | 2 +- .../common/insert/insert_default.result | 2 +- .../common/insert/insert_default.sql | 2 +- .../common/order/limit_union.result | 10 +- .../common/parser/operator_precedence.result | 40 ++--- .../standalone/common/range/error.result | 3 +- .../common/types/float/nan_ordering.result | 40 ++--- .../types/string/scan_big_varchar.result | 160 +++++++++--------- .../types/timestamp/timestamp_join.result | 10 +- .../types/timestamp/timestamp_types.result | 42 ++--- .../standalone/optimizer/order_by.result | 4 +- 15 files changed, 167 insertions(+), 166 deletions(-) diff --git a/tests/cases/standalone/common/basic.result b/tests/cases/standalone/common/basic.result index b86ca616baa8..873f15e01bdc 100644 --- a/tests/cases/standalone/common/basic.result +++ b/tests/cases/standalone/common/basic.result @@ -4,7 +4,7 @@ CREATE TABLE system_metrics ( cpu_util DOUBLE, memory_util DOUBLE, disk_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), PRIMARY KEY(host, idc), TIME INDEX(ts) ); @@ -31,11 +31,11 @@ SELECT * FROM system_metrics; SELECT count(*) FROM system_metrics; -+-----------------+ -| COUNT(UInt8(1)) | -+-----------------+ -| 3 | -+-----------------+ ++----------+ +| COUNT(*) | ++----------+ +| 3 | ++----------+ SELECT avg(cpu_util) FROM system_metrics; diff --git a/tests/cases/standalone/common/basic.sql b/tests/cases/standalone/common/basic.sql index d425b6634300..b10795639207 100644 --- a/tests/cases/standalone/common/basic.sql +++ b/tests/cases/standalone/common/basic.sql @@ -4,7 +4,7 @@ CREATE TABLE system_metrics ( cpu_util DOUBLE, memory_util DOUBLE, disk_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), PRIMARY KEY(host, idc), TIME INDEX(ts) ); diff --git a/tests/cases/standalone/common/create/create.result b/tests/cases/standalone/common/create/create.result index 9f110ac743bb..4acfca83635e 100644 --- a/tests/cases/standalone/common/create/create.result +++ b/tests/cases/standalone/common/create/create.result @@ -22,7 +22,7 @@ CREATE TABLE integers (i TIMESTAMP TIME INDEX); Affected Rows: 0 -CREATE TABLE times (i TIMESTAMP TIME INDEX DEFAULT CURRENT_TIMESTAMP); +CREATE TABLE times (i TIMESTAMP TIME INDEX DEFAULT CURRENT_TIMESTAMP()); Affected Rows: 0 diff --git a/tests/cases/standalone/common/create/create.sql b/tests/cases/standalone/common/create/create.sql index 61a3588269b5..315a3aad05b2 100644 --- a/tests/cases/standalone/common/create/create.sql +++ b/tests/cases/standalone/common/create/create.sql @@ -10,7 +10,7 @@ CREATE TABLE integers (i TIMESTAMP TIME INDEX, j BIGINT, TIME INDEX(i, j)); CREATE TABLE integers (i TIMESTAMP TIME INDEX); -CREATE TABLE times (i TIMESTAMP TIME INDEX DEFAULT CURRENT_TIMESTAMP); +CREATE TABLE times (i TIMESTAMP TIME INDEX DEFAULT CURRENT_TIMESTAMP()); CREATE TABLE IF NOT EXISTS integers (i TIMESTAMP TIME INDEX); diff --git a/tests/cases/standalone/common/create/create_type_alias.sql b/tests/cases/standalone/common/create/create_type_alias.sql index e4ef33824563..937fb0b506cd 100644 --- a/tests/cases/standalone/common/create/create_type_alias.sql +++ b/tests/cases/standalone/common/create/create_type_alias.sql @@ -14,7 +14,7 @@ CREATE TABLE data_types ( ts0 TimestampSecond, ts3 Timestamp_MS, ts6 Timestamp_US, - ts9 TimestampNanosecond DEFAULT CURRENT_TIMESTAMP TIME INDEX, + ts9 TimestampNanosecond DEFAULT CURRENT_TIMESTAMP() TIME INDEX, PRIMARY KEY(s)); SHOW CREATE TABLE data_types; diff --git a/tests/cases/standalone/common/insert/insert_default.result b/tests/cases/standalone/common/insert/insert_default.result index 9dc85eba3661..da5ac155e1a9 100644 --- a/tests/cases/standalone/common/insert/insert_default.result +++ b/tests/cases/standalone/common/insert/insert_default.result @@ -29,7 +29,7 @@ SELECT * FROM test1; | | 1970-01-01T00:00:00.004 | blabla | +---+-------------------------+--------+ -CREATE TABLE test2 (i INTEGER, j TIMESTAMP TIME INDEX DEFAULT CURRENT_TIMESTAMP, k STRING DEFAULT 'blabla'); +CREATE TABLE test2 (i INTEGER, j TIMESTAMP TIME INDEX DEFAULT CURRENT_TIMESTAMP(), k STRING DEFAULT 'blabla'); Affected Rows: 0 diff --git a/tests/cases/standalone/common/insert/insert_default.sql b/tests/cases/standalone/common/insert/insert_default.sql index c020b6a7423e..4e50fc59c978 100644 --- a/tests/cases/standalone/common/insert/insert_default.sql +++ b/tests/cases/standalone/common/insert/insert_default.sql @@ -10,7 +10,7 @@ INSERT INTO test1 VALUES (DEFAULT, 1, DEFAULT), (default, 2, default), (DeFaUlT, SELECT * FROM test1; -CREATE TABLE test2 (i INTEGER, j TIMESTAMP TIME INDEX DEFAULT CURRENT_TIMESTAMP, k STRING DEFAULT 'blabla'); +CREATE TABLE test2 (i INTEGER, j TIMESTAMP TIME INDEX DEFAULT CURRENT_TIMESTAMP(), k STRING DEFAULT 'blabla'); INSERT INTO test2 VALUES (1,1,'a'), (default, 2, default), (3,3,'b'), (default, 4, default), (5, 5, 'c'); diff --git a/tests/cases/standalone/common/order/limit_union.result b/tests/cases/standalone/common/order/limit_union.result index 75d636bf072c..a6f86768ea67 100644 --- a/tests/cases/standalone/common/order/limit_union.result +++ b/tests/cases/standalone/common/order/limit_union.result @@ -22,11 +22,11 @@ SELECT * FROM integers UNION ALL SELECT * FROM integers LIMIT 7; SELECT COUNT(*) FROM (SELECT * FROM integers UNION ALL SELECT * FROM integers LIMIT 7) tbl; -+-----------------+ -| COUNT(UInt8(1)) | -+-----------------+ -| 7 | -+-----------------+ ++----------+ +| COUNT(*) | ++----------+ +| 7 | ++----------+ DROP TABLE integers; diff --git a/tests/cases/standalone/common/parser/operator_precedence.result b/tests/cases/standalone/common/parser/operator_precedence.result index 2f1d756026ce..aa0a1895d16a 100644 --- a/tests/cases/standalone/common/parser/operator_precedence.result +++ b/tests/cases/standalone/common/parser/operator_precedence.result @@ -16,19 +16,19 @@ SELECT 1+2*3; SELECT 2^2 + 1; -+--------------------------------+ -| Int64(2) # Int64(2) + Int64(1) | -+--------------------------------+ -| 1 | -+--------------------------------+ ++--------------------------------------+ +| Int64(2) BIT_XOR Int64(2) + Int64(1) | ++--------------------------------------+ +| 1 | ++--------------------------------------+ SELECT 1+2^2; -+--------------------------------+ -| Int64(1) + Int64(2) # Int64(2) | -+--------------------------------+ -| 1 | -+--------------------------------+ ++--------------------------------------+ +| Int64(1) + Int64(2) BIT_XOR Int64(2) | ++--------------------------------------+ +| 1 | ++--------------------------------------+ SELECT 2*4 / 2; @@ -72,17 +72,17 @@ SELECT 2*3*2; SELECT 2^3*2; -+--------------------------------+ -| Int64(2) # Int64(3) * Int64(2) | -+--------------------------------+ -| 4 | -+--------------------------------+ ++--------------------------------------+ +| Int64(2) BIT_XOR Int64(3) * Int64(2) | ++--------------------------------------+ +| 4 | ++--------------------------------------+ SELECT 2*3^2; -+--------------------------------+ -| Int64(2) * Int64(3) # Int64(2) | -+--------------------------------+ -| 4 | -+--------------------------------+ ++--------------------------------------+ +| Int64(2) * Int64(3) BIT_XOR Int64(2) | ++--------------------------------------+ +| 4 | ++--------------------------------------+ diff --git a/tests/cases/standalone/common/range/error.result b/tests/cases/standalone/common/range/error.result index 508cad0adff3..289e52f23735 100644 --- a/tests/cases/standalone/common/range/error.result +++ b/tests/cases/standalone/common/range/error.result @@ -55,7 +55,8 @@ Error: 1003(Internal), Error during planning: Missing argument in range select q -- 2.3 type mismatch SELECT covar(ceil(val), floor(val)) RANGE '20s' FROM host ALIGN '10s'; -Error: 1003(Internal), Internal error: Unsupported data type Int64 for function ceil. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker +Error: 1003(Internal), Internal error: Unsupported data type Int64 for function ceil. +This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker -- 2.4 nest query SELECT min(max(val) RANGE '20s') RANGE '20s' FROM host ALIGN '10s'; diff --git a/tests/cases/standalone/common/types/float/nan_ordering.result b/tests/cases/standalone/common/types/float/nan_ordering.result index c9665bf968a8..4d3b495a3d51 100644 --- a/tests/cases/standalone/common/types/float/nan_ordering.result +++ b/tests/cases/standalone/common/types/float/nan_ordering.result @@ -80,19 +80,19 @@ SELECT f FROM floats ORDER BY f NULLS LAST LIMIT 4; -- count with filters SELECT COUNT(*) FROM floats WHERE f > 0; -+-----------------+ -| COUNT(UInt8(1)) | -+-----------------+ -| 3 | -+-----------------+ ++----------+ +| COUNT(*) | ++----------+ +| 3 | ++----------+ SELECT COUNT(*) FROM floats WHERE f < 0; -+-----------------+ -| COUNT(UInt8(1)) | -+-----------------+ -| 2 | -+-----------------+ ++----------+ +| COUNT(*) | ++----------+ +| 2 | ++----------+ DROP TABLE floats; @@ -179,19 +179,19 @@ SELECT d FROM doubles ORDER BY d NULLS LAST LIMIT 4; -- count with filters SELECT COUNT(*) FROM doubles WHERE d > 0; -+-----------------+ -| COUNT(UInt8(1)) | -+-----------------+ -| 3 | -+-----------------+ ++----------+ +| COUNT(*) | ++----------+ +| 3 | ++----------+ SELECT COUNT(*) FROM doubles WHERE d < 0; -+-----------------+ -| COUNT(UInt8(1)) | -+-----------------+ -| 2 | -+-----------------+ ++----------+ +| COUNT(*) | ++----------+ +| 2 | ++----------+ DROP TABLE doubles; diff --git a/tests/cases/standalone/common/types/string/scan_big_varchar.result b/tests/cases/standalone/common/types/string/scan_big_varchar.result index f8ff770face5..1a73ecf35975 100644 --- a/tests/cases/standalone/common/types/string/scan_big_varchar.result +++ b/tests/cases/standalone/common/types/string/scan_big_varchar.result @@ -33,11 +33,11 @@ Affected Rows: 1 -- verify that the append worked SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 1 | 1 | 10000 | 10000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 1 | 1 | 10000 | 10000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ -- we create a total of 16K entries in the big table -- the total size of this table is 16K*10K = 160MB @@ -48,11 +48,11 @@ Affected Rows: 1 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 2 | 2 | 10000 | 20000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 2 | 2 | 10000 | 20000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 23 FROM bigtable; @@ -60,11 +60,11 @@ Affected Rows: 2 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 4 | 4 | 10000 | 40000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 4 | 4 | 10000 | 40000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 31 FROM bigtable; @@ -72,11 +72,11 @@ Affected Rows: 4 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 8 | 8 | 10000 | 80000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 8 | 8 | 10000 | 80000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 37 FROM bigtable; @@ -84,11 +84,11 @@ Affected Rows: 8 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 16 | 16 | 10000 | 160000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 16 | 16 | 10000 | 160000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 41 FROM bigtable; @@ -96,11 +96,11 @@ Affected Rows: 16 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 32 | 32 | 10000 | 320000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 32 | 32 | 10000 | 320000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 47 FROM bigtable; @@ -108,11 +108,11 @@ Affected Rows: 32 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 64 | 64 | 10000 | 640000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 64 | 64 | 10000 | 640000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 51 FROM bigtable; @@ -120,11 +120,11 @@ Affected Rows: 64 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 128 | 128 | 10000 | 1280000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 128 | 128 | 10000 | 1280000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 53 FROM bigtable; @@ -132,11 +132,11 @@ Affected Rows: 128 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 256 | 256 | 10000 | 2560000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 256 | 256 | 10000 | 2560000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 57 FROM bigtable; @@ -144,11 +144,11 @@ Affected Rows: 256 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 512 | 512 | 10000 | 5120000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 512 | 512 | 10000 | 5120000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 61 FROM bigtable; @@ -156,11 +156,11 @@ Affected Rows: 512 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 1024 | 1024 | 10000 | 10240000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 1024 | 1024 | 10000 | 10240000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 63 FROM bigtable; @@ -168,11 +168,11 @@ Affected Rows: 1024 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 2048 | 2048 | 10000 | 20480000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 2048 | 2048 | 10000 | 20480000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 67 FROM bigtable; @@ -180,11 +180,11 @@ Affected Rows: 2048 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 4096 | 4096 | 10000 | 40960000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 4096 | 4096 | 10000 | 40960000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 71 FROM bigtable; @@ -192,11 +192,11 @@ Affected Rows: 4096 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 8192 | 8192 | 10000 | 81920000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 8192 | 8192 | 10000 | 81920000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 73 FROM bigtable; @@ -204,11 +204,11 @@ Affected Rows: 8192 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 16384 | 16384 | 10000 | 163840000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 16384 | 16384 | 10000 | 163840000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ INSERT INTO bigtable SELECT a, to_unixtime(ts) * 79 FROM bigtable; @@ -216,11 +216,11 @@ Affected Rows: 16384 SELECT COUNT(*), COUNT(a), MAX(LENGTH(a)), SUM(LENGTH(a)) FROM bigtable; -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| COUNT(UInt8(1)) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ -| 32768 | 32768 | 10000 | 327680000 | -+-----------------+-------------------+-----------------------------------+-----------------------------------+ ++----------+-------------------+-----------------------------------+-----------------------------------+ +| COUNT(*) | COUNT(bigtable.a) | MAX(character_length(bigtable.a)) | SUM(character_length(bigtable.a)) | ++----------+-------------------+-----------------------------------+-----------------------------------+ +| 32768 | 32768 | 10000 | 327680000 | ++----------+-------------------+-----------------------------------+-----------------------------------+ DROP TABLE test; diff --git a/tests/cases/standalone/common/types/timestamp/timestamp_join.result b/tests/cases/standalone/common/types/timestamp/timestamp_join.result index c207d88fbef2..1b25cab706fb 100644 --- a/tests/cases/standalone/common/types/timestamp/timestamp_join.result +++ b/tests/cases/standalone/common/types/timestamp/timestamp_join.result @@ -16,11 +16,11 @@ Affected Rows: 1 select count(*) from timestamp2 inner join timestamp1 on (timestamp1.i = timestamp2.i); -+-----------------+ -| COUNT(UInt8(1)) | -+-----------------+ -| 1 | -+-----------------+ ++----------+ +| COUNT(*) | ++----------+ +| 1 | ++----------+ DROP TABLE timestamp1; diff --git a/tests/cases/standalone/common/types/timestamp/timestamp_types.result b/tests/cases/standalone/common/types/timestamp/timestamp_types.result index ffe36657def5..56c104a234ac 100644 --- a/tests/cases/standalone/common/types/timestamp/timestamp_types.result +++ b/tests/cases/standalone/common/types/timestamp/timestamp_types.result @@ -211,33 +211,33 @@ Affected Rows: 1 select count(*), nano from timestamp group by nano order by nano; -+-----------------+-------------------------------+ -| COUNT(UInt8(1)) | nano | -+-----------------+-------------------------------+ -| 1 | 2008-01-01T00:00:01.889268321 | -| 2 | 2008-01-01T00:00:01.899268321 | -| 2 | 2008-01-01T00:00:01.999268321 | -+-----------------+-------------------------------+ ++----------+-------------------------------+ +| COUNT(*) | nano | ++----------+-------------------------------+ +| 2 | 2008-01-01T00:00:01.899268321 | +| 1 | 2008-01-01T00:00:01.889268321 | +| 2 | 2008-01-01T00:00:01.999268321 | ++----------+-------------------------------+ select count(*), sec from timestamp group by sec order by sec; -+-----------------+---------------------+ -| COUNT(UInt8(1)) | sec | -+-----------------+---------------------+ -| 1 | 2008-01-01T00:00:01 | -| 2 | 2008-01-01T00:00:11 | -| 2 | 2008-01-01T00:00:51 | -+-----------------+---------------------+ ++----------+---------------------+ +| COUNT(*) | sec | ++----------+---------------------+ +| 2 | 2008-01-01T00:00:11 | +| 1 | 2008-01-01T00:00:01 | +| 2 | 2008-01-01T00:00:51 | ++----------+---------------------+ select count(*), milli from timestamp group by milli order by milli; -+-----------------+-------------------------+ -| COUNT(UInt8(1)) | milli | -+-----------------+-------------------------+ -| 1 | 2008-01-01T00:00:01.594 | -| 2 | 2008-01-01T00:00:01.794 | -| 2 | 2008-01-01T00:00:01.894 | -+-----------------+-------------------------+ ++----------+-------------------------+ +| COUNT(*) | milli | ++----------+-------------------------+ +| 2 | 2008-01-01T00:00:01.794 | +| 1 | 2008-01-01T00:00:01.594 | +| 2 | 2008-01-01T00:00:01.894 | ++----------+-------------------------+ CREATE TABLE IF NOT EXISTS timestamp_two (sec TIMESTAMP_S, milli TIMESTAMP_MS,micro TIMESTAMP_US, nano TIMESTAMP_NS TIME INDEX); diff --git a/tests/cases/standalone/optimizer/order_by.result b/tests/cases/standalone/optimizer/order_by.result index 129743b39d63..eea30ecf01f5 100644 --- a/tests/cases/standalone/optimizer/order_by.result +++ b/tests/cases/standalone/optimizer/order_by.result @@ -37,7 +37,7 @@ explain select * from numbers order by number desc limit 10; +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | logical_plan | MergeScan [is_placeholder=false] | | physical_plan | GlobalLimitExec: skip=0, fetch=10 | -| | SortExec: fetch=10, expr=[number@0 DESC] | +| | SortExec: TopK(fetch=10), expr=[number@0 DESC] | | | StreamScanAdapter { stream: "", schema: [Field { name: "number", data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }] } | | | | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -49,7 +49,7 @@ explain select * from numbers order by number asc limit 10; +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | logical_plan | MergeScan [is_placeholder=false] | | physical_plan | GlobalLimitExec: skip=0, fetch=10 | -| | SortExec: fetch=10, expr=[number@0 ASC NULLS LAST] | +| | SortExec: TopK(fetch=10), expr=[number@0 ASC NULLS LAST] | | | StreamScanAdapter { stream: "", schema: [Field { name: "number", data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }] } | | | | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ From 5d6e6444e37f995839da52ba45b240964c6ce471 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Wed, 25 Oct 2023 16:30:17 +0800 Subject: [PATCH 04/12] fix order by Signed-off-by: Ruihang Xia --- src/query/src/query_engine/state.rs | 17 +---- tests/cases/standalone/common/basic.result | 6 +- tests/cases/standalone/common/basic.sql | 2 +- tests/cases/standalone/common/cte/cte.result | 2 +- .../common/insert/big_insert.result | 10 +-- .../common/types/float/nan_join.result | 66 ++++++++++++++++--- .../common/types/interval/interval.result | 14 ++-- .../common/types/timestamp/timestamp.result | 16 +++-- .../types/timestamp/timestamp_types.result | 6 +- 9 files changed, 90 insertions(+), 49 deletions(-) diff --git a/src/query/src/query_engine/state.rs b/src/query/src/query_engine/state.rs index 22d5c0fec8cf..2ef25cd78a4b 100644 --- a/src/query/src/query_engine/state.rs +++ b/src/query/src/query_engine/state.rs @@ -93,20 +93,6 @@ impl QueryEngineState { let mut optimizer = Optimizer::new(); optimizer.rules.push(Arc::new(OrderHintRule)); - let mut physical_optimizers = { - let state = SessionState::with_config_rt(session_config.clone(), runtime_env.clone()); - state.physical_optimizers().to_vec() - }; - // run the sort enforcement rules first. - // And `EnforceSorting` is required to run after `EnforceDistribution`. - Self::remove_physical_optimize_rule(&mut physical_optimizers, EnforceSorting {}.name()); - Self::remove_physical_optimize_rule( - &mut physical_optimizers, - EnforceDistribution {}.name(), - ); - physical_optimizers.insert(0, Arc::new(EnforceSorting {})); - physical_optimizers.insert(0, Arc::new(EnforceDistribution {})); - let session_state = SessionState::with_config_rt_and_catalog_list( session_config, runtime_env, @@ -118,8 +104,7 @@ impl QueryEngineState { catalog_list.clone(), region_query_handler, ))) - .with_optimizer_rules(optimizer.rules) - .with_physical_optimizer_rules(physical_optimizers); + .with_optimizer_rules(optimizer.rules); let df_context = SessionContext::with_state(session_state); diff --git a/tests/cases/standalone/common/basic.result b/tests/cases/standalone/common/basic.result index 873f15e01bdc..c054009a83a8 100644 --- a/tests/cases/standalone/common/basic.result +++ b/tests/cases/standalone/common/basic.result @@ -14,7 +14,7 @@ Affected Rows: 0 INSERT INTO system_metrics VALUES ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), - ("host2", "idc_a", 80.1, 70.3, 90.0, 1667446797450), + ("host2", "idc_a", 80.0, 70.3, 90.0, 1667446797450), ("host1", "idc_b", 50.0, 66.7, 40.6, 1667446797450); Affected Rows: 3 @@ -26,7 +26,7 @@ SELECT * FROM system_metrics; +-------+-------+----------+-------------+-----------+-------------------------+ | host1 | idc_a | 11.8 | 10.3 | 10.3 | 2022-11-03T03:39:57.450 | | host1 | idc_b | 50.0 | 66.7 | 40.6 | 2022-11-03T03:39:57.450 | -| host2 | idc_a | 80.1 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | +| host2 | idc_a | 80.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | +-------+-------+----------+-------------+-----------+-------------------------+ SELECT count(*) FROM system_metrics; @@ -42,7 +42,7 @@ SELECT avg(cpu_util) FROM system_metrics; +------------------------------+ | AVG(system_metrics.cpu_util) | +------------------------------+ -| 47.29999999999999 | +| 47.26666666666667 | +------------------------------+ SELECT idc, avg(memory_util) FROM system_metrics GROUP BY idc ORDER BY idc; diff --git a/tests/cases/standalone/common/basic.sql b/tests/cases/standalone/common/basic.sql index b10795639207..fa03cb28942d 100644 --- a/tests/cases/standalone/common/basic.sql +++ b/tests/cases/standalone/common/basic.sql @@ -12,7 +12,7 @@ CREATE TABLE system_metrics ( INSERT INTO system_metrics VALUES ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), - ("host2", "idc_a", 80.1, 70.3, 90.0, 1667446797450), + ("host2", "idc_a", 80.0, 70.3, 90.0, 1667446797450), ("host1", "idc_b", 50.0, 66.7, 40.6, 1667446797450); SELECT * FROM system_metrics; diff --git a/tests/cases/standalone/common/cte/cte.result b/tests/cases/standalone/common/cte/cte.result index 5f399b61d64c..cd42b15566dc 100644 --- a/tests/cases/standalone/common/cte/cte.result +++ b/tests/cases/standalone/common/cte/cte.result @@ -121,7 +121,7 @@ select from cte where alias2 > 0; -Error: 3000(PlanQuery), No field named alias2. Valid fields are a. +Error: 3000(PlanQuery), No field named alias2. Valid fields are cte.a. drop table a; diff --git a/tests/cases/standalone/common/insert/big_insert.result b/tests/cases/standalone/common/insert/big_insert.result index 56e33e871935..0506b912b967 100644 --- a/tests/cases/standalone/common/insert/big_insert.result +++ b/tests/cases/standalone/common/insert/big_insert.result @@ -8,11 +8,11 @@ Affected Rows: 1050 SELECT COUNT(*) FROM integers; -+-----------------+ -| COUNT(UInt8(1)) | -+-----------------+ -| 10 | -+-----------------+ ++----------+ +| COUNT(*) | ++----------+ +| 10 | ++----------+ DROP TABLE integers; diff --git a/tests/cases/standalone/common/types/float/nan_join.result b/tests/cases/standalone/common/types/float/nan_join.result index fcc9b9dd2889..1fc3e627c7ff 100644 --- a/tests/cases/standalone/common/types/float/nan_join.result +++ b/tests/cases/standalone/common/types/float/nan_join.result @@ -11,23 +11,46 @@ Affected Rows: 3 SELECT * FROM floats JOIN (SELECT 'inf'::FLOAT) tbl(f) USING (f); -Error: 3000(PlanQuery), Schema contains qualified field name floats.f and unqualified field name f which would be ambiguous ++-----+-------------------------+ +| f | ts | ++-----+-------------------------+ +| inf | 1970-01-01T00:00:00.001 | ++-----+-------------------------+ SELECT * FROM floats JOIN (SELECT '-inf'::FLOAT) tbl(f) USING (f); -Error: 3000(PlanQuery), Schema contains qualified field name floats.f and unqualified field name f which would be ambiguous ++------+-------------------------+ +| f | ts | ++------+-------------------------+ +| -inf | 1970-01-01T00:00:00.002 | ++------+-------------------------+ SELECT * FROM floats JOIN (SELECT 'inf'::FLOAT) tbl(f) ON (floats.f >= tbl.f) ORDER BY 1; -Error: 3000(PlanQuery), Schema contains qualified field name floats.f and unqualified field name f which would be ambiguous ++-----+-------------------------+-----+ +| f | ts | f | ++-----+-------------------------+-----+ +| inf | 1970-01-01T00:00:00.001 | inf | +| NaN | 1970-01-01T00:00:00.003 | inf | ++-----+-------------------------+-----+ SELECT * FROM floats JOIN (SELECT 'inf'::FLOAT) tbl(f) ON (floats.f <= tbl.f) ORDER BY 1; -Error: 3000(PlanQuery), Schema contains qualified field name floats.f and unqualified field name f which would be ambiguous ++------+-------------------------+-----+ +| f | ts | f | ++------+-------------------------+-----+ +| -inf | 1970-01-01T00:00:00.002 | inf | +| inf | 1970-01-01T00:00:00.001 | inf | ++------+-------------------------+-----+ SELECT * FROM floats JOIN (SELECT '-inf'::FLOAT, 'inf'::FLOAT) tbl(f,g) ON (floats.f >= tbl.f AND floats.f <= tbl.g) ORDER BY 1; -Error: 3000(PlanQuery), Schema contains qualified field name floats.f and unqualified field name f which would be ambiguous ++------+-------------------------+------+-----+ +| f | ts | f | g | ++------+-------------------------+------+-----+ +| -inf | 1970-01-01T00:00:00.002 | -inf | inf | +| inf | 1970-01-01T00:00:00.001 | -inf | inf | ++------+-------------------------+------+-----+ DROP TABLE floats; @@ -44,23 +67,46 @@ Affected Rows: 3 SELECT * FROM doubles JOIN (SELECT 'inf'::DOUBLE) tbl(d) USING (d); -Error: 3000(PlanQuery), Schema contains qualified field name doubles.d and unqualified field name d which would be ambiguous ++-----+-------------------------+ +| d | ts | ++-----+-------------------------+ +| inf | 1970-01-01T00:00:00.001 | ++-----+-------------------------+ SELECT * FROM doubles JOIN (SELECT '-inf'::DOUBLE) tbl(d) USING (d); -Error: 3000(PlanQuery), Schema contains qualified field name doubles.d and unqualified field name d which would be ambiguous ++------+-------------------------+ +| d | ts | ++------+-------------------------+ +| -inf | 1970-01-01T00:00:00.002 | ++------+-------------------------+ SELECT * FROM doubles JOIN (SELECT 'inf'::DOUBLE) tbl(d) ON (doubles.d >= tbl.d) ORDER BY 1; -Error: 3000(PlanQuery), Schema contains qualified field name doubles.d and unqualified field name d which would be ambiguous ++-----+-------------------------+-----+ +| d | ts | d | ++-----+-------------------------+-----+ +| inf | 1970-01-01T00:00:00.001 | inf | +| NaN | 1970-01-01T00:00:00.003 | inf | ++-----+-------------------------+-----+ SELECT * FROM doubles JOIN (SELECT 'inf'::DOUBLE) tbl(d) ON (doubles.d <= tbl.d) ORDER BY 1; -Error: 3000(PlanQuery), Schema contains qualified field name doubles.d and unqualified field name d which would be ambiguous ++------+-------------------------+-----+ +| d | ts | d | ++------+-------------------------+-----+ +| -inf | 1970-01-01T00:00:00.002 | inf | +| inf | 1970-01-01T00:00:00.001 | inf | ++------+-------------------------+-----+ SELECT * FROM doubles JOIN (SELECT '-inf'::DOUBLE, 'inf'::DOUBLE) tbl(d,g) ON (doubles.d >= tbl.d AND doubles.d <= tbl.g) ORDER BY 1; -Error: 3000(PlanQuery), Schema contains qualified field name doubles.d and unqualified field name d which would be ambiguous ++------+-------------------------+------+-----+ +| d | ts | d | g | ++------+-------------------------+------+-----+ +| -inf | 1970-01-01T00:00:00.002 | -inf | inf | +| inf | 1970-01-01T00:00:00.001 | -inf | inf | ++------+-------------------------+------+-----+ DROP TABLE doubles; diff --git a/tests/cases/standalone/common/types/interval/interval.result b/tests/cases/standalone/common/types/interval/interval.result index 1b9f3a64d1f7..00203179abb1 100644 --- a/tests/cases/standalone/common/types/interval/interval.result +++ b/tests/cases/standalone/common/types/interval/interval.result @@ -249,19 +249,25 @@ SELECT TIMESTAMP '1992-09-20 11:30:00.123456' - interval_value as new_value from -- Interval type does not support aggregation functions. SELECT MIN(interval_value) from intervals; -Error: 1003(Internal), Internal error: Min/Max accumulator not implemented for type Interval(MonthDayNano). This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker +Error: 1003(Internal), Internal error: Min/Max accumulator not implemented for type Interval(MonthDayNano). +This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker SELECT MAX(interval_value) from intervals; -Error: 1003(Internal), Internal error: Min/Max accumulator not implemented for type Interval(MonthDayNano). This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker +Error: 1003(Internal), Internal error: Min/Max accumulator not implemented for type Interval(MonthDayNano). +This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker SELECT SUM(interval_value) from intervals; -Error: 3000(PlanQuery), Error during planning: The function Sum does not support inputs of type Interval(MonthDayNano). +Error: 3000(PlanQuery), Error during planning: No function matches the given name and argument types 'SUM(Interval(MonthDayNano))'. You might need to add explicit type casts. + Candidate functions: + SUM(Int8/Int16/Int32/Int64/UInt8/UInt16/UInt32/UInt64/Float32/Float64) SELECT AVG(interval_value) from intervals; -Error: 3000(PlanQuery), Error during planning: The function Avg does not support inputs of type Interval(MonthDayNano). +Error: 3000(PlanQuery), Error during planning: No function matches the given name and argument types 'AVG(Interval(MonthDayNano))'. You might need to add explicit type casts. + Candidate functions: + AVG(Int8/Int16/Int32/Int64/UInt8/UInt16/UInt32/UInt64/Float32/Float64) DROP TABLE intervals; diff --git a/tests/cases/standalone/common/types/timestamp/timestamp.result b/tests/cases/standalone/common/types/timestamp/timestamp.result index 70063acfab7c..80173a778f0b 100644 --- a/tests/cases/standalone/common/types/timestamp/timestamp.result +++ b/tests/cases/standalone/common/types/timestamp/timestamp.result @@ -75,27 +75,31 @@ SELECT MAX(t) FROM timestamp; SELECT SUM(t) FROM timestamp; -Error: 3000(PlanQuery), Error during planning: The function Sum does not support inputs of type Timestamp(Millisecond, None). +Error: 3000(PlanQuery), Error during planning: No function matches the given name and argument types 'SUM(Timestamp(Millisecond, None))'. You might need to add explicit type casts. + Candidate functions: + SUM(Int8/Int16/Int32/Int64/UInt8/UInt16/UInt32/UInt64/Float32/Float64) SELECT AVG(t) FROM timestamp; -Error: 3000(PlanQuery), Error during planning: The function Avg does not support inputs of type Timestamp(Millisecond, None). +Error: 3000(PlanQuery), Error during planning: No function matches the given name and argument types 'AVG(Timestamp(Millisecond, None))'. You might need to add explicit type casts. + Candidate functions: + AVG(Int8/Int16/Int32/Int64/UInt8/UInt16/UInt32/UInt64/Float32/Float64) SELECT t+t FROM timestamp; -Error: 1003(Internal), Cast error: Cannot perform arithmetic operation between array of type Timestamp(Millisecond, None) and array of type Timestamp(Millisecond, None) +Error: 3000(PlanQuery), Error during planning: Cannot get result type for temporal operation Timestamp(Millisecond, None) + Timestamp(Millisecond, None): Invalid argument error: Invalid timestamp arithmetic operation: Timestamp(Millisecond, None) + Timestamp(Millisecond, None) SELECT t*t FROM timestamp; -Error: 1003(Internal), Invalid argument error: column types must match schema types, expected Interval(DayTime) but found Timestamp(Millisecond, None) at column index 0 +Error: 3000(PlanQuery), Error during planning: Cannot get result type for temporal operation Timestamp(Millisecond, None) * Timestamp(Millisecond, None): Invalid argument error: Invalid timestamp arithmetic operation: Timestamp(Millisecond, None) * Timestamp(Millisecond, None) SELECT t/t FROM timestamp; -Error: 1003(Internal), Invalid argument error: column types must match schema types, expected Interval(DayTime) but found Timestamp(Millisecond, None) at column index 0 +Error: 3000(PlanQuery), Error during planning: Cannot get result type for temporal operation Timestamp(Millisecond, None) / Timestamp(Millisecond, None): Invalid argument error: Invalid timestamp arithmetic operation: Timestamp(Millisecond, None) / Timestamp(Millisecond, None) SELECT t%t FROM timestamp; -Error: 1003(Internal), Invalid argument error: column types must match schema types, expected Interval(DayTime) but found Timestamp(Millisecond, None) at column index 0 +Error: 3000(PlanQuery), Error during planning: Cannot get result type for temporal operation Timestamp(Millisecond, None) % Timestamp(Millisecond, None): Invalid argument error: Invalid timestamp arithmetic operation: Timestamp(Millisecond, None) % Timestamp(Millisecond, None) -- TODO(dennis): It can't run on distributed mode, uncomment it when the issue is fixed: https://github.com/GreptimeTeam/greptimedb/issues/2071 -- -- SELECT t-t FROM timestamp; -- diff --git a/tests/cases/standalone/common/types/timestamp/timestamp_types.result b/tests/cases/standalone/common/types/timestamp/timestamp_types.result index 56c104a234ac..02d024216769 100644 --- a/tests/cases/standalone/common/types/timestamp/timestamp_types.result +++ b/tests/cases/standalone/common/types/timestamp/timestamp_types.result @@ -214,8 +214,8 @@ select count(*), nano from timestamp group by nano order by nano; +----------+-------------------------------+ | COUNT(*) | nano | +----------+-------------------------------+ -| 2 | 2008-01-01T00:00:01.899268321 | | 1 | 2008-01-01T00:00:01.889268321 | +| 2 | 2008-01-01T00:00:01.899268321 | | 2 | 2008-01-01T00:00:01.999268321 | +----------+-------------------------------+ @@ -224,8 +224,8 @@ select count(*), sec from timestamp group by sec order by sec; +----------+---------------------+ | COUNT(*) | sec | +----------+---------------------+ -| 2 | 2008-01-01T00:00:11 | | 1 | 2008-01-01T00:00:01 | +| 2 | 2008-01-01T00:00:11 | | 2 | 2008-01-01T00:00:51 | +----------+---------------------+ @@ -234,8 +234,8 @@ select count(*), milli from timestamp group by milli order by milli; +----------+-------------------------+ | COUNT(*) | milli | +----------+-------------------------+ -| 2 | 2008-01-01T00:00:01.794 | | 1 | 2008-01-01T00:00:01.594 | +| 2 | 2008-01-01T00:00:01.794 | | 2 | 2008-01-01T00:00:01.894 | +----------+-------------------------+ From 42054a6517039c018c4bc054492b3010c9ddf143 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Wed, 25 Oct 2023 16:42:54 +0800 Subject: [PATCH 05/12] fix sql keyword and data type Signed-off-by: Ruihang Xia --- src/sql/src/statements.rs | 6 ++++-- .../common/create/create_type_alias.result | 2 +- .../common/order/order_variable_size_payload.result | 12 ++++++------ .../common/order/order_variable_size_payload.sql | 8 ++++---- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/sql/src/statements.rs b/src/sql/src/statements.rs index 743f6496c8f7..d7b26fb58941 100644 --- a/src/sql/src/statements.rs +++ b/src/sql/src/statements.rs @@ -376,8 +376,10 @@ pub fn sql_data_type_to_concrete_data_type(data_type: &SqlDataType) -> Result Ok(ConcreteDataType::int16_datatype()), SqlDataType::UnsignedSmallInt(_) => Ok(ConcreteDataType::uint16_datatype()), - SqlDataType::TinyInt(_) => Ok(ConcreteDataType::int8_datatype()), - SqlDataType::UnsignedTinyInt(_) => Ok(ConcreteDataType::uint8_datatype()), + SqlDataType::TinyInt(_) | SqlDataType::Int8(_) => Ok(ConcreteDataType::int8_datatype()), + SqlDataType::UnsignedTinyInt(_) | SqlDataType::UnsignedInt8(_) => { + Ok(ConcreteDataType::uint8_datatype()) + } SqlDataType::Char(_) | SqlDataType::Varchar(_) | SqlDataType::Text diff --git a/tests/cases/standalone/common/create/create_type_alias.result b/tests/cases/standalone/common/create/create_type_alias.result index 7c7c00573752..44d8aaf2aaf6 100644 --- a/tests/cases/standalone/common/create/create_type_alias.result +++ b/tests/cases/standalone/common/create/create_type_alias.result @@ -14,7 +14,7 @@ CREATE TABLE data_types ( ts0 TimestampSecond, ts3 Timestamp_MS, ts6 Timestamp_US, - ts9 TimestampNanosecond DEFAULT CURRENT_TIMESTAMP TIME INDEX, + ts9 TimestampNanosecond DEFAULT CURRENT_TIMESTAMP() TIME INDEX, PRIMARY KEY(s)); Affected Rows: 0 diff --git a/tests/cases/standalone/common/order/order_variable_size_payload.result b/tests/cases/standalone/common/order/order_variable_size_payload.result index 5a7dc32a18d6..8fc3593ce539 100644 --- a/tests/cases/standalone/common/order/order_variable_size_payload.result +++ b/tests/cases/standalone/common/order/order_variable_size_payload.result @@ -21,7 +21,7 @@ SELECT * FROM t0 ORDER BY t0.c0 DESC; | a | 1970-01-01T00:00:00.001 | +------+-------------------------+ -CREATE TABLE test0 (job VARCHAR, name VARCHAR, t TIMESTAMP TIME INDEX); +CREATE TABLE test0 (job VARCHAR, host VARCHAR, t TIMESTAMP TIME INDEX); Affected Rows: 0 @@ -29,10 +29,10 @@ INSERT INTO test0 VALUES ('Shipping and Receiving Supervisor', 'Ackerman', 1), ( Affected Rows: 6 -SELECT * FROM test0 ORDER BY job, name; +SELECT * FROM test0 ORDER BY job, host; +-----------------------------------+----------+-------------------------+ -| job | name | t | +| job | host | t | +-----------------------------------+----------+-------------------------+ | Production Supervisor - WC40 | Dsa | 1970-01-01T00:00:00.006 | | Production Supervisor - WC60 | Brown | 1970-01-01T00:00:00.004 | @@ -42,10 +42,10 @@ SELECT * FROM test0 ORDER BY job, name; | Shipping and Receiving Supervisor | Ackerman | 1970-01-01T00:00:00.001 | +-----------------------------------+----------+-------------------------+ -SELECT * FROM test0 ORDER BY job DESC, name DESC; +SELECT * FROM test0 ORDER BY job DESC, host DESC; +-----------------------------------+----------+-------------------------+ -| job | name | t | +| job | host | t | +-----------------------------------+----------+-------------------------+ | Shipping and Receiving Supervisor | Ackerman | 1970-01-01T00:00:00.001 | | Shipping and Receiving Clerk | Kuppa | 1970-01-01T00:00:00.003 | @@ -350,7 +350,7 @@ select i, split_part(s, 'b', 1) from test8 order by i; CREATE TABLE DirectReports ( EmployeeID smallint, - Name varchar NOT NULL, + "Name" varchar NOT NULL, Title varchar NOT NULL, EmployeeLevel int NOT NULL, "Sort" varchar NOT NULL, diff --git a/tests/cases/standalone/common/order/order_variable_size_payload.sql b/tests/cases/standalone/common/order/order_variable_size_payload.sql index d9b6ea2ac4e8..b71ba7405e4b 100644 --- a/tests/cases/standalone/common/order/order_variable_size_payload.sql +++ b/tests/cases/standalone/common/order/order_variable_size_payload.sql @@ -5,13 +5,13 @@ insert into t0 values ('a', 1), (NULL,2), (NULL, 3), (NULL, 4), (NULL, 5), (NULL -- SQLNESS SORT_RESULT 2 2 SELECT * FROM t0 ORDER BY t0.c0 DESC; -CREATE TABLE test0 (job VARCHAR, name VARCHAR, t TIMESTAMP TIME INDEX); +CREATE TABLE test0 (job VARCHAR, host VARCHAR, t TIMESTAMP TIME INDEX); INSERT INTO test0 VALUES ('Shipping and Receiving Supervisor', 'Ackerman', 1), ('Shipping and Receiving Clerk', 'Berndt', 2), ('Shipping and Receiving Clerk', 'Kuppa', 3), ('Production Supervisor - WC60', 'Brown', 4), ('Production Supervisor - WC60', 'Campbell', 5), ('Production Supervisor - WC40', 'Dsa', 6); -SELECT * FROM test0 ORDER BY job, name; +SELECT * FROM test0 ORDER BY job, host; -SELECT * FROM test0 ORDER BY job DESC, name DESC; +SELECT * FROM test0 ORDER BY job DESC, host DESC; CREATE TABLE test1 (s VARCHAR, t TIMESTAMP TIME INDEX); @@ -85,7 +85,7 @@ select i, split_part(s, 'b', 1) from test8 order by i; CREATE TABLE DirectReports ( EmployeeID smallint, - Name varchar NOT NULL, + "Name" varchar NOT NULL, Title varchar NOT NULL, EmployeeLevel int NOT NULL, "Sort" varchar NOT NULL, From 4d4a614ba66b7727aeb4db84691bf934169a16ef Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Thu, 26 Oct 2023 11:41:18 +0800 Subject: [PATCH 06/12] fix range exec's input partitioning Signed-off-by: Ruihang Xia --- src/query/src/range_select/plan.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/query/src/range_select/plan.rs b/src/query/src/range_select/plan.rs index 601161c529ce..fd6920cc4b9c 100644 --- a/src/query/src/range_select/plan.rs +++ b/src/query/src/range_select/plan.rs @@ -31,7 +31,8 @@ use datafusion::execution::context::SessionState; use datafusion::physical_plan::metrics::{BaselineMetrics, ExecutionPlanMetricsSet, MetricsSet}; use datafusion::physical_plan::udaf::create_aggregate_expr as create_aggr_udf_expr; use datafusion::physical_plan::{ - DisplayAs, DisplayFormatType, ExecutionPlan, RecordBatchStream, SendableRecordBatchStream, + DisplayAs, DisplayFormatType, ExecutionPlan, Partitioning, RecordBatchStream, + SendableRecordBatchStream, }; use datafusion::physical_planner::create_physical_sort_expr; use datafusion_common::utils::get_arrayref_at_indices; @@ -40,7 +41,9 @@ use datafusion_expr::utils::exprlist_to_fields; use datafusion_expr::{Accumulator, Expr, ExprSchemable, LogicalPlan, UserDefinedLogicalNodeCore}; use datafusion_physical_expr::expressions::create_aggregate_expr as create_aggr_expr; use datafusion_physical_expr::hash_utils::create_hashes; -use datafusion_physical_expr::{create_physical_expr, AggregateExpr, PhysicalExpr}; +use datafusion_physical_expr::{ + create_physical_expr, AggregateExpr, Distribution, PhysicalExpr, PhysicalSortExpr, +}; use datatypes::arrow::array::{ Array, ArrayRef, TimestampMillisecondArray, TimestampMillisecondBuilder, UInt32Builder, }; @@ -533,11 +536,15 @@ impl ExecutionPlan for RangeSelectExec { self.schema.clone() } - fn output_partitioning(&self) -> datafusion::physical_plan::Partitioning { - self.input.output_partitioning() + fn output_partitioning(&self) -> Partitioning { + Partitioning::UnknownPartitioning(1) + } + + fn required_input_distribution(&self) -> Vec { + vec![Distribution::SinglePartition] } - fn output_ordering(&self) -> Option<&[datafusion_physical_expr::PhysicalSortExpr]> { + fn output_ordering(&self) -> Option<&[PhysicalSortExpr]> { self.input.output_ordering() } @@ -641,6 +648,7 @@ struct RangeSelectStream { schema_before_project: SchemaRef, } +#[derive(Debug)] struct SeriesState { /// by values written by `RowWriter` row: OwnedRow, From 396c7c4d017a518ff3d47a4d9abad7345bef208b Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Thu, 26 Oct 2023 11:47:49 +0800 Subject: [PATCH 07/12] fix cover input type Signed-off-by: Ruihang Xia --- tests/cases/standalone/common/range/calculate.result | 2 +- tests/cases/standalone/common/range/calculate.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cases/standalone/common/range/calculate.result b/tests/cases/standalone/common/range/calculate.result index 29e292b409b1..a4c10994c0d8 100644 --- a/tests/cases/standalone/common/range/calculate.result +++ b/tests/cases/standalone/common/range/calculate.result @@ -21,7 +21,7 @@ INSERT INTO TABLE host VALUES Affected Rows: 10 -- Test range expr calculate -SELECT ts, host, covar(val, val) RANGE '20s' FROM host ALIGN '10s' ORDER BY host, ts; +SELECT ts, host, covar(val::DOUBLE, val::DOUBLE) RANGE '20s' FROM host ALIGN '10s' ORDER BY host, ts; +---------------------+-------+---------------------------------------------------+ | ts | host | COVARIANCE(host.val,host.val) RANGE 20s FILL NULL | diff --git a/tests/cases/standalone/common/range/calculate.sql b/tests/cases/standalone/common/range/calculate.sql index 59b19e923237..07d34173c4e6 100644 --- a/tests/cases/standalone/common/range/calculate.sql +++ b/tests/cases/standalone/common/range/calculate.sql @@ -18,7 +18,7 @@ INSERT INTO TABLE host VALUES -- Test range expr calculate -SELECT ts, host, covar(val, val) RANGE '20s' FROM host ALIGN '10s' ORDER BY host, ts; +SELECT ts, host, covar(val::DOUBLE, val::DOUBLE) RANGE '20s' FROM host ALIGN '10s' ORDER BY host, ts; SELECT ts, host, 2 * min(val) RANGE '5s' FROM host ALIGN '5s' ORDER BY host, ts; From 8a94ce3dd1c8f43445744f53336dfab58a104250 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Thu, 26 Oct 2023 15:16:20 +0800 Subject: [PATCH 08/12] fix explain analyze Signed-off-by: Ruihang Xia --- src/query/src/datafusion.rs | 45 ++++++++++++++----- .../tql-explain-analyze/analyze.result | 1 - 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/src/query/src/datafusion.rs b/src/query/src/datafusion.rs index 8798285a6b6c..5b3b8d41fef2 100644 --- a/src/query/src/datafusion.rs +++ b/src/query/src/datafusion.rs @@ -36,6 +36,7 @@ use common_recordbatch::{ }; use common_telemetry::timer; use datafusion::common::Column; +use datafusion::physical_plan::analyze::AnalyzeExec; use datafusion::physical_plan::coalesce_partitions::CoalescePartitionsExec; use datafusion::physical_plan::ExecutionPlan; use datafusion::prelude::SessionContext; @@ -86,12 +87,12 @@ impl DatafusionQueryEngine { // `create_physical_plan` will optimize logical plan internally let physical_plan = self.create_physical_plan(&mut ctx, &plan).await?; - let physical_plan = self.optimize_physical_plan(&mut ctx, physical_plan)?; + let optimized_physical_plan = self.optimize_physical_plan(&mut ctx, physical_plan)?; let physical_plan = if let Some(wrapper) = self.plugins.get::() { - wrapper.wrap(physical_plan, query_ctx) + wrapper.wrap(optimized_physical_plan, query_ctx) } else { - physical_plan + optimized_physical_plan }; Ok(Output::Stream(self.execute_stream(&ctx, &physical_plan)?)) @@ -345,7 +346,9 @@ impl PhysicalOptimizer for DatafusionQueryEngine { ) -> Result> { let _timer = timer!(metrics::METRIC_OPTIMIZE_PHYSICAL_ELAPSED); - let mut new_plan = plan + let state = ctx.state(); + let config = state.config_options(); + let df_plan = plan .as_any() .downcast_ref::() .context(error::PhysicalPlanDowncastSnafu) @@ -353,14 +356,32 @@ impl PhysicalOptimizer for DatafusionQueryEngine { .context(QueryExecutionSnafu)? .df_plan(); - let state = ctx.state(); - let config = state.config_options(); - for optimizer in state.physical_optimizers() { - new_plan = optimizer - .optimize(new_plan, config) - .context(DataFusionSnafu)?; - } - Ok(Arc::new(PhysicalPlanAdapter::new(plan.schema(), new_plan))) + // skip optimize AnalyzeExec plan + let optimized_plan = + if let Some(analyze_plan) = df_plan.as_any().downcast_ref::() { + let mut new_plan = analyze_plan.input().clone(); + for optimizer in state.physical_optimizers() { + new_plan = optimizer + .optimize(new_plan, config) + .context(DataFusionSnafu)?; + } + Arc::new(analyze_plan.clone()) + .with_new_children(vec![new_plan]) + .unwrap() + } else { + let mut new_plan = df_plan; + for optimizer in state.physical_optimizers() { + new_plan = optimizer + .optimize(new_plan, config) + .context(DataFusionSnafu)?; + } + new_plan + }; + + Ok(Arc::new(PhysicalPlanAdapter::new( + plan.schema(), + optimized_plan, + ))) } } diff --git a/tests/cases/standalone/tql-explain-analyze/analyze.result b/tests/cases/standalone/tql-explain-analyze/analyze.result index 1c35d346c58f..7b3e9485ddb4 100644 --- a/tests/cases/standalone/tql-explain-analyze/analyze.result +++ b/tests/cases/standalone/tql-explain-analyze/analyze.result @@ -20,7 +20,6 @@ TQL ANALYZE (0, 10, '5s') test; +-+-+ | Plan with Metrics | PromInstantManipulateExec: range=[0..10000], lookback=[300000], interval=[5000], time index=[j], REDACTED |_|_RepartitionExec: partitioning=REDACTED -|_|_RepartitionExec: partitioning=REDACTED |_|_PromSeriesNormalizeExec: offset=[0], time index=[j], filter NaN: [false], REDACTED |_|_PromSeriesDivideExec: tags=["k"], REDACTED |_|_SortExec: expr=[k@2 ASC NULLS LAST], REDACTED From 0496fd846318bd75da249c64ffa8afa9f990f48a Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Thu, 26 Oct 2023 15:21:42 +0800 Subject: [PATCH 09/12] update distributed mode sqlness result Signed-off-by: Ruihang Xia --- tests/cases/distributed/explain/join_10_tables.result | 2 +- tests/cases/distributed/explain/subqueries.result | 6 ++++-- tests/cases/distributed/optimizer/order_by.result | 4 ++-- tests/cases/distributed/tql-explain-analyze/analyze.result | 1 - 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/cases/distributed/explain/join_10_tables.result b/tests/cases/distributed/explain/join_10_tables.result index 74f06c246b0f..0fe8bebfb6e0 100644 --- a/tests/cases/distributed/explain/join_10_tables.result +++ b/tests/cases/distributed/explain/join_10_tables.result @@ -98,7 +98,7 @@ limit 1; |_|_MergeScan [is_placeholder=false]_| | physical_plan | GlobalLimitExec: skip=0, fetch=1_| |_|_SortPreservingMergeExec: [ts@0 DESC], fetch=1_| -|_|_SortExec: fetch=1, expr=[ts@0 DESC]_| +|_|_SortExec: TopK(fetch=1), expr=[ts@0 DESC]_| |_|_CoalesceBatchesExec: target_batch_size=8192_| |_|_REDACTED |_|_CoalesceBatchesExec: target_batch_size=8192_| diff --git a/tests/cases/distributed/explain/subqueries.result b/tests/cases/distributed/explain/subqueries.result index 8d20b8e159e9..5d0857b09110 100644 --- a/tests/cases/distributed/explain/subqueries.result +++ b/tests/cases/distributed/explain/subqueries.result @@ -92,8 +92,10 @@ order by t.i desc; |_|_Filter: other.i IS NOT NULL_| |_|_Projection: other.i_| |_|_MergeScan [is_placeholder=false]_| -| physical_plan | SortExec: expr=[i@0 DESC]_| +| physical_plan | SortPreservingMergeExec: [i@0 DESC]_| +|_|_SortExec: expr=[i@0 DESC]_| |_|_NestedLoopJoinExec: join_type=Inner_| +|_|_RepartitionExec: partitioning=REDACTED |_|_ProjectionExec: expr=[]_| |_|_MergeScanExec: REDACTED |_|_CoalescePartitionsExec_| @@ -110,7 +112,7 @@ EXPLAIN INSERT INTO other SELECT i, 2 FROM integers WHERE i=(SELECT MAX(i) FROM +--------------+-------------------------------------------------------------------+ | plan_type | plan | +--------------+-------------------------------------------------------------------+ -| logical_plan | Dml: op=[Insert] table=[other] | +| logical_plan | Dml: op=[Insert Into] table=[other] | | | Projection: integers.i AS i, TimestampMillisecond(2, None) AS j | | | Inner Join: integers.i = __scalar_sq_1.MAX(integers.i) | | | Projection: integers.i | diff --git a/tests/cases/distributed/optimizer/order_by.result b/tests/cases/distributed/optimizer/order_by.result index b49f3eba4637..40e73f6410ea 100644 --- a/tests/cases/distributed/optimizer/order_by.result +++ b/tests/cases/distributed/optimizer/order_by.result @@ -41,7 +41,7 @@ explain select * from numbers order by number desc limit 10; +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | logical_plan | MergeScan [is_placeholder=false] | | physical_plan | GlobalLimitExec: skip=0, fetch=10 | -| | SortExec: fetch=10, expr=[number@0 DESC] | +| | SortExec: TopK(fetch=10), expr=[number@0 DESC] | | | StreamScanAdapter { stream: "", schema: [Field { name: "number", data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }] } | | | | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -54,7 +54,7 @@ explain select * from numbers order by number asc limit 10; +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | logical_plan | MergeScan [is_placeholder=false] | | physical_plan | GlobalLimitExec: skip=0, fetch=10 | -| | SortExec: fetch=10, expr=[number@0 ASC NULLS LAST] | +| | SortExec: TopK(fetch=10), expr=[number@0 ASC NULLS LAST] | | | StreamScanAdapter { stream: "", schema: [Field { name: "number", data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }] } | | | | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/tests/cases/distributed/tql-explain-analyze/analyze.result b/tests/cases/distributed/tql-explain-analyze/analyze.result index 1c35d346c58f..7b3e9485ddb4 100644 --- a/tests/cases/distributed/tql-explain-analyze/analyze.result +++ b/tests/cases/distributed/tql-explain-analyze/analyze.result @@ -20,7 +20,6 @@ TQL ANALYZE (0, 10, '5s') test; +-+-+ | Plan with Metrics | PromInstantManipulateExec: range=[0..10000], lookback=[300000], interval=[5000], time index=[j], REDACTED |_|_RepartitionExec: partitioning=REDACTED -|_|_RepartitionExec: partitioning=REDACTED |_|_PromSeriesNormalizeExec: offset=[0], time index=[j], filter NaN: [false], REDACTED |_|_PromSeriesDivideExec: tags=["k"], REDACTED |_|_SortExec: expr=[k@2 ASC NULLS LAST], REDACTED From 8d97bd109daca7c76008d0a28f003636b9b0c6d0 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Thu, 26 Oct 2023 16:36:15 +0800 Subject: [PATCH 10/12] fix lints Signed-off-by: Ruihang Xia --- src/api/src/error.rs | 7 +++++- src/api/src/helper.rs | 4 ++-- .../src/scalars/timestamp/greatest.rs | 6 ++--- src/common/query/src/columnar_value.rs | 2 +- src/common/substrait/src/df_substrait.rs | 8 +++---- src/common/time/src/timestamp.rs | 7 +++--- src/datatypes/src/vectors/constant.rs | 3 ++- src/datatypes/src/vectors/helper.rs | 9 +++++--- src/frontend/src/instance/prom_store.rs | 2 +- src/meta-srv/src/handler.rs | 2 +- src/mito2/src/memtable/key_values.rs | 2 +- src/mito2/src/read.rs | 6 +++-- src/mito2/src/region_write_ctx.rs | 8 +++---- src/mito2/src/request.rs | 6 ++--- src/query/src/dist_plan/analyzer.rs | 3 +-- .../src/optimizer/string_normalization.rs | 2 +- src/query/src/optimizer/type_conversion.rs | 2 +- src/query/src/query_engine/state.rs | 14 ++---------- src/script/src/python/ffi_types/utils.rs | 6 ++--- src/script/src/python/ffi_types/vector.rs | 1 - src/script/src/python/pyo3/utils.rs | 6 ++--- src/script/src/python/pyo3/vector_impl.rs | 1 - src/script/src/python/rspython/builtins.rs | 22 +++++++++++-------- src/servers/src/prom_store.rs | 10 +++++---- src/storage/src/read/windowed.rs | 2 +- src/storage/src/sst/pruning.rs | 6 +++-- src/storage/src/write_batch/codec.rs | 10 ++++----- src/store-api/src/region_request.rs | 9 +++----- 28 files changed, 85 insertions(+), 81 deletions(-) diff --git a/src/api/src/error.rs b/src/api/src/error.rs index 77b3d54097d9..4763b1c3dd6e 100644 --- a/src/api/src/error.rs +++ b/src/api/src/error.rs @@ -28,7 +28,12 @@ pub type Result = std::result::Result; #[stack_trace_debug] pub enum Error { #[snafu(display("Unknown proto column datatype: {}", datatype))] - UnknownColumnDataType { datatype: i32, location: Location }, + UnknownColumnDataType { + datatype: i32, + location: Location, + #[snafu(source)] + error: prost::DecodeError, + }, #[snafu(display("Failed to create column datatype from {:?}", from))] IntoColumnDataType { diff --git a/src/api/src/helper.rs b/src/api/src/helper.rs index 6f2b5b4f7db0..5ebea9c4bbe1 100644 --- a/src/api/src/helper.rs +++ b/src/api/src/helper.rs @@ -50,7 +50,7 @@ pub struct ColumnDataTypeWrapper(ColumnDataType); impl ColumnDataTypeWrapper { pub fn try_new(datatype: i32) -> Result { - let datatype = ColumnDataType::from_i32(datatype) + let datatype = ColumnDataType::try_from(datatype) .context(error::UnknownColumnDataTypeSnafu { datatype })?; Ok(Self(datatype)) } @@ -705,7 +705,7 @@ pub fn is_semantic_type_eq(type_value: i32, semantic_type: SemanticType) -> bool /// Returns true if the pb type value is valid. pub fn is_column_type_value_eq(type_value: i32, expect_type: &ConcreteDataType) -> bool { - let Some(column_type) = ColumnDataType::from_i32(type_value) else { + let Ok(column_type) = ColumnDataType::try_from(type_value) else { return false; }; diff --git a/src/common/function/src/scalars/timestamp/greatest.rs b/src/common/function/src/scalars/timestamp/greatest.rs index e583872d5a24..db116dc04598 100644 --- a/src/common/function/src/scalars/timestamp/greatest.rs +++ b/src/common/function/src/scalars/timestamp/greatest.rs @@ -18,9 +18,9 @@ use common_query::error::{ self, ArrowComputeSnafu, InvalidFuncArgsSnafu, Result, UnsupportedInputDataTypeSnafu, }; use common_query::prelude::{Signature, Volatility}; +use datafusion::arrow::compute::kernels::cmp::gt; use datatypes::arrow::array::AsArray; use datatypes::arrow::compute::cast; -use datatypes::arrow::compute::kernels::comparison::gt_dyn; use datatypes::arrow::compute::kernels::zip; use datatypes::arrow::datatypes::{DataType as ArrowDataType, Date32Type}; use datatypes::prelude::ConcreteDataType; @@ -72,7 +72,7 @@ impl Function for GreatestFunction { let column2 = cast(&columns[1].to_arrow_array(), &ArrowDataType::Date32) .context(ArrowComputeSnafu)?; let column2 = column2.as_primitive::(); - let boolean_array = gt_dyn(&column1, &column2).context(ArrowComputeSnafu)?; + let boolean_array = gt(&column1, &column2).context(ArrowComputeSnafu)?; let result = zip::zip(&boolean_array, &column1, &column2).context(ArrowComputeSnafu)?; Ok(Helper::try_into_vector(&result).context(error::FromArrowArraySnafu)?) @@ -82,7 +82,7 @@ impl Function for GreatestFunction { let column1 = column1.as_primitive::(); let column2 = columns[1].to_arrow_array(); let column2 = column2.as_primitive::(); - let boolean_array = gt_dyn(&column1, &column2).context(ArrowComputeSnafu)?; + let boolean_array = gt(&column1, &column2).context(ArrowComputeSnafu)?; let result = zip::zip(&boolean_array, &column1, &column2).context(ArrowComputeSnafu)?; Ok(Helper::try_into_vector(&result).context(error::FromArrowArraySnafu)?) diff --git a/src/common/query/src/columnar_value.rs b/src/common/query/src/columnar_value.rs index 4be676cc9259..4e79d7819f0e 100644 --- a/src/common/query/src/columnar_value.rs +++ b/src/common/query/src/columnar_value.rs @@ -33,7 +33,7 @@ impl ColumnarValue { match self { ColumnarValue::Vector(vector) => vector.data_type(), ColumnarValue::Scalar(scalar_value) => { - ConcreteDataType::from_arrow_type(&scalar_value.get_datatype()) + ConcreteDataType::from_arrow_type(&scalar_value.data_type()) } } } diff --git a/src/common/substrait/src/df_substrait.rs b/src/common/substrait/src/df_substrait.rs index 25de9a30b983..c4e1db9a560e 100644 --- a/src/common/substrait/src/df_substrait.rs +++ b/src/common/substrait/src/df_substrait.rs @@ -47,9 +47,9 @@ impl SubstraitPlan for DFLogicalSubstraitConvertor { schema: &str, ) -> Result { let state_config = SessionConfig::new().with_default_catalog_and_schema(catalog, schema); - let state = SessionState::with_config_rt(state_config, Arc::new(RuntimeEnv::default())) + let state = SessionState::new_with_config_rt(state_config, Arc::new(RuntimeEnv::default())) .with_serializer_registry(Arc::new(ExtensionSerializer)); - let mut context = SessionContext::with_state(state); + let mut context = SessionContext::new_with_state(state); context.register_catalog_list(catalog_list); let plan = Plan::decode(message).context(DecodeRelSnafu)?; let df_plan = from_substrait_plan(&mut context, &plan) @@ -61,9 +61,9 @@ impl SubstraitPlan for DFLogicalSubstraitConvertor { fn encode(&self, plan: &Self::Plan) -> Result { let mut buf = BytesMut::new(); let session_state = - SessionState::with_config_rt(SessionConfig::new(), Arc::new(RuntimeEnv::default())) + SessionState::new_with_config_rt(SessionConfig::new(), Arc::new(RuntimeEnv::default())) .with_serializer_registry(Arc::new(ExtensionSerializer)); - let context = SessionContext::with_state(session_state); + let context = SessionContext::new_with_state(session_state); let substrait_plan = to_substrait_plan(plan, &context).context(EncodeDfPlanSnafu)?; substrait_plan.encode(&mut buf).context(EncodeRelSnafu)?; diff --git a/src/common/time/src/timestamp.rs b/src/common/time/src/timestamp.rs index 60ba5b0edf9d..147064d674bc 100644 --- a/src/common/time/src/timestamp.rs +++ b/src/common/time/src/timestamp.rs @@ -21,7 +21,7 @@ use std::time::Duration; use arrow::datatypes::TimeUnit as ArrowTimeUnit; use chrono::{ - DateTime, LocalResult, NaiveDate, NaiveDateTime, NaiveTime, TimeZone as ChronoTimeZone, Utc, + DateTime, LocalResult, NaiveDate, NaiveDateTime, NaiveTime, TimeZone as ChronoTimeZone, }; use serde::{Deserialize, Serialize}; use snafu::{OptionExt, ResultExt}; @@ -63,7 +63,7 @@ impl Timestamp { TimeUnit::Second => now.timestamp(), TimeUnit::Millisecond => now.timestamp_millis(), TimeUnit::Microsecond => now.timestamp_micros(), - TimeUnit::Nanosecond => now.timestamp_nanos(), + TimeUnit::Nanosecond => now.timestamp_nanos_opt().unwrap_or_default(), }; Timestamp { value, unit } } @@ -287,6 +287,7 @@ impl FromStr for Timestamp { /// - `2022-09-20 14:16:43.012345Z` (Zulu timezone, without T) /// - `2022-09-20 14:16:43` (local timezone, without T) /// - `2022-09-20 14:16:43.012345` (local timezone, without T) + #[allow(deprecated)] fn from_str(s: &str) -> Result { // RFC3339 timestamp (with a T) let s = s.trim(); @@ -298,7 +299,7 @@ impl FromStr for Timestamp { return Timestamp::from_chrono_datetime(ts.naive_utc()) .context(ParseTimestampSnafu { raw: s }); } - if let Ok(ts) = Utc.datetime_from_str(s, "%Y-%m-%d %H:%M:%S%.fZ") { + if let Ok(ts) = chrono::Utc.datetime_from_str(s, "%Y-%m-%d %H:%M:%S%.fZ") { return Timestamp::from_chrono_datetime(ts.naive_utc()) .context(ParseTimestampSnafu { raw: s }); } diff --git a/src/datatypes/src/vectors/constant.rs b/src/datatypes/src/vectors/constant.rs index 750b816b61c2..2d731ee993c6 100644 --- a/src/datatypes/src/vectors/constant.rs +++ b/src/datatypes/src/vectors/constant.rs @@ -100,7 +100,8 @@ impl ConstantVector { let arr = indices.to_arrow_array(); let indices_arr = arr.as_any().downcast_ref::().unwrap(); if !arrow::compute::min_boolean( - &arrow::compute::lt_scalar(indices_arr, len as u32).unwrap(), + &arrow::compute::kernels::cmp::lt(indices_arr, &UInt32Array::new_scalar(len as u32)) + .unwrap(), ) .unwrap() { diff --git a/src/datatypes/src/vectors/helper.rs b/src/datatypes/src/vectors/helper.rs index 106aa17d3b16..0bd5cd9d891f 100644 --- a/src/datatypes/src/vectors/helper.rs +++ b/src/datatypes/src/vectors/helper.rs @@ -346,7 +346,8 @@ impl Helper { pub fn like_utf8(names: Vec, s: &str) -> Result { let array = StringArray::from(names); - let filter = comparison::like_utf8_scalar(&array, s).context(error::ArrowComputeSnafu)?; + let s = StringArray::new_scalar(s); + let filter = comparison::like(&array, &s).context(error::ArrowComputeSnafu)?; let result = compute::filter(&array, &filter).context(error::ArrowComputeSnafu)?; Helper::try_into_vector(result) @@ -354,7 +355,8 @@ impl Helper { pub fn like_utf8_filter(names: Vec, s: &str) -> Result<(VectorRef, BooleanVector)> { let array = StringArray::from(names); - let filter = comparison::like_utf8_scalar(&array, s).context(error::ArrowComputeSnafu)?; + let s = StringArray::new_scalar(s); + let filter = comparison::like(&array, &s).context(error::ArrowComputeSnafu)?; let result = compute::filter(&array, &filter).context(error::ArrowComputeSnafu)?; let vector = Helper::try_into_vector(result)?; @@ -482,7 +484,8 @@ mod tests { fn assert_filter(array: Vec, s: &str, expected_filter: &BooleanVector) { let array = StringArray::from(array); - let actual_filter = comparison::like_utf8_scalar(&array, s).unwrap(); + let s = StringArray::new_scalar(s); + let actual_filter = comparison::like(&array, &s).unwrap(); assert_eq!(BooleanVector::from(actual_filter), *expected_filter); } diff --git a/src/frontend/src/instance/prom_store.rs b/src/frontend/src/instance/prom_store.rs index 0e718250764e..c49c7356b055 100644 --- a/src/frontend/src/instance/prom_store.rs +++ b/src/frontend/src/instance/prom_store.rs @@ -64,7 +64,7 @@ fn negotiate_response_type(accepted_response_types: &[i32]) -> ServerResult ServerResult { diff --git a/src/meta-srv/src/handler.rs b/src/meta-srv/src/handler.rs index d2c2f0dfdd42..f57ba5579eef 100644 --- a/src/meta-srv/src/handler.rs +++ b/src/meta-srv/src/handler.rs @@ -241,7 +241,7 @@ impl HeartbeatHandlerGroup { let role = req .header .as_ref() - .and_then(|h| Role::from_i32(h.role)) + .and_then(|h| Role::try_from(h.role).ok()) .context(error::InvalidArgumentsSnafu { err_msg: format!("invalid role: {:?}", req.header), })?; diff --git a/src/mito2/src/memtable/key_values.rs b/src/mito2/src/memtable/key_values.rs index 33f5bdc75b53..37906a0c5c3f 100644 --- a/src/mito2/src/memtable/key_values.rs +++ b/src/mito2/src/memtable/key_values.rs @@ -51,7 +51,7 @@ impl KeyValues { helper: &self.helper, sequence: self.mutation.sequence + idx as u64, // Calculate sequence for each row. // Safety: This is a valid mutation. - op_type: OpType::from_i32(self.mutation.op_type).unwrap(), + op_type: OpType::try_from(self.mutation.op_type).unwrap(), } }) } diff --git a/src/mito2/src/read.rs b/src/mito2/src/read.rs index 7c7f055abfd1..ee2305fdd916 100644 --- a/src/mito2/src/read.rs +++ b/src/mito2/src/read.rs @@ -26,6 +26,7 @@ use std::sync::Arc; use api::v1::OpType; use async_trait::async_trait; use common_time::Timestamp; +use datafusion_common::arrow::array::UInt8Array; use datatypes::arrow; use datatypes::arrow::array::{Array, ArrayRef}; use datatypes::arrow::compute::SortOptions; @@ -263,8 +264,9 @@ impl Batch { // Safety: op type column is not null. let array = self.op_types.as_arrow(); // Find rows with non-delete op type. + let rhs = UInt8Array::new_scalar(OpType::Delete as u8); let predicate = - arrow::compute::neq_scalar(array, OpType::Delete as u8).context(ComputeArrowSnafu)?; + arrow::compute::kernels::cmp::neq(array, &rhs).context(ComputeArrowSnafu)?; self.filter(&BooleanVector::from(predicate)) } @@ -307,7 +309,7 @@ impl Batch { pub fn sort_and_dedup(&mut self) -> Result<()> { // If building a converter each time is costly, we may allow passing a // converter. - let mut converter = RowConverter::new(vec![ + let converter = RowConverter::new(vec![ SortField::new(self.timestamps.data_type().as_arrow_type()), SortField::new_with_options( self.sequences.data_type().as_arrow_type(), diff --git a/src/mito2/src/region_write_ctx.rs b/src/mito2/src/region_write_ctx.rs index 5270ceec326d..da256879d00b 100644 --- a/src/mito2/src/region_write_ctx.rs +++ b/src/mito2/src/region_write_ctx.rs @@ -143,10 +143,10 @@ impl RegionWriteCtx { self.next_sequence += num_rows as u64; // Update metrics. - match OpType::from_i32(op_type) { - Some(OpType::Delete) => self.delete_num += num_rows, - Some(OpType::Put) => self.put_num += num_rows, - None => (), + match OpType::try_from(op_type) { + Ok(OpType::Delete) => self.delete_num += num_rows, + Ok(OpType::Put) => self.put_num += num_rows, + Err(_) => (), } } diff --git a/src/mito2/src/request.rs b/src/mito2/src/request.rs index e2427b29481c..919eb6d4fab6 100644 --- a/src/mito2/src/request.rs +++ b/src/mito2/src/request.rs @@ -161,7 +161,7 @@ impl WriteRequest { "column {} expect type {:?}, given: {}({})", column.column_schema.name, column.column_schema.data_type, - ColumnDataType::from_i32(input_col.datatype) + ColumnDataType::try_from(input_col.datatype) .map(|v| v.as_str_name()) .unwrap_or("Unknown"), input_col.datatype, @@ -178,7 +178,7 @@ impl WriteRequest { "column {} has semantic type {:?}, given: {}({})", column.column_schema.name, column.semantic_type, - api::v1::SemanticType::from_i32(input_col.semantic_type) + api::v1::SemanticType::try_from(input_col.semantic_type) .map(|v| v.as_str_name()) .unwrap_or("Unknown"), input_col.semantic_type @@ -364,7 +364,7 @@ pub(crate) fn validate_proto_value( "value has type {:?}, but column {} has type {:?}({})", value_type, column_schema.column_name, - ColumnDataType::from_i32(column_schema.datatype), + ColumnDataType::try_from(column_schema.datatype), column_schema.datatype, ), } diff --git a/src/query/src/dist_plan/analyzer.rs b/src/query/src/dist_plan/analyzer.rs index 08262da196f5..06aee5844d45 100644 --- a/src/query/src/dist_plan/analyzer.rs +++ b/src/query/src/dist_plan/analyzer.rs @@ -19,7 +19,6 @@ use datafusion::error::Result as DfResult; use datafusion_common::config::ConfigOptions; use datafusion_common::tree_node::{RewriteRecursion, Transformed, TreeNode, TreeNodeRewriter}; use datafusion_expr::expr::{Exists, InSubquery}; -use datafusion_expr::utils::from_plan; use datafusion_expr::{col, Expr, LogicalPlan, LogicalPlanBuilder, Subquery}; use datafusion_optimizer::analyzer::AnalyzerRule; use substrait::{DFLogicalSubstraitConvertor, SubstraitPlan}; @@ -60,7 +59,7 @@ impl DistPlannerAnalyzer { .collect::>>()?; let inputs = plan.inputs().into_iter().cloned().collect::>(); - Ok(Transformed::Yes(from_plan(&plan, &exprs, &inputs)?)) + Ok(Transformed::Yes(plan.with_new_exprs(exprs, &inputs)?)) } fn transform_subquery(expr: Expr) -> DfResult> { diff --git a/src/query/src/optimizer/string_normalization.rs b/src/query/src/optimizer/string_normalization.rs index 3cf80870f7d1..1dfcc4d518d0 100644 --- a/src/query/src/optimizer/string_normalization.rs +++ b/src/query/src/optimizer/string_normalization.rs @@ -34,7 +34,7 @@ impl AnalyzerRule for StringNormalizationRule { .into_iter() .map(|e| e.rewrite(&mut converter)) .collect::>>()?; - datafusion_expr::utils::from_plan(&plan, &expr, &inputs).map(Transformed::Yes) + plan.with_new_exprs(expr, &inputs).map(Transformed::Yes) }) } diff --git a/src/query/src/optimizer/type_conversion.rs b/src/query/src/optimizer/type_conversion.rs index 0b47fc2f0f55..cfc8a5e33f3a 100644 --- a/src/query/src/optimizer/type_conversion.rs +++ b/src/query/src/optimizer/type_conversion.rs @@ -94,7 +94,7 @@ impl AnalyzerRule for TypeConversionRule { .map(|e| e.rewrite(&mut converter)) .collect::>>()?; - datafusion_expr::utils::from_plan(&plan, &expr, &inputs).map(Transformed::Yes) + plan.with_new_exprs(expr, &inputs).map(Transformed::Yes) } LogicalPlan::Subquery { .. } diff --git a/src/query/src/query_engine/state.rs b/src/query/src/query_engine/state.rs index 2ef25cd78a4b..b5dc35b3e9b4 100644 --- a/src/query/src/query_engine/state.rs +++ b/src/query/src/query_engine/state.rs @@ -27,9 +27,6 @@ use datafusion::dataframe::DataFrame; use datafusion::error::Result as DfResult; use datafusion::execution::context::{QueryPlanner, SessionConfig, SessionState}; use datafusion::execution::runtime_env::RuntimeEnv; -use datafusion::physical_optimizer::enforce_distribution::EnforceDistribution; -use datafusion::physical_optimizer::enforce_sorting::EnforceSorting; -use datafusion::physical_optimizer::PhysicalOptimizerRule; use datafusion::physical_plan::ExecutionPlan; use datafusion::physical_planner::{DefaultPhysicalPlanner, ExtensionPlanner, PhysicalPlanner}; use datafusion_expr::LogicalPlan as DfLogicalPlan; @@ -93,7 +90,7 @@ impl QueryEngineState { let mut optimizer = Optimizer::new(); optimizer.rules.push(Arc::new(OrderHintRule)); - let session_state = SessionState::with_config_rt_and_catalog_list( + let session_state = SessionState::new_with_config_rt_and_catalog_list( session_config, runtime_env, Arc::new(MemoryCatalogList::default()), // pass a dummy catalog list @@ -106,7 +103,7 @@ impl QueryEngineState { ))) .with_optimizer_rules(optimizer.rules); - let df_context = SessionContext::with_state(session_state); + let df_context = SessionContext::new_with_state(session_state); Self { df_context, @@ -121,13 +118,6 @@ impl QueryEngineState { rules.retain(|rule| rule.name() != name); } - fn remove_physical_optimize_rule( - rules: &mut Vec>, - name: &str, - ) { - rules.retain(|rule| rule.name() != name); - } - /// Register a udf function // TODO(dennis): manage UDFs by ourself. pub fn register_udf(&self, udf: ScalarUdf) { diff --git a/src/script/src/python/ffi_types/utils.rs b/src/script/src/python/ffi_types/utils.rs index 46d4243f7ec9..dd5ec785588b 100644 --- a/src/script/src/python/ffi_types/utils.rs +++ b/src/script/src/python/ffi_types/utils.rs @@ -33,8 +33,8 @@ pub(crate) fn collect_diff_types_string(values: &[ScalarValue], ty: &ArrowDataTy .iter() .enumerate() .filter_map(|(idx, val)| { - if val.get_datatype() != *ty { - Some((idx, val.get_datatype())) + if val.data_type() != *ty { + Some((idx, val.data_type())) } else { None } @@ -68,7 +68,7 @@ pub fn all_to_f64(col: ColumnarValue) -> Result { _ => { return Err(format!( "Can't cast type {:#?} to {:#?}", - val.get_datatype(), + val.data_type(), ArrowDataType::Float64 )) } diff --git a/src/script/src/python/ffi_types/vector.rs b/src/script/src/python/ffi_types/vector.rs index 4c6ff5f50c43..1f75efdecf69 100644 --- a/src/script/src/python/ffi_types/vector.rs +++ b/src/script/src/python/ffi_types/vector.rs @@ -23,7 +23,6 @@ use datatypes::arrow::array::{ Array, ArrayRef, BooleanArray, Float64Array, Int64Array, UInt64Array, }; use datatypes::arrow::compute; -use datatypes::arrow::compute::kernels::{arithmetic, comparison}; use datatypes::arrow::datatypes::DataType as ArrowDataType; use datatypes::arrow::error::Result as ArrowResult; use datatypes::data_type::DataType; diff --git a/src/script/src/python/pyo3/utils.rs b/src/script/src/python/pyo3/utils.rs index 7708a90f9864..f64ac32c90da 100644 --- a/src/script/src/python/pyo3/utils.rs +++ b/src/script/src/python/pyo3/utils.rs @@ -217,7 +217,7 @@ pub fn scalar_value_to_py_any(py: Python<'_>, val: ScalarValue) -> PyResult Err(PyValueError::new_err(format!( "Can't cast a Scalar Value `{:#?}` of type {:#?} to a Python Object", - $val, $val.get_datatype() + $val, $val.data_type() ))) } }; @@ -281,9 +281,9 @@ pub fn try_into_columnar_value(py: Python<'_>, obj: PyObject) -> PyResult Stri .iter() .enumerate() .filter_map(|(idx, val)| { - if val.get_datatype() != *ty { - Some((idx, val.get_datatype())) + if val.data_type() != *ty { + Some((idx, val.data_type())) } else { None } @@ -124,8 +124,8 @@ pub fn try_into_columnar_value(obj: PyObjectRef, vm: &VirtualMachine) -> PyResul ))); } - let ty = ret[0].get_datatype(); - if ret.iter().any(|i| i.get_datatype() != ty) { + let ty = ret[0].data_type(); + if ret.iter().any(|i| i.data_type() != ty) { return Err(vm.new_type_error(format!( "All elements in a list should be same type to cast to Datafusion list!\nExpect {ty:?}, found {}", collect_diff_types_string(&ret, &ty) @@ -186,7 +186,7 @@ fn scalar_val_try_into_py_obj(val: ScalarValue, vm: &VirtualMachine) -> PyResult } _ => Err(vm.new_type_error(format!( "Can't cast a Scalar Value `{val:#?}` of type {:#?} to a Python Object", - val.get_datatype() + val.data_type() ))), } } @@ -212,7 +212,7 @@ fn all_to_f64(col: DFColValue, vm: &VirtualMachine) -> PyResult { _ => { return Err(vm.new_type_error(format!( "Can't cast type {:#?} to {:#?}", - val.get_datatype(), + val.data_type(), ArrowDataType::Float64 ))) } @@ -287,7 +287,7 @@ pub(crate) mod greptime_builtin { // P.S.: not extract to file because not-inlined proc macro attribute is *unstable* use std::sync::Arc; - use arrow::compute::kernels::{aggregate, boolean, comparison}; + use arrow::compute::kernels::{aggregate, boolean}; use common_function::scalars::function::FunctionContext; use common_function::scalars::math::PowFunction; use common_function::scalars::{Function, FunctionRef, FUNCTION_REGISTRY}; @@ -1001,8 +1001,12 @@ pub(crate) mod greptime_builtin { .iter() .zip(slices.iter().skip(1)) .map(|(first, second)| { - let left = comparison::gt_eq_scalar(ts, *first).map_err(arrow_error)?; - let right = comparison::lt_eq_scalar(ts, *second).map_err(arrow_error)?; + let first = Int64Array::new_scalar(*first); + let second = Int64Array::new_scalar(*second); + let left = + arrow::compute::kernels::cmp::gt_eq(ts, &first).map_err(arrow_error)?; + let right = + arrow::compute::kernels::cmp::lt_eq(ts, &second).map_err(arrow_error)?; boolean::and(&left, &right).map_err(arrow_error) }) .map(|mask| match mask { diff --git a/src/servers/src/prom_store.rs b/src/servers/src/prom_store.rs index 63a13842b87e..955bda833bcc 100644 --- a/src/servers/src/prom_store.rs +++ b/src/servers/src/prom_store.rs @@ -85,10 +85,12 @@ pub fn query_to_plan(dataframe: DataFrame, q: &Query) -> Result { } let value = &m.value; - let m_type = - MatcherType::from_i32(m.r#type).context(error::InvalidPromRemoteRequestSnafu { - msg: format!("invalid LabelMatcher type: {}", m.r#type), - })?; + let m_type = MatcherType::try_from(m.r#type).map_err(|e| { + error::InvalidPromRemoteRequestSnafu { + msg: format!("invalid LabelMatcher type, decode error: {e}",), + } + .build() + })?; match m_type { MatcherType::Eq => { diff --git a/src/storage/src/read/windowed.rs b/src/storage/src/read/windowed.rs index 76e18ffd1d0e..d1faa65700f0 100644 --- a/src/storage/src/read/windowed.rs +++ b/src/storage/src/read/windowed.rs @@ -121,7 +121,7 @@ fn sort_by_rows( let sort_columns = build_sorted_columns(store_schema, order_options); // Convert columns to rows to speed lexicographic sort // TODO(hl): maybe optimize to lexsort_to_index when only timestamp column is involved. - let mut row_converter = RowConverter::new( + let row_converter = RowConverter::new( sort_columns .iter() .map(|(idx, descending)| { diff --git a/src/storage/src/sst/pruning.rs b/src/storage/src/sst/pruning.rs index a6c2080be81f..7e24c894d5dd 100644 --- a/src/storage/src/sst/pruning.rs +++ b/src/storage/src/sst/pruning.rs @@ -182,8 +182,10 @@ impl ArrowPredicate for FastTimestampRowFilter { .as_any() .downcast_ref::<$typ>() .unwrap(); // safety: we've checked the data type of timestamp column. - let left = arrow::compute::gt_eq_scalar(ts_col, self.lower_bound)?; - let right = arrow::compute::lt_scalar(ts_col, self.upper_bound)?; + let lower_bound = <$typ>::new_scalar(self.lower_bound); + let upper_bound = <$typ>::new_scalar(self.upper_bound); + let left = arrow::compute::kernels::cmp::gt_eq(ts_col, &lower_bound)?; + let right = arrow::compute::kernels::cmp::lt(ts_col, &upper_bound)?; arrow::compute::and(&left, &right) } }; diff --git a/src/storage/src/write_batch/codec.rs b/src/storage/src/write_batch/codec.rs index b0ce435dd7db..c299fb51ea22 100644 --- a/src/storage/src/write_batch/codec.rs +++ b/src/storage/src/write_batch/codec.rs @@ -88,12 +88,12 @@ impl<'a> Decoder for PayloadDecoder<'a> { let record_batch = record_batch.context(DecodeArrowSnafu)?; let record_batch = RecordBatch::try_from_df_record_batch(schema.clone(), record_batch) .context(CreateRecordBatchSnafu)?; - let op_type = match MutationType::from_i32(*mutation_type) { - Some(MutationType::Delete) => OpType::Delete, - Some(MutationType::Put) => OpType::Put, - None => { + let op_type = match MutationType::try_from(*mutation_type) { + Ok(MutationType::Delete) => OpType::Delete, + Ok(MutationType::Put) => OpType::Put, + Err(e) => { return BatchCorruptedSnafu { - message: format!("Unexpceted mutation type: {mutation_type}"), + message: format!("Unexpceted decode error for mutation type: {e}"), } .fail() } diff --git a/src/store-api/src/region_request.rs b/src/store-api/src/region_request.rs index b6f06b790dab..de07dc11ea0e 100644 --- a/src/store-api/src/region_request.rs +++ b/src/store-api/src/region_request.rs @@ -13,7 +13,7 @@ // limitations under the License. use std::collections::HashMap; -use std::fmt; +use std::fmt::{self}; use api::v1::add_column_location::LocationType; use api::v1::region::{alter_request, region_request, AlterRequest}; @@ -423,11 +423,8 @@ impl TryFrom for AddColumnLocation { type Error = MetadataError; fn try_from(location: v1::AddColumnLocation) -> Result { - let location_type = LocationType::from_i32(location.location_type).context( - InvalidRawRegionRequestSnafu { - err: format!("unknown location type {}", location.location_type), - }, - )?; + let location_type = LocationType::try_from(location.location_type) + .map_err(|e| InvalidRawRegionRequestSnafu { err: e.to_string() }.build())?; let add_column_location = match location_type { LocationType::First => AddColumnLocation::First, LocationType::After => AddColumnLocation::After { From 6defbe2a8a41d50d4ee22fb722917c76674355a3 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Thu, 26 Oct 2023 17:04:12 +0800 Subject: [PATCH 11/12] update locks Signed-off-by: Ruihang Xia --- Cargo.lock | 1122 ++++++++++++++++++++++++++++------------------------ 1 file changed, 600 insertions(+), 522 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cad502408b48..7a62a79a9467 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -31,9 +31,9 @@ checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ "getrandom", "once_cell", @@ -42,15 +42,16 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if 1.0.0", "const-random", "getrandom", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -64,9 +65,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -144,9 +145,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", @@ -158,15 +159,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -182,9 +183,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -272,7 +273,7 @@ version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fab9e93ba8ce88a37d5a30dce4b9913b75413dc1ac56cb5d72e5a840543f829" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "arrow-arith", "arrow-array", "arrow-buffer", @@ -310,14 +311,14 @@ version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d02efa7253ede102d45a4e802a129e83bcc3f49884cab795b1ac223918e4318d" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "arrow-buffer", "arrow-data", "arrow-schema", "chrono", "chrono-tz 0.8.3", "half 2.3.1", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "num", ] @@ -392,7 +393,7 @@ dependencies = [ "arrow-cast", "arrow-ipc", "arrow-schema", - "base64 0.21.3", + "base64 0.21.5", "bytes", "futures", "paste", @@ -428,7 +429,7 @@ dependencies = [ "arrow-schema", "chrono", "half 2.3.1", - "indexmap 2.0.0", + "indexmap 2.0.2", "lexical-core", "num", "serde", @@ -456,13 +457,13 @@ version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "114a348ab581e7c9b6908fcab23cb39ff9f060eb19e72b13f8fb8eaa37f65d22" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", "half 2.3.1", - "hashbrown 0.14.0", + "hashbrown 0.14.2", ] [[package]] @@ -471,7 +472,7 @@ version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d1d179c117b158853e0101bfbed5615e86fe97ee356b4af901f1c5001e1ce4b" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "serde", ] @@ -481,7 +482,7 @@ version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5c71e003202e67e9db139e5278c79f5520bb79922261dfe140e4637ee8b6108" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "arrow-array", "arrow-buffer", "arrow-data", @@ -533,9 +534,9 @@ dependencies = [ [[package]] name = "async-compat" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b48b4ff0c2026db683dea961cd8ea874737f56cffca86fa84415eaddc51c00d" +checksum = "f68a707c1feb095d8c07f8a65b9f506b117d30af431cab89374357de7c11461b" dependencies = [ "futures-core", "futures-io", @@ -565,9 +566,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d495b6dc0184693324491a5ac05f559acc97bf937ab31d7a1c33dd0016be6d2b" +checksum = "f658e2baef915ba0f26f1f7c42bfb8e12f532a01f449a090ded75ae7a07e9ba2" dependencies = [ "bzip2", "flate2", @@ -577,8 +578,8 @@ dependencies = [ "pin-project-lite", "tokio", "xz2", - "zstd 0.12.4", - "zstd-safe 6.0.6", + "zstd 0.13.0", + "zstd-safe 7.0.0", ] [[package]] @@ -592,13 +593,13 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -620,18 +621,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -764,7 +765,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -819,9 +820,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.3" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -831,9 +832,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bcder" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab26f019795af36086f2ca879aeeaae7566bdfd2fe0821a0328d3fdd9d1da2d9" +checksum = "bf16bec990f8ea25cab661199904ef452fcf11f565c404ce6cffbdf3f8cbbc47" dependencies = [ "bytes", "smallvec", @@ -845,7 +846,7 @@ version = "0.4.1" dependencies = [ "arrow", "chrono", - "clap 4.4.1", + "clap 4.4.7", "client", "futures-util", "indicatif", @@ -896,11 +897,11 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.66.1" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "cexpr", "clang-sys", "lazy_static", @@ -911,7 +912,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -937,9 +938,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitvec" @@ -964,16 +965,15 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if 1.0.0", "constant_time_eq", - "digest", ] [[package]] @@ -1032,9 +1032,9 @@ dependencies = [ [[package]] name = "brotli" -version = "3.3.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1043,9 +1043,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.4" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +checksum = "da74e2b81409b1b743f8f0c62cc6254afefb8b8e50bbfe3735550f7aeefa3448" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1064,9 +1064,9 @@ dependencies = [ [[package]] name = "build-data" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac83c47416b2db78a5a8a45d7d229a730b62806fa41ac6b4dbde6d016798776" +checksum = "aed3884e2cab7c973c8fd2d150314b6a932df7fdc830edcaf1e8e7c4ae9db3c0" dependencies = [ "chrono", "safe-lock", @@ -1075,9 +1075,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytecheck" @@ -1103,27 +1103,27 @@ dependencies = [ [[package]] name = "bytecount" -version = "0.6.3" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" +checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ "serde", ] @@ -1166,9 +1166,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" +checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" dependencies = [ "serde", ] @@ -1424,24 +1424,23 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.1" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c8d502cbaec4595d2e7d5f61e318f05417bd2b66fdc3809498f0d3fdf0bea27" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", - "clap_derive 4.4.0", - "once_cell", + "clap_derive 4.4.7", ] [[package]] name = "clap_builder" -version = "4.4.1" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5891c7bc0edb3e1c2204fc5e94009affabeb1821c9e5fdc3959536c5c0bb984d" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", - "clap_lex 0.5.1", + "clap_lex 0.6.0", "strsim 0.10.0", ] @@ -1460,14 +1459,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.0" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -1481,9 +1480,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "client" @@ -1517,7 +1516,7 @@ dependencies = [ "rand", "session", "snafu", - "substrait 0.17.0", + "substrait 0.17.1", "substrait 0.4.1", "tokio", "tokio-stream", @@ -1601,7 +1600,7 @@ dependencies = [ "temp-env", "tikv-jemallocator", "tokio", - "toml 0.7.6", + "toml 0.7.8", ] [[package]] @@ -1612,12 +1611,12 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "7.0.1" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab77dbd8adecaf3f0db40581631b995f312a8a5ae3aa9993188bb8f23d83a5b" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" dependencies = [ - "strum 0.24.1", - "strum_macros 0.24.3", + "strum 0.25.0", + "strum_macros 0.25.3", "unicode-width", ] @@ -1639,7 +1638,7 @@ dependencies = [ "paste", "serde", "snafu", - "toml 0.7.6", + "toml 0.7.8", ] [[package]] @@ -1806,7 +1805,7 @@ dependencies = [ "snafu", "static_assertions", "syn 1.0.109", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -1830,7 +1829,7 @@ dependencies = [ "arrow-flight", "async-stream", "async-trait", - "base64 0.21.3", + "base64 0.21.5", "bytes", "chrono", "common-catalog", @@ -2009,9 +2008,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -2098,23 +2097,21 @@ checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "const-random" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" +checksum = "11df32a13d7892ec42d51d3d175faba5211ffe13ed25d4fb348ac9e9ce835593" dependencies = [ "const-random-macro", - "proc-macro-hack", ] [[package]] name = "const-random-macro" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ "getrandom", "once_cell", - "proc-macro-hack", "tiny-keccak", ] @@ -2151,9 +2148,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "3fbc60abd742b35f2492f808e1abbb83d45f72db402e14c55057edc9c7b1e9e4" dependencies = [ "libc", ] @@ -2351,9 +2348,9 @@ dependencies = [ [[package]] name = "csv" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" dependencies = [ "csv-core", "itoa", @@ -2363,9 +2360,9 @@ dependencies = [ [[package]] name = "csv-core" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" dependencies = [ "memchr", ] @@ -2415,7 +2412,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -2437,7 +2434,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -2447,10 +2444,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "lock_api", "once_cell", - "parking_lot_core 0.9.8", + "parking_lot_core 0.9.9", ] [[package]] @@ -2458,11 +2455,11 @@ name = "datafusion" version = "32.0.0" source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "arrow", "arrow-array", "arrow-schema", - "async-compression 0.4.2", + "async-compression 0.4.4", "async-trait", "bytes", "bzip2", @@ -2479,8 +2476,8 @@ dependencies = [ "futures", "glob", "half 2.3.1", - "hashbrown 0.14.0", - "indexmap 2.0.0", + "hashbrown 0.14.2", + "indexmap 2.0.2", "itertools 0.11.0", "log", "num_cpus", @@ -2505,7 +2502,7 @@ name = "datafusion-common" version = "32.0.0" source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "arrow", "arrow-array", "arrow-buffer", @@ -2529,7 +2526,7 @@ dependencies = [ "datafusion-common", "datafusion-expr", "futures", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "log", "object_store", "parking_lot 0.12.1", @@ -2543,13 +2540,13 @@ name = "datafusion-expr" version = "32.0.0" source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "arrow", "arrow-array", "datafusion-common", "sqlparser 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.25.0", - "strum_macros 0.25.2", + "strum_macros 0.25.3", ] [[package]] @@ -2563,7 +2560,7 @@ dependencies = [ "datafusion-common", "datafusion-expr", "datafusion-physical-expr", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "itertools 0.11.0", "log", "regex-syntax 0.8.2", @@ -2574,21 +2571,21 @@ name = "datafusion-physical-expr" version = "32.0.0" source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "arrow", "arrow-array", "arrow-buffer", "arrow-schema", - "base64 0.21.3", + "base64 0.21.5", "blake2", "blake3", "chrono", "datafusion-common", "datafusion-expr", "half 2.3.1", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "hex", - "indexmap 2.0.0", + "indexmap 2.0.2", "itertools 0.11.0", "libc", "log", @@ -2607,7 +2604,7 @@ name = "datafusion-physical-plan" version = "32.0.0" source = "git+https://github.com/apache/arrow-datafusion.git?rev=26e43acac3a96cec8dd4c8365f22dfb1a84306e9#26e43acac3a96cec8dd4c8365f22dfb1a84306e9" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "arrow", "arrow-array", "arrow-buffer", @@ -2620,8 +2617,8 @@ dependencies = [ "datafusion-physical-expr", "futures", "half 2.3.1", - "hashbrown 0.14.0", - "indexmap 2.0.0", + "hashbrown 0.14.2", + "indexmap 2.0.2", "itertools 0.11.0", "log", "once_cell", @@ -2657,7 +2654,7 @@ dependencies = [ "object_store", "prost 0.12.1", "prost-types 0.12.1", - "substrait 0.17.0", + "substrait 0.17.1", "tokio", ] @@ -2726,7 +2723,7 @@ dependencies = [ "table", "tokio", "tokio-stream", - "toml 0.7.6", + "toml 0.7.8", "tonic 0.10.2", "tower", "tower-http", @@ -2750,7 +2747,7 @@ dependencies = [ "enum_dispatch", "num", "num-traits", - "ordered-float 3.9.1", + "ordered-float 3.9.2", "paste", "serde", "serde_json", @@ -2790,10 +2787,11 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" dependencies = [ + "powerfmt", "serde", ] @@ -2937,9 +2935,9 @@ checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" [[package]] name = "dlv-list" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d529fd73d344663edfd598ccb3f344e46034db51ebd103518eae34338248ad73" +checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" dependencies = [ "const-random", ] @@ -2952,7 +2950,7 @@ checksum = "53ecafc952c4528d9b51a458d1a8904b81783feff9fde08ab6ed2545ff396872" dependencies = [ "cfg-if 1.0.0", "libc", - "socket2 0.4.9", + "socket2 0.4.10", "winapi", ] @@ -2976,9 +2974,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dyn-clone" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "either" @@ -3033,7 +3031,7 @@ checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -3045,7 +3043,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -3076,11 +3074,10 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys 0.48.0", ] @@ -3176,9 +3173,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fd-lock" @@ -3187,7 +3184,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5" dependencies = [ "cfg-if 1.0.0", - "rustix 0.38.10", + "rustix 0.38.20", "windows-sys 0.48.0", ] @@ -3244,6 +3241,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" + [[package]] name = "fixedbitset" version = "0.4.2" @@ -3252,9 +3255,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flagset" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda653ca797810c02f7ca4b804b40b8b95ae046eb989d356bce17919a8c25499" +checksum = "d52a7e408202050813e6f1d9addadcaafef3dca7530c7ddfb005d4081cce6779" [[package]] name = "flatbuffers" @@ -3268,9 +3271,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "libz-sys", @@ -3370,7 +3373,7 @@ dependencies = [ "substrait 0.4.1", "table", "tokio", - "toml 0.7.6", + "toml 0.7.8", "tonic 0.10.2", "tower", "uuid", @@ -3401,7 +3404,7 @@ checksum = "b0fa992f1656e1707946bbba340ad244f0814009ef8c0118eb7b658395f19a2e" dependencies = [ "frunk_proc_macro_helpers", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -3413,7 +3416,7 @@ dependencies = [ "frunk_core", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -3425,7 +3428,7 @@ dependencies = [ "frunk_core", "frunk_proc_macro_helpers", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -3511,7 +3514,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -3616,7 +3619,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "libc", "libgit2-sys", "log", @@ -3638,7 +3641,7 @@ dependencies = [ "serde", "serde_json", "strum 0.25.0", - "strum_macros 0.25.2", + "strum_macros 0.25.3", "tonic 0.10.2", "tonic-build 0.10.2", ] @@ -3685,7 +3688,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", ] [[package]] @@ -3694,16 +3697,16 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", ] [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "allocator-api2", ] @@ -3713,7 +3716,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.0", + "hashbrown 0.14.2", ] [[package]] @@ -3731,12 +3734,11 @@ dependencies = [ [[package]] name = "headers" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ - "base64 0.13.1", - "bitflags 1.3.2", + "base64 0.21.5", "bytes", "headers-core", "http", @@ -3774,9 +3776,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -3901,7 +3903,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -3917,7 +3919,7 @@ dependencies = [ "futures-util", "http", "hyper", - "rustls 0.21.7", + "rustls 0.21.8", "tokio", "tokio-rustls 0.24.1", ] @@ -3936,16 +3938,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core", ] [[package]] @@ -4011,25 +4013,25 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "serde", ] [[package]] name = "indicatif" -version = "0.17.6" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", "number_prefix", - "portable-atomic 1.4.3", + "portable-atomic 1.5.0", "unicode-width", ] @@ -4041,12 +4043,12 @@ checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" [[package]] name = "inferno" -version = "0.11.16" +version = "0.11.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73c0fefcb6d409a6587c07515951495d482006f89a21daa0f2f783aa4fd5e027" +checksum = "c50453ec3a6555fad17b1cd1a80d16af5bc7cb35094f64e429fd46549018c6a3" dependencies = [ - "ahash 0.8.3", - "indexmap 2.0.0", + "ahash 0.8.6", + "indexmap 2.0.2", "is-terminal", "itoa", "log", @@ -4095,16 +4097,16 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", "windows-sys 0.48.0", ] [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "iri-string" @@ -4134,8 +4136,8 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.10", + "hermit-abi 0.3.3", + "rustix 0.38.20", "windows-sys 0.48.0", ] @@ -4165,9 +4167,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] @@ -4194,13 +4196,13 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "8.3.0" +version = "9.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +checksum = "155c4d7e39ad04c172c5e3a99c434ea3b4a7ba7960b38ecd562b270b097cce09" dependencies = [ - "base64 0.21.3", - "pem 1.1.1", - "ring", + "base64 0.21.5", + "pem 3.0.2", + "ring 0.17.5", "serde", "serde_json", "simple_asn1", @@ -4252,7 +4254,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "spin", + "spin 0.5.2", ] [[package]] @@ -4336,9 +4338,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.147" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libgit2-sys" @@ -4364,9 +4366,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libproc" @@ -4416,15 +4418,15 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -4624,15 +4626,15 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matchit" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "matrixmultiply" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" dependencies = [ "autocfg", "rawpointer", @@ -4640,10 +4642,11 @@ dependencies = [ [[package]] name = "md-5" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ + "cfg-if 1.0.0", "digest", ] @@ -4655,9 +4658,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.6.2" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memcomparable" @@ -4784,7 +4787,7 @@ dependencies = [ "table", "tokio", "tokio-stream", - "toml 0.7.6", + "toml 0.7.8", "tonic 0.10.2", "tower", "tracing", @@ -4818,7 +4821,7 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b9b8653cec6897f73b519a43fba5ee3d50f62fe9af80b428accdcc093b4a849" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", "metrics-macros", "portable-atomic 0.3.20", ] @@ -4877,7 +4880,7 @@ dependencies = [ "indexmap 1.9.3", "metrics", "num_cpus", - "ordered-float 2.10.0", + "ordered-float 2.10.1", "parking_lot 0.12.1", "portable-atomic 0.3.20", "quanta 0.10.1", @@ -4918,9 +4921,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "log", @@ -4987,9 +4990,9 @@ dependencies = [ [[package]] name = "moka" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dc65d4615c08c8a13d91fd404b5a2a4485ba35b4091e3315cf8798d280c2f29" +checksum = "d8017ec3548ffe7d4cef7ac0e12b044c01164a74c0f3119420faeaf13490ad8b" dependencies = [ "async-lock", "async-trait", @@ -5037,7 +5040,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", "termcolor", "thiserror", ] @@ -5062,11 +5065,11 @@ dependencies = [ "percent-encoding", "pin-project", "priority-queue", - "rustls 0.21.7", + "rustls 0.21.8", "rustls-pemfile", "serde", "serde_json", - "socket2 0.5.3", + "socket2 0.5.5", "thiserror", "tokio", "tokio-rustls 0.24.1", @@ -5083,10 +5086,10 @@ version = "0.30.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57349d5a326b437989b6ee4dc8f2f34b0cc131202748414712a8e7d98952fc8c" dependencies = [ - "base64 0.21.3", + "base64 0.21.5", "bigdecimal", - "bindgen 0.66.1", - "bitflags 2.4.0", + "bindgen 0.68.1", + "bitflags 2.4.1", "bitvec", "byteorder", "bytes", @@ -5273,13 +5276,13 @@ dependencies = [ [[package]] name = "num-derive" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e" +checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -5327,9 +5330,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", "libm", @@ -5341,7 +5344,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", ] @@ -5374,9 +5377,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -5443,7 +5446,7 @@ dependencies = [ "async-compat", "async-trait", "backon", - "base64 0.21.3", + "base64 0.21.5", "bytes", "chrono", "flagset", @@ -5481,9 +5484,9 @@ dependencies = [ [[package]] name = "opensrv-mysql" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34be5f325aa2d88f9770cea96539b58297b83cc7f80b2b317711af787f6c5a7" +checksum = "5c66063eb6aca9e6b5354f91db29f7244a8e7f9c01219b3ce76a5340a78d9f6f" dependencies = [ "async-trait", "byteorder", @@ -5529,7 +5532,7 @@ source = "git+https://github.com/waynexia/opentelemetry-rust.git?rev=33841b38dda dependencies = [ "futures-core", "futures-sink", - "indexmap 2.0.0", + "indexmap 2.0.2", "js-sys", "once_cell", "pin-project-lite", @@ -5679,18 +5682,18 @@ dependencies = [ [[package]] name = "ordered-float" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" dependencies = [ "num-traits", ] [[package]] name = "ordered-float" -version = "3.9.1" +version = "3.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a54938017eacd63036332b4ae5c8a49fc8c0c1d6d629893057e4f13609edd06" +checksum = "f1e1c390732d15f1d48471625cd92d154e66db2c56645e29a9cd26f4699f72dc" dependencies = [ "num-traits", "rand", @@ -5722,15 +5725,15 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e" dependencies = [ - "dlv-list 0.5.0", + "dlv-list 0.5.2", "hashbrown 0.13.2", ] [[package]] name = "os_str_bytes" -version = "6.5.1" +version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" [[package]] name = "overload" @@ -5785,7 +5788,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", + "parking_lot_core 0.9.9", ] [[package]] @@ -5804,15 +5807,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "backtrace", "cfg-if 1.0.0", "libc", "petgraph", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "smallvec", "thread-id", "windows-targets 0.48.5", @@ -5824,7 +5827,7 @@ version = "47.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0463cc3b256d5f50408c49a4be3a16674f4c8ceef60941709620a062b1f6bf4d" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "arrow-array", "arrow-buffer", "arrow-cast", @@ -5832,13 +5835,13 @@ dependencies = [ "arrow-ipc", "arrow-schema", "arrow-select", - "base64 0.21.3", + "base64 0.21.5", "brotli", "bytes", "chrono", "flate2", "futures", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "lz4", "num", "num-bigint", @@ -5906,20 +5909,21 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "pem" -version = "1.1.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +checksum = "6b13fe415cdf3c8e44518e18a7c95a13431d9bdf6d15367d82b23c377fdd441a" dependencies = [ - "base64 0.13.1", + "base64 0.21.5", + "serde", ] [[package]] name = "pem" -version = "2.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b13fe415cdf3c8e44518e18a7c95a13431d9bdf6d15367d82b23c377fdd441a" +checksum = "3163d2912b7c3b52d651a055f2c7eec9ba5cd22d26ef75b8dd3a59980b185923" dependencies = [ - "base64 0.21.3", + "base64 0.21.5", "serde", ] @@ -5949,9 +5953,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.3" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33" +checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" dependencies = [ "memchr", "thiserror", @@ -5960,9 +5964,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.3" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bee7be22ce7918f641a33f08e3f43388c7656772244e2bbb2477f44cc9021a" +checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" dependencies = [ "pest", "pest_generator", @@ -5970,22 +5974,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.3" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1511785c5e98d79a05e8a6bc34b4ac2168a0e3e92161862030ad84daa223141" +checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] name = "pest_meta" -version = "2.7.3" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42f0394d3123e33353ca5e1e89092e533d2cc490389f2bd6131c43c634ebc5f" +checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" dependencies = [ "once_cell", "pest", @@ -5999,17 +6003,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.0", + "indexmap 2.0.2", ] [[package]] name = "pgwire" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "593c5af58c6394873b84c6fabf31f97e49ab29a56809e7fd240c1bcc4e5d272f" +checksum = "06d04982366efd653d4365175426acbabd55efb07231869e92b9e1f5b3faf7df" dependencies = [ "async-trait", - "base64 0.21.3", + "base64 0.21.5", "bytes", "chrono", "derive-new", @@ -6020,7 +6024,7 @@ dependencies = [ "md5", "postgres-types", "rand", - "ring", + "ring 0.16.20", "stringprep", "thiserror", "time", @@ -6095,7 +6099,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -6216,14 +6220,14 @@ version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e30165d31df606f5726b090ec7592c308a0eaf61721ff64c9a3018e344a8753e" dependencies = [ - "portable-atomic 1.4.3", + "portable-atomic 1.5.0", ] [[package]] name = "portable-atomic" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" +checksum = "b559898e0b4931ed2d3b959ab0c2da4d99cc644c4b0b1a35b4d344027f474023" [[package]] name = "postgres-protocol" @@ -6231,7 +6235,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" dependencies = [ - "base64 0.21.3", + "base64 0.21.5", "byteorder", "bytes", "fallible-iterator", @@ -6255,6 +6259,12 @@ dependencies = [ "postgres-protocol", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "pprof" version = "0.11.1" @@ -6315,12 +6325,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -6376,17 +6386,11 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -6401,7 +6405,7 @@ dependencies = [ "byteorder", "hex", "lazy_static", - "rustix 0.36.15", + "rustix 0.36.16", ] [[package]] @@ -6525,11 +6529,11 @@ dependencies = [ "multimap", "once_cell", "petgraph", - "prettyplease 0.2.12", + "prettyplease 0.2.15", "prost 0.12.1", "prost-types 0.12.1", "regex", - "syn 2.0.29", + "syn 2.0.38", "tempfile", "which", ] @@ -6557,7 +6561,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -6751,7 +6755,7 @@ dependencies = [ name = "query" version = "0.4.1" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "api", "approx_eq", "arc-swap", @@ -6831,6 +6835,16 @@ dependencies = [ "serde", ] +[[package]] +name = "quick-xml" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "quote" version = "1.0.33" @@ -6866,7 +6880,7 @@ dependencies = [ "crossbeam", "fail", "fs2", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "hex", "if_chain", "lazy_static", @@ -6948,9 +6962,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -6958,14 +6972,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -6986,6 +6998,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -6999,14 +7020,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.4" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ - "aho-corasick 1.0.5", + "aho-corasick 1.1.2", "memchr", - "regex-automata 0.3.7", - "regex-syntax 0.7.5", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -7020,13 +7041,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.7" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ - "aho-corasick 1.0.5", + "aho-corasick 1.1.2", "memchr", - "regex-syntax 0.7.5", + "regex-syntax 0.8.2", ] [[package]] @@ -7049,9 +7070,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "regress" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a9ecfa0cb04d0b04dddb99b8ccf4f66bc8dfd23df694b398570bd8ae3a50fb" +checksum = "4ed9969cad8051328011596bf549629f1b800cf1731e7964b1eef8dfc480d2c2" dependencies = [ "hashbrown 0.13.2", "memchr", @@ -7059,22 +7080,22 @@ dependencies = [ [[package]] name = "rend" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" +checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" dependencies = [ "bytecheck", ] [[package]] name = "reqsign" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3228e570df74d69d3d3236a71371f1edd748a3e4eb728ea1f29d403bc10fc727" +checksum = "1d64673dc76895d04d102f9fafb83039d79e9d44c51e83d1d271671ac9263821" dependencies = [ "anyhow", "async-trait", - "base64 0.21.3", + "base64 0.21.5", "chrono", "form_urlencoded", "hex", @@ -7085,7 +7106,7 @@ dependencies = [ "log", "once_cell", "percent-encoding", - "quick-xml 0.29.0", + "quick-xml 0.30.0", "rand", "reqwest", "rsa 0.9.2", @@ -7099,11 +7120,11 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.20" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.3", + "base64 0.21.5", "bytes", "encoding_rs", "futures-core", @@ -7121,12 +7142,13 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.7", + "rustls 0.21.8", "rustls-native-certs", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", "tokio-rustls 0.24.1", "tokio-util", @@ -7185,14 +7207,15 @@ dependencies = [ [[package]] name = "rhai" -version = "1.15.1" +version = "1.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2a11a646ef5d4e4a9d5cf80c7e4ecb20f9b1954292d5c5e6d6cbc8d33728ec" +checksum = "206cee941730eaf90a22c84235b25193df661393688162e15551164f92f09eca" dependencies = [ - "ahash 0.8.3", - "bitflags 1.3.2", + "ahash 0.8.6", + "bitflags 2.4.1", "instant", "num-traits", + "once_cell", "rhai_codegen", "smallvec", "smartstring", @@ -7200,13 +7223,13 @@ dependencies = [ [[package]] name = "rhai_codegen" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db74e3fdd29d969a0ec1f8e79171a6f0f71d0429293656901db382d248c4c021" +checksum = "853977598f084a492323fe2f7896b4100a86284ee8473612de60021ea341310f" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] @@ -7218,12 +7241,26 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +dependencies = [ + "cc", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "rkyv" version = "0.7.42" @@ -7378,7 +7415,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.29", + "syn 2.0.38", "walkdir", ] @@ -7451,12 +7488,12 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.15" +version = "0.36.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" +checksum = "6da3636faa25820d8648e0e31c5d519bbb01f72fdf57131f0f5f7da5fed36eab" dependencies = [ "bitflags 1.3.2", - "errno 0.3.3", + "errno 0.3.5", "io-lifetimes", "libc", "linux-raw-sys 0.1.4", @@ -7465,14 +7502,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.10" +version = "0.38.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6248e1caa625eb708e266e06159f135e8c26f2bb7ceb72dc4b2766d0340964" +checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" dependencies = [ - "bitflags 2.4.0", - "errno 0.3.3", + "bitflags 2.4.1", + "errno 0.3.5", "libc", - "linux-raw-sys 0.4.5", + "linux-raw-sys 0.4.10", "windows-sys 0.48.0", ] @@ -7483,20 +7520,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", - "ring", + "ring 0.16.20", "sct", "webpki", ] [[package]] name = "rustls" -version = "0.21.7" +version = "0.21.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" dependencies = [ "log", - "ring", - "rustls-webpki 0.101.4", + "ring 0.17.5", + "rustls-webpki 0.101.7", "sct", ] @@ -7518,27 +7555,27 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.3", + "base64 0.21.5", ] [[package]] name = "rustls-webpki" -version = "0.100.2" +version = "0.100.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" +checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] name = "rustls-webpki" -version = "0.101.4" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -7556,7 +7593,7 @@ name = "rustpython-codegen" version = "0.2.0" source = "git+https://github.com/discord9/RustPython?rev=9ed5137412#9ed51374125b5f1a9e5cee5dd7e27023b8591f1e" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", "bitflags 1.3.2", "indexmap 1.9.3", "itertools 0.10.5", @@ -7657,7 +7694,7 @@ name = "rustpython-parser" version = "0.2.0" source = "git+https://github.com/discord9/RustPython?rev=9ed5137412#9ed51374125b5f1a9e5cee5dd7e27023b8591f1e" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", "anyhow", "itertools 0.10.5", "lalrpop", @@ -7692,7 +7729,7 @@ version = "0.2.0" source = "git+https://github.com/discord9/RustPython?rev=9ed5137412#9ed51374125b5f1a9e5cee5dd7e27023b8591f1e" dependencies = [ "adler32", - "ahash 0.7.6", + "ahash 0.7.7", "ascii", "base64 0.13.1", "blake2", @@ -7735,7 +7772,7 @@ dependencies = [ "sha-1", "sha2", "sha3", - "socket2 0.4.9", + "socket2 0.4.10", "system-configuration", "termios", "ucd", @@ -7758,7 +7795,7 @@ name = "rustpython-vm" version = "0.2.0" source = "git+https://github.com/discord9/RustPython?rev=9ed5137412#9ed51374125b5f1a9e5cee5dd7e27023b8591f1e" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", "ascii", "atty", "bitflags 1.3.2", @@ -7890,11 +7927,11 @@ checksum = "077d73db7973cccf63eb4aff1e5a34dc2459baa867512088269ea5f2f4253c90" [[package]] name = "safe-proc-macro2" -version = "1.0.36" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "814c536dcd27acf03296c618dab7ad62d28e70abd7ba41d3f34a2ce707a2c666" +checksum = "7fd85be67db87168aa3c13fd0da99f48f2ab005dccad5af5626138dc1df20eb6" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -7970,9 +8007,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763f8cd0d4c71ed8389c90cb8100cba87e763bd01a8e614d4f0af97bcd50a161" +checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" dependencies = [ "dyn-clone", "indexmap 1.9.3", @@ -7983,9 +8020,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0f696e21e10fa546b7ffb1c9672c6de8fbc7a81acf59524386d8639bf12737" +checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" dependencies = [ "proc-macro2", "quote", @@ -8058,12 +8095,12 @@ dependencies = [ [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -8107,9 +8144,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ "serde", ] @@ -8122,9 +8159,9 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" dependencies = [ "serde_derive", ] @@ -8141,13 +8178,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -8163,9 +8200,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -8190,14 +8227,14 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ "serde", ] @@ -8211,7 +8248,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -8228,15 +8265,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237" +checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" dependencies = [ - "base64 0.21.3", + "base64 0.21.5", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_json", "serde_with_macros", @@ -8245,23 +8282,23 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e6be15c453eb305019bfa438b1593c731f36a289a7853f7707ee29e870b3b3c" +checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] name = "serde_yaml" -version = "0.9.25" +version = "0.9.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" +checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "itoa", "ryu", "serde", @@ -8335,7 +8372,7 @@ dependencies = [ "rand", "regex", "rust-embed", - "rustls 0.21.7", + "rustls 0.21.8", "rustls-pemfile", "schemars", "script", @@ -8389,9 +8426,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -8400,9 +8437,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -8421,18 +8458,18 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signal-hook-registry" @@ -8522,9 +8559,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "smartstring" @@ -8568,9 +8605,9 @@ checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -8578,9 +8615,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", "windows-sys 0.48.0", @@ -8604,6 +8641,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "spki" version = "0.5.4" @@ -8680,7 +8723,7 @@ name = "sqlness-runner" version = "0.4.1" dependencies = [ "async-trait", - "clap 4.4.1", + "clap 4.4.7", "client", "common-base", "common-error", @@ -8753,7 +8796,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", "atoi", "base64 0.13.1", "bitflags 1.3.2", @@ -8837,11 +8880,11 @@ dependencies = [ [[package]] name = "sre-engine" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a490c5c46c35dba9a6f5e7ee8e4d67e775eb2d2da0f115750b8d10e1c1ac2d28" +checksum = "1120e6a8cbd4d85d5532d2e8a245aef2128e1853981f8b6d9943264184843102" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "num_enum", "optional", ] @@ -9002,10 +9045,11 @@ dependencies = [ [[package]] name = "stringprep" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" dependencies = [ + "finl_unicode", "unicode-bidi", "unicode-normalization", ] @@ -9034,7 +9078,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" dependencies = [ - "strum_macros 0.25.2", + "strum_macros 0.25.3", ] [[package]] @@ -9052,15 +9096,15 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.25.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -9095,20 +9139,20 @@ dependencies = [ "prost 0.12.1", "session", "snafu", - "substrait 0.17.0", + "substrait 0.17.1", "table", "tokio", ] [[package]] name = "substrait" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c27c547fb40b6cdf4acd9bae723bb36e9297d586d175c7d31ad9fee4a494c097" +checksum = "f1e8440a1c9b95a7c9a00a19f78b980749e8c945eb880687a5d673cea83729c5" dependencies = [ "git2", "heck", - "prettyplease 0.2.12", + "prettyplease 0.2.15", "prost 0.12.1", "prost-build 0.12.1", "prost-types 0.12.1", @@ -9117,7 +9161,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml", - "syn 2.0.29", + "syn 2.0.38", "typify", "walkdir", ] @@ -9164,9 +9208,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.29" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -9260,15 +9304,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "temp-env" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9547444bfe52cbd79515c6c8087d8ae6ca8d64d2d31a27746320f5cb81d1a15c" +checksum = "96374855068f47402c3121c6eed88d29cb1de8f3ab27090e273e420bdabcf050" dependencies = [ "parking_lot 0.12.1", ] @@ -9280,9 +9324,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if 1.0.0", - "fastrand 2.0.0", + "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.10", + "rustix 0.38.20", "windows-sys 0.48.0", ] @@ -9299,9 +9343,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] @@ -9403,32 +9447,31 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.47" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] name = "thread-id" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79474f573561cdc4871a0de34a51c92f7f5a56039113fbb5b9c9f96bdb756669" +checksum = "f0ec81c46e9eb50deaa257be2f148adf052d1fb7701cfd55ccfab2525280b70b" dependencies = [ "libc", - "redox_syscall 0.2.16", "winapi", ] @@ -9472,7 +9515,7 @@ checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09" dependencies = [ "byteorder", "integer-encoding", - "ordered-float 2.10.0", + "ordered-float 2.10.1", ] [[package]] @@ -9508,12 +9551,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -9521,15 +9565,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -9576,9 +9620,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ "backtrace", "bytes", @@ -9588,7 +9632,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.3", + "socket2 0.5.5", "tokio-macros", "tracing", "windows-sys 0.48.0", @@ -9612,7 +9656,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -9635,7 +9679,7 @@ dependencies = [ "postgres-protocol", "postgres-types", "rand", - "socket2 0.5.3", + "socket2 0.5.5", "tokio", "tokio-util", "whoami", @@ -9648,8 +9692,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd5831152cb0d3f79ef5523b357319ba154795d64c7078b2daa95a803b54057f" dependencies = [ "futures", - "ring", - "rustls 0.21.7", + "ring 0.16.20", + "rustls 0.21.8", "tokio", "tokio-postgres", "tokio-rustls 0.24.1", @@ -9672,7 +9716,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.7", + "rustls 0.21.8", "tokio", ] @@ -9702,9 +9746,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -9726,9 +9770,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", @@ -9738,20 +9782,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_spanned", "toml_datetime", @@ -9766,7 +9810,7 @@ checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" dependencies = [ "async-trait", "axum", - "base64 0.21.3", + "base64 0.21.5", "bytes", "futures-core", "futures-util", @@ -9795,7 +9839,7 @@ dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.3", + "base64 0.21.5", "bytes", "h2", "http", @@ -9805,7 +9849,7 @@ dependencies = [ "percent-encoding", "pin-project", "prost 0.12.1", - "rustls 0.21.7", + "rustls 0.21.8", "rustls-pemfile", "tokio", "tokio-rustls 0.24.1", @@ -9835,11 +9879,11 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" dependencies = [ - "prettyplease 0.2.12", + "prettyplease 0.2.15", "proc-macro2", "prost-build 0.12.1", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -9920,11 +9964,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if 1.0.0", "log", "pin-project-lite", "tracing-attributes", @@ -9944,13 +9987,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -9959,7 +10002,7 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5c266b9ac83dedf0e0385ad78514949e6d89491269e7065bee51d2bb8ec7373" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "gethostname", "log", "serde", @@ -9973,9 +10016,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -9995,12 +10038,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -10070,9 +10113,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "typetag" @@ -10095,14 +10138,14 @@ checksum = "bfc13d450dc4a695200da3074dacf43d449b968baee95e341920e47f61a3b40f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] name = "typify" -version = "0.0.13" +version = "0.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be9bb640c0eece20cac2028ebbc2ca1a3d17e3b1ddd98540309c309ed178d158" +checksum = "c2e3b707a653e2915a2fc2c4ee96a3d30b9554b9435eb4cc8b5c6c74bbdd3044" dependencies = [ "typify-impl", "typify-macro", @@ -10110,9 +10153,9 @@ dependencies = [ [[package]] name = "typify-impl" -version = "0.0.13" +version = "0.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8d9ecedde2fd77e975c38eeb9ca40b34ad0247b2259c6e6bbd2a8d6cc2444f" +checksum = "9d9c752192779f666e4c868672dee56a652b82c08032c7e9d23f6a845b282298" dependencies = [ "heck", "log", @@ -10121,16 +10164,16 @@ dependencies = [ "regress", "schemars", "serde_json", - "syn 2.0.29", + "syn 2.0.38", "thiserror", "unicode-ident", ] [[package]] name = "typify-macro" -version = "0.0.13" +version = "0.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08942cd65d458d2da15777a649cb6400cb545f17964f1ca965583f22e9cc3a9" +checksum = "a14defd554507e72a2bb93cd081c8b374cfed43b3d986b141ad3839d9fd6986b" dependencies = [ "proc-macro2", "quote", @@ -10138,7 +10181,7 @@ dependencies = [ "serde", "serde_json", "serde_tokenstream", - "syn 2.0.29", + "syn 2.0.38", "typify-impl", ] @@ -10311,9 +10354,9 @@ checksum = "623f59e6af2a98bdafeb93fa277ac8e1e40440973001ca15cf4ae1541cd16d56" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -10332,9 +10375,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -10374,6 +10417,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.4.1" @@ -10399,9 +10448,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" dependencies = [ "atomic", "getrandom", @@ -10412,13 +10461,13 @@ dependencies = [ [[package]] name = "uuid-macro-internal" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e1ba1f333bd65ce3c9f27de592fcbc256dafe3af2717f56d7c87761fbaccf4" +checksum = "3d8c6bba9b149ee82950daefc9623b32bb1dacbfb1890e352f6b887bd582adaf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -10479,9 +10528,9 @@ checksum = "f8e76fae08f03f96e166d2dfda232190638c10e0383841252416f9cfe2ae60e6" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -10529,7 +10578,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -10563,7 +10612,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -10599,12 +10648,12 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -10622,18 +10671,19 @@ version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "rustls-webpki 0.100.2", + "rustls-webpki 0.100.3", ] [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix 0.38.20", ] [[package]] @@ -10648,9 +10698,9 @@ dependencies = [ [[package]] name = "wide" -version = "0.7.11" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" +checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" dependencies = [ "bytemuck", "safe_arch", @@ -10680,9 +10730,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -10715,6 +10765,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -10879,9 +10938,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.15" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" dependencies = [ "memchr", ] @@ -10926,7 +10985,7 @@ dependencies = [ "der 0.7.8", "hex", "pem 2.0.1", - "ring", + "ring 0.16.20", "signature", "spki 0.7.2", "thiserror", @@ -10934,9 +10993,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47430998a7b5d499ccee752b41567bc3afc57e1327dc855b1a2aa44ce29b5fa1" +checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" [[package]] name = "xz2" @@ -10956,6 +11015,26 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "zerocopy" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81ba595b9f2772fbee2312de30eeb80ec773b4cb2f1e8098db024afadda6c06f" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772666c41fb6dceaf520b564b962d738a8e1a83b41bd48945f50837aed78bb1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "zeroize" version = "1.6.0" @@ -11029,11 +11108,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] From d4366af7fe6f8a4b9ab3fa3e7bf47ef890751ae5 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Thu, 26 Oct 2023 20:02:46 +0800 Subject: [PATCH 12/12] downgrade dlv-list Signed-off-by: Ruihang Xia --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8e1ad37b6974..249066b9d4b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2935,9 +2935,9 @@ checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" [[package]] name = "dlv-list" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" +checksum = "8aead04dc46b5f263c25721cf25c9e595951d15055f8063f92392fa0d7f64cf4" dependencies = [ "const-random", ] @@ -5731,7 +5731,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e" dependencies = [ - "dlv-list 0.5.2", + "dlv-list 0.5.1", "hashbrown 0.13.2", ]