From 034d9b371d86d076078ea3aab1114011f9e93e70 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Mon, 7 Nov 2022 06:01:58 -0500 Subject: [PATCH] chore: Update datafusion and arrow/arrow-flight/parquet to `26.0.0` (#6061) * chore: Update datafusion and arrow/arrow-flight/parquet to `26.0.0` * fix: Update query_functions * fix: update for TimestampNanosecondArray API changes * fix: update for TimestampNanosecondArray API changes * chore: Update flatbuffers and remove rustsec warning * chore: Update text * fix: update more test * fix: Lock ahash to exactly 0.8.0 * fix: Update datafusion pin * chore: Run cargo hakari tasks Co-authored-by: Carol (Nichols || Goulding) Co-authored-by: CircleCI[bot] Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- Cargo.lock | 285 ++++++++---------- Cargo.toml | 10 +- arrow_util/Cargo.toml | 4 +- deny.toml | 5 - influxdb_iox/src/commands/storage/response.rs | 36 +-- ingester/Cargo.toml | 2 +- iox_query/src/exec/seriesset/series.rs | 23 +- iox_query/src/test.rs | 102 ++++--- query_functions/src/lib.rs | 4 +- query_functions/src/selectors.rs | 108 +++---- query_functions/src/window.rs | 23 +- query_tests/cases/in/selectors.expected | 40 +-- service_grpc_influxrpc/src/data.rs | 6 +- workspace-hack/Cargo.toml | 26 +- 14 files changed, 317 insertions(+), 357 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f98a1ad276..e0801ad442 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -100,15 +100,16 @@ checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "arrow" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76312eb67808c67341f4234861c4fcd2f9868f55e88fa2186ab3b357a6c5830b" +checksum = "e24e2bcd431a4aa0ff003fdd2dc21c78cfb42f31459c89d2312c2746fe17a5ac" dependencies = [ "ahash 0.8.0", "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", + "arrow-select", "bitflags", "chrono", "comfy-table", @@ -128,9 +129,9 @@ dependencies = [ [[package]] name = "arrow-array" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69dd2c257fa76de0bcc63cabe8c81d34c46ef6fa7651e3e497922c3c9878bd67" +checksum = "c9044300874385f19e77cbf90911e239bd23630d8f23bb0f948f9067998a13b7" dependencies = [ "ahash 0.8.0", "arrow-buffer", @@ -144,9 +145,9 @@ dependencies = [ [[package]] name = "arrow-buffer" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af963e71bdbbf928231d521083ddc8e8068cf5c8d45d4edcfeaf7eb5cdd779a9" +checksum = "78476cbe9e3f808dcecab86afe42d573863c63e149c62e6e379ed2522743e626" dependencies = [ "half 2.1.0", "num", @@ -154,9 +155,9 @@ dependencies = [ [[package]] name = "arrow-data" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52554ffff560c366d7210c2621a3cf1dc408f9969a0c7688a3ba0a62248a945d" +checksum = "4d916feee158c485dad4f701cba31bc9a90a8db87d9df8e2aa8adc0c20a2bbb9" dependencies = [ "arrow-buffer", "arrow-schema", @@ -166,17 +167,17 @@ dependencies = [ [[package]] name = "arrow-flight" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded4fc9e8a4c7afe216cdd92989f089d7ce47810d974da898b2b42a4b9cec9f3" +checksum = "9fdfed4af8da422c6ea108ae216325a9b8e020602c333cb31648a6d95178923a" dependencies = [ "arrow", "base64", "bytes", "futures", "proc-macro2", - "prost 0.11.0", - "prost-derive 0.11.0", + "prost 0.11.2", + "prost-derive 0.11.2", "tokio", "tonic", "tonic-build", @@ -184,9 +185,22 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5518f2bd7775057391f88257627cbb760ba3e1c2f2444a005ba79158624654" +checksum = "0f9406eb7834ca6bd8350d1baa515d18b9fcec487eddacfb62f5e19511f7bd37" + +[[package]] +name = "arrow-select" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6593a01586751c74498495d2f5a01fcd438102b52965c11dd98abf4ebcacef37" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "num", +] [[package]] name = "arrow_util" @@ -217,11 +231,11 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "2.0.5" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5c2ca00549910ec251e3bd15f87aeeb206c9456b9a77b43ff6c97c54042a472" +checksum = "ba45b8163c49ab5f972e59a8a5a03b6d2972619d486e19ec9fe744f7c2753d3c" dependencies = [ - "bstr", + "bstr 1.0.1", "doc-comment", "predicates", "predicates-core", @@ -467,6 +481,18 @@ dependencies = [ "serde", ] +[[package]] +name = "bstr" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fca0852af221f458706eb0725c03e4ed6c46af9ac98e6a689d5e634215d594dd" +dependencies = [ + "memchr", + "once_cell", + "regex-automata", + "serde", +] + [[package]] name = "bumpalo" version = "3.11.1" @@ -621,9 +647,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.0.18" +version = "4.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335867764ed2de42325fafe6d18b8af74ba97ee0c590fa016f157535b42ab04b" +checksum = "8e67816e006b17427c9b4386915109b494fec2d929c63e3bd3561234cbf1bf1e" dependencies = [ "atty", "bitflags", @@ -638,7 +664,7 @@ dependencies = [ name = "clap_blocks" version = "0.1.0" dependencies = [ - "clap 4.0.18", + "clap 4.0.19", "data_types", "futures", "humantime", @@ -810,8 +836,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e57ff02e8ad8e06ab9731d5dc72dc23bef9200778eae1a89d555d8c42e5d4a86" dependencies = [ - "prost 0.11.0", - "prost-types 0.11.1", + "prost 0.11.2", + "prost-types 0.11.2", "tonic", "tracing-core", ] @@ -829,7 +855,7 @@ dependencies = [ "hdrhistogram", "humantime", "parking_lot 0.11.2", - "prost-types 0.11.1", + "prost-types 0.11.2", "serde", "serde_json", "thread_local", @@ -1038,7 +1064,7 @@ version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" dependencies = [ - "bstr", + "bstr 0.2.17", "csv-core", "itoa 0.4.8", "ryu", @@ -1129,7 +1155,7 @@ dependencies = [ [[package]] name = "datafusion" version = "13.0.0" -source = "git+https://github.com/apache/arrow-datafusion.git?rev=761e1671bd3c4988d21a38bb19e50bdac6cfaa61#761e1671bd3c4988d21a38bb19e50bdac6cfaa61" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=dd081d64a2fba8574e63bdd0662c14aec5852b48#dd081d64a2fba8574e63bdd0662c14aec5852b48" dependencies = [ "ahash 0.8.0", "arrow", @@ -1173,7 +1199,7 @@ dependencies = [ [[package]] name = "datafusion-common" version = "13.0.0" -source = "git+https://github.com/apache/arrow-datafusion.git?rev=761e1671bd3c4988d21a38bb19e50bdac6cfaa61#761e1671bd3c4988d21a38bb19e50bdac6cfaa61" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=dd081d64a2fba8574e63bdd0662c14aec5852b48#dd081d64a2fba8574e63bdd0662c14aec5852b48" dependencies = [ "arrow", "chrono", @@ -1186,7 +1212,7 @@ dependencies = [ [[package]] name = "datafusion-expr" version = "13.0.0" -source = "git+https://github.com/apache/arrow-datafusion.git?rev=761e1671bd3c4988d21a38bb19e50bdac6cfaa61#761e1671bd3c4988d21a38bb19e50bdac6cfaa61" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=dd081d64a2fba8574e63bdd0662c14aec5852b48#dd081d64a2fba8574e63bdd0662c14aec5852b48" dependencies = [ "ahash 0.8.0", "arrow", @@ -1198,7 +1224,7 @@ dependencies = [ [[package]] name = "datafusion-optimizer" version = "13.0.0" -source = "git+https://github.com/apache/arrow-datafusion.git?rev=761e1671bd3c4988d21a38bb19e50bdac6cfaa61#761e1671bd3c4988d21a38bb19e50bdac6cfaa61" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=dd081d64a2fba8574e63bdd0662c14aec5852b48#dd081d64a2fba8574e63bdd0662c14aec5852b48" dependencies = [ "arrow", "async-trait", @@ -1213,7 +1239,7 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" version = "13.0.0" -source = "git+https://github.com/apache/arrow-datafusion.git?rev=761e1671bd3c4988d21a38bb19e50bdac6cfaa61#761e1671bd3c4988d21a38bb19e50bdac6cfaa61" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=dd081d64a2fba8574e63bdd0662c14aec5852b48#dd081d64a2fba8574e63bdd0662c14aec5852b48" dependencies = [ "ahash 0.8.0", "arrow", @@ -1243,21 +1269,21 @@ dependencies = [ [[package]] name = "datafusion-proto" version = "13.0.0" -source = "git+https://github.com/apache/arrow-datafusion.git?rev=761e1671bd3c4988d21a38bb19e50bdac6cfaa61#761e1671bd3c4988d21a38bb19e50bdac6cfaa61" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=dd081d64a2fba8574e63bdd0662c14aec5852b48#dd081d64a2fba8574e63bdd0662c14aec5852b48" dependencies = [ "arrow", "datafusion", "datafusion-common", "datafusion-expr", "pbjson-build", - "prost 0.11.0", + "prost 0.11.2", "prost-build 0.11.1", ] [[package]] name = "datafusion-row" version = "13.0.0" -source = "git+https://github.com/apache/arrow-datafusion.git?rev=761e1671bd3c4988d21a38bb19e50bdac6cfaa61#761e1671bd3c4988d21a38bb19e50bdac6cfaa61" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=dd081d64a2fba8574e63bdd0662c14aec5852b48#dd081d64a2fba8574e63bdd0662c14aec5852b48" dependencies = [ "arrow", "datafusion-common", @@ -1268,7 +1294,7 @@ dependencies = [ [[package]] name = "datafusion-sql" version = "13.0.0" -source = "git+https://github.com/apache/arrow-datafusion.git?rev=761e1671bd3c4988d21a38bb19e50bdac6cfaa61#761e1671bd3c4988d21a38bb19e50bdac6cfaa61" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=dd081d64a2fba8574e63bdd0662c14aec5852b48#dd081d64a2fba8574e63bdd0662c14aec5852b48" dependencies = [ "arrow", "datafusion-common", @@ -1452,13 +1478,13 @@ dependencies = [ [[package]] name = "fd-lock" -version = "3.0.6" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11dcc7e4d79a8c89b9ab4c6f5c30b1fc4a83c420792da3542fd31179ed5f517" +checksum = "0c93a581058d957dc4176875aad04f82f81613e6611d64aa1a9c755bdfb16711" dependencies = [ "cfg-if", "rustix", - "windows-sys 0.36.1", + "windows-sys", ] [[package]] @@ -1470,7 +1496,7 @@ dependencies = [ "cfg-if", "libc", "redox_syscall", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -1493,12 +1519,11 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flatbuffers" -version = "2.1.2" +version = "22.9.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b428b715fdbdd1c364b84573b5fdc0f84f8e423661b9f398735278bc7f2b6a" +checksum = "8ce016b9901aef3579617931fbb2df8fc9a9f7cb95a16eb8acc8148209bb9e70" dependencies = [ "bitflags", - "smallvec", "thiserror", ] @@ -1648,7 +1673,7 @@ version = "0.1.0" dependencies = [ "chrono", "chrono-english", - "clap 4.0.18", + "clap 4.0.19", "clap_blocks", "data_types", "filetime", @@ -1682,7 +1707,7 @@ dependencies = [ "pbjson-build", "pbjson-types", "predicate", - "prost 0.11.0", + "prost 0.11.2", "prost-build 0.11.1", "query_functions", "serde", @@ -1740,9 +1765,9 @@ dependencies = [ "http-body", "hyper", "pin-project", - "prost 0.11.0", + "prost 0.11.2", "prost-build 0.11.1", - "prost-types 0.11.1", + "prost-types 0.11.2", "tokio", "tokio-stream", "tonic", @@ -1755,9 +1780,9 @@ dependencies = [ name = "grpc-binary-logger-proto" version = "0.1.0" dependencies = [ - "prost 0.11.0", + "prost 0.11.2", "prost-build 0.11.1", - "prost-types 0.11.1", + "prost-types 0.11.2", "tonic", "tonic-build", "workspace-hack", @@ -1767,9 +1792,9 @@ dependencies = [ name = "grpc-binary-logger-test-proto" version = "0.1.0" dependencies = [ - "prost 0.11.0", + "prost 0.11.2", "prost-build 0.11.1", - "prost-types 0.11.1", + "prost-types 0.11.2", "tonic", "tonic-build", "workspace-hack", @@ -2137,7 +2162,7 @@ dependencies = [ "assert_cmd", "backtrace", "bytes", - "clap 4.0.18", + "clap 4.0.19", "clap_blocks", "comfy-table", "compactor", @@ -2213,7 +2238,7 @@ dependencies = [ "futures-util", "generated_types", "influxdb_line_protocol", - "prost 0.11.0", + "prost 0.11.2", "rand", "reqwest", "thiserror", @@ -2247,7 +2272,7 @@ dependencies = [ "futures-util", "generated_types", "observability_deps", - "prost 0.11.0", + "prost 0.11.2", "tonic", "workspace-hack", ] @@ -2313,7 +2338,7 @@ dependencies = [ "paste", "pin-project", "predicate", - "prost 0.11.0", + "prost 0.11.2", "rand", "schema", "service_grpc_catalog", @@ -2363,9 +2388,9 @@ checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" [[package]] name = "io-lifetimes" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e481ccbe3dea62107216d0d1138bb8ad8e5e5c43009a098bd1990272c497b0" +checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" [[package]] name = "iox_catalog" @@ -2403,7 +2428,7 @@ dependencies = [ "bytes", "chrono", "chrono-english", - "clap 4.0.18", + "clap 4.0.19", "criterion", "datafusion_util", "futures", @@ -2501,7 +2526,7 @@ dependencies = [ "async-trait", "bytes", "chrono", - "clap 4.0.18", + "clap 4.0.19", "clap_blocks", "data_types", "flate2", @@ -2657,7 +2682,7 @@ name = "ioxd_test" version = "0.1.0" dependencies = [ "async-trait", - "clap 4.0.18", + "clap 4.0.19", "hyper", "ioxd_common", "metric", @@ -2963,7 +2988,7 @@ dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -3071,7 +3096,7 @@ dependencies = [ "mutable_batch", "mutable_batch_lp", "mutable_batch_pb", - "prost 0.11.0", + "prost 0.11.2", ] [[package]] @@ -3214,9 +3239,9 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ "hermit-abi", "libc", @@ -3392,14 +3417,14 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] name = "parquet" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7758803135c32b243e52832473fc8f7c768a0a170b0851fb1bb37904c6b3550" +checksum = "3bf8fa7ab6572791325a8595f55dc532dde88b996ae10a5ca8a2db746784ecc4" dependencies = [ "ahash 0.8.0", "arrow", @@ -3413,7 +3438,6 @@ dependencies = [ "lz4", "num", "num-bigint", - "rand", "seq-macro", "snap", "thrift", @@ -3440,7 +3464,7 @@ dependencies = [ "parquet", "pbjson-types", "predicate", - "prost 0.11.0", + "prost 0.11.2", "schema", "snafu", "thiserror", @@ -3493,8 +3517,8 @@ checksum = "bdbb7b706f2afc610f3853550cdbbf6372fd324824a087806bd4480ea4996e24" dependencies = [ "heck", "itertools", - "prost 0.11.0", - "prost-types 0.11.1", + "prost 0.11.2", + "prost-types 0.11.2", ] [[package]] @@ -3507,7 +3531,7 @@ dependencies = [ "chrono", "pbjson", "pbjson-build", - "prost 0.11.0", + "prost 0.11.2", "prost-build 0.11.1", "serde", ] @@ -3529,9 +3553,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc7bc69c062e492337d74d59b120c274fd3d261b6bf6d3207d499b4b379c41a" +checksum = "a528564cc62c19a7acac4d81e01f39e53e25e17b934878f4c6d25cc2836e62f8" dependencies = [ "thiserror", "ucd-trie", @@ -3539,9 +3563,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b75706b9642ebcb34dab3bc7750f811609a0eb1dd8b88c2d15bf628c1c65b2" +checksum = "d5fd9bc6500181952d34bd0b2b0163a54d794227b498be0b7afa7698d0a7b18f" dependencies = [ "pest", "pest_generator", @@ -3549,9 +3573,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f9272122f5979a6511a749af9db9bfc810393f63119970d7085fed1c4ea0db" +checksum = "d2610d5ac5156217b4ff8e46ddcef7cdf44b273da2ac5bca2ecbfa86a330e7c4" dependencies = [ "pest", "pest_meta", @@ -3562,9 +3586,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8717927f9b79515e565a64fe46c38b8cd0427e64c40680b14a7365ab09ac8d" +checksum = "824749bf7e21dd66b36fbe26b3f45c713879cccd4a009a917ab8e045ca8246fe" dependencies = [ "once_cell", "pest", @@ -3803,12 +3827,12 @@ dependencies = [ [[package]] name = "prost" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7" +checksum = "a0841812012b2d4a6145fae9a6af1534873c32aa67fff26bd09f8fa42c83f95a" dependencies = [ "bytes", - "prost-derive 0.11.0", + "prost-derive 0.11.2", ] [[package]] @@ -3846,8 +3870,8 @@ dependencies = [ "log", "multimap", "petgraph", - "prost 0.11.0", - "prost-types 0.11.1", + "prost 0.11.2", + "prost-types 0.11.2", "regex", "tempfile", "which", @@ -3868,9 +3892,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364" +checksum = "164ae68b6587001ca506d3bf7f1000bfa248d0e1217b618108fba4ec1d0cc306" dependencies = [ "anyhow", "itertools", @@ -3891,12 +3915,12 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e" +checksum = "747761bc3dc48f9a34553bf65605cf6cb6288ba219f3450b4275dbd81539551a" dependencies = [ "bytes", - "prost 0.11.0", + "prost 0.11.2", ] [[package]] @@ -4314,16 +4338,16 @@ dependencies = [ [[package]] name = "rustix" -version = "0.35.12" +version = "0.35.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985947f9b6423159c4726323f373be0a21bdb514c5af06a849cb3d2dce2d01e8" +checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" dependencies = [ "bitflags", "errno", "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.36.1", + "windows-sys", ] [[package]] @@ -4532,7 +4556,7 @@ dependencies = [ "metric", "observability_deps", "pin-project", - "prost 0.11.0", + "prost 0.11.2", "serde", "serde_json", "service_common", @@ -4564,7 +4588,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "predicate", - "prost 0.11.0", + "prost 0.11.2", "query_functions", "regex", "schema", @@ -5074,7 +5098,7 @@ dependencies = [ "observability_deps", "once_cell", "parking_lot 0.12.1", - "prost 0.11.0", + "prost 0.11.2", "rand", "reqwest", "sqlx", @@ -5318,8 +5342,8 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost 0.11.0", - "prost-derive 0.11.0", + "prost 0.11.2", + "prost-derive 0.11.2", "tokio", "tokio-stream", "tokio-util", @@ -5351,7 +5375,7 @@ checksum = "632faf60b81a5b5f439d9635102b2b2921ee39171faf14f3e0008d99f98689f1" dependencies = [ "async-stream", "bytes", - "prost 0.11.0", + "prost 0.11.2", "tokio", "tokio-stream", "tonic", @@ -5364,8 +5388,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0455f730d540a1484bffc3c55c94100b18a662597b982c2e9073f2c55c602616" dependencies = [ "bytes", - "prost 0.11.0", - "prost-types 0.11.1", + "prost 0.11.2", + "prost-types 0.11.2", "tokio", "tokio-stream", "tonic", @@ -5441,7 +5465,7 @@ version = "0.1.0" dependencies = [ "async-trait", "chrono", - "clap 4.0.18", + "clap 4.0.19", "futures", "observability_deps", "snafu", @@ -5580,7 +5604,7 @@ name = "trogging" version = "0.1.0" dependencies = [ "atty", - "clap 4.0.18", + "clap 4.0.19", "logfmt", "observability_deps", "regex", @@ -5881,19 +5905,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -5901,12 +5912,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc", ] [[package]] @@ -5915,48 +5926,24 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - [[package]] name = "windows_aarch64_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - [[package]] name = "windows_i686_gnu" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - [[package]] name = "windows_i686_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - [[package]] name = "windows_x86_64_gnu" version = "0.42.0" @@ -5969,12 +5956,6 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - [[package]] name = "windows_x86_64_msvc" version = "0.42.0" @@ -6033,8 +6014,8 @@ dependencies = [ "parking_lot 0.12.1", "parquet", "predicates", - "prost 0.11.0", - "prost-types 0.11.1", + "prost 0.11.2", + "prost-types 0.11.2", "rand", "regex", "regex-automata", @@ -6066,7 +6047,7 @@ dependencies = [ "url", "uuid", "winapi", - "windows-sys 0.42.0", + "windows-sys", "zstd", "zstd-safe", "zstd-sys", @@ -6093,7 +6074,7 @@ dependencies = [ "observability_deps", "parking_lot 0.12.1", "pin-project", - "prost 0.11.0", + "prost 0.11.2", "rskafka", "schema", "tempfile", diff --git a/Cargo.toml b/Cargo.toml index 1f7a1b2f8a..9b8ce3dfe0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -108,11 +108,11 @@ edition = "2021" license = "MIT OR Apache-2.0" [workspace.dependencies] -arrow = { version = "25.0.0" } -arrow-flight = { version = "25.0.0" } -datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev="761e1671bd3c4988d21a38bb19e50bdac6cfaa61", default-features = false } -datafusion-proto = { git = "https://github.com/apache/arrow-datafusion.git", rev="761e1671bd3c4988d21a38bb19e50bdac6cfaa61" } -parquet = { version = "25.0.0" } +arrow = { version = "26.0.0" } +arrow-flight = { version = "26.0.0" } +datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev="dd081d64a2fba8574e63bdd0662c14aec5852b48", default-features = false } +datafusion-proto = { git = "https://github.com/apache/arrow-datafusion.git", rev="dd081d64a2fba8574e63bdd0662c14aec5852b48" } +parquet = { version = "26.0.0" } # This profile optimizes for runtime performance and small binary size at the expense of longer # build times. It's most suitable for final release builds. diff --git a/arrow_util/Cargo.toml b/arrow_util/Cargo.toml index 981af8f927..8c872ad599 100644 --- a/arrow_util/Cargo.toml +++ b/arrow_util/Cargo.toml @@ -7,7 +7,9 @@ edition.workspace = true license.workspace = true [dependencies] -ahash = { version = "0.8.0", default-features = false, features = ["runtime-rng"] } +# Locking ahash to 0.8.0 because of a cargo hakari problem, see: +# +ahash = { version = "=0.8.0", default-features = false, features = ["runtime-rng"] } # need dyn_cmp_dict feature for comparing dictionary arrays arrow = { workspace = true, features = ["prettyprint", "dyn_cmp_dict"] } # used by arrow anyway (needed for printing workaround) diff --git a/deny.toml b/deny.toml index 3ed7124db6..93681fef98 100644 --- a/deny.toml +++ b/deny.toml @@ -11,11 +11,6 @@ ignore = [ # why needed: used by `chrono` # upstream issue: https://github.com/chronotope/chrono/issues/553 "RUSTSEC-2020-0071", - - # title: Generated code can read and write out of bounds in safe code - # why needed: part of `arrow` - # upstream issue: https://github.com/google/flatbuffers/issues/6627 - "RUSTSEC-2021-0122", ] git-fetch-with-cli = true diff --git a/influxdb_iox/src/commands/storage/response.rs b/influxdb_iox/src/commands/storage/response.rs index f2420a5809..d6b095d40a 100644 --- a/influxdb_iox/src/commands/storage/response.rs +++ b/influxdb_iox/src/commands/storage/response.rs @@ -761,12 +761,12 @@ mod test_super { "+--------+------------+----------------+---------+-------------------------------+", "| region | bool_field | unsigned_field | voltage | time |", "+--------+------------+----------------+---------+-------------------------------+", - "| | | | hello | 1970-01-01 00:00:00.000000200 |", - "| | | | abc | 1970-01-01 00:00:00.000000201 |", - "| west | | | foo | 1970-01-01 00:00:00.000000302 |", - "| west | | | bar | 1970-01-01 00:00:00.000000304 |", - "| north | true | | | 1970-01-01 00:00:00.000001 |", - "| south | | 600 | | 1970-01-01 00:00:00.000002 |", + "| | | | hello | 1970-01-01T00:00:00.000000200 |", + "| | | | abc | 1970-01-01T00:00:00.000000201 |", + "| west | | | foo | 1970-01-01T00:00:00.000000302 |", + "| west | | | bar | 1970-01-01T00:00:00.000000304 |", + "| north | true | | | 1970-01-01T00:00:00.000001 |", + "| south | | 600 | | 1970-01-01T00:00:00.000002 |", "+--------+------------+----------------+---------+-------------------------------+", ], ), @@ -776,18 +776,18 @@ mod test_super { "+------+------------+--------+------+---------+-------------------------------+", "| host | new_column | server | temp | voltage | time |", "+------+------------+--------+------+---------+-------------------------------+", - "| foo | | a | 1.1 | | 1970-01-01 00:00:00.000000001 |", - "| foo | | a | 2.2 | | 1970-01-01 00:00:00.000000002 |", - "| foo | | a | 3.3 | | 1970-01-01 00:00:00.000000003 |", - "| foo | | a | 4.4 | | 1970-01-01 00:00:00.000000004 |", - "| foo | | a | 5.1 | | 1970-01-01 00:00:00.000000005 |", - "| foo | | a | 5.2 | | 1970-01-01 00:00:00.000000006 |", - "| foo | | a | 5.3 | | 1970-01-01 00:00:00.000000007 |", - "| foo | | a | 10.4 | | 1970-01-01 00:00:00.000000010 |", - "| foo | | a | | 22 | 1970-01-01 00:00:00.000000001 |", - "| foo | | a | | 22 | 1970-01-01 00:00:00.000000002 |", - "| foo | a | | | 1000 | 1970-01-01 00:00:00.000000100 |", - "| foo | a | | | 2000 | 1970-01-01 00:00:00.000000200 |", + "| foo | | a | 1.1 | | 1970-01-01T00:00:00.000000001 |", + "| foo | | a | 2.2 | | 1970-01-01T00:00:00.000000002 |", + "| foo | | a | 3.3 | | 1970-01-01T00:00:00.000000003 |", + "| foo | | a | 4.4 | | 1970-01-01T00:00:00.000000004 |", + "| foo | | a | 5.1 | | 1970-01-01T00:00:00.000000005 |", + "| foo | | a | 5.2 | | 1970-01-01T00:00:00.000000006 |", + "| foo | | a | 5.3 | | 1970-01-01T00:00:00.000000007 |", + "| foo | | a | 10.4 | | 1970-01-01T00:00:00.000000010 |", + "| foo | | a | | 22 | 1970-01-01T00:00:00.000000001 |", + "| foo | | a | | 22 | 1970-01-01T00:00:00.000000002 |", + "| foo | a | | | 1000 | 1970-01-01T00:00:00.000000100 |", + "| foo | a | | | 2000 | 1970-01-01T00:00:00.000000200 |", "+------+------------+--------+------+---------+-------------------------------+", ], ), diff --git a/ingester/Cargo.toml b/ingester/Cargo.toml index 2eefa42ed3..c269ab2a68 100644 --- a/ingester/Cargo.toml +++ b/ingester/Cargo.toml @@ -17,7 +17,7 @@ data_types = { path = "../data_types" } datafusion = { workspace = true } datafusion_util = { path = "../datafusion_util" } dml = { path = "../dml" } -flatbuffers = "2.1.2" +flatbuffers = "22.9.29" futures = "0.3" generated_types = { path = "../generated_types" } hashbrown = "0.12.3" diff --git a/iox_query/src/exec/seriesset/series.rs b/iox_query/src/exec/seriesset/series.rs index e5f71b0ff3..42a694a801 100644 --- a/iox_query/src/exec/seriesset/series.rs +++ b/iox_query/src/exec/seriesset/series.rs @@ -465,8 +465,7 @@ mod tests { #[test] fn test_series_set_conversion_mixed_case_tags() { - let time1_array: ArrayRef = - Arc::new(TimestampNanosecondArray::from_vec(vec![1, 2, 3], None)); + let time1_array: ArrayRef = Arc::new(TimestampNanosecondArray::from(vec![1, 2, 3])); let string1_array: ArrayRef = Arc::new(StringArray::from(vec!["foo", "bar", "baz"])); let batch = RecordBatch::try_from_iter(vec![ @@ -506,11 +505,9 @@ mod tests { #[test] fn test_series_set_conversion_different_time_columns() { - let time1_array: ArrayRef = - Arc::new(TimestampNanosecondArray::from_vec(vec![1, 2, 3], None)); + let time1_array: ArrayRef = Arc::new(TimestampNanosecondArray::from(vec![1, 2, 3])); let string1_array: ArrayRef = Arc::new(StringArray::from(vec!["foo", "bar", "baz"])); - let time2_array: ArrayRef = - Arc::new(TimestampNanosecondArray::from_vec(vec![3, 4, 5], None)); + let time2_array: ArrayRef = Arc::new(TimestampNanosecondArray::from(vec![3, 4, 5])); let string2_array: ArrayRef = Arc::new(StringArray::from(vec!["boo", "far", "faz"])); let batch = RecordBatch::try_from_iter(vec![ @@ -559,10 +556,8 @@ mod tests { Some(40.1), ])); - let timestamp_array: ArrayRef = Arc::new(TimestampNanosecondArray::from_vec( - vec![1000, 2000, 3000, 4000], - None, - )); + let timestamp_array: ArrayRef = + Arc::new(TimestampNanosecondArray::from(vec![1000, 2000, 3000, 4000])); let batch = RecordBatch::try_from_iter_with_nullable(vec![ ("state", tag_array, true), @@ -607,7 +602,7 @@ mod tests { let uint_array = UInt64Array::from(vec![None, Some(100)]); let bool_array = BooleanArray::from(vec![None, Some(true)]); - let timestamp_array = TimestampNanosecondArray::from_vec(vec![1000, 2000], None); + let timestamp_array = TimestampNanosecondArray::from(vec![1000, 2000]); let batch = RecordBatch::try_from_iter_with_nullable(vec![ ("state", Arc::new(tag_array) as ArrayRef, true), @@ -660,10 +655,8 @@ mod tests { let float_array: ArrayRef = Arc::new(Float64Array::from(vec![10.1, 20.1, 30.1, 40.1])); let bool_array: ArrayRef = Arc::new(BooleanArray::from(vec![true, false, true, false])); - let timestamp_array: ArrayRef = Arc::new(TimestampNanosecondArray::from_vec( - vec![1000, 2000, 3000, 4000], - None, - )); + let timestamp_array: ArrayRef = + Arc::new(TimestampNanosecondArray::from(vec![1000, 2000, 3000, 4000])); RecordBatch::try_from_iter_with_nullable(vec![ ("string_field", string_array, true), diff --git a/iox_query/src/test.rs b/iox_query/src/test.rs index ec8a43abd8..82e18b01b9 100644 --- a/iox_query/src/test.rs +++ b/iox_query/src/test.rs @@ -601,7 +601,7 @@ impl TestChunk { DataType::Int64 => Arc::new(Int64Array::from(vec![1000])) as ArrayRef, DataType::Utf8 => Arc::new(StringArray::from(vec!["MA"])) as ArrayRef, DataType::Timestamp(TimeUnit::Nanosecond, _) => { - Arc::new(TimestampNanosecondArray::from_vec(vec![1000], None)) as ArrayRef + Arc::new(TimestampNanosecondArray::from(vec![1000])) as ArrayRef } DataType::Dictionary(key, value) if key.as_ref() == &DataType::Int32 && value.as_ref() == &DataType::Utf8 => @@ -647,9 +647,9 @@ impl TestChunk { "tag2" => Arc::new(StringArray::from(vec!["SC", "NC", "RI"])) as ArrayRef, _ => Arc::new(StringArray::from(vec!["TX", "PR", "OR"])) as ArrayRef, }, - DataType::Timestamp(TimeUnit::Nanosecond, _) => Arc::new( - TimestampNanosecondArray::from_vec(vec![8000, 10000, 20000], None), - ) as ArrayRef, + DataType::Timestamp(TimeUnit::Nanosecond, _) => { + Arc::new(TimestampNanosecondArray::from(vec![8000, 10000, 20000])) as ArrayRef + } DataType::Dictionary(key, value) if key.as_ref() == &DataType::Int32 && value.as_ref() == &DataType::Utf8 => { @@ -708,9 +708,11 @@ impl TestChunk { "tag2" => Arc::new(StringArray::from(vec!["SC", "NC", "RI", "NC"])) as ArrayRef, _ => Arc::new(StringArray::from(vec!["TX", "PR", "OR", "AL"])) as ArrayRef, }, - DataType::Timestamp(TimeUnit::Nanosecond, _) => Arc::new( - TimestampNanosecondArray::from_vec(vec![28000, 210000, 220000, 210000], None), - ) as ArrayRef, + DataType::Timestamp(TimeUnit::Nanosecond, _) => { + Arc::new(TimestampNanosecondArray::from(vec![ + 28000, 210000, 220000, 210000, + ])) as ArrayRef + } DataType::Dictionary(key, value) if key.as_ref() == &DataType::Int32 && value.as_ref() == &DataType::Utf8 => { @@ -760,53 +762,54 @@ impl TestChunk { /// Stats(min, max) : tag1(AL, MT), tag2(AL, MA), time(5, 7000) pub fn with_five_rows_of_data(mut self) -> Self { // create arrays - let columns = self - .schema - .iter() - .map(|(_influxdb_column_type, field)| match field.data_type() { - DataType::Int64 => { - Arc::new(Int64Array::from(vec![1000, 10, 70, 100, 5])) as ArrayRef - } - DataType::Utf8 => { - match field.name().as_str() { + let columns = + self.schema + .iter() + .map(|(_influxdb_column_type, field)| match field.data_type() { + DataType::Int64 => { + Arc::new(Int64Array::from(vec![1000, 10, 70, 100, 5])) as ArrayRef + } + DataType::Utf8 => match field.name().as_str() { "tag1" => Arc::new(StringArray::from(vec!["MT", "MT", "CT", "AL", "MT"])) as ArrayRef, "tag2" => Arc::new(StringArray::from(vec!["CT", "AL", "CT", "MA", "AL"])) as ArrayRef, _ => Arc::new(StringArray::from(vec!["CT", "MT", "AL", "AL", "MT"])) as ArrayRef, + }, + DataType::Timestamp(TimeUnit::Nanosecond, _) => { + Arc::new(TimestampNanosecondArray::from(vec![ + 1000, 7000, 100, 50, 5000, + ])) as ArrayRef } - } - DataType::Timestamp(TimeUnit::Nanosecond, _) => Arc::new( - TimestampNanosecondArray::from_vec(vec![1000, 7000, 100, 50, 5000], None), - ) as ArrayRef, - DataType::Dictionary(key, value) - if key.as_ref() == &DataType::Int32 && value.as_ref() == &DataType::Utf8 => - { - match field.name().as_str() { - "tag1" => Arc::new( - vec!["MT", "MT", "CT", "AL", "MT"] - .into_iter() - .collect::>(), - ) as ArrayRef, - "tag2" => Arc::new( - vec!["CT", "AL", "CT", "MA", "AL"] - .into_iter() - .collect::>(), - ) as ArrayRef, - _ => Arc::new( - vec!["CT", "MT", "AL", "AL", "MT"] - .into_iter() - .collect::>(), - ) as ArrayRef, + DataType::Dictionary(key, value) + if key.as_ref() == &DataType::Int32 + && value.as_ref() == &DataType::Utf8 => + { + match field.name().as_str() { + "tag1" => Arc::new( + vec!["MT", "MT", "CT", "AL", "MT"] + .into_iter() + .collect::>(), + ) as ArrayRef, + "tag2" => Arc::new( + vec!["CT", "AL", "CT", "MA", "AL"] + .into_iter() + .collect::>(), + ) as ArrayRef, + _ => Arc::new( + vec!["CT", "MT", "AL", "AL", "MT"] + .into_iter() + .collect::>(), + ) as ArrayRef, + } } - } - _ => unimplemented!( - "Unimplemented data type for test database: {:?}", - field.data_type() - ), - }) - .collect::>(); + _ => unimplemented!( + "Unimplemented data type for test database: {:?}", + field.data_type() + ), + }) + .collect::>(); let batch = RecordBatch::try_new(self.schema.as_ref().into(), columns).expect("made record batch"); @@ -853,10 +856,9 @@ impl TestChunk { ])) as ArrayRef, }, DataType::Timestamp(TimeUnit::Nanosecond, _) => { - Arc::new(TimestampNanosecondArray::from_vec( - vec![1000, 7000, 100, 50, 5, 2000, 7000, 500, 50, 5], - None, - )) as ArrayRef + Arc::new(TimestampNanosecondArray::from(vec![ + 1000, 7000, 100, 50, 5, 2000, 7000, 500, 50, 5, + ])) as ArrayRef } DataType::Dictionary(key, value) if key.as_ref() == &DataType::Int32 && value.as_ref() == &DataType::Utf8 => diff --git a/query_functions/src/lib.rs b/query_functions/src/lib.rs index bc8de9fff3..5b79daedab 100644 --- a/query_functions/src/lib.rs +++ b/query_functions/src/lib.rs @@ -190,8 +190,8 @@ mod test { "+----------------------------+-------------------------------+", "| time | bound |", "+----------------------------+-------------------------------+", - "| 1970-01-01 00:00:00.000001 | 1970-01-01 00:00:00.000001100 |", - "| 1970-01-01 00:00:00.000002 | 1970-01-01 00:00:00.000002100 |", + "| 1970-01-01T00:00:00.000001 | 1970-01-01T00:00:00.000001100 |", + "| 1970-01-01T00:00:00.000002 | 1970-01-01T00:00:00.000002100 |", "+----------------------------+-------------------------------+", ]; diff --git a/query_functions/src/selectors.rs b/query_functions/src/selectors.rs index 1d788c1bf5..5feb4087be 100644 --- a/query_functions/src/selectors.rs +++ b/query_functions/src/selectors.rs @@ -572,7 +572,6 @@ mod test { util::pretty::pretty_format_batches, }; use datafusion::{datasource::MemTable, prelude::*}; - use schema::TIME_DATA_TIMEZONE; use super::*; @@ -587,7 +586,7 @@ mod test { "+------------------------------------------+-----------------------------------------+", "| selector_first_value(t.f64_value,t.time) | selector_first_time(t.f64_value,t.time) |", "+------------------------------------------+-----------------------------------------+", - "| 2 | 1970-01-01 00:00:00.000001 |", + "| 2 | 1970-01-01T00:00:00.000001 |", "+------------------------------------------+-----------------------------------------+", ], ), @@ -599,7 +598,7 @@ mod test { "+------------------------------------------+-----------------------------------------+", "| selector_first_value(t.i64_value,t.time) | selector_first_time(t.i64_value,t.time) |", "+------------------------------------------+-----------------------------------------+", - "| 20 | 1970-01-01 00:00:00.000001 |", + "| 20 | 1970-01-01T00:00:00.000001 |", "+------------------------------------------+-----------------------------------------+", ], ), @@ -611,7 +610,7 @@ mod test { "+------------------------------------------+-----------------------------------------+", "| selector_first_value(t.u64_value,t.time) | selector_first_time(t.u64_value,t.time) |", "+------------------------------------------+-----------------------------------------+", - "| 20 | 1970-01-01 00:00:00.000001 |", + "| 20 | 1970-01-01T00:00:00.000001 |", "+------------------------------------------+-----------------------------------------+", ], ), @@ -623,7 +622,7 @@ mod test { "+---------------------------------------------+--------------------------------------------+", "| selector_first_value(t.string_value,t.time) | selector_first_time(t.string_value,t.time) |", "+---------------------------------------------+--------------------------------------------+", - "| two | 1970-01-01 00:00:00.000001 |", + "| two | 1970-01-01T00:00:00.000001 |", "+---------------------------------------------+--------------------------------------------+", ], ), @@ -635,7 +634,7 @@ mod test { "+-------------------------------------------+------------------------------------------+", "| selector_first_value(t.bool_value,t.time) | selector_first_time(t.bool_value,t.time) |", "+-------------------------------------------+------------------------------------------+", - "| true | 1970-01-01 00:00:00.000001 |", + "| true | 1970-01-01T00:00:00.000001 |", "+-------------------------------------------+------------------------------------------+", ], ) @@ -665,7 +664,7 @@ mod test { "+-----------------------------------------+----------------------------------------+", "| selector_last_value(t.f64_value,t.time) | selector_last_time(t.f64_value,t.time) |", "+-----------------------------------------+----------------------------------------+", - "| 3 | 1970-01-01 00:00:00.000006 |", + "| 3 | 1970-01-01T00:00:00.000006 |", "+-----------------------------------------+----------------------------------------+", ], ), @@ -677,7 +676,7 @@ mod test { "+-----------------------------------------+----------------------------------------+", "| selector_last_value(t.i64_value,t.time) | selector_last_time(t.i64_value,t.time) |", "+-----------------------------------------+----------------------------------------+", - "| 30 | 1970-01-01 00:00:00.000006 |", + "| 30 | 1970-01-01T00:00:00.000006 |", "+-----------------------------------------+----------------------------------------+", ], ), @@ -689,7 +688,7 @@ mod test { "+-----------------------------------------+----------------------------------------+", "| selector_last_value(t.u64_value,t.time) | selector_last_time(t.u64_value,t.time) |", "+-----------------------------------------+----------------------------------------+", - "| 30 | 1970-01-01 00:00:00.000006 |", + "| 30 | 1970-01-01T00:00:00.000006 |", "+-----------------------------------------+----------------------------------------+", ], ), @@ -701,7 +700,7 @@ mod test { "+--------------------------------------------+-------------------------------------------+", "| selector_last_value(t.string_value,t.time) | selector_last_time(t.string_value,t.time) |", "+--------------------------------------------+-------------------------------------------+", - "| three | 1970-01-01 00:00:00.000006 |", + "| three | 1970-01-01T00:00:00.000006 |", "+--------------------------------------------+-------------------------------------------+", ], ), @@ -713,7 +712,7 @@ mod test { "+------------------------------------------+-----------------------------------------+", "| selector_last_value(t.bool_value,t.time) | selector_last_time(t.bool_value,t.time) |", "+------------------------------------------+-----------------------------------------+", - "| false | 1970-01-01 00:00:00.000006 |", + "| false | 1970-01-01T00:00:00.000006 |", "+------------------------------------------+-----------------------------------------+", ], ) @@ -743,7 +742,7 @@ mod test { "+----------------------------------------+---------------------------------------+", "| selector_min_value(t.f64_value,t.time) | selector_min_time(t.f64_value,t.time) |", "+----------------------------------------+---------------------------------------+", - "| 1 | 1970-01-01 00:00:00.000004 |", + "| 1 | 1970-01-01T00:00:00.000004 |", "+----------------------------------------+---------------------------------------+", ], ), @@ -755,7 +754,7 @@ mod test { "+----------------------------------------+---------------------------------------+", "| selector_min_value(t.i64_value,t.time) | selector_min_time(t.i64_value,t.time) |", "+----------------------------------------+---------------------------------------+", - "| 10 | 1970-01-01 00:00:00.000004 |", + "| 10 | 1970-01-01T00:00:00.000004 |", "+----------------------------------------+---------------------------------------+", ], ), @@ -767,7 +766,7 @@ mod test { "+----------------------------------------+---------------------------------------+", "| selector_min_value(t.u64_value,t.time) | selector_min_time(t.u64_value,t.time) |", "+----------------------------------------+---------------------------------------+", - "| 10 | 1970-01-01 00:00:00.000004 |", + "| 10 | 1970-01-01T00:00:00.000004 |", "+----------------------------------------+---------------------------------------+", ], ), @@ -779,7 +778,7 @@ mod test { "+-------------------------------------------+------------------------------------------+", "| selector_min_value(t.string_value,t.time) | selector_min_time(t.string_value,t.time) |", "+-------------------------------------------+------------------------------------------+", - "| a_one | 1970-01-01 00:00:00.000004 |", + "| a_one | 1970-01-01T00:00:00.000004 |", "+-------------------------------------------+------------------------------------------+", ], ), @@ -791,7 +790,7 @@ mod test { "+-----------------------------------------+----------------------------------------+", "| selector_min_value(t.bool_value,t.time) | selector_min_time(t.bool_value,t.time) |", "+-----------------------------------------+----------------------------------------+", - "| false | 1970-01-01 00:00:00.000002 |", + "| false | 1970-01-01T00:00:00.000002 |", "+-----------------------------------------+----------------------------------------+", ], ) @@ -821,7 +820,7 @@ mod test { "+----------------------------------------+---------------------------------------+", "| selector_max_value(t.f64_value,t.time) | selector_max_time(t.f64_value,t.time) |", "+----------------------------------------+---------------------------------------+", - "| 5 | 1970-01-01 00:00:00.000005 |", + "| 5 | 1970-01-01T00:00:00.000005 |", "+----------------------------------------+---------------------------------------+", ], ), @@ -833,7 +832,7 @@ mod test { "+----------------------------------------+---------------------------------------+", "| selector_max_value(t.i64_value,t.time) | selector_max_time(t.i64_value,t.time) |", "+----------------------------------------+---------------------------------------+", - "| 50 | 1970-01-01 00:00:00.000005 |", + "| 50 | 1970-01-01T00:00:00.000005 |", "+----------------------------------------+---------------------------------------+", ], ), @@ -845,7 +844,7 @@ mod test { "+----------------------------------------+---------------------------------------+", "| selector_max_value(t.u64_value,t.time) | selector_max_time(t.u64_value,t.time) |", "+----------------------------------------+---------------------------------------+", - "| 50 | 1970-01-01 00:00:00.000005 |", + "| 50 | 1970-01-01T00:00:00.000005 |", "+----------------------------------------+---------------------------------------+", ], ), @@ -857,7 +856,7 @@ mod test { "+-------------------------------------------+------------------------------------------+", "| selector_max_value(t.string_value,t.time) | selector_max_time(t.string_value,t.time) |", "+-------------------------------------------+------------------------------------------+", - "| z_five | 1970-01-01 00:00:00.000005 |", + "| z_five | 1970-01-01T00:00:00.000005 |", "+-------------------------------------------+------------------------------------------+", ], ), @@ -869,7 +868,7 @@ mod test { "+-----------------------------------------+----------------------------------------+", "| selector_max_value(t.bool_value,t.time) | selector_max_time(t.bool_value,t.time) |", "+-----------------------------------------+----------------------------------------+", - "| true | 1970-01-01 00:00:00.000001 |", + "| true | 1970-01-01T00:00:00.000001 |", "+-----------------------------------------+----------------------------------------+", ], ) @@ -898,7 +897,7 @@ mod test { "+--------------------------------------------------+", "| selector_first(t.f64_value,t.time) |", "+--------------------------------------------------+", - "| {\"value\": 2, \"time\": 1970-01-01 00:00:00.000001} |", + "| {\"value\": 2, \"time\": 1970-01-01T00:00:00.000001} |", "+--------------------------------------------------+", ], ) @@ -913,7 +912,7 @@ mod test { "+---------------------------------------------------+", "| selector_first(t.i64_value,t.time) |", "+---------------------------------------------------+", - "| {\"value\": 20, \"time\": 1970-01-01 00:00:00.000001} |", + "| {\"value\": 20, \"time\": 1970-01-01T00:00:00.000001} |", "+---------------------------------------------------+", ], ) @@ -928,7 +927,7 @@ mod test { "+---------------------------------------------------+", "| selector_first(t.u64_value,t.time) |", "+---------------------------------------------------+", - "| {\"value\": 20, \"time\": 1970-01-01 00:00:00.000001} |", + "| {\"value\": 20, \"time\": 1970-01-01T00:00:00.000001} |", "+---------------------------------------------------+", ], ) @@ -943,7 +942,7 @@ mod test { "+------------------------------------------------------+", "| selector_first(t.string_value,t.time) |", "+------------------------------------------------------+", - "| {\"value\": \"two\", \"time\": 1970-01-01 00:00:00.000001} |", + "| {\"value\": \"two\", \"time\": 1970-01-01T00:00:00.000001} |", "+------------------------------------------------------+", ], ) @@ -958,7 +957,7 @@ mod test { "+-----------------------------------------------------+", "| selector_first(t.bool_value,t.time) |", "+-----------------------------------------------------+", - "| {\"value\": true, \"time\": 1970-01-01 00:00:00.000001} |", + "| {\"value\": true, \"time\": 1970-01-01T00:00:00.000001} |", "+-----------------------------------------------------+", ], ) @@ -975,7 +974,7 @@ mod test { "+--------------------------------------------------+", "| selector_last(t.f64_value,t.time) |", "+--------------------------------------------------+", - "| {\"value\": 3, \"time\": 1970-01-01 00:00:00.000006} |", + "| {\"value\": 3, \"time\": 1970-01-01T00:00:00.000006} |", "+--------------------------------------------------+", ], ) @@ -990,7 +989,7 @@ mod test { "+---------------------------------------------------+", "| selector_last(t.i64_value,t.time) |", "+---------------------------------------------------+", - "| {\"value\": 30, \"time\": 1970-01-01 00:00:00.000006} |", + "| {\"value\": 30, \"time\": 1970-01-01T00:00:00.000006} |", "+---------------------------------------------------+", ], ) @@ -1005,7 +1004,7 @@ mod test { "+---------------------------------------------------+", "| selector_last(t.u64_value,t.time) |", "+---------------------------------------------------+", - "| {\"value\": 30, \"time\": 1970-01-01 00:00:00.000006} |", + "| {\"value\": 30, \"time\": 1970-01-01T00:00:00.000006} |", "+---------------------------------------------------+", ], ) @@ -1020,7 +1019,7 @@ mod test { "+--------------------------------------------------------+", "| selector_last(t.string_value,t.time) |", "+--------------------------------------------------------+", - "| {\"value\": \"three\", \"time\": 1970-01-01 00:00:00.000006} |", + "| {\"value\": \"three\", \"time\": 1970-01-01T00:00:00.000006} |", "+--------------------------------------------------------+", ], ) @@ -1035,7 +1034,7 @@ mod test { "+------------------------------------------------------+", "| selector_last(t.bool_value,t.time) |", "+------------------------------------------------------+", - "| {\"value\": false, \"time\": 1970-01-01 00:00:00.000006} |", + "| {\"value\": false, \"time\": 1970-01-01T00:00:00.000006} |", "+------------------------------------------------------+", ], ) @@ -1052,7 +1051,7 @@ mod test { "+--------------------------------------------------+", "| selector_min(t.f64_value,t.time) |", "+--------------------------------------------------+", - "| {\"value\": 1, \"time\": 1970-01-01 00:00:00.000004} |", + "| {\"value\": 1, \"time\": 1970-01-01T00:00:00.000004} |", "+--------------------------------------------------+", ], ) @@ -1067,7 +1066,7 @@ mod test { "+---------------------------------------------------+", "| selector_min(t.i64_value,t.time) |", "+---------------------------------------------------+", - "| {\"value\": 10, \"time\": 1970-01-01 00:00:00.000004} |", + "| {\"value\": 10, \"time\": 1970-01-01T00:00:00.000004} |", "+---------------------------------------------------+", ], ) @@ -1082,7 +1081,7 @@ mod test { "+---------------------------------------------------+", "| selector_min(t.u64_value,t.time) |", "+---------------------------------------------------+", - "| {\"value\": 10, \"time\": 1970-01-01 00:00:00.000004} |", + "| {\"value\": 10, \"time\": 1970-01-01T00:00:00.000004} |", "+---------------------------------------------------+", ], ) @@ -1097,7 +1096,7 @@ mod test { "+--------------------------------------------------------+", "| selector_min(t.string_value,t.time) |", "+--------------------------------------------------------+", - "| {\"value\": \"a_one\", \"time\": 1970-01-01 00:00:00.000004} |", + "| {\"value\": \"a_one\", \"time\": 1970-01-01T00:00:00.000004} |", "+--------------------------------------------------------+", ], ) @@ -1112,7 +1111,7 @@ mod test { "+------------------------------------------------------+", "| selector_min(t.bool_value,t.time) |", "+------------------------------------------------------+", - "| {\"value\": false, \"time\": 1970-01-01 00:00:00.000002} |", + "| {\"value\": false, \"time\": 1970-01-01T00:00:00.000002} |", "+------------------------------------------------------+", ], ) @@ -1129,7 +1128,7 @@ mod test { "+--------------------------------------------------+", "| selector_max(t.f64_value,t.time) |", "+--------------------------------------------------+", - "| {\"value\": 5, \"time\": 1970-01-01 00:00:00.000005} |", + "| {\"value\": 5, \"time\": 1970-01-01T00:00:00.000005} |", "+--------------------------------------------------+", ], ) @@ -1144,7 +1143,7 @@ mod test { "+---------------------------------------------------+", "| selector_max(t.i64_value,t.time) |", "+---------------------------------------------------+", - "| {\"value\": 50, \"time\": 1970-01-01 00:00:00.000005} |", + "| {\"value\": 50, \"time\": 1970-01-01T00:00:00.000005} |", "+---------------------------------------------------+", ], ) @@ -1159,7 +1158,7 @@ mod test { "+---------------------------------------------------+", "| selector_max(t.u64_value,t.time) |", "+---------------------------------------------------+", - "| {\"value\": 50, \"time\": 1970-01-01 00:00:00.000005} |", + "| {\"value\": 50, \"time\": 1970-01-01T00:00:00.000005} |", "+---------------------------------------------------+", ], ) @@ -1174,7 +1173,7 @@ mod test { "+---------------------------------------------------------+", "| selector_max(t.string_value,t.time) |", "+---------------------------------------------------------+", - "| {\"value\": \"z_five\", \"time\": 1970-01-01 00:00:00.000005} |", + "| {\"value\": \"z_five\", \"time\": 1970-01-01T00:00:00.000005} |", "+---------------------------------------------------------+", ], ) @@ -1189,7 +1188,7 @@ mod test { "+-----------------------------------------------------+", "| selector_max(t.bool_value,t.time) |", "+-----------------------------------------------------+", - "| {\"value\": true, \"time\": 1970-01-01 00:00:00.000001} |", + "| {\"value\": true, \"time\": 1970-01-01T00:00:00.000001} |", "+-----------------------------------------------------+", ], ) @@ -1217,12 +1216,12 @@ mod test { /// +-----------+-----------+-----------+--------------+------------+----------------------------+, /// | f64_value | i64_value | u64_value | string_value | bool_value | time |, /// +-----------+-----------+--------------+------------+----------------------------+, - /// | 2 | 20 | 20 | two | true | 1970-01-01 00:00:00.000001 |, - /// | 4 | 40 | 40 | four | false | 1970-01-01 00:00:00.000002 |, - /// | | | | | | 1970-01-01 00:00:00.000003 |, - /// | 1 | 10 | 10 | a_one | true | 1970-01-01 00:00:00.000004 |, - /// | 5 | 50 | 50 | z_five | false | 1970-01-01 00:00:00.000005 |, - /// | 3 | 30 | 30 | three | false | 1970-01-01 00:00:00.000006 |, + /// | 2 | 20 | 20 | two | true | 1970-01-01T00:00:00.000001 |, + /// | 4 | 40 | 40 | four | false | 1970-01-01T00:00:00.000002 |, + /// | | | | | | 1970-01-01T00:00:00.000003 |, + /// | 1 | 10 | 10 | a_one | true | 1970-01-01T00:00:00.000004 |, + /// | 5 | 50 | 50 | z_five | false | 1970-01-01T00:00:00.000005 |, + /// | 3 | 30 | 30 | three | false | 1970-01-01T00:00:00.000006 |, /// +-----------+-----------+--------------+------------+----------------------------+, /// ``` async fn run_plan(aggs: Vec) -> Vec { @@ -1246,10 +1245,7 @@ mod test { Arc::new(UInt64Array::from(vec![Some(20), Some(40), None])), Arc::new(StringArray::from(vec![Some("two"), Some("four"), None])), Arc::new(BooleanArray::from(vec![Some(true), Some(false), None])), - Arc::new(TimestampNanosecondArray::from_vec( - vec![1000, 2000, 3000], - TIME_DATA_TIMEZONE(), - )), + Arc::new(TimestampNanosecondArray::from(vec![1000, 2000, 3000])), ], ) .unwrap(); @@ -1263,10 +1259,7 @@ mod test { Arc::new(UInt64Array::from(vec![] as Vec>)), Arc::new(StringArray::from(vec![] as Vec>)), Arc::new(BooleanArray::from(vec![] as Vec>)), - Arc::new(TimestampNanosecondArray::from_vec( - vec![], - TIME_DATA_TIMEZONE(), - )), + Arc::new(TimestampNanosecondArray::from(vec![] as Vec)), ], ) { Ok(a) => a, @@ -1289,10 +1282,7 @@ mod test { Some(false), Some(false), ])), - Arc::new(TimestampNanosecondArray::from_vec( - vec![4000, 5000, 6000], - TIME_DATA_TIMEZONE(), - )), + Arc::new(TimestampNanosecondArray::from(vec![4000, 5000, 6000])), ], ) .unwrap(); diff --git a/query_functions/src/window.rs b/query_functions/src/window.rs index 8f79c6e8ba..e4c0d5fa5a 100644 --- a/query_functions/src/window.rs +++ b/query_functions/src/window.rs @@ -265,26 +265,31 @@ impl TryFrom for WindowDuration { #[cfg(test)] mod tests { use arrow::array::TimestampNanosecondArray; - use schema::TIME_DATA_TIMEZONE; use super::*; #[test] fn test_window_bounds() { - let input: ArrayRef = Arc::new(TimestampNanosecondArray::from_opt_vec( - vec![Some(100), None, Some(200), Some(300), Some(400)], - TIME_DATA_TIMEZONE(), - )); + let input: ArrayRef = Arc::new(TimestampNanosecondArray::from(vec![ + Some(100), + None, + Some(200), + Some(300), + Some(400), + ])); let every = WindowDuration::from_nanoseconds(200); let offset = WindowDuration::from_nanoseconds(50); let bounds_array = window_bounds(&input, every, offset); - let expected_array: ArrayRef = Arc::new(TimestampNanosecondArray::from_opt_vec( - vec![Some(250), None, Some(250), Some(450), Some(450)], - TIME_DATA_TIMEZONE(), - )); + let expected_array: ArrayRef = Arc::new(TimestampNanosecondArray::from(vec![ + Some(250), + None, + Some(250), + Some(450), + Some(450), + ])); assert_eq!( &expected_array, &bounds_array, diff --git a/query_tests/cases/in/selectors.expected b/query_tests/cases/in/selectors.expected index 6b2683a4a5..1f1e986ac6 100644 --- a/query_tests/cases/in/selectors.expected +++ b/query_tests/cases/in/selectors.expected @@ -16,31 +16,31 @@ +------------------------------------------------------+ | selector_first(m.float_field,m.time) | +------------------------------------------------------+ -| {"value": 65, "time": 1970-01-01 00:00:00.000000100} | +| {"value": 65, "time": 1970-01-01T00:00:00.000000100} | +------------------------------------------------------+ -- SQL: select selector_first(int_field, time) from m; +------------------------------------------------------+ | selector_first(m.int_field,m.time) | +------------------------------------------------------+ -| {"value": 18, "time": 1970-01-01 00:00:00.000000100} | +| {"value": 18, "time": 1970-01-01T00:00:00.000000100} | +------------------------------------------------------+ -- SQL: select selector_first(uint_field, time) from m; +------------------------------------------------------+ | selector_first(m.uint_field,m.time) | +------------------------------------------------------+ -| {"value": 40, "time": 1970-01-01 00:00:00.000000100} | +| {"value": 40, "time": 1970-01-01T00:00:00.000000100} | +------------------------------------------------------+ -- SQL: select selector_first(string_field, time) from m; +----------------------------------------------------------+ | selector_first(m.string_field,m.time) | +----------------------------------------------------------+ -| {"value": "fruz", "time": 1970-01-01 00:00:00.000000100} | +| {"value": "fruz", "time": 1970-01-01T00:00:00.000000100} | +----------------------------------------------------------+ -- SQL: select selector_first(bool_field, time) from m; +---------------------------------------------------------+ | selector_first(m.bool_field,m.time) | +---------------------------------------------------------+ -| {"value": false, "time": 1970-01-01 00:00:00.000000100} | +| {"value": false, "time": 1970-01-01T00:00:00.000000100} | +---------------------------------------------------------+ -- SQL: select selector_first(float_field, time)['value'], selector_first(float_field, time)['time'] from m; +---------------------------------------------+--------------------------------------------+ @@ -58,31 +58,31 @@ +------------------------------------------------------+ | selector_last(m.float_field,m.time) | +------------------------------------------------------+ -| {"value": 66, "time": 1970-01-01 00:00:00.000000600} | +| {"value": 66, "time": 1970-01-01T00:00:00.000000600} | +------------------------------------------------------+ -- SQL: select selector_last(int_field, time) from m; +------------------------------------------------------+ | selector_last(m.int_field,m.time) | +------------------------------------------------------+ -| {"value": 17, "time": 1970-01-01 00:00:00.000000600} | +| {"value": 17, "time": 1970-01-01T00:00:00.000000600} | +------------------------------------------------------+ -- SQL: select selector_last(uint_field, time) from m; +------------------------------------------------------+ | selector_last(m.uint_field,m.time) | +------------------------------------------------------+ -| {"value": 10, "time": 1970-01-01 00:00:00.000000600} | +| {"value": 10, "time": 1970-01-01T00:00:00.000000600} | +------------------------------------------------------+ -- SQL: select selector_last(string_field, time) from m; +---------------------------------------------------------+ | selector_last(m.string_field,m.time) | +---------------------------------------------------------+ -| {"value": "faa", "time": 1970-01-01 00:00:00.000000600} | +| {"value": "faa", "time": 1970-01-01T00:00:00.000000600} | +---------------------------------------------------------+ -- SQL: select selector_last(bool_field, time) from m; +--------------------------------------------------------+ | selector_last(m.bool_field,m.time) | +--------------------------------------------------------+ -| {"value": true, "time": 1970-01-01 00:00:00.000000600} | +| {"value": true, "time": 1970-01-01T00:00:00.000000600} | +--------------------------------------------------------+ -- SQL: select selector_last(float_field, time)['value'], selector_last(float_field, time)['time'] from m; +--------------------------------------------+-------------------------------------------+ @@ -100,31 +100,31 @@ +------------------------------------------------------+ | selector_min(m.float_field,m.time) | +------------------------------------------------------+ -| {"value": 61, "time": 1970-01-01 00:00:00.000000500} | +| {"value": 61, "time": 1970-01-01T00:00:00.000000500} | +------------------------------------------------------+ -- SQL: select selector_min(int_field, time) from m; +------------------------------------------------------+ | selector_min(m.int_field,m.time) | +------------------------------------------------------+ -| {"value": 17, "time": 1970-01-01 00:00:00.000000600} | +| {"value": 17, "time": 1970-01-01T00:00:00.000000600} | +------------------------------------------------------+ -- SQL: select selector_min(uint_field, time) from m; +------------------------------------------------------+ | selector_min(m.uint_field,m.time) | +------------------------------------------------------+ -| {"value": 10, "time": 1970-01-01 00:00:00.000000600} | +| {"value": 10, "time": 1970-01-01T00:00:00.000000600} | +------------------------------------------------------+ -- SQL: select selector_min(string_field, time) from m; +--------------------------------------------------------+ | selector_min(m.string_field,m.time) | +--------------------------------------------------------+ -| {"value": "ba", "time": 1970-01-01 00:00:00.000000200} | +| {"value": "ba", "time": 1970-01-01T00:00:00.000000200} | +--------------------------------------------------------+ -- SQL: select selector_min(bool_field, time) from m; +---------------------------------------------------------+ | selector_min(m.bool_field,m.time) | +---------------------------------------------------------+ -| {"value": false, "time": 1970-01-01 00:00:00.000000100} | +| {"value": false, "time": 1970-01-01T00:00:00.000000100} | +---------------------------------------------------------+ -- SQL: select selector_min(float_field, time)['value'], selector_min(float_field, time)['time'] from m; +-------------------------------------------+------------------------------------------+ @@ -142,31 +142,31 @@ +------------------------------------------------------+ | selector_max(m.float_field,m.time) | +------------------------------------------------------+ -| {"value": 66, "time": 1970-01-01 00:00:00.000000600} | +| {"value": 66, "time": 1970-01-01T00:00:00.000000600} | +------------------------------------------------------+ -- SQL: select selector_max(int_field, time) from m; +------------------------------------------------------+ | selector_max(m.int_field,m.time) | +------------------------------------------------------+ -| {"value": 64, "time": 1970-01-01 00:00:00.000000550} | +| {"value": 64, "time": 1970-01-01T00:00:00.000000550} | +------------------------------------------------------+ -- SQL: select selector_max(uint_field, time) from m; +------------------------------------------------------+ | selector_max(m.uint_field,m.time) | +------------------------------------------------------+ -| {"value": 40, "time": 1970-01-01 00:00:00.000000100} | +| {"value": 40, "time": 1970-01-01T00:00:00.000000100} | +------------------------------------------------------+ -- SQL: select selector_max(string_field, time) from m; +----------------------------------------------------------+ | selector_max(m.string_field,m.time) | +----------------------------------------------------------+ -| {"value": "fruz", "time": 1970-01-01 00:00:00.000000100} | +| {"value": "fruz", "time": 1970-01-01T00:00:00.000000100} | +----------------------------------------------------------+ -- SQL: select selector_max(bool_field, time) from m; +--------------------------------------------------------+ | selector_max(m.bool_field,m.time) | +--------------------------------------------------------+ -| {"value": true, "time": 1970-01-01 00:00:00.000000400} | +| {"value": true, "time": 1970-01-01T00:00:00.000000400} | +--------------------------------------------------------+ -- SQL: select selector_max(float_field, time)['value'], selector_max(float_field, time)['time'] from m; +-------------------------------------------+------------------------------------------+ diff --git a/service_grpc_influxrpc/src/data.rs b/service_grpc_influxrpc/src/data.rs index 0a582a88b5..1401496340 100644 --- a/service_grpc_influxrpc/src/data.rs +++ b/service_grpc_influxrpc/src/data.rs @@ -561,10 +561,8 @@ mod tests { let float_array: ArrayRef = Arc::new(Float64Array::from(vec![10.1, 20.1, 30.1, 40.1])); let bool_array: ArrayRef = Arc::new(BooleanArray::from(vec![true, false, true, false])); - let timestamp_array: ArrayRef = Arc::new(TimestampNanosecondArray::from_vec( - vec![1000, 2000, 3000, 4000], - None, - )); + let timestamp_array: ArrayRef = + Arc::new(TimestampNanosecondArray::from(vec![1000, 2000, 3000, 4000])); RecordBatch::try_from_iter_with_nullable(vec![ ("string_field", string_array, true), diff --git a/workspace-hack/Cargo.toml b/workspace-hack/Cargo.toml index 1a0b9d1c21..38de483208 100644 --- a/workspace-hack/Cargo.toml +++ b/workspace-hack/Cargo.toml @@ -17,7 +17,7 @@ license.workspace = true ### BEGIN HAKARI SECTION [dependencies] ahash-ca01ad9e24f5d932 = { package = "ahash", version = "0.7", features = ["std"] } -arrow = { version = "25", features = ["comfy-table", "csv", "csv_crate", "dyn_cmp_dict", "flatbuffers", "ipc", "json", "prettyprint", "serde_json"] } +arrow = { version = "26", features = ["comfy-table", "csv", "csv_crate", "dyn_cmp_dict", "flatbuffers", "ipc", "json", "prettyprint", "serde_json"] } base64 = { version = "0.13", features = ["std"] } bitflags = { version = "1" } byteorder = { version = "1", features = ["std"] } @@ -25,17 +25,18 @@ bytes = { version = "1", features = ["std"] } chrono = { version = "0.4", default-features = false, features = ["alloc", "clock", "iana-time-zone", "serde", "std", "winapi"] } crossbeam-utils = { version = "0.8", features = ["std"] } crypto-common = { version = "0.1", default-features = false, features = ["std"] } -datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev = "761e1671bd3c4988d21a38bb19e50bdac6cfaa61", features = ["crypto_expressions", "regex_expressions", "unicode_expressions"] } +datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev = "dd081d64a2fba8574e63bdd0662c14aec5852b48", features = ["crypto_expressions", "regex_expressions", "unicode_expressions"] } digest = { version = "0.10", features = ["alloc", "block-buffer", "core-api", "mac", "std", "subtle"] } either = { version = "1", features = ["use_std"] } fixedbitset = { version = "0.4", features = ["std"] } -flatbuffers = { version = "2", features = ["thiserror"] } +flatbuffers = { version = "22", features = ["thiserror"] } futures-channel = { version = "0.3", features = ["alloc", "futures-sink", "sink", "std"] } futures-core = { version = "0.3", features = ["alloc", "std"] } futures-io = { version = "0.3", features = ["std"] } futures-sink = { version = "0.3", features = ["alloc", "std"] } futures-task = { version = "0.3", default-features = false, features = ["alloc", "std"] } futures-util = { version = "0.3", features = ["alloc", "async-await", "async-await-macro", "channel", "futures-channel", "futures-io", "futures-macro", "futures-sink", "io", "memchr", "sink", "slab", "std"] } +getrandom = { version = "0.2", default-features = false, features = ["std"] } hashbrown = { version = "0.12", features = ["ahash", "inline-more", "raw"] } indexmap = { version = "1", default-features = false, features = ["std"] } libc = { version = "0.2", features = ["extra_traits", "std"] } @@ -49,7 +50,7 @@ num-traits = { version = "0.2", features = ["i128", "libm", "std"] } object_store = { version = "0.5", default-features = false, features = ["aws", "azure", "base64", "cloud", "gcp", "quick-xml", "rand", "reqwest", "ring", "rustls-pemfile", "serde", "serde_json"] } once_cell = { version = "1", features = ["alloc", "parking_lot", "parking_lot_core", "race", "std"] } parking_lot = { version = "0.12", features = ["arc_lock"] } -parquet = { version = "25", features = ["arrow", "async", "base64", "brotli", "experimental", "flate2", "futures", "lz4", "snap", "tokio", "zstd"] } +parquet = { version = "26", features = ["arrow", "async", "base64", "brotli", "experimental", "flate2", "futures", "lz4", "snap", "tokio", "zstd"] } predicates = { version = "2", features = ["diff", "difflib", "float-cmp", "normalize-line-endings", "regex"] } prost = { version = "0.11", features = ["prost-derive", "std"] } prost-types = { version = "0.11", features = ["std"] } @@ -101,6 +102,7 @@ futures-io = { version = "0.3", features = ["std"] } futures-sink = { version = "0.3", features = ["alloc", "std"] } futures-task = { version = "0.3", default-features = false, features = ["alloc", "std"] } futures-util = { version = "0.3", features = ["alloc", "async-await", "async-await-macro", "channel", "futures-channel", "futures-io", "futures-macro", "futures-sink", "io", "memchr", "sink", "slab", "std"] } +getrandom = { version = "0.2", default-features = false, features = ["std"] } hashbrown = { version = "0.12", features = ["ahash", "inline-more", "raw"] } heck = { version = "0.4", features = ["unicode", "unicode-segmentation"] } indexmap = { version = "1", default-features = false, features = ["std"] } @@ -133,35 +135,28 @@ url = { version = "2" } uuid = { version = "1", features = ["getrandom", "rng", "std", "v4"] } [target.x86_64-unknown-linux-gnu.dependencies] -ahash-c38e5c1d305a1b54 = { package = "ahash", version = "0.8", features = ["getrandom", "runtime-rng", "std"] } -getrandom = { version = "0.2", default-features = false, features = ["std"] } +ahash-c38e5c1d305a1b54 = { package = "ahash", version = "0.8", default-features = false, features = ["compile-time-rng", "const-random", "getrandom", "runtime-rng"] } once_cell = { version = "1", default-features = false, features = ["unstable"] } [target.x86_64-unknown-linux-gnu.build-dependencies] -getrandom = { version = "0.2", default-features = false, features = ["std"] } once_cell = { version = "1", default-features = false, features = ["unstable"] } [target.x86_64-apple-darwin.dependencies] -ahash-c38e5c1d305a1b54 = { package = "ahash", version = "0.8", features = ["getrandom", "runtime-rng", "std"] } -getrandom = { version = "0.2", default-features = false, features = ["std"] } +ahash-c38e5c1d305a1b54 = { package = "ahash", version = "0.8", default-features = false, features = ["compile-time-rng", "const-random", "getrandom", "runtime-rng"] } once_cell = { version = "1", default-features = false, features = ["unstable"] } [target.x86_64-apple-darwin.build-dependencies] -getrandom = { version = "0.2", default-features = false, features = ["std"] } once_cell = { version = "1", default-features = false, features = ["unstable"] } [target.aarch64-apple-darwin.dependencies] -ahash-c38e5c1d305a1b54 = { package = "ahash", version = "0.8", features = ["getrandom", "runtime-rng", "std"] } -getrandom = { version = "0.2", default-features = false, features = ["std"] } +ahash-c38e5c1d305a1b54 = { package = "ahash", version = "0.8", default-features = false, features = ["compile-time-rng", "const-random", "getrandom", "runtime-rng"] } once_cell = { version = "1", default-features = false, features = ["unstable"] } [target.aarch64-apple-darwin.build-dependencies] -getrandom = { version = "0.2", default-features = false, features = ["std"] } once_cell = { version = "1", default-features = false, features = ["unstable"] } [target.x86_64-pc-windows-msvc.dependencies] -ahash-c38e5c1d305a1b54 = { package = "ahash", version = "0.8", features = ["getrandom", "runtime-rng", "std"] } -getrandom = { version = "0.2", default-features = false, features = ["std"] } +ahash-c38e5c1d305a1b54 = { package = "ahash", version = "0.8", default-features = false, features = ["compile-time-rng", "const-random", "getrandom", "runtime-rng"] } once_cell = { version = "1", default-features = false, features = ["unstable"] } scopeguard = { version = "1", features = ["use_std"] } tokio = { version = "1", default-features = false, features = ["winapi"] } @@ -169,7 +164,6 @@ winapi = { version = "0.3", default-features = false, features = ["accctrl", "ac windows-sys = { version = "0.42", features = ["Win32", "Win32_Foundation", "Win32_Networking", "Win32_Networking_WinSock", "Win32_Security", "Win32_Storage", "Win32_Storage_FileSystem", "Win32_System", "Win32_System_IO", "Win32_System_LibraryLoader", "Win32_System_Pipes", "Win32_System_SystemServices", "Win32_System_WindowsProgramming"] } [target.x86_64-pc-windows-msvc.build-dependencies] -getrandom = { version = "0.2", default-features = false, features = ["std"] } once_cell = { version = "1", default-features = false, features = ["unstable"] } scopeguard = { version = "1", features = ["use_std"] } tokio = { version = "1", default-features = false, features = ["winapi"] }