diff --git a/Cargo.lock b/Cargo.lock index 353399f9cc..5710cd14f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,7 +90,7 @@ version = "1.2.6-alpha" dependencies = [ "arc-swap 1.6.0", "arena", - "arrow 43.0.0", + "arrow 47.0.0", "async-stream", "async-trait", "atomic_enum", @@ -117,7 +117,7 @@ dependencies = [ "parquet_ext", "pin-project-lite", "prometheus 0.12.0", - "prost", + "prost 0.11.8", "rand 0.7.3", "remote_engine_client", "router", @@ -235,24 +235,24 @@ dependencies = [ [[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 43.0.0", - "arrow-array 43.0.0", - "arrow-buffer 43.0.0", - "arrow-cast 43.0.0", - "arrow-csv 43.0.0", - "arrow-data 43.0.0", - "arrow-ipc 43.0.0", - "arrow-json 43.0.0", - "arrow-ord 43.0.0", - "arrow-row 43.0.0", - "arrow-schema 43.0.0", - "arrow-select 43.0.0", - "arrow-string 43.0.0", + "arrow-arith 47.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-cast 47.0.0", + "arrow-csv 47.0.0", + "arrow-data 47.0.0", + "arrow-ipc 47.0.0", + "arrow-json 47.0.0", + "arrow-ord 47.0.0", + "arrow-row 47.0.0", + "arrow-schema 47.0.0", + "arrow-select 47.0.0", + "arrow-string 47.0.0", ] [[package]] @@ -272,14 +272,14 @@ 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 43.0.0", - "arrow-buffer 43.0.0", - "arrow-data 43.0.0", - "arrow-schema 43.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-data 47.0.0", + "arrow-schema 47.0.0", "chrono", "half 2.2.1", "num", @@ -303,14 +303,14 @@ 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 43.0.0", - "arrow-data 43.0.0", - "arrow-schema 43.0.0", + "arrow-buffer 47.0.0", + "arrow-data 47.0.0", + "arrow-schema 47.0.0", "chrono", "chrono-tz", "half 2.2.1", @@ -330,10 +330,11 @@ 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.2.1", "num", ] @@ -356,15 +357,15 @@ dependencies = [ [[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 43.0.0", - "arrow-buffer 43.0.0", - "arrow-data 43.0.0", - "arrow-schema 43.0.0", - "arrow-select 43.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-data 47.0.0", + "arrow-schema 47.0.0", + "arrow-select 47.0.0", "chrono", "comfy-table 7.0.1", "half 2.2.1", @@ -393,15 +394,15 @@ 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 43.0.0", - "arrow-buffer 43.0.0", - "arrow-cast 43.0.0", - "arrow-data 43.0.0", - "arrow-schema 43.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-cast 47.0.0", + "arrow-data 47.0.0", + "arrow-schema 47.0.0", "chrono", "csv", "csv-core", @@ -424,12 +425,12 @@ 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 43.0.0", - "arrow-schema 43.0.0", + "arrow-buffer 47.0.0", + "arrow-schema 47.0.0", "half 2.2.1", "num", ] @@ -450,15 +451,15 @@ dependencies = [ [[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 43.0.0", - "arrow-buffer 43.0.0", - "arrow-cast 43.0.0", - "arrow-data 43.0.0", - "arrow-schema 43.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-cast 47.0.0", + "arrow-data 47.0.0", + "arrow-schema 47.0.0", "flatbuffers", ] @@ -484,15 +485,15 @@ 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 43.0.0", - "arrow-buffer 43.0.0", - "arrow-cast 43.0.0", - "arrow-data 43.0.0", - "arrow-schema 43.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-cast 47.0.0", + "arrow-data 47.0.0", + "arrow-schema 47.0.0", "chrono", "half 2.2.1", "indexmap 2.0.0", @@ -519,15 +520,15 @@ 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 43.0.0", - "arrow-buffer 43.0.0", - "arrow-data 43.0.0", - "arrow-schema 43.0.0", - "arrow-select 43.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-data 47.0.0", + "arrow-schema 47.0.0", + "arrow-select 47.0.0", "half 2.2.1", "num", ] @@ -549,15 +550,15 @@ 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 43.0.0", - "arrow-buffer 43.0.0", - "arrow-data 43.0.0", - "arrow-schema 43.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-data 47.0.0", + "arrow-schema 47.0.0", "half 2.2.1", "hashbrown 0.14.0", ] @@ -570,9 +571,9 @@ checksum = "bc85923d8d6662cc66ac6602c7d1876872e671002d60993dfdf492a6badeae92" [[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" [[package]] name = "arrow-select" @@ -589,14 +590,15 @@ 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 = [ - "arrow-array 43.0.0", - "arrow-buffer 43.0.0", - "arrow-data 43.0.0", - "arrow-schema 43.0.0", + "ahash 0.8.3", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-data 47.0.0", + "arrow-schema 47.0.0", "num", ] @@ -617,15 +619,15 @@ 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 43.0.0", - "arrow-buffer 43.0.0", - "arrow-data 43.0.0", - "arrow-schema 43.0.0", - "arrow-select 43.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-data 47.0.0", + "arrow-schema 47.0.0", + "arrow-select 47.0.0", "num", "regex", "regex-syntax 0.7.1", @@ -635,7 +637,7 @@ dependencies = [ name = "arrow_ext" version = "1.2.6-alpha" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "serde", "snafu 0.6.10", "zstd", @@ -644,10 +646,10 @@ dependencies = [ [[package]] name = "arrow_util" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql.git?rev=acbd3ad7651f2deb74857155bea892f88926da57#acbd3ad7651f2deb74857155bea892f88926da57" +source = "git+https://github.com/CeresDB/influxql.git?rev=2d8060c09d7bc6ceefc7fd41492821f179ae40a8#2d8060c09d7bc6ceefc7fd41492821f179ae40a8" dependencies = [ "ahash 0.8.3", - "arrow 43.0.0", + "arrow 47.0.0", "chrono", "comfy-table 6.1.4", "hashbrown 0.13.2", @@ -740,9 +742,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", @@ -871,7 +873,7 @@ version = "1.2.6-alpha" dependencies = [ "analytic_engine", "arena", - "arrow 43.0.0", + "arrow 47.0.0", "base64 0.13.1", "bytes_ext", "clap 3.2.23", @@ -1330,7 +1332,7 @@ version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39fca0a20131625263de118b8d09be05ffcc0d0ed6392f75d29e277f36b0d32c" dependencies = [ - "prost", + "prost 0.11.8", "protoc-bin-vendored", "tonic 0.8.3", "tonic-build", @@ -1360,18 +1362,17 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", - "time 0.1.43", "wasm-bindgen", - "winapi", + "windows-targets 0.48.1", ] [[package]] @@ -1519,7 +1520,7 @@ dependencies = [ "log", "macros", "meta_client", - "prost", + "prost 0.11.8", "runtime", "serde", "serde_json", @@ -1586,7 +1587,7 @@ dependencies = [ name = "common_types" version = "1.2.6-alpha" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "arrow_ext", "bytes_ext", "ceresdbproto", @@ -1595,7 +1596,7 @@ dependencies = [ "hash_ext", "macros", "paste 1.0.12", - "prost", + "prost 0.11.8", "rand 0.7.3", "seahash", "serde", @@ -1631,7 +1632,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2895653b4d9f1538a83970077cb01dfc77a4810524e51a110944688e916b18e" dependencies = [ - "prost", + "prost 0.11.8", "prost-types", "tonic 0.9.2", "tracing-core", @@ -2069,13 +2070,13 @@ dependencies = [ [[package]] name = "datafusion" -version = "27.0.0" -source = "git+https://github.com/CeresDB/arrow-datafusion.git?rev=9c3a537e25e5ab3299922864034f67fb2f79805d#9c3a537e25e5ab3299922864034f67fb2f79805d" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=219cfb4ccb36045c73409127db51377d66ca0f33#219cfb4ccb36045c73409127db51377d66ca0f33" dependencies = [ "ahash 0.8.3", - "arrow 43.0.0", - "arrow-array 43.0.0", - "arrow-schema 43.0.0", + "arrow 47.0.0", + "arrow-array 47.0.0", + "arrow-schema 47.0.0", "async-compression", "async-trait", "bytes", @@ -2087,24 +2088,23 @@ dependencies = [ "datafusion-expr", "datafusion-optimizer", "datafusion-physical-expr", - "datafusion-row", + "datafusion-physical-plan", "datafusion-sql", "flate2", "futures 0.3.28", "glob", + "half 2.2.1", "hashbrown 0.14.0", "indexmap 2.0.0", "itertools 0.11.0", - "lazy_static", "log", "num_cpus", - "object_store 0.6.1", + "object_store 0.7.1", "parking_lot 0.12.1", "parquet", "percent-encoding", "pin-project-lite", "rand 0.8.5", - "smallvec", "sqlparser", "tempfile", "tokio", @@ -2117,29 +2117,36 @@ dependencies = [ [[package]] name = "datafusion-common" -version = "27.0.0" -source = "git+https://github.com/CeresDB/arrow-datafusion.git?rev=9c3a537e25e5ab3299922864034f67fb2f79805d#9c3a537e25e5ab3299922864034f67fb2f79805d" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=219cfb4ccb36045c73409127db51377d66ca0f33#219cfb4ccb36045c73409127db51377d66ca0f33" dependencies = [ - "arrow 43.0.0", - "arrow-array 43.0.0", + "ahash 0.8.3", + "arrow 47.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-schema 47.0.0", "chrono", + "half 2.2.1", "num_cpus", - "object_store 0.6.1", + "object_store 0.7.1", "parquet", "sqlparser", ] [[package]] name = "datafusion-execution" -version = "27.0.0" -source = "git+https://github.com/CeresDB/arrow-datafusion.git?rev=9c3a537e25e5ab3299922864034f67fb2f79805d#9c3a537e25e5ab3299922864034f67fb2f79805d" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=219cfb4ccb36045c73409127db51377d66ca0f33#219cfb4ccb36045c73409127db51377d66ca0f33" dependencies = [ + "arrow 47.0.0", + "chrono", "dashmap 5.4.0", "datafusion-common", "datafusion-expr", + "futures 0.3.28", "hashbrown 0.14.0", "log", - "object_store 0.6.1", + "object_store 0.7.1", "parking_lot 0.12.1", "rand 0.8.5", "tempfile", @@ -2148,13 +2155,13 @@ dependencies = [ [[package]] name = "datafusion-expr" -version = "27.0.0" -source = "git+https://github.com/CeresDB/arrow-datafusion.git?rev=9c3a537e25e5ab3299922864034f67fb2f79805d#9c3a537e25e5ab3299922864034f67fb2f79805d" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=219cfb4ccb36045c73409127db51377d66ca0f33#219cfb4ccb36045c73409127db51377d66ca0f33" dependencies = [ "ahash 0.8.3", - "arrow 43.0.0", + "arrow 47.0.0", + "arrow-array 47.0.0", "datafusion-common", - "lazy_static", "sqlparser", "strum 0.25.0", "strum_macros 0.25.1", @@ -2162,10 +2169,10 @@ dependencies = [ [[package]] name = "datafusion-optimizer" -version = "27.0.0" -source = "git+https://github.com/CeresDB/arrow-datafusion.git?rev=9c3a537e25e5ab3299922864034f67fb2f79805d#9c3a537e25e5ab3299922864034f67fb2f79805d" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=219cfb4ccb36045c73409127db51377d66ca0f33#219cfb4ccb36045c73409127db51377d66ca0f33" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "async-trait", "chrono", "datafusion-common", @@ -2179,27 +2186,25 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" -version = "27.0.0" -source = "git+https://github.com/CeresDB/arrow-datafusion.git?rev=9c3a537e25e5ab3299922864034f67fb2f79805d#9c3a537e25e5ab3299922864034f67fb2f79805d" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=219cfb4ccb36045c73409127db51377d66ca0f33#219cfb4ccb36045c73409127db51377d66ca0f33" dependencies = [ "ahash 0.8.3", - "arrow 43.0.0", - "arrow-array 43.0.0", - "arrow-buffer 43.0.0", - "arrow-schema 43.0.0", + "arrow 47.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-schema 47.0.0", "base64 0.21.0", "blake2", "blake3", "chrono", "datafusion-common", "datafusion-expr", - "datafusion-row", "half 2.2.1", "hashbrown 0.14.0", "hex", "indexmap 2.0.0", "itertools 0.11.0", - "lazy_static", "libc", "log", "md-5", @@ -2213,37 +2218,56 @@ dependencies = [ ] [[package]] -name = "datafusion-proto" -version = "27.0.0" -source = "git+https://github.com/CeresDB/arrow-datafusion.git?rev=9c3a537e25e5ab3299922864034f67fb2f79805d#9c3a537e25e5ab3299922864034f67fb2f79805d" +name = "datafusion-physical-plan" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=219cfb4ccb36045c73409127db51377d66ca0f33#219cfb4ccb36045c73409127db51377d66ca0f33" dependencies = [ - "arrow 43.0.0", + "ahash 0.8.3", + "arrow 47.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-schema 47.0.0", + "async-trait", "chrono", - "datafusion", "datafusion-common", + "datafusion-execution", "datafusion-expr", - "object_store 0.6.1", - "prost", + "datafusion-physical-expr", + "futures 0.3.28", + "half 2.2.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 0.8.5", + "tokio", + "uuid", ] [[package]] -name = "datafusion-row" -version = "27.0.0" -source = "git+https://github.com/CeresDB/arrow-datafusion.git?rev=9c3a537e25e5ab3299922864034f67fb2f79805d#9c3a537e25e5ab3299922864034f67fb2f79805d" +name = "datafusion-proto" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=219cfb4ccb36045c73409127db51377d66ca0f33#219cfb4ccb36045c73409127db51377d66ca0f33" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", + "chrono", + "datafusion", "datafusion-common", - "paste 1.0.12", - "rand 0.8.5", + "datafusion-expr", + "object_store 0.7.1", + "prost 0.12.1", ] [[package]] name = "datafusion-sql" -version = "27.0.0" -source = "git+https://github.com/CeresDB/arrow-datafusion.git?rev=9c3a537e25e5ab3299922864034f67fb2f79805d#9c3a537e25e5ab3299922864034f67fb2f79805d" +version = "32.0.0" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=219cfb4ccb36045c73409127db51377d66ca0f33#219cfb4ccb36045c73409127db51377d66ca0f33" dependencies = [ - "arrow 43.0.0", - "arrow-schema 43.0.0", + "arrow 47.0.0", + "arrow-schema 47.0.0", "datafusion-common", "datafusion-expr", "log", @@ -2253,7 +2277,7 @@ dependencies = [ [[package]] name = "datafusion_util" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql.git?rev=acbd3ad7651f2deb74857155bea892f88926da57#acbd3ad7651f2deb74857155bea892f88926da57" +source = "git+https://github.com/CeresDB/influxql.git?rev=2d8060c09d7bc6ceefc7fd41492821f179ae40a8#2d8060c09d7bc6ceefc7fd41492821f179ae40a8" dependencies = [ "async-trait", "datafusion", @@ -2340,7 +2364,7 @@ dependencies = [ name = "df_engine_extensions" version = "1.2.6-alpha" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "async-recursion", "async-trait", "catalog", @@ -2353,7 +2377,7 @@ dependencies = [ "insta", "lazy_static", "prometheus 0.12.0", - "prost", + "prost 0.11.8", "snafu 0.6.10", "table_engine", "tokio", @@ -2364,7 +2388,7 @@ dependencies = [ name = "df_operator" version = "1.2.6-alpha" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "base64 0.13.1", "bincode", "chrono", @@ -2504,7 +2528,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4319dc0fb739a6e84cb8678b8cf50c9bcfa4712ae826b33ecf00cc0850550a58" dependencies = [ "http", - "prost", + "prost 0.11.8", "tokio", "tokio-stream", "tonic 0.8.3", @@ -2840,12 +2864,12 @@ checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" [[package]] name = "generated_types" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql.git?rev=acbd3ad7651f2deb74857155bea892f88926da57#acbd3ad7651f2deb74857155bea892f88926da57" +source = "git+https://github.com/CeresDB/influxql.git?rev=2d8060c09d7bc6ceefc7fd41492821f179ae40a8#2d8060c09d7bc6ceefc7fd41492821f179ae40a8" dependencies = [ "pbjson", "pbjson-build", "pbjson-types", - "prost", + "prost 0.11.8", "prost-build", "serde", "tonic-build", @@ -3278,7 +3302,7 @@ dependencies = [ [[package]] name = "influxdb_influxql_parser" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql.git?rev=acbd3ad7651f2deb74857155bea892f88926da57#acbd3ad7651f2deb74857155bea892f88926da57" +source = "git+https://github.com/CeresDB/influxql.git?rev=2d8060c09d7bc6ceefc7fd41492821f179ae40a8#2d8060c09d7bc6ceefc7fd41492821f179ae40a8" dependencies = [ "chrono", "chrono-tz", @@ -3320,7 +3344,7 @@ name = "interpreters" version = "1.2.6-alpha" dependencies = [ "analytic_engine", - "arrow 43.0.0", + "arrow 47.0.0", "async-trait", "catalog", "catalog_impls", @@ -3368,9 +3392,9 @@ dependencies = [ [[package]] name = "iox_query" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql.git?rev=acbd3ad7651f2deb74857155bea892f88926da57#acbd3ad7651f2deb74857155bea892f88926da57" +source = "git+https://github.com/CeresDB/influxql.git?rev=2d8060c09d7bc6ceefc7fd41492821f179ae40a8#2d8060c09d7bc6ceefc7fd41492821f179ae40a8" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "arrow_util", "async-trait", "chrono", @@ -3392,9 +3416,9 @@ dependencies = [ [[package]] name = "iox_query_influxql" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql.git?rev=acbd3ad7651f2deb74857155bea892f88926da57#acbd3ad7651f2deb74857155bea892f88926da57" +source = "git+https://github.com/CeresDB/influxql.git?rev=2d8060c09d7bc6ceefc7fd41492821f179ae40a8#2d8060c09d7bc6ceefc7fd41492821f179ae40a8" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "chrono", "chrono-tz", "datafusion", @@ -3902,7 +3926,7 @@ dependencies = [ "generic_error", "log", "macros", - "prost", + "prost 0.11.8", "reqwest", "serde", "serde_json", @@ -4254,9 +4278,9 @@ dependencies = [ [[package]] name = "num" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ "num-bigint", "num-complex", @@ -4396,16 +4420,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 0.3.28", "humantime 2.1.0", - "itertools 0.10.5", + "itertools 0.11.0", "parking_lot 0.12.1", "percent-encoding", "snafu 0.7.4", @@ -4437,7 +4461,7 @@ dependencies = [ "partitioned_lock", "prometheus 0.12.0", "prometheus-static-metric", - "prost", + "prost 0.11.8", "rand 0.7.3", "runtime", "serde", @@ -4491,16 +4515,16 @@ dependencies = [ [[package]] name = "observability_deps" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql.git?rev=acbd3ad7651f2deb74857155bea892f88926da57#acbd3ad7651f2deb74857155bea892f88926da57" +source = "git+https://github.com/CeresDB/influxql.git?rev=2d8060c09d7bc6ceefc7fd41492821f179ae40a8#2d8060c09d7bc6ceefc7fd41492821f179ae40a8" dependencies = [ "tracing", ] [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" dependencies = [ "parking_lot_core 0.9.7", ] @@ -4616,18 +4640,18 @@ 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 43.0.0", - "arrow-buffer 43.0.0", - "arrow-cast 43.0.0", - "arrow-data 43.0.0", - "arrow-ipc 43.0.0", - "arrow-schema 43.0.0", - "arrow-select 43.0.0", + "arrow-array 47.0.0", + "arrow-buffer 47.0.0", + "arrow-cast 47.0.0", + "arrow-data 47.0.0", + "arrow-ipc 47.0.0", + "arrow-schema 47.0.0", + "arrow-select 47.0.0", "base64 0.21.0", "brotli", "bytes", @@ -4638,7 +4662,7 @@ dependencies = [ "lz4", "num", "num-bigint", - "object_store 0.6.1", + "object_store 0.7.1", "paste 1.0.12", "seq-macro", "snap", @@ -4652,7 +4676,7 @@ dependencies = [ name = "parquet_ext" version = "1.2.6-alpha" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "arrow_ext", "async-trait", "bytes", @@ -4679,7 +4703,7 @@ name = "partition_table_engine" version = "1.2.6-alpha" dependencies = [ "analytic_engine", - "arrow 43.0.0", + "arrow 47.0.0", "async-trait", "common_types", "datafusion", @@ -4746,7 +4770,7 @@ checksum = "bdbb7b706f2afc610f3853550cdbbf6372fd324824a087806bd4480ea4996e24" dependencies = [ "heck", "itertools 0.10.5", - "prost", + "prost 0.11.8", "prost-types", ] @@ -4760,7 +4784,7 @@ dependencies = [ "chrono", "pbjson", "pbjson-build", - "prost", + "prost 0.11.8", "prost-build", "serde", ] @@ -5110,7 +5134,7 @@ dependencies = [ "async-trait", "bytes", "futures 0.3.28", - "prost", + "prost 0.11.8", "prost-build", "snap", "warp", @@ -5187,7 +5211,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48e50df39172a3e7eb17e14642445da64996989bc212b583015435d39a58537" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.8", +] + +[[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]] @@ -5204,7 +5238,7 @@ dependencies = [ "multimap", "petgraph", "prettyplease 0.1.25", - "prost", + "prost 0.11.8", "prost-types", "regex", "syn 1.0.109", @@ -5225,13 +5259,26 @@ 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.28", +] + [[package]] name = "prost-types" version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "379119666929a1afd7a043aa6cf96fa67a6dce9af60c88095a4686dbce4c9c88" dependencies = [ - "prost", + "prost 0.11.8", ] [[package]] @@ -5294,7 +5341,7 @@ checksum = "9653c3ed92974e34c5a6e0a510864dab979760481714c172e0a34e437cb98804" name = "proxy" version = "1.2.6-alpha" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "arrow_ext", "async-trait", "bytes", @@ -5322,7 +5369,7 @@ dependencies = [ "prom-remote-api", "prometheus 0.12.0", "prometheus-static-metric", - "prost", + "prost 0.11.8", "query_engine", "query_frontend", "router", @@ -5394,7 +5441,7 @@ dependencies = [ name = "query_engine" version = "1.2.6-alpha" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "async-trait", "bytes_ext", "catalog", @@ -5409,7 +5456,7 @@ dependencies = [ "iox_query", "log", "macros", - "prost", + "prost 0.11.8", "query_frontend", "serde", "snafu 0.6.10", @@ -5422,7 +5469,7 @@ dependencies = [ name = "query_frontend" version = "1.2.6-alpha" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "async-trait", "catalog", "ceresdbproto", @@ -5455,9 +5502,9 @@ dependencies = [ [[package]] name = "query_functions" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql.git?rev=acbd3ad7651f2deb74857155bea892f88926da57#acbd3ad7651f2deb74857155bea892f88926da57" +source = "git+https://github.com/CeresDB/influxql.git?rev=2d8060c09d7bc6ceefc7fd41492821f179ae40a8#2d8060c09d7bc6ceefc7fd41492821f179ae40a8" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "chrono", "datafusion", "itertools 0.10.5", @@ -6103,9 +6150,9 @@ dependencies = [ [[package]] name = "schema" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql.git?rev=acbd3ad7651f2deb74857155bea892f88926da57#acbd3ad7651f2deb74857155bea892f88926da57" +source = "git+https://github.com/CeresDB/influxql.git?rev=2d8060c09d7bc6ceefc7fd41492821f179ae40a8#2d8060c09d7bc6ceefc7fd41492821f179ae40a8" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "hashbrown 0.13.2", "indexmap 1.9.3", "itertools 0.10.5", @@ -6228,7 +6275,7 @@ name = "server" version = "1.2.6-alpha" dependencies = [ "analytic_engine", - "arrow 43.0.0", + "arrow 47.0.0", "arrow_ext", "async-trait", "bytes_ext", @@ -6259,7 +6306,7 @@ dependencies = [ "prom-remote-api", "prometheus 0.12.0", "prometheus-static-metric", - "prost", + "prost 0.11.8", "proxy", "query_engine", "query_frontend", @@ -6589,9 +6636,9 @@ dependencies = [ [[package]] name = "sqlparser" -version = "0.35.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca597d77c98894be1f965f2e4e2d2a61575d4998088e655476c73715c54b2b43" +checksum = "0272b7bb0a225320170c99901b4b5fb3a4384e255a7f2cc228f61e2ba3893e75" dependencies = [ "log", "serde", @@ -6755,7 +6802,7 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" name = "system_catalog" version = "1.2.6-alpha" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "async-trait", "bytes_ext", "catalog", @@ -6766,7 +6813,7 @@ dependencies = [ "generic_error", "log", "macros", - "prost", + "prost 0.11.8", "snafu 0.6.10", "table_engine", "tokio", @@ -6777,7 +6824,7 @@ dependencies = [ name = "table_engine" version = "1.2.6-alpha" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "arrow_ext", "async-trait", "bytes_ext", @@ -6793,7 +6840,7 @@ dependencies = [ "lazy_static", "log", "macros", - "prost", + "prost 0.11.8", "rand 0.7.3", "regex", "runtime", @@ -6874,7 +6921,7 @@ dependencies = [ [[package]] name = "test_helpers" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql.git?rev=acbd3ad7651f2deb74857155bea892f88926da57#acbd3ad7651f2deb74857155bea892f88926da57" +source = "git+https://github.com/CeresDB/influxql.git?rev=2d8060c09d7bc6ceefc7fd41492821f179ae40a8#2d8060c09d7bc6ceefc7fd41492821f179ae40a8" dependencies = [ "dotenvy", "observability_deps", @@ -6888,7 +6935,7 @@ dependencies = [ name = "test_util" version = "1.2.6-alpha" dependencies = [ - "arrow 43.0.0", + "arrow 47.0.0", "chrono", "common_types", "env_logger", @@ -7224,8 +7271,8 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost", - "prost-derive", + "prost 0.11.8", + "prost-derive 0.11.8", "tokio", "tokio-stream", "tokio-util", @@ -7255,7 +7302,7 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost", + "prost 0.11.8", "tokio", "tokio-stream", "tower", @@ -7645,7 +7692,7 @@ dependencies = [ "macros", "message_queue", "prometheus 0.12.0", - "prost", + "prost 0.11.8", "rand 0.8.5", "rocksdb", "runtime", diff --git a/Cargo.toml b/Cargo.toml index 6a0be15c4a..6263622d75 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,13 +79,13 @@ members = [ [workspace.dependencies] alloc_tracker = { path = "components/alloc_tracker" } -arrow = { version = "43.0.0", features = ["prettyprint"] } +arrow = { version = "47.0.0", features = ["prettyprint"] } arrow_ipc = { version = "43.0.0" } arrow_ext = { path = "components/arrow_ext" } analytic_engine = { path = "analytic_engine" } arena = { path = "components/arena" } async-stream = "0.3.4" -async-trait = "0.1.72" +async-trait = "0.1.73" atomic_enum = "0.2.0" base64 = "0.13" bytes = "1" @@ -101,8 +101,8 @@ clru = "0.6.1" cluster = { path = "cluster" } criterion = "0.5" common_types = { path = "common_types" } -datafusion = { git = "https://github.com/CeresDB/arrow-datafusion.git", rev = "9c3a537e25e5ab3299922864034f67fb2f79805d" } -datafusion-proto = { git = "https://github.com/CeresDB/arrow-datafusion.git", rev = "9c3a537e25e5ab3299922864034f67fb2f79805d" } +datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev = "219cfb4ccb36045c73409127db51377d66ca0f33" } +datafusion-proto = { git = "https://github.com/apache/arrow-datafusion.git", rev = "219cfb4ccb36045c73409127db51377d66ca0f33" } df_operator = { path = "df_operator" } df_engine_extensions = { path = "df_engine_extensions" } future_ext = { path = "components/future_ext" } @@ -118,10 +118,10 @@ log = "0.4" logger = { path = "components/logger" } lru = "0.7.6" id_allocator = { path = "components/id_allocator" } -influxql-logical-planner = { git = "https://github.com/CeresDB/influxql.git", rev = "acbd3ad7651f2deb74857155bea892f88926da57", package = "iox_query_influxql" } -influxql-parser = { git = "https://github.com/CeresDB/influxql.git", rev = "acbd3ad7651f2deb74857155bea892f88926da57", package = "influxdb_influxql_parser" } -influxql-query = { git = "https://github.com/CeresDB/influxql.git", rev = "acbd3ad7651f2deb74857155bea892f88926da57", package = "iox_query" } -influxql-schema = { git = "https://github.com/CeresDB/influxql.git", rev = "acbd3ad7651f2deb74857155bea892f88926da57", package = "schema" } +influxql-logical-planner = { git = "https://github.com/CeresDB/influxql.git", rev = "2d8060c09d7bc6ceefc7fd41492821f179ae40a8", package = "iox_query_influxql" } +influxql-parser = { git = "https://github.com/CeresDB/influxql.git", rev = "2d8060c09d7bc6ceefc7fd41492821f179ae40a8", package = "influxdb_influxql_parser" } +influxql-query = { git = "https://github.com/CeresDB/influxql.git", rev = "2d8060c09d7bc6ceefc7fd41492821f179ae40a8", package = "iox_query" } +influxql-schema = { git = "https://github.com/CeresDB/influxql.git", rev = "2d8060c09d7bc6ceefc7fd41492821f179ae40a8", package = "schema" } interpreters = { path = "interpreters" } itertools = "0.10.5" macros = { path = "components/macros" } @@ -133,7 +133,7 @@ panic_ext = { path = "components/panic_ext" } partitioned_lock = { path = "components/partitioned_lock" } partition_table_engine = { path = "partition_table_engine" } parquet_ext = { path = "components/parquet_ext" } -parquet = { version = "43.0.0" } +parquet = { version = "47.0.0" } paste = "1.0" pin-project-lite = "0.2.8" pprof = "0.12.1" @@ -158,7 +158,7 @@ size_ext = { path = "components/size_ext" } smallvec = "1.6" slog = "2.7" spin = "0.9.6" -sqlparser = { version = "0.35", features = ["serde"] } +sqlparser = { version = "0.38", features = ["serde"] } system_catalog = { path = "system_catalog" } table_engine = { path = "table_engine" } table_kv = { path = "components/table_kv" } diff --git a/common_types/src/datum.rs b/common_types/src/datum.rs index 83cd2fc87f..349326b7f0 100644 --- a/common_types/src/datum.rs +++ b/common_types/src/datum.rs @@ -291,6 +291,7 @@ impl TryFrom<&SqlDataType> for DatumKind { SqlDataType::BigInt(_) => Ok(Self::Int64), SqlDataType::Int(_) => Ok(Self::Int32), SqlDataType::SmallInt(_) => Ok(Self::Int16), + SqlDataType::Int8(_) => Ok(Self::Int8), SqlDataType::String => Ok(Self::String), SqlDataType::Varbinary(_) => Ok(Self::Varbinary), SqlDataType::Date => Ok(Self::Date), @@ -1466,6 +1467,7 @@ impl Datum { | ScalarValue::DurationSecond(_) | ScalarValue::DurationMillisecond(_) | ScalarValue::DurationMicrosecond(_) + | ScalarValue::Decimal256(_, _, _) | ScalarValue::DurationNanosecond(_) => None, } } @@ -1515,6 +1517,7 @@ impl<'a> DatumView<'a> { | ScalarValue::DurationSecond(_) | ScalarValue::DurationMillisecond(_) | ScalarValue::DurationMicrosecond(_) + | ScalarValue::Decimal256(_, _, _) | ScalarValue::DurationNanosecond(_) => None, } } diff --git a/components/parquet_ext/src/meta_data.rs b/components/parquet_ext/src/meta_data.rs index 6dcd47c5fd..3ddb88dd8c 100644 --- a/components/parquet_ext/src/meta_data.rs +++ b/components/parquet_ext/src/meta_data.rs @@ -16,9 +16,10 @@ use std::{ops::Range, sync::Arc}; use async_trait::async_trait; use bytes::Bytes; +use datafusion::parquet::arrow::ParquetRecordBatchStreamBuilder; use generic_error::GenericResult; use parquet::{ - arrow::{arrow_reader::ArrowReaderOptions, ParquetRecordBatchStreamBuilder}, + arrow::arrow_reader::ArrowReaderOptions, errors::{ParquetError, Result}, file::{footer, metadata::ParquetMetaData}, }; diff --git a/components/parquet_ext/src/prune/min_max.rs b/components/parquet_ext/src/prune/min_max.rs index 836d2851ce..8066ae3e68 100644 --- a/components/parquet_ext/src/prune/min_max.rs +++ b/components/parquet_ext/src/prune/min_max.rs @@ -227,7 +227,7 @@ mod test { } fn prepare_parquet_schema_descr(schema: &ArrowSchema) -> SchemaDescPtr { - let mut fields = schema + let fields = schema .fields() .iter() .map(|field| { @@ -242,7 +242,7 @@ mod test { }) .collect(); let schema = SchemaType::group_type_builder("schema") - .with_fields(&mut fields) + .with_fields(fields) .build() .unwrap(); diff --git a/df_engine_extensions/src/dist_sql_query/test_util.rs b/df_engine_extensions/src/dist_sql_query/test_util.rs index d12a18de82..2a7ea98bb6 100644 --- a/df_engine_extensions/src/dist_sql_query/test_util.rs +++ b/df_engine_extensions/src/dist_sql_query/test_util.rs @@ -464,7 +464,7 @@ impl ExecutionPlan for MockScan { } fn statistics(&self) -> datafusion::physical_plan::Statistics { - unimplemented!() + datafusion::physical_plan::Statistics::default() } } diff --git a/integration_tests/cases/common/dml/issue-1087.result b/integration_tests/cases/common/dml/issue-1087.result index 54265dae88..20306b466e 100644 --- a/integration_tests/cases/common/dml/issue-1087.result +++ b/integration_tests/cases/common/dml/issue-1087.result @@ -77,15 +77,16 @@ String("logical_plan after influx_regex_to_datafusion_regex"),String("SAME TEXT String("logical_plan after handle_gap_fill"),String("SAME TEXT AS ABOVE"), String("logical_plan"),String("TableScan: issue_1087 projection=[tsid, t, name, value]"), String("initial_physical_plan"),String("ScanTable: table=issue_1087, parallelism=8\n"), +String("physical_plan after OutputRequirements"),String("OutputRequirementExec\n ScanTable: table=issue_1087, parallelism=8\n"), String("physical_plan after aggregate_statistics"),String("SAME TEXT AS ABOVE"), String("physical_plan after join_selection"),String("SAME TEXT AS ABOVE"), -String("physical_plan after PipelineFixer"),String("SAME TEXT AS ABOVE"), -String("physical_plan after repartition"),String("SAME TEXT AS ABOVE"), String("physical_plan after EnforceDistribution"),String("SAME TEXT AS ABOVE"), String("physical_plan after CombinePartialFinalAggregate"),String("SAME TEXT AS ABOVE"), String("physical_plan after EnforceSorting"),String("SAME TEXT AS ABOVE"), String("physical_plan after coalesce_batches"),String("SAME TEXT AS ABOVE"), +String("physical_plan after OutputRequirements"),String("ScanTable: table=issue_1087, parallelism=8\n"), String("physical_plan after PipelineChecker"),String("SAME TEXT AS ABOVE"), +String("physical_plan after LimitAggregation"),String("SAME TEXT AS ABOVE"), String("physical_plan"),String("ScanTable: table=issue_1087, parallelism=8\n"), diff --git a/integration_tests/cases/common/dml/issue-341.result b/integration_tests/cases/common/dml/issue-341.result index f9405db366..72b2d1af22 100644 --- a/integration_tests/cases/common/dml/issue-341.result +++ b/integration_tests/cases/common/dml/issue-341.result @@ -71,8 +71,8 @@ WHERE tag1 = "t3"; plan_type,plan, -String("logical_plan"),String("Projection: issue341_t1.timestamp, issue341_t1.value\n TableScan: issue341_t1 projection=[timestamp, value, tag1], full_filters=[issue341_t1.tag1 = Utf8(\"t3\")]"), -String("physical_plan"),String("ProjectionExec: expr=[timestamp@0 as timestamp, value@1 as value]\n ScanTable: table=issue341_t1, parallelism=8\n"), +String("logical_plan"),String("TableScan: issue341_t1 projection=[timestamp, value], full_filters=[issue341_t1.tag1 = Utf8(\"t3\")]"), +String("physical_plan"),String("ScanTable: table=issue341_t1, parallelism=8\n"), -- Repeat operations above, but with overwrite table @@ -129,8 +129,8 @@ WHERE tag1 = "t3"; plan_type,plan, -String("logical_plan"),String("Projection: issue341_t2.timestamp, issue341_t2.value\n TableScan: issue341_t2 projection=[timestamp, value, tag1], full_filters=[issue341_t2.tag1 = Utf8(\"t3\")]"), -String("physical_plan"),String("ProjectionExec: expr=[timestamp@0 as timestamp, value@1 as value]\n ScanTable: table=issue341_t2, parallelism=8\n"), +String("logical_plan"),String("TableScan: issue341_t2 projection=[timestamp, value], full_filters=[issue341_t2.tag1 = Utf8(\"t3\")]"), +String("physical_plan"),String("ScanTable: table=issue341_t2, parallelism=8\n"), DROP TABLE IF EXISTS `issue341_t1`; diff --git a/integration_tests/src/database.rs b/integration_tests/src/database.rs index 77bcc65e35..1265848aee 100644 --- a/integration_tests/src/database.rs +++ b/integration_tests/src/database.rs @@ -295,7 +295,6 @@ impl Database for CeresDB { let cmd = pre_cmd.expect("parse command"); match cmd { Command::Flush => { - println!("Flush memtable..."); if let Err(e) = self.execute_flush().await { panic!("Execute flush command failed, err:{e}"); } diff --git a/query_engine/src/datafusion_impl/logical_optimizer/type_conversion.rs b/query_engine/src/datafusion_impl/logical_optimizer/type_conversion.rs index 39990cb6f0..a1cb122909 100644 --- a/query_engine/src/datafusion_impl/logical_optimizer/type_conversion.rs +++ b/query_engine/src/datafusion_impl/logical_optimizer/type_conversion.rs @@ -27,7 +27,7 @@ use datafusion::{ logical_expr::{ expr::{Expr, InList}, logical_plan::{Filter, LogicalPlan, TableScan}, - utils, Between, BinaryExpr, ExprSchemable, Operator, + Between, BinaryExpr, ExprSchemable, Operator, }, optimizer::analyzer::AnalyzerRule, scalar::ScalarValue, @@ -116,12 +116,13 @@ impl AnalyzerRule for TypeConversion { .map(|e| e.rewrite(&mut rewriter)) .collect::>>()?; - Ok(utils::from_plan(&plan, &expr, &new_inputs)?) + Ok(plan.with_new_exprs(expr, &new_inputs)?) } LogicalPlan::Subquery(_) | LogicalPlan::Statement { .. } | LogicalPlan::SubqueryAlias(_) | LogicalPlan::Unnest(_) + | LogicalPlan::Copy(_) | LogicalPlan::EmptyRelation { .. } => Ok(plan.clone()), } } @@ -331,13 +332,17 @@ fn naive_datetime_to_timestamp(s: &str, datetime: NaiveDateTime) -> Result Err(ArrowError::CastError(format!( "Error parsing '{s}' as timestamp: local time representation is invalid" ))), - LocalResult::Single(local_datetime) => { - Ok(local_datetime.with_timezone(&Utc).timestamp_nanos() / 1_000_000) - } - - LocalResult::Ambiguous(local_datetime, _) => { - Ok(local_datetime.with_timezone(&Utc).timestamp_nanos() / 1_000_000) - } + LocalResult::Single(local_datetime) => Ok(local_datetime + .with_timezone(&Utc) + .timestamp_nanos_opt() + .unwrap() + / 1_000_000), + + LocalResult::Ambiguous(local_datetime, _) => Ok(local_datetime + .with_timezone(&Utc) + .timestamp_nanos_opt() + .unwrap() + / 1_000_000), } } diff --git a/query_engine/src/datafusion_impl/mod.rs b/query_engine/src/datafusion_impl/mod.rs index b3afd1ed34..6804b5d136 100644 --- a/query_engine/src/datafusion_impl/mod.rs +++ b/query_engine/src/datafusion_impl/mod.rs @@ -159,7 +159,7 @@ impl DfContextBuilder { // Using default logcial optimizer, if want to add more custom rule, using // `add_optimizer_rule` to add. - let state = SessionState::with_config_rt(df_session_config, self.runtime_env.clone()) + let state = SessionState::new_with_config_rt(df_session_config, self.runtime_env.clone()) .with_query_planner(self.physical_planner.clone()); // Register analyzer rules @@ -168,7 +168,7 @@ impl DfContextBuilder { // Register iox optimizers, used by influxql. let state = influxql_query::logical_optimizer::register_iox_logical_optimizers(state); - SessionContext::with_state(state) + SessionContext::new_with_state(state) } // TODO: this is not used now, bug of RepartitionAdapter is already fixed in diff --git a/query_engine/src/datafusion_impl/physical_optimizer/repartition.rs b/query_engine/src/datafusion_impl/physical_optimizer/repartition.rs index a1a7b37de3..da150441b8 100644 --- a/query_engine/src/datafusion_impl/physical_optimizer/repartition.rs +++ b/query_engine/src/datafusion_impl/physical_optimizer/repartition.rs @@ -18,7 +18,9 @@ use std::sync::Arc; use datafusion::{ config::ConfigOptions, - physical_optimizer::{optimizer::PhysicalOptimizerRule, repartition::Repartition}, + physical_optimizer::{ + enforce_distribution::EnforceDistribution, optimizer::PhysicalOptimizerRule, + }, physical_plan::ExecutionPlan, }; use log::debug; @@ -31,7 +33,7 @@ pub struct RepartitionAdapter { impl Adapter for RepartitionAdapter { fn may_adapt(original_rule: OptimizeRuleRef) -> OptimizeRuleRef { - if original_rule.name() == Repartition::new().name() { + if original_rule.name() == EnforceDistribution::new().name() { Arc::new(Self { original_rule }) } else { original_rule diff --git a/query_engine/src/datafusion_impl/task_context.rs b/query_engine/src/datafusion_impl/task_context.rs index e0d4bd8175..7799768850 100644 --- a/query_engine/src/datafusion_impl/task_context.rs +++ b/query_engine/src/datafusion_impl/task_context.rs @@ -36,7 +36,6 @@ use df_engine_extensions::dist_sql_query::{ }; use futures::future::BoxFuture; use generic_error::BoxError; -use prost::Message; use snafu::ResultExt; use table_engine::{ provider::{CeresdbOptions, ScanTable}, @@ -101,7 +100,8 @@ impl Preprocessor { async fn preprocess_remote_plan(&self, encoded_plan: &[u8]) -> Result> { // Decode to datafusion physical plan. - let protobuf = protobuf::PhysicalPlanNode::decode(encoded_plan) + + let protobuf = protobuf::PhysicalPlanNode::try_decode(encoded_plan) .box_err() .with_context(|| ExecutorWithCause { msg: Some("failed to decode plan".to_string()), diff --git a/table_engine/src/predicate.rs b/table_engine/src/predicate.rs index 5949edfe6d..d02c5ca066 100644 --- a/table_engine/src/predicate.rs +++ b/table_engine/src/predicate.rs @@ -324,6 +324,8 @@ impl<'a> TimeRangeExtractor<'a> { | Operator::BitwiseXor | Operator::BitwiseShiftRight | Operator::BitwiseShiftLeft + | Operator::AtArrow + | Operator::ArrowAt | Operator::StringConcat => TimeRange::min_to_max(), } }