diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index 2104a96c6844..1319bfab206a 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -33,14 +33,14 @@ simd = ["datafusion/simd"] snmalloc = ["snmalloc-rs"] [dependencies] -arrow = "25.0.0" +arrow = "26.0.0" datafusion = { path = "../datafusion/core" } env_logger = "0.9" futures = "0.3" mimalloc = { version = "0.1", optional = true, default-features = false } num_cpus = "1.13.0" object_store = "0.5.0" -parquet = "25.0.0" +parquet = "26.0.0" parquet-test-utils = { path = "../parquet-test-utils/" } rand = "0.8.4" serde = { version = "1.0.136", features = ["derive"] } diff --git a/datafusion-cli/Cargo.lock b/datafusion-cli/Cargo.lock index 89f4cc78a0fa..4a6ab53ceb9c 100644 --- a/datafusion-cli/Cargo.lock +++ b/datafusion-cli/Cargo.lock @@ -21,9 +21,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e6e951cfbb2db8de1828d49073a113a29fd7117b1596caa781a258c7e38d72" +checksum = "464b3811b747f8f7ebc8849c9c728c39f6ac98a055edad93baf9eb330e3f8f9d" dependencies = [ "cfg-if", "const-random", @@ -79,15 +79,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", + "ahash 0.8.1", "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", + "arrow-select", "bitflags", "chrono", "comfy-table", @@ -107,11 +108,11 @@ 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", + "ahash 0.8.1", "arrow-buffer", "arrow-data", "arrow-schema", @@ -123,9 +124,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", "num", @@ -133,9 +134,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", @@ -145,9 +146,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 = "async-compression" @@ -194,9 +208,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "bitflags" @@ -310,9 +324,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.73" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "581f5dba903aac52ea3feb5ec4810848460ee833876f1f9b0fdeab1f19091574" dependencies = [ "jobserver", ] @@ -338,9 +352,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.22" +version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" +checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", "bitflags", @@ -398,9 +412,9 @@ dependencies = [ [[package]] name = "comfy-table" -version = "6.1.1" +version = "6.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3d16bb3da60be2f7c7acfc438f2ae6f3496897ce68c291d0509bb67b4e248e" +checksum = "1090f39f45786ec6dc6286f8ea9c75d0a7ef0a0d3cda674cef0c3af7b307fbc2" dependencies = [ "strum", "strum_macros", @@ -409,9 +423,9 @@ dependencies = [ [[package]] name = "const-random" -version = "0.1.13" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f590d95d011aa80b063ffe3253422ed5aa462af4e9867d43ce8337562bac77c4" +checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" dependencies = [ "const-random-macro", "proc-macro-hack", @@ -419,12 +433,12 @@ dependencies = [ [[package]] name = "const-random-macro" -version = "0.1.13" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615f6e27d000a2bffbc7f2f6a8669179378fa27ee4d0a509e985dfc0a7defb40" +checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" dependencies = [ "getrandom", - "lazy_static", + "once_cell", "proc-macro-hack", "tiny-keccak", ] @@ -499,9 +513,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f83d0ebf42c6eafb8d7c52f7e5f2d3003b89c7aa4fd2b79229209459a849af8" +checksum = "6b7d4e43b25d3c994662706a1d4fcfc32aaa6afd287502c111b237093bb23f3a" dependencies = [ "cc", "cxxbridge-flags", @@ -511,9 +525,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07d050484b55975889284352b0ffc2ecbda25c0c55978017c132b29ba0818a86" +checksum = "84f8829ddc213e2c1368e51a2564c552b65a8cb6a28f31e576270ac81d5e5827" dependencies = [ "cc", "codespan-reporting", @@ -526,15 +540,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d2199b00553eda8012dfec8d3b1c75fce747cf27c169a270b3b99e3448ab78" +checksum = "e72537424b474af1460806647c41d4b6d35d09ef7fe031c5c2fa5766047cc56a" [[package]] name = "cxxbridge-macro" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb67a6de1f602736dd7eaead0080cf3435df806c61b24b13328db128c58868f" +checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7" dependencies = [ "proc-macro2", "quote", @@ -545,7 +559,7 @@ dependencies = [ name = "datafusion" version = "13.0.0" dependencies = [ - "ahash 0.8.0", + "ahash 0.8.1", "arrow", "async-compression", "async-trait", @@ -616,7 +630,7 @@ dependencies = [ name = "datafusion-expr" version = "13.0.0" dependencies = [ - "ahash 0.8.0", + "ahash 0.8.1", "arrow", "datafusion-common", "log", @@ -641,7 +655,7 @@ dependencies = [ name = "datafusion-physical-expr" version = "13.0.0" dependencies = [ - "ahash 0.8.0", + "ahash 0.8.1", "arrow", "arrow-buffer", "arrow-schema", @@ -820,23 +834,22 @@ 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]] 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", ] @@ -867,9 +880,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" dependencies = [ "futures-channel", "futures-core", @@ -882,9 +895,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" dependencies = [ "futures-core", "futures-sink", @@ -892,15 +905,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" [[package]] name = "futures-executor" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" dependencies = [ "futures-core", "futures-task", @@ -909,15 +922,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" [[package]] name = "futures-macro" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ "proc-macro2", "quote", @@ -926,21 +939,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" [[package]] name = "futures-task" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" [[package]] name = "futures-util" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" dependencies = [ "futures-channel", "futures-core", @@ -966,13 +979,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -983,9 +998,9 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "h2" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ "bytes", "fnv", @@ -1076,9 +1091,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.20" +version = "0.14.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" +checksum = "abfba89e19b959ca163c7752ba59d737c1ceea53a5d31a149c805446fc958064" dependencies = [ "bytes", "futures-channel", @@ -1113,9 +1128,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.51" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5a6ef98976b22b3b7f2f3a806f858cb862044cfa66805aa3ad84cb3d3b785ed" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1172,9 +1187,9 @@ checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" [[package]] name = "io-lifetimes" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea37f355c05dde75b84bba2d767906ad522e97cd9e2eef2be7a4ab7fb442c06" +checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" [[package]] name = "ipnet" @@ -1293,9 +1308,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.135" +version = "0.2.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" +checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" [[package]] name = "libm" @@ -1407,14 +1422,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", "wasi", - "windows-sys 0.36.1", + "windows-sys", ] [[package]] @@ -1536,9 +1551,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", @@ -1574,9 +1589,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "ordered-float" @@ -1598,9 +1613,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.3.0" +version = "6.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" +checksum = "3baf96e39c5359d2eb0dd6ccb42c62b91d9678aa68160d261b9e0ccbf9e9dea9" [[package]] name = "parking_lot" @@ -1622,16 +1637,16 @@ 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", + "ahash 0.8.1", "arrow", "base64", "brotli", @@ -1643,7 +1658,6 @@ dependencies = [ "lz4", "num", "num-bigint", - "rand", "seq-macro", "snap", "thrift", @@ -1677,9 +1691,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "ppv-lite86" @@ -1894,16 +1908,16 @@ dependencies = [ [[package]] name = "rustix" -version = "0.35.11" +version = "0.35.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb2fda4666def1433b1b05431ab402e42a1084285477222b72d6c564c417cef" +checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" dependencies = [ "bitflags", "errno", "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.36.1", + "windows-sys", ] [[package]] @@ -2001,18 +2015,18 @@ checksum = "0772c5c30e1a0d91f6834f8e545c69281c099dfa9a3ac58d96a9fd629c8d4898" [[package]] name = "serde" -version = "1.0.145" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" +checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.145" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" +checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ "proc-macro2", "quote", @@ -2070,9 +2084,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "snafu" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd726aec4ebad65756394ff89a9b9598793d4e30121cd71690244c1e497b3aee" +checksum = "a152ba99b054b22972ee794cf04e5ef572da1229e33b65f3c57abbff0525a454" dependencies = [ "doc-comment", "snafu-derive", @@ -2080,9 +2094,9 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712529e9b0b014eabaa345b38e06032767e3dc393e8b017e853b1d7247094e74" +checksum = "d5e79cdebbabaebb06a9bdbaedc7f159b410461f63611d4d0e3fb0fab8fed850" dependencies = [ "heck", "proc-macro2", @@ -2166,9 +2180,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.102" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1" +checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" dependencies = [ "proc-macro2", "quote", @@ -2200,9 +2214,9 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.15.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" @@ -2599,19 +2613,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" @@ -2619,12 +2620,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]] @@ -2633,48 +2634,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" @@ -2687,12 +2664,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" diff --git a/datafusion-cli/Cargo.toml b/datafusion-cli/Cargo.toml index 7367f2dc0aeb..2b9e285b32d0 100644 --- a/datafusion-cli/Cargo.toml +++ b/datafusion-cli/Cargo.toml @@ -29,7 +29,7 @@ rust-version = "1.62" readme = "README.md" [dependencies] -arrow = "25.0.0" +arrow = "26.0.0" clap = { version = "3", features = ["derive", "cargo"] } datafusion = { path = "../datafusion/core", version = "13.0.0" } dirs = "4.0.0" diff --git a/datafusion-examples/Cargo.toml b/datafusion-examples/Cargo.toml index 9abf76b253a6..132b7b2389f5 100644 --- a/datafusion-examples/Cargo.toml +++ b/datafusion-examples/Cargo.toml @@ -34,8 +34,8 @@ path = "examples/avro_sql.rs" required-features = ["datafusion/avro"] [dev-dependencies] -arrow = "25.0.0" -arrow-flight = "25.0.0" +arrow = "26.0.0" +arrow-flight = "26.0.0" async-trait = "0.1.41" datafusion = { path = "../datafusion/core" } datafusion-common = { path = "../datafusion/common" } diff --git a/datafusion/common/Cargo.toml b/datafusion/common/Cargo.toml index 9aedeac9e116..b4f6bea85ba7 100644 --- a/datafusion/common/Cargo.toml +++ b/datafusion/common/Cargo.toml @@ -40,11 +40,11 @@ pyarrow = ["pyo3", "arrow/pyarrow"] [dependencies] apache-avro = { version = "0.14", default-features = false, features = ["snappy"], optional = true } -arrow = { version = "25.0.0", default-features = false } +arrow = { version = "26.0.0", default-features = false } chrono = { version = "0.4", default-features = false } cranelift-module = { version = "0.89.0", optional = true } object_store = { version = "0.5.0", default-features = false, optional = true } ordered-float = "3.0" -parquet = { version = "25.0.0", default-features = false, optional = true } +parquet = { version = "26.0.0", default-features = false, optional = true } pyo3 = { version = "0.17.1", optional = true } sqlparser = "0.26" diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.toml index 83c224dca9e8..88f05cca43f2 100644 --- a/datafusion/core/Cargo.toml +++ b/datafusion/core/Cargo.toml @@ -56,8 +56,7 @@ unicode_expressions = ["datafusion-physical-expr/regex_expressions", "datafusion [dependencies] ahash = { version = "0.8", default-features = false, features = ["runtime-rng"] } apache-avro = { version = "0.14", optional = true } -arrow = { version = "25.0.0", features = ["prettyprint"] } - +arrow = { version = "26.0.0", features = ["prettyprint"] } async-compression = { version = "0.3.14", features = ["bzip2", "gzip", "futures-io", "tokio"] } async-trait = "0.1.41" bytes = "1.1" @@ -82,7 +81,7 @@ num_cpus = "1.13.0" object_store = "0.5.0" ordered-float = "3.0" parking_lot = "0.12" -parquet = { version = "25.0.0", features = ["arrow", "async"] } +parquet = { version = "26.0.0", features = ["arrow", "async"] } paste = "^1.0" percent-encoding = "2.2.0" pin-project-lite = "^0.2.7" @@ -99,7 +98,7 @@ url = "2.2" uuid = { version = "1.0", features = ["v4"] } [dev-dependencies] -arrow = { version = "25.0.0", features = ["prettyprint", "dyn_cmp_dict"] } +arrow = { version = "26.0.0", features = ["prettyprint", "dyn_cmp_dict"] } async-trait = "0.1.53" criterion = "0.4" csv = "1.1.6" diff --git a/datafusion/core/src/config.rs b/datafusion/core/src/config.rs index 8277cef31d4d..3b00f4ab1bdc 100644 --- a/datafusion/core/src/config.rs +++ b/datafusion/core/src/config.rs @@ -223,7 +223,7 @@ impl BuiltInConfigs { "The session time zone which some function require \ e.g. EXTRACT(HOUR from SOME_TIME) shift the underline datetime according to the time zone, then extract the hour.", - Some("UTC".into()), + Some("+00:00".into()), ), ConfigDefinition::new_bool( OPT_PARQUET_PUSHDOWN_FILTERS, diff --git a/datafusion/core/src/datasource/file_format/avro.rs b/datafusion/core/src/datasource/file_format/avro.rs index c2007dc384d8..4a87eee9359f 100644 --- a/datafusion/core/src/datasource/file_format/avro.rs +++ b/datafusion/core/src/datasource/file_format/avro.rs @@ -172,14 +172,14 @@ mod tests { "+----+----------+-------------+--------------+---------+------------+-----------+------------+------------------+------------+---------------------+", "| id | bool_col | tinyint_col | smallint_col | int_col | bigint_col | float_col | double_col | date_string_col | string_col | timestamp_col |", "+----+----------+-------------+--------------+---------+------------+-----------+------------+------------------+------------+---------------------+", - "| 4 | true | 0 | 0 | 0 | 0 | 0 | 0 | 30332f30312f3039 | 30 | 2009-03-01 00:00:00 |", - "| 5 | false | 1 | 1 | 1 | 10 | 1.1 | 10.1 | 30332f30312f3039 | 31 | 2009-03-01 00:01:00 |", - "| 6 | true | 0 | 0 | 0 | 0 | 0 | 0 | 30342f30312f3039 | 30 | 2009-04-01 00:00:00 |", - "| 7 | false | 1 | 1 | 1 | 10 | 1.1 | 10.1 | 30342f30312f3039 | 31 | 2009-04-01 00:01:00 |", - "| 2 | true | 0 | 0 | 0 | 0 | 0 | 0 | 30322f30312f3039 | 30 | 2009-02-01 00:00:00 |", - "| 3 | false | 1 | 1 | 1 | 10 | 1.1 | 10.1 | 30322f30312f3039 | 31 | 2009-02-01 00:01:00 |", - "| 0 | true | 0 | 0 | 0 | 0 | 0 | 0 | 30312f30312f3039 | 30 | 2009-01-01 00:00:00 |", - "| 1 | false | 1 | 1 | 1 | 10 | 1.1 | 10.1 | 30312f30312f3039 | 31 | 2009-01-01 00:01:00 |", + "| 4 | true | 0 | 0 | 0 | 0 | 0 | 0 | 30332f30312f3039 | 30 | 2009-03-01T00:00:00 |", + "| 5 | false | 1 | 1 | 1 | 10 | 1.1 | 10.1 | 30332f30312f3039 | 31 | 2009-03-01T00:01:00 |", + "| 6 | true | 0 | 0 | 0 | 0 | 0 | 0 | 30342f30312f3039 | 30 | 2009-04-01T00:00:00 |", + "| 7 | false | 1 | 1 | 1 | 10 | 1.1 | 10.1 | 30342f30312f3039 | 31 | 2009-04-01T00:01:00 |", + "| 2 | true | 0 | 0 | 0 | 0 | 0 | 0 | 30322f30312f3039 | 30 | 2009-02-01T00:00:00 |", + "| 3 | false | 1 | 1 | 1 | 10 | 1.1 | 10.1 | 30322f30312f3039 | 31 | 2009-02-01T00:01:00 |", + "| 0 | true | 0 | 0 | 0 | 0 | 0 | 0 | 30312f30312f3039 | 30 | 2009-01-01T00:00:00 |", + "| 1 | false | 1 | 1 | 1 | 10 | 1.1 | 10.1 | 30312f30312f3039 | 31 | 2009-01-01T00:01:00 |", "+----+----------+-------------+--------------+---------+------------+-----------+------------+------------------+------------+---------------------+", ]; diff --git a/datafusion/core/src/datasource/listing/table.rs b/datafusion/core/src/datasource/listing/table.rs index 61ee1a0287b6..61e13abb53e6 100644 --- a/datafusion/core/src/datasource/listing/table.rs +++ b/datafusion/core/src/datasource/listing/table.rs @@ -17,7 +17,7 @@ //! The table implementation. -use ahash::HashMap; +use hashbrown::HashMap; use std::str::FromStr; use std::{any::Any, sync::Arc}; diff --git a/datafusion/core/src/physical_optimizer/pruning.rs b/datafusion/core/src/physical_optimizer/pruning.rs index 0907efc9c04f..3adf0ad7bd5f 100644 --- a/datafusion/core/src/physical_optimizer/pruning.rs +++ b/datafusion/core/src/physical_optimizer/pruning.rs @@ -1184,7 +1184,7 @@ mod tests { "+-------------------------------+", "| s1_min |", "+-------------------------------+", - "| 1970-01-01 00:00:00.000000010 |", + "| 1970-01-01T00:00:00.000000010 |", "+-------------------------------+", ]; diff --git a/datafusion/core/src/physical_plan/sorts/sort_preserving_merge.rs b/datafusion/core/src/physical_plan/sorts/sort_preserving_merge.rs index a8c6fe4e6a93..17dea38c065d 100644 --- a/datafusion/core/src/physical_plan/sorts/sort_preserving_merge.rs +++ b/datafusion/core/src/physical_plan/sorts/sort_preserving_merge.rs @@ -672,16 +672,16 @@ mod tests { "+----+---+-------------------------------+", "| a | b | c |", "+----+---+-------------------------------+", - "| 1 | a | 1970-01-01 00:00:00.000000008 |", - "| 10 | b | 1970-01-01 00:00:00.000000004 |", - "| 2 | c | 1970-01-01 00:00:00.000000007 |", - "| 20 | d | 1970-01-01 00:00:00.000000006 |", - "| 7 | e | 1970-01-01 00:00:00.000000006 |", - "| 70 | f | 1970-01-01 00:00:00.000000002 |", - "| 9 | g | 1970-01-01 00:00:00.000000005 |", - "| 90 | h | 1970-01-01 00:00:00.000000002 |", - "| 30 | j | 1970-01-01 00:00:00.000000006 |", // input b2 before b1 - "| 3 | j | 1970-01-01 00:00:00.000000008 |", + "| 1 | a | 1970-01-01T00:00:00.000000008 |", + "| 10 | b | 1970-01-01T00:00:00.000000004 |", + "| 2 | c | 1970-01-01T00:00:00.000000007 |", + "| 20 | d | 1970-01-01T00:00:00.000000006 |", + "| 7 | e | 1970-01-01T00:00:00.000000006 |", + "| 70 | f | 1970-01-01T00:00:00.000000002 |", + "| 9 | g | 1970-01-01T00:00:00.000000005 |", + "| 90 | h | 1970-01-01T00:00:00.000000002 |", + "| 30 | j | 1970-01-01T00:00:00.000000006 |", // input b2 before b1 + "| 3 | j | 1970-01-01T00:00:00.000000008 |", "+----+---+-------------------------------+", ], task_ctx, @@ -721,16 +721,16 @@ mod tests { "+-----+---+-------------------------------+", "| a | b | c |", "+-----+---+-------------------------------+", - "| 1 | a | 1970-01-01 00:00:00.000000008 |", - "| 2 | b | 1970-01-01 00:00:00.000000007 |", - "| 70 | c | 1970-01-01 00:00:00.000000004 |", - "| 7 | c | 1970-01-01 00:00:00.000000006 |", - "| 9 | d | 1970-01-01 00:00:00.000000005 |", - "| 90 | d | 1970-01-01 00:00:00.000000006 |", - "| 30 | e | 1970-01-01 00:00:00.000000002 |", - "| 3 | e | 1970-01-01 00:00:00.000000008 |", - "| 100 | f | 1970-01-01 00:00:00.000000002 |", - "| 110 | g | 1970-01-01 00:00:00.000000006 |", + "| 1 | a | 1970-01-01T00:00:00.000000008 |", + "| 2 | b | 1970-01-01T00:00:00.000000007 |", + "| 70 | c | 1970-01-01T00:00:00.000000004 |", + "| 7 | c | 1970-01-01T00:00:00.000000006 |", + "| 9 | d | 1970-01-01T00:00:00.000000005 |", + "| 90 | d | 1970-01-01T00:00:00.000000006 |", + "| 30 | e | 1970-01-01T00:00:00.000000002 |", + "| 3 | e | 1970-01-01T00:00:00.000000008 |", + "| 100 | f | 1970-01-01T00:00:00.000000002 |", + "| 110 | g | 1970-01-01T00:00:00.000000006 |", "+-----+---+-------------------------------+", ], task_ctx, @@ -770,16 +770,16 @@ mod tests { "+----+---+-------------------------------+", "| a | b | c |", "+----+---+-------------------------------+", - "| 1 | a | 1970-01-01 00:00:00.000000008 |", - "| 2 | b | 1970-01-01 00:00:00.000000007 |", - "| 7 | c | 1970-01-01 00:00:00.000000006 |", - "| 9 | d | 1970-01-01 00:00:00.000000005 |", - "| 3 | e | 1970-01-01 00:00:00.000000008 |", - "| 10 | f | 1970-01-01 00:00:00.000000004 |", - "| 20 | g | 1970-01-01 00:00:00.000000006 |", - "| 70 | h | 1970-01-01 00:00:00.000000002 |", - "| 90 | i | 1970-01-01 00:00:00.000000002 |", - "| 30 | j | 1970-01-01 00:00:00.000000006 |", + "| 1 | a | 1970-01-01T00:00:00.000000008 |", + "| 2 | b | 1970-01-01T00:00:00.000000007 |", + "| 7 | c | 1970-01-01T00:00:00.000000006 |", + "| 9 | d | 1970-01-01T00:00:00.000000005 |", + "| 3 | e | 1970-01-01T00:00:00.000000008 |", + "| 10 | f | 1970-01-01T00:00:00.000000004 |", + "| 20 | g | 1970-01-01T00:00:00.000000006 |", + "| 70 | h | 1970-01-01T00:00:00.000000002 |", + "| 90 | i | 1970-01-01T00:00:00.000000002 |", + "| 30 | j | 1970-01-01T00:00:00.000000006 |", "+----+---+-------------------------------+", ], task_ctx, @@ -831,21 +831,21 @@ mod tests { "+-----+---+-------------------------------+", "| a | b | c |", "+-----+---+-------------------------------+", - "| 1 | a | 1970-01-01 00:00:00.000000008 |", - "| 2 | b | 1970-01-01 00:00:00.000000007 |", - "| 7 | c | 1970-01-01 00:00:00.000000006 |", - "| 9 | d | 1970-01-01 00:00:00.000000005 |", - "| 10 | e | 1970-01-01 00:00:00.000000040 |", - "| 100 | f | 1970-01-01 00:00:00.000000004 |", - "| 3 | f | 1970-01-01 00:00:00.000000008 |", - "| 200 | g | 1970-01-01 00:00:00.000000006 |", - "| 20 | g | 1970-01-01 00:00:00.000000060 |", - "| 700 | h | 1970-01-01 00:00:00.000000002 |", - "| 70 | h | 1970-01-01 00:00:00.000000020 |", - "| 900 | i | 1970-01-01 00:00:00.000000002 |", - "| 90 | i | 1970-01-01 00:00:00.000000020 |", - "| 300 | j | 1970-01-01 00:00:00.000000006 |", - "| 30 | j | 1970-01-01 00:00:00.000000060 |", + "| 1 | a | 1970-01-01T00:00:00.000000008 |", + "| 2 | b | 1970-01-01T00:00:00.000000007 |", + "| 7 | c | 1970-01-01T00:00:00.000000006 |", + "| 9 | d | 1970-01-01T00:00:00.000000005 |", + "| 10 | e | 1970-01-01T00:00:00.000000040 |", + "| 100 | f | 1970-01-01T00:00:00.000000004 |", + "| 3 | f | 1970-01-01T00:00:00.000000008 |", + "| 200 | g | 1970-01-01T00:00:00.000000006 |", + "| 20 | g | 1970-01-01T00:00:00.000000060 |", + "| 700 | h | 1970-01-01T00:00:00.000000002 |", + "| 70 | h | 1970-01-01T00:00:00.000000020 |", + "| 900 | i | 1970-01-01T00:00:00.000000002 |", + "| 90 | i | 1970-01-01T00:00:00.000000020 |", + "| 300 | j | 1970-01-01T00:00:00.000000006 |", + "| 30 | j | 1970-01-01T00:00:00.000000060 |", "+-----+---+-------------------------------+", ], task_ctx, @@ -1155,16 +1155,16 @@ mod tests { "+---+---+-------------------------------+", "| a | b | c |", "+---+---+-------------------------------+", - "| 1 | | 1970-01-01 00:00:00.000000008 |", - "| 1 | | 1970-01-01 00:00:00.000000008 |", + "| 1 | | 1970-01-01T00:00:00.000000008 |", + "| 1 | | 1970-01-01T00:00:00.000000008 |", "| 2 | a | |", - "| 7 | b | 1970-01-01 00:00:00.000000006 |", + "| 7 | b | 1970-01-01T00:00:00.000000006 |", "| 2 | b | |", "| 9 | d | |", - "| 3 | e | 1970-01-01 00:00:00.000000004 |", - "| 3 | g | 1970-01-01 00:00:00.000000005 |", + "| 3 | e | 1970-01-01T00:00:00.000000004 |", + "| 3 | g | 1970-01-01T00:00:00.000000005 |", "| 4 | h | |", - "| 5 | i | 1970-01-01 00:00:00.000000004 |", + "| 5 | i | 1970-01-01T00:00:00.000000004 |", "+---+---+-------------------------------+", ], collected.as_slice() diff --git a/datafusion/core/tests/parquet_pruning.rs b/datafusion/core/tests/parquet_pruning.rs index b70e05c66a33..71503d249959 100644 --- a/datafusion/core/tests/parquet_pruning.rs +++ b/datafusion/core/tests/parquet_pruning.rs @@ -822,10 +822,10 @@ fn make_timestamp_batch(offset: Duration) -> RecordBatch { .map(|(i, _)| format!("Row {} + {}", i, offset)) .collect::>(); - let arr_nanos = TimestampNanosecondArray::from_opt_vec(ts_nanos, None); - let arr_micros = TimestampMicrosecondArray::from_opt_vec(ts_micros, None); - let arr_millis = TimestampMillisecondArray::from_opt_vec(ts_millis, None); - let arr_seconds = TimestampSecondArray::from_opt_vec(ts_seconds, None); + let arr_nanos = TimestampNanosecondArray::from(ts_nanos); + let arr_micros = TimestampMicrosecondArray::from(ts_micros); + let arr_millis = TimestampMillisecondArray::from(ts_millis); + let arr_seconds = TimestampSecondArray::from(ts_seconds); let names = names.iter().map(|s| s.as_str()).collect::>(); let arr_names = StringArray::from(names); diff --git a/datafusion/core/tests/sql/aggregates.rs b/datafusion/core/tests/sql/aggregates.rs index 1d2e41254b1a..8f266a29f5cf 100644 --- a/datafusion/core/tests/sql/aggregates.rs +++ b/datafusion/core/tests/sql/aggregates.rs @@ -1475,7 +1475,7 @@ async fn aggregate_timestamps_min() -> Result<()> { "+----------------------------+----------------------------+-------------------------+---------------------+", "| MIN(t.nanos) | MIN(t.micros) | MIN(t.millis) | MIN(t.secs) |", "+----------------------------+----------------------------+-------------------------+---------------------+", - "| 2011-12-13 11:13:10.123450 | 2011-12-13 11:13:10.123450 | 2011-12-13 11:13:10.123 | 2011-12-13 11:13:10 |", + "| 2011-12-13T11:13:10.123450 | 2011-12-13T11:13:10.123450 | 2011-12-13T11:13:10.123 | 2011-12-13T11:13:10 |", "+----------------------------+----------------------------+-------------------------+---------------------+", ]; assert_batches_sorted_eq!(expected, &results); @@ -1498,7 +1498,7 @@ async fn aggregate_timestamps_max() -> Result<()> { "+-------------------------+-------------------------+-------------------------+---------------------+", "| MAX(t.nanos) | MAX(t.micros) | MAX(t.millis) | MAX(t.secs) |", "+-------------------------+-------------------------+-------------------------+---------------------+", - "| 2021-01-01 05:11:10.432 | 2021-01-01 05:11:10.432 | 2021-01-01 05:11:10.432 | 2021-01-01 05:11:10 |", + "| 2021-01-01T05:11:10.432 | 2021-01-01T05:11:10.432 | 2021-01-01T05:11:10.432 | 2021-01-01T05:11:10 |", "+-------------------------+-------------------------+-------------------------+---------------------+", ]; assert_batches_sorted_eq!(expected, &results); diff --git a/datafusion/core/tests/sql/arrow_typeof.rs b/datafusion/core/tests/sql/arrow_typeof.rs index 9f971f27b934..4477ad53c12b 100644 --- a/datafusion/core/tests/sql/arrow_typeof.rs +++ b/datafusion/core/tests/sql/arrow_typeof.rs @@ -110,7 +110,7 @@ async fn arrow_typeof_timestamp_utc() -> Result<()> { let ctx = SessionContext::new(); let sql = "SELECT arrow_typeof(now())"; let actual = execute(&ctx, sql).await; - let expected = "Timestamp(Nanosecond, Some(\"UTC\"))"; + let expected = "Timestamp(Nanosecond, Some(\"+00:00\"))"; assert_eq!(expected, &actual[0][0]); Ok(()) diff --git a/datafusion/core/tests/sql/create_drop.rs b/datafusion/core/tests/sql/create_drop.rs index 567ee022b526..73dd53c2cdf1 100644 --- a/datafusion/core/tests/sql/create_drop.rs +++ b/datafusion/core/tests/sql/create_drop.rs @@ -271,8 +271,8 @@ async fn create_external_table_with_timestamps() { "+--------+-------------------------+", "| name | ts |", "+--------+-------------------------+", - "| Andrew | 2018-11-13 17:11:10.011 |", - "| Jorge | 2018-12-13 12:12:10.011 |", + "| Andrew | 2018-11-13T17:11:10.011 |", + "| Jorge | 2018-12-13T12:12:10.011 |", "+--------+-------------------------+", ]; assert_batches_sorted_eq!(expected, &result); diff --git a/datafusion/core/tests/sql/group_by.rs b/datafusion/core/tests/sql/group_by.rs index e71d6210f589..057673dda5e7 100644 --- a/datafusion/core/tests/sql/group_by.rs +++ b/datafusion/core/tests/sql/group_by.rs @@ -527,8 +527,8 @@ async fn group_by_date_trunc() -> Result<()> { "+---------------------+--------------+", "| week | SUM(test.c2) |", "+---------------------+--------------+", - "| 2020-12-07 00:00:00 | 24 |", - "| 2020-12-14 00:00:00 | 156 |", + "| 2020-12-07T00:00:00 | 24 |", + "| 2020-12-14T00:00:00 | 156 |", "+---------------------+--------------+", ]; assert_batches_sorted_eq!(expected, &results); diff --git a/datafusion/core/tests/sql/information_schema.rs b/datafusion/core/tests/sql/information_schema.rs index 3033f50ed475..836e70d4fc91 100644 --- a/datafusion/core/tests/sql/information_schema.rs +++ b/datafusion/core/tests/sql/information_schema.rs @@ -519,10 +519,7 @@ fn table_with_many_types() -> Arc { Arc::new(LargeStringArray::from(vec![Some("bar")])), Arc::new(BinaryArray::from_slice([b"foo" as &[u8]])), Arc::new(LargeBinaryArray::from_slice([b"foo" as &[u8]])), - Arc::new(TimestampNanosecondArray::from_opt_vec( - vec![Some(123)], - None, - )), + Arc::new(TimestampNanosecondArray::from(vec![Some(123)])), ], ) .unwrap(); @@ -706,7 +703,7 @@ async fn show_all() { "| datafusion.execution.parquet.enable_page_index | false |", "| datafusion.execution.parquet.pushdown_filters | false |", "| datafusion.execution.parquet.reorder_filters | false |", - "| datafusion.execution.time_zone | UTC |", + "| datafusion.execution.time_zone | +00:00 |", "| datafusion.explain.logical_plan_only | false |", "| datafusion.explain.physical_plan_only | false |", "| datafusion.optimizer.filter_null_join_keys | false |", @@ -730,7 +727,7 @@ async fn show_time_zone_default_utc() { "+--------------------------------+---------+", "| name | setting |", "+--------------------------------+---------+", - "| datafusion.execution.time_zone | UTC |", + "| datafusion.execution.time_zone | +00:00 |", "+--------------------------------+---------+", ]; @@ -749,7 +746,7 @@ async fn show_timezone_default_utc() { "+--------------------------------+---------+", "| name | setting |", "+--------------------------------+---------+", - "| datafusion.execution.time_zone | UTC |", + "| datafusion.execution.time_zone | +00:00 |", "+--------------------------------+---------+", ]; diff --git a/datafusion/core/tests/sql/joins.rs b/datafusion/core/tests/sql/joins.rs index 3f939e353740..ae1e89646973 100644 --- a/datafusion/core/tests/sql/joins.rs +++ b/datafusion/core/tests/sql/joins.rs @@ -768,9 +768,9 @@ async fn test_join_timestamp() -> Result<()> { "+-------------------------------+-------------------------------+", "| time | time |", "+-------------------------------+-------------------------------+", - "| 1970-01-02 12:39:24.190213133 | 1970-01-02 12:39:24.190213133 |", - "| 1970-01-02 12:39:24.190213134 | 1970-01-02 12:39:24.190213134 |", - "| 1970-01-02 12:39:24.190213135 | 1970-01-02 12:39:24.190213135 |", + "| 1970-01-02T12:39:24.190213133 | 1970-01-02T12:39:24.190213133 |", + "| 1970-01-02T12:39:24.190213134 | 1970-01-02T12:39:24.190213134 |", + "| 1970-01-02T12:39:24.190213135 | 1970-01-02T12:39:24.190213135 |", "+-------------------------------+-------------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -1025,9 +1025,9 @@ async fn join_timestamp() -> Result<()> { "+-------------------------------+----------------------------+-------------------------+---------------------+-------+-------------------------------+----------------------------+-------------------------+---------------------+-------+", "| nanos | micros | millis | secs | name | nanos | micros | millis | secs | name |", "+-------------------------------+----------------------------+-------------------------+---------------------+-------+-------------------------------+----------------------------+-------------------------+---------------------+-------+", - "| 2011-12-13 11:13:10.123450 | 2011-12-13 11:13:10.123450 | 2011-12-13 11:13:10.123 | 2011-12-13 11:13:10 | Row 1 | 2011-12-13 11:13:10.123450 | 2011-12-13 11:13:10.123450 | 2011-12-13 11:13:10.123 | 2011-12-13 11:13:10 | Row 1 |", - "| 2018-11-13 17:11:10.011375885 | 2018-11-13 17:11:10.011375 | 2018-11-13 17:11:10.011 | 2018-11-13 17:11:10 | Row 0 | 2018-11-13 17:11:10.011375885 | 2018-11-13 17:11:10.011375 | 2018-11-13 17:11:10.011 | 2018-11-13 17:11:10 | Row 0 |", - "| 2021-01-01 05:11:10.432 | 2021-01-01 05:11:10.432 | 2021-01-01 05:11:10.432 | 2021-01-01 05:11:10 | Row 3 | 2021-01-01 05:11:10.432 | 2021-01-01 05:11:10.432 | 2021-01-01 05:11:10.432 | 2021-01-01 05:11:10 | Row 3 |", + "| 2011-12-13T11:13:10.123450 | 2011-12-13T11:13:10.123450 | 2011-12-13T11:13:10.123 | 2011-12-13T11:13:10 | Row 1 | 2011-12-13T11:13:10.123450 | 2011-12-13T11:13:10.123450 | 2011-12-13T11:13:10.123 | 2011-12-13T11:13:10 | Row 1 |", + "| 2018-11-13T17:11:10.011375885 | 2018-11-13T17:11:10.011375 | 2018-11-13T17:11:10.011 | 2018-11-13T17:11:10 | Row 0 | 2018-11-13T17:11:10.011375885 | 2018-11-13T17:11:10.011375 | 2018-11-13T17:11:10.011 | 2018-11-13T17:11:10 | Row 0 |", + "| 2021-01-01T05:11:10.432 | 2021-01-01T05:11:10.432 | 2021-01-01T05:11:10.432 | 2021-01-01T05:11:10 | Row 3 | 2021-01-01T05:11:10.432 | 2021-01-01T05:11:10.432 | 2021-01-01T05:11:10.432 | 2021-01-01T05:11:10 | Row 3 |", "+-------------------------------+----------------------------+-------------------------+---------------------+-------+-------------------------------+----------------------------+-------------------------+---------------------+-------+", ]; diff --git a/datafusion/core/tests/sql/mod.rs b/datafusion/core/tests/sql/mod.rs index be86d25c7a73..9c78bb32510e 100644 --- a/datafusion/core/tests/sql/mod.rs +++ b/datafusion/core/tests/sql/mod.rs @@ -983,14 +983,14 @@ async fn register_alltypes_parquet(ctx: &SessionContext) { fn make_timestamp_table() -> Result> where - A: ArrowTimestampType, + A: ArrowTimestampType, { make_timestamp_tz_table::(None) } fn make_timestamp_tz_table(tz: Option) -> Result> where - A: ArrowTimestampType, + A: ArrowTimestampType, { let schema = Arc::new(Schema::new(vec![ Field::new( @@ -1014,7 +1014,7 @@ where 1599565349190855000 / divisor, // 2020-09-08T11:42:29.190855+00:00 ]; // 2020-09-08T11:42:29.190855+00:00 - let array = PrimitiveArray::::from_vec(timestamps, tz); + let array = PrimitiveArray::::from_iter_values(timestamps).with_timezone_opt(tz); let data = RecordBatch::try_new( schema.clone(), @@ -1152,10 +1152,10 @@ pub fn make_timestamps() -> RecordBatch { .map(|(i, _)| format!("Row {}", i)) .collect::>(); - let arr_nanos = TimestampNanosecondArray::from_opt_vec(ts_nanos, None); - let arr_micros = TimestampMicrosecondArray::from_opt_vec(ts_micros, None); - let arr_millis = TimestampMillisecondArray::from_opt_vec(ts_millis, None); - let arr_secs = TimestampSecondArray::from_opt_vec(ts_secs, None); + let arr_nanos = TimestampNanosecondArray::from(ts_nanos); + let arr_micros = TimestampMicrosecondArray::from(ts_micros); + let arr_millis = TimestampMillisecondArray::from(ts_millis); + let arr_secs = TimestampSecondArray::from(ts_secs); let names = names.iter().map(|s| s.as_str()).collect::>(); let arr_names = StringArray::from(names); diff --git a/datafusion/core/tests/sql/timestamp.rs b/datafusion/core/tests/sql/timestamp.rs index e2ee43332cd2..7fb8e109f575 100644 --- a/datafusion/core/tests/sql/timestamp.rs +++ b/datafusion/core/tests/sql/timestamp.rs @@ -41,9 +41,9 @@ async fn query_cast_timestamp_millis() -> Result<()> { "+--------------------------+", "| totimestampmillis(t1.ts) |", "+--------------------------+", - "| 2009-03-01 00:00:00 |", - "| 2009-03-01 00:01:00 |", - "| 2009-04-01 00:00:00 |", + "| 2009-03-01T00:00:00 |", + "| 2009-03-01T00:01:00 |", + "| 2009-04-01T00:00:00 |", "+--------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -72,9 +72,9 @@ async fn query_cast_timestamp_micros() -> Result<()> { "+--------------------------+", "| totimestampmicros(t1.ts) |", "+--------------------------+", - "| 2009-03-01 00:00:00 |", - "| 2009-03-01 00:01:00 |", - "| 2009-04-01 00:00:00 |", + "| 2009-03-01T00:00:00 |", + "| 2009-03-01T00:01:00 |", + "| 2009-04-01T00:00:00 |", "+--------------------------+", ]; @@ -102,9 +102,9 @@ async fn query_cast_timestamp_seconds() -> Result<()> { "+---------------------------+", "| totimestampseconds(t1.ts) |", "+---------------------------+", - "| 2009-03-01 00:00:00 |", - "| 2009-03-01 00:01:00 |", - "| 2009-04-01 00:00:00 |", + "| 2009-03-01T00:00:00 |", + "| 2009-03-01T00:01:00 |", + "| 2009-04-01T00:00:00 |", "+---------------------------+", ]; @@ -125,9 +125,9 @@ async fn query_cast_timestamp_nanos_to_others() -> Result<()> { "+-------------------------------+", "| totimestampmillis(ts_data.ts) |", "+-------------------------------+", - "| 2020-09-08 13:42:29.190 |", - "| 2020-09-08 12:42:29.190 |", - "| 2020-09-08 11:42:29.190 |", + "| 2020-09-08T13:42:29.190 |", + "| 2020-09-08T12:42:29.190 |", + "| 2020-09-08T11:42:29.190 |", "+-------------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -139,9 +139,9 @@ async fn query_cast_timestamp_nanos_to_others() -> Result<()> { "+-------------------------------+", "| totimestampmicros(ts_data.ts) |", "+-------------------------------+", - "| 2020-09-08 13:42:29.190855 |", - "| 2020-09-08 12:42:29.190855 |", - "| 2020-09-08 11:42:29.190855 |", + "| 2020-09-08T13:42:29.190855 |", + "| 2020-09-08T12:42:29.190855 |", + "| 2020-09-08T11:42:29.190855 |", "+-------------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -152,9 +152,9 @@ async fn query_cast_timestamp_nanos_to_others() -> Result<()> { "+--------------------------------+", "| totimestampseconds(ts_data.ts) |", "+--------------------------------+", - "| 2020-09-08 13:42:29 |", - "| 2020-09-08 12:42:29 |", - "| 2020-09-08 11:42:29 |", + "| 2020-09-08T13:42:29 |", + "| 2020-09-08T12:42:29 |", + "| 2020-09-08T11:42:29 |", "+--------------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -174,9 +174,9 @@ async fn query_cast_timestamp_seconds_to_others() -> Result<()> { "+-------------------------------+", "| totimestampmillis(ts_secs.ts) |", "+-------------------------------+", - "| 2020-09-08 13:42:29 |", - "| 2020-09-08 12:42:29 |", - "| 2020-09-08 11:42:29 |", + "| 2020-09-08T13:42:29 |", + "| 2020-09-08T12:42:29 |", + "| 2020-09-08T11:42:29 |", "+-------------------------------+", ]; @@ -189,9 +189,9 @@ async fn query_cast_timestamp_seconds_to_others() -> Result<()> { "+-------------------------------+", "| totimestampmicros(ts_secs.ts) |", "+-------------------------------+", - "| 2020-09-08 13:42:29 |", - "| 2020-09-08 12:42:29 |", - "| 2020-09-08 11:42:29 |", + "| 2020-09-08T13:42:29 |", + "| 2020-09-08T12:42:29 |", + "| 2020-09-08T11:42:29 |", "+-------------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -203,9 +203,9 @@ async fn query_cast_timestamp_seconds_to_others() -> Result<()> { "+-------------------------+", "| totimestamp(ts_secs.ts) |", "+-------------------------+", - "| 2020-09-08 13:42:29 |", - "| 2020-09-08 12:42:29 |", - "| 2020-09-08 11:42:29 |", + "| 2020-09-08T13:42:29 |", + "| 2020-09-08T12:42:29 |", + "| 2020-09-08T11:42:29 |", "+-------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -227,9 +227,9 @@ async fn query_cast_timestamp_micros_to_others() -> Result<()> { "+---------------------------------+", "| totimestampmillis(ts_micros.ts) |", "+---------------------------------+", - "| 2020-09-08 13:42:29.190 |", - "| 2020-09-08 12:42:29.190 |", - "| 2020-09-08 11:42:29.190 |", + "| 2020-09-08T13:42:29.190 |", + "| 2020-09-08T12:42:29.190 |", + "| 2020-09-08T11:42:29.190 |", "+---------------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -241,9 +241,9 @@ async fn query_cast_timestamp_micros_to_others() -> Result<()> { "+----------------------------------+", "| totimestampseconds(ts_micros.ts) |", "+----------------------------------+", - "| 2020-09-08 13:42:29 |", - "| 2020-09-08 12:42:29 |", - "| 2020-09-08 11:42:29 |", + "| 2020-09-08T13:42:29 |", + "| 2020-09-08T12:42:29 |", + "| 2020-09-08T11:42:29 |", "+----------------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -255,9 +255,9 @@ async fn query_cast_timestamp_micros_to_others() -> Result<()> { "+----------------------------+", "| totimestamp(ts_micros.ts) |", "+----------------------------+", - "| 2020-09-08 13:42:29.190855 |", - "| 2020-09-08 12:42:29.190855 |", - "| 2020-09-08 11:42:29.190855 |", + "| 2020-09-08T13:42:29.190855 |", + "| 2020-09-08T12:42:29.190855 |", + "| 2020-09-08T11:42:29.190855 |", "+----------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -284,9 +284,9 @@ async fn query_cast_timestamp_from_unixtime() -> Result<()> { "+---------------------+", "| fromunixtime(t1.ts) |", "+---------------------+", - "| 2009-03-01 00:00:00 |", - "| 2009-03-01 00:01:00 |", - "| 2009-04-01 00:00:00 |", + "| 2009-03-01T00:00:00 |", + "| 2009-03-01T00:01:00 |", + "| 2009-04-01T00:00:00 |", "+---------------------+", ]; @@ -420,9 +420,8 @@ async fn test_current_timestamp_expressions() -> Result<()> { let actual = execute(&ctx, "SELECT NOW(), NOW() as t2").await; let res1 = actual[0][0].as_str(); let res2 = actual[0][1].as_str(); - let t3 = chrono::Utc::now().timestamp(); - let t2_naive = - chrono::NaiveDateTime::parse_from_str(res1, "%Y-%m-%d %H:%M:%S%.6f").unwrap(); + let t3 = Utc::now().timestamp(); + let t2_naive = DateTime::parse_from_rfc3339(res1).unwrap(); let t2 = t2_naive.timestamp(); assert!(t1 <= t2 && t2 <= t3); @@ -528,18 +527,18 @@ async fn timestamp_minmax() -> Result<()> { let ctx = SessionContext::new(); let table_a = make_timestamp_tz_table::(None)?; let table_b = - make_timestamp_tz_table::(Some("UTC".to_owned()))?; + make_timestamp_tz_table::(Some("+00:00".to_owned()))?; ctx.register_table("table_a", table_a)?; ctx.register_table("table_b", table_b)?; let sql = "SELECT MIN(table_a.ts), MAX(table_b.ts) FROM table_a, table_b"; let actual = execute_to_batches(&ctx, sql).await; let expected = vec![ - "+-------------------------+----------------------------+", - "| MIN(table_a.ts) | MAX(table_b.ts) |", - "+-------------------------+----------------------------+", - "| 2020-09-08 11:42:29.190 | 2020-09-08 13:42:29.190855 |", - "+-------------------------+----------------------------+", + "+-------------------------+----------------------------------+", + "| MIN(table_a.ts) | MAX(table_b.ts) |", + "+-------------------------+----------------------------------+", + "| 2020-09-08T11:42:29.190 | 2020-09-08T13:42:29.190855+00:00 |", + "+-------------------------+----------------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -551,28 +550,29 @@ async fn timestamp_coercion() -> Result<()> { { let ctx = SessionContext::new(); let table_a = - make_timestamp_tz_table::(Some("UTC".to_owned()))?; - let table_b = - make_timestamp_tz_table::(Some("UTC".to_owned()))?; + make_timestamp_tz_table::(Some("+00:00".to_owned()))?; + let table_b = make_timestamp_tz_table::(Some( + "+00:00".to_owned(), + ))?; ctx.register_table("table_a", table_a)?; ctx.register_table("table_b", table_b)?; let sql = "SELECT table_a.ts, table_b.ts, table_a.ts = table_b.ts FROM table_a, table_b"; let actual = execute_to_batches(&ctx, sql).await; let expected = vec![ - "+---------------------+-------------------------+-------------------------+", - "| ts | ts | table_a.ts = table_b.ts |", - "+---------------------+-------------------------+-------------------------+", - "| 2020-09-08 13:42:29 | 2020-09-08 13:42:29.190 | true |", - "| 2020-09-08 13:42:29 | 2020-09-08 12:42:29.190 | false |", - "| 2020-09-08 13:42:29 | 2020-09-08 11:42:29.190 | false |", - "| 2020-09-08 12:42:29 | 2020-09-08 13:42:29.190 | false |", - "| 2020-09-08 12:42:29 | 2020-09-08 12:42:29.190 | true |", - "| 2020-09-08 12:42:29 | 2020-09-08 11:42:29.190 | false |", - "| 2020-09-08 11:42:29 | 2020-09-08 13:42:29.190 | false |", - "| 2020-09-08 11:42:29 | 2020-09-08 12:42:29.190 | false |", - "| 2020-09-08 11:42:29 | 2020-09-08 11:42:29.190 | true |", - "+---------------------+-------------------------+-------------------------+", + "+---------------------------+-------------------------------+-------------------------+", + "| ts | ts | table_a.ts = table_b.ts |", + "+---------------------------+-------------------------------+-------------------------+", + "| 2020-09-08T13:42:29+00:00 | 2020-09-08T13:42:29.190+00:00 | true |", + "| 2020-09-08T13:42:29+00:00 | 2020-09-08T12:42:29.190+00:00 | false |", + "| 2020-09-08T13:42:29+00:00 | 2020-09-08T11:42:29.190+00:00 | false |", + "| 2020-09-08T12:42:29+00:00 | 2020-09-08T13:42:29.190+00:00 | false |", + "| 2020-09-08T12:42:29+00:00 | 2020-09-08T12:42:29.190+00:00 | true |", + "| 2020-09-08T12:42:29+00:00 | 2020-09-08T11:42:29.190+00:00 | false |", + "| 2020-09-08T11:42:29+00:00 | 2020-09-08T13:42:29.190+00:00 | false |", + "| 2020-09-08T11:42:29+00:00 | 2020-09-08T12:42:29.190+00:00 | false |", + "| 2020-09-08T11:42:29+00:00 | 2020-09-08T11:42:29.190+00:00 | true |", + "+---------------------------+-------------------------------+-------------------------+", ]; assert_batches_eq!(expected, &actual); } @@ -590,15 +590,15 @@ async fn timestamp_coercion() -> Result<()> { "+---------------------+----------------------------+-------------------------+", "| ts | ts | table_a.ts = table_b.ts |", "+---------------------+----------------------------+-------------------------+", - "| 2020-09-08 13:42:29 | 2020-09-08 13:42:29.190855 | true |", - "| 2020-09-08 13:42:29 | 2020-09-08 12:42:29.190855 | false |", - "| 2020-09-08 13:42:29 | 2020-09-08 11:42:29.190855 | false |", - "| 2020-09-08 12:42:29 | 2020-09-08 13:42:29.190855 | false |", - "| 2020-09-08 12:42:29 | 2020-09-08 12:42:29.190855 | true |", - "| 2020-09-08 12:42:29 | 2020-09-08 11:42:29.190855 | false |", - "| 2020-09-08 11:42:29 | 2020-09-08 13:42:29.190855 | false |", - "| 2020-09-08 11:42:29 | 2020-09-08 12:42:29.190855 | false |", - "| 2020-09-08 11:42:29 | 2020-09-08 11:42:29.190855 | true |", + "| 2020-09-08T13:42:29 | 2020-09-08T13:42:29.190855 | true |", + "| 2020-09-08T13:42:29 | 2020-09-08T12:42:29.190855 | false |", + "| 2020-09-08T13:42:29 | 2020-09-08T11:42:29.190855 | false |", + "| 2020-09-08T12:42:29 | 2020-09-08T13:42:29.190855 | false |", + "| 2020-09-08T12:42:29 | 2020-09-08T12:42:29.190855 | true |", + "| 2020-09-08T12:42:29 | 2020-09-08T11:42:29.190855 | false |", + "| 2020-09-08T11:42:29 | 2020-09-08T13:42:29.190855 | false |", + "| 2020-09-08T11:42:29 | 2020-09-08T12:42:29.190855 | false |", + "| 2020-09-08T11:42:29 | 2020-09-08T11:42:29.190855 | true |", "+---------------------+----------------------------+-------------------------+", ]; @@ -618,15 +618,15 @@ async fn timestamp_coercion() -> Result<()> { "+---------------------+----------------------------+-------------------------+", "| ts | ts | table_a.ts = table_b.ts |", "+---------------------+----------------------------+-------------------------+", - "| 2020-09-08 13:42:29 | 2020-09-08 13:42:29.190855 | true |", - "| 2020-09-08 13:42:29 | 2020-09-08 12:42:29.190855 | false |", - "| 2020-09-08 13:42:29 | 2020-09-08 11:42:29.190855 | false |", - "| 2020-09-08 12:42:29 | 2020-09-08 13:42:29.190855 | false |", - "| 2020-09-08 12:42:29 | 2020-09-08 12:42:29.190855 | true |", - "| 2020-09-08 12:42:29 | 2020-09-08 11:42:29.190855 | false |", - "| 2020-09-08 11:42:29 | 2020-09-08 13:42:29.190855 | false |", - "| 2020-09-08 11:42:29 | 2020-09-08 12:42:29.190855 | false |", - "| 2020-09-08 11:42:29 | 2020-09-08 11:42:29.190855 | true |", + "| 2020-09-08T13:42:29 | 2020-09-08T13:42:29.190855 | true |", + "| 2020-09-08T13:42:29 | 2020-09-08T12:42:29.190855 | false |", + "| 2020-09-08T13:42:29 | 2020-09-08T11:42:29.190855 | false |", + "| 2020-09-08T12:42:29 | 2020-09-08T13:42:29.190855 | false |", + "| 2020-09-08T12:42:29 | 2020-09-08T12:42:29.190855 | true |", + "| 2020-09-08T12:42:29 | 2020-09-08T11:42:29.190855 | false |", + "| 2020-09-08T11:42:29 | 2020-09-08T13:42:29.190855 | false |", + "| 2020-09-08T11:42:29 | 2020-09-08T12:42:29.190855 | false |", + "| 2020-09-08T11:42:29 | 2020-09-08T11:42:29.190855 | true |", "+---------------------+----------------------------+-------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -645,15 +645,15 @@ async fn timestamp_coercion() -> Result<()> { "+-------------------------+---------------------+-------------------------+", "| ts | ts | table_a.ts = table_b.ts |", "+-------------------------+---------------------+-------------------------+", - "| 2020-09-08 13:42:29.190 | 2020-09-08 13:42:29 | true |", - "| 2020-09-08 13:42:29.190 | 2020-09-08 12:42:29 | false |", - "| 2020-09-08 13:42:29.190 | 2020-09-08 11:42:29 | false |", - "| 2020-09-08 12:42:29.190 | 2020-09-08 13:42:29 | false |", - "| 2020-09-08 12:42:29.190 | 2020-09-08 12:42:29 | true |", - "| 2020-09-08 12:42:29.190 | 2020-09-08 11:42:29 | false |", - "| 2020-09-08 11:42:29.190 | 2020-09-08 13:42:29 | false |", - "| 2020-09-08 11:42:29.190 | 2020-09-08 12:42:29 | false |", - "| 2020-09-08 11:42:29.190 | 2020-09-08 11:42:29 | true |", + "| 2020-09-08T13:42:29.190 | 2020-09-08T13:42:29 | true |", + "| 2020-09-08T13:42:29.190 | 2020-09-08T12:42:29 | false |", + "| 2020-09-08T13:42:29.190 | 2020-09-08T11:42:29 | false |", + "| 2020-09-08T12:42:29.190 | 2020-09-08T13:42:29 | false |", + "| 2020-09-08T12:42:29.190 | 2020-09-08T12:42:29 | true |", + "| 2020-09-08T12:42:29.190 | 2020-09-08T11:42:29 | false |", + "| 2020-09-08T11:42:29.190 | 2020-09-08T13:42:29 | false |", + "| 2020-09-08T11:42:29.190 | 2020-09-08T12:42:29 | false |", + "| 2020-09-08T11:42:29.190 | 2020-09-08T11:42:29 | true |", "+-------------------------+---------------------+-------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -672,15 +672,15 @@ async fn timestamp_coercion() -> Result<()> { "+-------------------------+----------------------------+-------------------------+", "| ts | ts | table_a.ts = table_b.ts |", "+-------------------------+----------------------------+-------------------------+", - "| 2020-09-08 13:42:29.190 | 2020-09-08 13:42:29.190855 | true |", - "| 2020-09-08 13:42:29.190 | 2020-09-08 12:42:29.190855 | false |", - "| 2020-09-08 13:42:29.190 | 2020-09-08 11:42:29.190855 | false |", - "| 2020-09-08 12:42:29.190 | 2020-09-08 13:42:29.190855 | false |", - "| 2020-09-08 12:42:29.190 | 2020-09-08 12:42:29.190855 | true |", - "| 2020-09-08 12:42:29.190 | 2020-09-08 11:42:29.190855 | false |", - "| 2020-09-08 11:42:29.190 | 2020-09-08 13:42:29.190855 | false |", - "| 2020-09-08 11:42:29.190 | 2020-09-08 12:42:29.190855 | false |", - "| 2020-09-08 11:42:29.190 | 2020-09-08 11:42:29.190855 | true |", + "| 2020-09-08T13:42:29.190 | 2020-09-08T13:42:29.190855 | true |", + "| 2020-09-08T13:42:29.190 | 2020-09-08T12:42:29.190855 | false |", + "| 2020-09-08T13:42:29.190 | 2020-09-08T11:42:29.190855 | false |", + "| 2020-09-08T12:42:29.190 | 2020-09-08T13:42:29.190855 | false |", + "| 2020-09-08T12:42:29.190 | 2020-09-08T12:42:29.190855 | true |", + "| 2020-09-08T12:42:29.190 | 2020-09-08T11:42:29.190855 | false |", + "| 2020-09-08T11:42:29.190 | 2020-09-08T13:42:29.190855 | false |", + "| 2020-09-08T11:42:29.190 | 2020-09-08T12:42:29.190855 | false |", + "| 2020-09-08T11:42:29.190 | 2020-09-08T11:42:29.190855 | true |", "+-------------------------+----------------------------+-------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -699,15 +699,15 @@ async fn timestamp_coercion() -> Result<()> { "+-------------------------+----------------------------+-------------------------+", "| ts | ts | table_a.ts = table_b.ts |", "+-------------------------+----------------------------+-------------------------+", - "| 2020-09-08 13:42:29.190 | 2020-09-08 13:42:29.190855 | true |", - "| 2020-09-08 13:42:29.190 | 2020-09-08 12:42:29.190855 | false |", - "| 2020-09-08 13:42:29.190 | 2020-09-08 11:42:29.190855 | false |", - "| 2020-09-08 12:42:29.190 | 2020-09-08 13:42:29.190855 | false |", - "| 2020-09-08 12:42:29.190 | 2020-09-08 12:42:29.190855 | true |", - "| 2020-09-08 12:42:29.190 | 2020-09-08 11:42:29.190855 | false |", - "| 2020-09-08 11:42:29.190 | 2020-09-08 13:42:29.190855 | false |", - "| 2020-09-08 11:42:29.190 | 2020-09-08 12:42:29.190855 | false |", - "| 2020-09-08 11:42:29.190 | 2020-09-08 11:42:29.190855 | true |", + "| 2020-09-08T13:42:29.190 | 2020-09-08T13:42:29.190855 | true |", + "| 2020-09-08T13:42:29.190 | 2020-09-08T12:42:29.190855 | false |", + "| 2020-09-08T13:42:29.190 | 2020-09-08T11:42:29.190855 | false |", + "| 2020-09-08T12:42:29.190 | 2020-09-08T13:42:29.190855 | false |", + "| 2020-09-08T12:42:29.190 | 2020-09-08T12:42:29.190855 | true |", + "| 2020-09-08T12:42:29.190 | 2020-09-08T11:42:29.190855 | false |", + "| 2020-09-08T11:42:29.190 | 2020-09-08T13:42:29.190855 | false |", + "| 2020-09-08T11:42:29.190 | 2020-09-08T12:42:29.190855 | false |", + "| 2020-09-08T11:42:29.190 | 2020-09-08T11:42:29.190855 | true |", "+-------------------------+----------------------------+-------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -726,15 +726,15 @@ async fn timestamp_coercion() -> Result<()> { "+----------------------------+---------------------+-------------------------+", "| ts | ts | table_a.ts = table_b.ts |", "+----------------------------+---------------------+-------------------------+", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 13:42:29 | true |", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 12:42:29 | false |", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 11:42:29 | false |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 13:42:29 | false |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 12:42:29 | true |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 11:42:29 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 13:42:29 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 12:42:29 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 11:42:29 | true |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T13:42:29 | true |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T12:42:29 | false |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T11:42:29 | false |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T13:42:29 | false |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T12:42:29 | true |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T11:42:29 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T13:42:29 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T12:42:29 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T11:42:29 | true |", "+----------------------------+---------------------+-------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -753,15 +753,15 @@ async fn timestamp_coercion() -> Result<()> { "+----------------------------+-------------------------+-------------------------+", "| ts | ts | table_a.ts = table_b.ts |", "+----------------------------+-------------------------+-------------------------+", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 13:42:29.190 | true |", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 12:42:29.190 | false |", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 11:42:29.190 | false |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 13:42:29.190 | false |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 12:42:29.190 | true |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 11:42:29.190 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 13:42:29.190 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 12:42:29.190 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 11:42:29.190 | true |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T13:42:29.190 | true |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T12:42:29.190 | false |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T11:42:29.190 | false |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T13:42:29.190 | false |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T12:42:29.190 | true |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T11:42:29.190 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T13:42:29.190 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T12:42:29.190 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T11:42:29.190 | true |", "+----------------------------+-------------------------+-------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -780,15 +780,15 @@ async fn timestamp_coercion() -> Result<()> { "+----------------------------+----------------------------+-------------------------+", "| ts | ts | table_a.ts = table_b.ts |", "+----------------------------+----------------------------+-------------------------+", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 13:42:29.190855 | true |", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 12:42:29.190855 | false |", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 11:42:29.190855 | false |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 13:42:29.190855 | false |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 12:42:29.190855 | true |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 11:42:29.190855 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 13:42:29.190855 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 12:42:29.190855 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 11:42:29.190855 | true |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T13:42:29.190855 | true |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T12:42:29.190855 | false |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T11:42:29.190855 | false |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T13:42:29.190855 | false |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T12:42:29.190855 | true |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T11:42:29.190855 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T13:42:29.190855 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T12:42:29.190855 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T11:42:29.190855 | true |", "+----------------------------+----------------------------+-------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -807,15 +807,15 @@ async fn timestamp_coercion() -> Result<()> { "+----------------------------+---------------------+-------------------------+", "| ts | ts | table_a.ts = table_b.ts |", "+----------------------------+---------------------+-------------------------+", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 13:42:29 | true |", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 12:42:29 | false |", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 11:42:29 | false |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 13:42:29 | false |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 12:42:29 | true |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 11:42:29 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 13:42:29 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 12:42:29 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 11:42:29 | true |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T13:42:29 | true |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T12:42:29 | false |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T11:42:29 | false |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T13:42:29 | false |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T12:42:29 | true |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T11:42:29 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T13:42:29 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T12:42:29 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T11:42:29 | true |", "+----------------------------+---------------------+-------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -834,15 +834,15 @@ async fn timestamp_coercion() -> Result<()> { "+----------------------------+-------------------------+-------------------------+", "| ts | ts | table_a.ts = table_b.ts |", "+----------------------------+-------------------------+-------------------------+", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 13:42:29.190 | true |", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 12:42:29.190 | false |", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 11:42:29.190 | false |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 13:42:29.190 | false |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 12:42:29.190 | true |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 11:42:29.190 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 13:42:29.190 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 12:42:29.190 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 11:42:29.190 | true |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T13:42:29.190 | true |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T12:42:29.190 | false |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T11:42:29.190 | false |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T13:42:29.190 | false |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T12:42:29.190 | true |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T11:42:29.190 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T13:42:29.190 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T12:42:29.190 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T11:42:29.190 | true |", "+----------------------------+-------------------------+-------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -861,15 +861,15 @@ async fn timestamp_coercion() -> Result<()> { "+----------------------------+----------------------------+-------------------------+", "| ts | ts | table_a.ts = table_b.ts |", "+----------------------------+----------------------------+-------------------------+", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 13:42:29.190855 | true |", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 12:42:29.190855 | false |", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 11:42:29.190855 | false |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 13:42:29.190855 | false |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 12:42:29.190855 | true |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 11:42:29.190855 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 13:42:29.190855 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 12:42:29.190855 | false |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 11:42:29.190855 | true |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T13:42:29.190855 | true |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T12:42:29.190855 | false |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T11:42:29.190855 | false |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T13:42:29.190855 | false |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T12:42:29.190855 | true |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T11:42:29.190855 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T13:42:29.190855 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T12:42:29.190855 | false |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T11:42:29.190855 | true |", "+----------------------------+----------------------------+-------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -916,8 +916,8 @@ async fn group_by_timestamp_millis() -> Result<()> { "+---------------------+---------------+", "| timestamp | SUM(t1.count) |", "+---------------------+---------------+", - "| 2018-07-01 06:00:00 | 80 |", - "| 2018-07-01 07:00:00 | 130 |", + "| 2018-07-01T06:00:00 | 80 |", + "| 2018-07-01T07:00:00 | 130 |", "+---------------------+---------------+", ]; assert_batches_eq!(expected, &actual); @@ -1093,7 +1093,7 @@ async fn cast_to_timestamp_twice() -> Result<()> { "+-------------------------------+", "| totimestamp(a.a) |", "+-------------------------------+", - "| 1970-01-01 00:00:00.000000001 |", + "| 1970-01-01T00:00:00.000000001 |", "+-------------------------------+", ]; @@ -1114,7 +1114,7 @@ async fn cast_to_timestamp_seconds_twice() -> Result<()> { "+-------------------------+", "| totimestampseconds(a.a) |", "+-------------------------+", - "| 1970-01-01 00:00:01 |", + "| 1970-01-01T00:00:01 |", "+-------------------------+", ]; @@ -1134,7 +1134,7 @@ async fn cast_to_timestamp_millis_twice() -> Result<()> { "+-------------------------+", "| totimestampmillis(a.a) |", "+-------------------------+", - "| 1970-01-01 00:00:00.001 |", + "| 1970-01-01T00:00:00.001 |", "+-------------------------+", ]; @@ -1154,7 +1154,7 @@ async fn cast_to_timestamp_micros_twice() -> Result<()> { "+----------------------------+", "| totimestampmicros(a.a) |", "+----------------------------+", - "| 1970-01-01 00:00:00.000001 |", + "| 1970-01-01T00:00:00.000001 |", "+----------------------------+", ]; @@ -1174,7 +1174,7 @@ async fn to_timestamp_i32() -> Result<()> { "+-------------------------------+", "| totimestamp(Int64(1)) |", "+-------------------------------+", - "| 1970-01-01 00:00:00.000000001 |", + "| 1970-01-01T00:00:00.000000001 |", "+-------------------------------+", ]; @@ -1194,7 +1194,7 @@ async fn to_timestamp_micros_i32() -> Result<()> { "+-----------------------------+", "| totimestampmicros(Int64(1)) |", "+-----------------------------+", - "| 1970-01-01 00:00:00.000001 |", + "| 1970-01-01T00:00:00.000001 |", "+-----------------------------+", ]; @@ -1214,7 +1214,7 @@ async fn to_timestamp_millis_i32() -> Result<()> { "+-----------------------------+", "| totimestampmillis(Int64(1)) |", "+-----------------------------+", - "| 1970-01-01 00:00:00.001 |", + "| 1970-01-01T00:00:00.001 |", "+-----------------------------+", ]; @@ -1234,7 +1234,7 @@ async fn to_timestamp_seconds_i32() -> Result<()> { "+------------------------------+", "| totimestampseconds(Int64(1)) |", "+------------------------------+", - "| 1970-01-01 00:00:01 |", + "| 1970-01-01T00:00:01 |", "+------------------------------+", ]; @@ -1253,7 +1253,7 @@ async fn date_bin() { "+---------------------+", "| res |", "+---------------------+", - "| 2022-08-03 14:30:00 |", + "| 2022-08-03T14:30:00 |", "+---------------------+", ]; assert_batches_eq!(expected, &results); @@ -1265,7 +1265,7 @@ async fn date_bin() { "+---------------------+", "| res |", "+---------------------+", - "| 2022-08-03 14:35:00 |", + "| 2022-08-03T14:35:00 |", "+---------------------+", ]; assert_batches_eq!(expected, &results); @@ -1277,7 +1277,7 @@ async fn date_bin() { "+---------------------+", "| res |", "+---------------------+", - "| 2022-08-03 14:25:00 |", + "| 2022-08-03T14:25:00 |", "+---------------------+", ]; assert_batches_eq!(expected, &results); @@ -1289,7 +1289,7 @@ async fn date_bin() { "+---------------------+", "| res |", "+---------------------+", - "| 2022-08-03 14:25:00 |", + "| 2022-08-03T14:25:00 |", "+---------------------+", ]; assert_batches_eq!(expected, &results); @@ -1301,7 +1301,7 @@ async fn date_bin() { "+---------------------+", "| res |", "+---------------------+", - "| 2022-07-28 00:00:00 |", + "| 2022-07-28T00:00:00 |", "+---------------------+", ]; assert_batches_eq!(expected, &results); @@ -1313,7 +1313,7 @@ async fn date_bin() { "+---------------------+", "| res |", "+---------------------+", - "| 2022-07-29 00:00:00 |", + "| 2022-07-29T00:00:00 |", "+---------------------+", ]; assert_batches_eq!(expected, &results); @@ -1332,8 +1332,8 @@ async fn date_bin() { "+---------------------+-----+", "| time | val |", "+---------------------+-----+", - "| 2021-06-10 17:00:00 | 0.5 |", - "| 2021-06-10 17:15:00 | 0.3 |", + "| 2021-06-10T17:00:00 | 0.5 |", + "| 2021-06-10T17:15:00 | 0.3 |", "+---------------------+-----+", ]; assert_batches_eq!(expected, &results); @@ -1365,9 +1365,8 @@ async fn timestamp_add_interval_second() -> Result<()> { let res1 = actual[0][0].as_str(); let res2 = actual[0][1].as_str(); - let format = "%Y-%m-%d %H:%M:%S%.6f"; - let t1_naive = chrono::NaiveDateTime::parse_from_str(res1, format).unwrap(); - let t2_naive = chrono::NaiveDateTime::parse_from_str(res2, format).unwrap(); + let t1_naive = DateTime::parse_from_rfc3339(res1).unwrap(); + let t2_naive = DateTime::parse_from_rfc3339(res2).unwrap(); assert_eq!(t1_naive.add(Duration::seconds(1)), t2_naive); Ok(()) @@ -1384,9 +1383,8 @@ async fn timestamp_sub_interval_days() -> Result<()> { let res1 = actual[0][0].as_str(); let res2 = actual[0][1].as_str(); - let format = "%Y-%m-%d %H:%M:%S%.6f"; - let t1_naive = chrono::NaiveDateTime::parse_from_str(res1, format).unwrap(); - let t2_naive = chrono::NaiveDateTime::parse_from_str(res2, format).unwrap(); + let t1_naive = DateTime::parse_from_rfc3339(res1).unwrap(); + let t2_naive = chrono::DateTime::parse_from_rfc3339(res2).unwrap(); assert_eq!(t1_naive.sub(Duration::days(8)), t2_naive); Ok(()) @@ -1429,9 +1427,8 @@ async fn timestamp_sub_interval_years() -> Result<()> { let res1 = actual[0][0].as_str(); let res2 = actual[0][1].as_str(); - let format = "%Y-%m-%d %H:%M:%S%.6f"; - let t1_naive = chrono::NaiveDateTime::parse_from_str(res1, format).unwrap(); - let t2_naive = chrono::NaiveDateTime::parse_from_str(res2, format).unwrap(); + let t1_naive = DateTime::parse_from_rfc3339(res1).unwrap(); + let t2_naive = DateTime::parse_from_rfc3339(res2).unwrap(); assert_eq!(t1_naive.with_year(t1_naive.year() - 16).unwrap(), t2_naive); Ok(()) @@ -1451,9 +1448,9 @@ async fn timestamp_array_add_interval() -> Result<()> { "+----------------------------+-----------------------------------+", "| ts | table_a.ts - IntervalDayTime(\"8\") |", "+----------------------------+-----------------------------------+", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 13:42:29.182855 |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 12:42:29.182855 |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 11:42:29.182855 |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T13:42:29.182855 |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T12:42:29.182855 |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T11:42:29.182855 |", "+----------------------------+-----------------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -1464,9 +1461,9 @@ async fn timestamp_array_add_interval() -> Result<()> { "+----------------------------+--------------------------------------+", "| ts | table_b.ts + IntervalDayTime(\"1000\") |", "+----------------------------+--------------------------------------+", - "| 2020-09-08 13:42:29.190855 | 2020-09-08 13:42:30.190855 |", - "| 2020-09-08 12:42:29.190855 | 2020-09-08 12:42:30.190855 |", - "| 2020-09-08 11:42:29.190855 | 2020-09-08 11:42:30.190855 |", + "| 2020-09-08T13:42:29.190855 | 2020-09-08T13:42:30.190855 |", + "| 2020-09-08T12:42:29.190855 | 2020-09-08T12:42:30.190855 |", + "| 2020-09-08T11:42:29.190855 | 2020-09-08T11:42:30.190855 |", "+----------------------------+--------------------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -1477,9 +1474,9 @@ async fn timestamp_array_add_interval() -> Result<()> { "+----------------------------+-------------------------------------+", "| ts | table_b.ts + IntervalYearMonth(\"2\") |", "+----------------------------+-------------------------------------+", - "| 2020-09-08 13:42:29.190855 | 2020-11-08 13:42:29.190855 |", - "| 2020-09-08 12:42:29.190855 | 2020-11-08 12:42:29.190855 |", - "| 2020-09-08 11:42:29.190855 | 2020-11-08 11:42:29.190855 |", + "| 2020-09-08T13:42:29.190855 | 2020-11-08T13:42:29.190855 |", + "| 2020-09-08T12:42:29.190855 | 2020-11-08T12:42:29.190855 |", + "| 2020-09-08T11:42:29.190855 | 2020-11-08T11:42:29.190855 |", "+----------------------------+-------------------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -1490,9 +1487,9 @@ async fn timestamp_array_add_interval() -> Result<()> { "+----------------------------+---------------------------------------+", "| ts | table_b.ts - IntervalYearMonth(\"192\") |", "+----------------------------+---------------------------------------+", - "| 2020-09-08 13:42:29.190855 | 2004-09-08 13:42:29.190855 |", - "| 2020-09-08 12:42:29.190855 | 2004-09-08 12:42:29.190855 |", - "| 2020-09-08 11:42:29.190855 | 2004-09-08 11:42:29.190855 |", + "| 2020-09-08T13:42:29.190855 | 2004-09-08T13:42:29.190855 |", + "| 2020-09-08T12:42:29.190855 | 2004-09-08T12:42:29.190855 |", + "| 2020-09-08T11:42:29.190855 | 2004-09-08T11:42:29.190855 |", "+----------------------------+---------------------------------------+", ]; assert_batches_eq!(expected, &actual); @@ -1510,7 +1507,7 @@ async fn cast_timestamp_before_1970() -> Result<()> { "+------------------------------+", "| Utf8(\"1969-01-01T00:00:00Z\") |", "+------------------------------+", - "| 1969-01-01 00:00:00 |", + "| 1969-01-01T00:00:00 |", "+------------------------------+", ]; @@ -1522,7 +1519,7 @@ async fn cast_timestamp_before_1970() -> Result<()> { "+--------------------------------+", "| Utf8(\"1969-01-01T00:00:00.1Z\") |", "+--------------------------------+", - "| 1969-01-01 00:00:00.100 |", + "| 1969-01-01T00:00:00.100 |", "+--------------------------------+", ]; @@ -1542,13 +1539,13 @@ async fn cast_timestamp_to_timestamptz() -> Result<()> { let actual = execute_to_batches(&ctx, sql).await; let expected = vec![ - "+----------------------------+------------------------------------+", - "| table_a.ts | arrowtypeof(table_a.ts) |", - "+----------------------------+------------------------------------+", - "| 2020-09-08 13:42:29.190855 | Timestamp(Nanosecond, Some(\"UTC\")) |", - "| 2020-09-08 12:42:29.190855 | Timestamp(Nanosecond, Some(\"UTC\")) |", - "| 2020-09-08 11:42:29.190855 | Timestamp(Nanosecond, Some(\"UTC\")) |", - "+----------------------------+------------------------------------+", + "+----------------------------------+---------------------------------------+", + "| table_a.ts | arrowtypeof(table_a.ts) |", + "+----------------------------------+---------------------------------------+", + "| 2020-09-08T13:42:29.190855+00:00 | Timestamp(Nanosecond, Some(\"+00:00\")) |", + "| 2020-09-08T12:42:29.190855+00:00 | Timestamp(Nanosecond, Some(\"+00:00\")) |", + "| 2020-09-08T11:42:29.190855+00:00 | Timestamp(Nanosecond, Some(\"+00:00\")) |", + "+----------------------------------+---------------------------------------+", ]; assert_batches_eq!(expected, &actual); diff --git a/datafusion/core/tests/sql/window.rs b/datafusion/core/tests/sql/window.rs index af84262065a8..9333a7e5a1e9 100644 --- a/datafusion/core/tests/sql/window.rs +++ b/datafusion/core/tests/sql/window.rs @@ -1151,14 +1151,14 @@ async fn window_frame_ranges_timestamp() -> Result<()> { "+---------------------+------+------+------+", "| ts | cnt1 | cnt2 | cnt3 |", "+---------------------+------+------+------+", - "| 2022-09-27 07:43:11 | 6 | 1 | 1 |", - "| 2022-09-27 07:43:12 | 6 | 2 | 3 |", - "| 2022-09-27 07:43:12 | 6 | 2 | 3 |", - "| 2022-09-27 07:43:13 | 6 | 1 | 4 |", - "| 2022-09-27 07:43:14 | 6 | 1 | 5 |", - "| 2022-09-28 11:29:54 | 2 | 1 | 1 |", - "| 2022-09-29 15:16:34 | 2 | 1 | 1 |", - "| 2022-09-30 19:03:14 | 1 | 1 | 1 |", + "| 2022-09-27T07:43:11 | 6 | 1 | 1 |", + "| 2022-09-27T07:43:12 | 6 | 2 | 3 |", + "| 2022-09-27T07:43:12 | 6 | 2 | 3 |", + "| 2022-09-27T07:43:13 | 6 | 1 | 4 |", + "| 2022-09-27T07:43:14 | 6 | 1 | 5 |", + "| 2022-09-28T11:29:54 | 2 | 1 | 1 |", + "| 2022-09-29T15:16:34 | 2 | 1 | 1 |", + "| 2022-09-30T19:03:14 | 1 | 1 | 1 |", "+---------------------+------+------+------+", ]; assert_batches_eq!(expected, &actual); diff --git a/datafusion/core/tests/user_defined_aggregates.rs b/datafusion/core/tests/user_defined_aggregates.rs index 5c172fe4a0ee..ea6838e70dba 100644 --- a/datafusion/core/tests/user_defined_aggregates.rs +++ b/datafusion/core/tests/user_defined_aggregates.rs @@ -47,7 +47,7 @@ async fn test_udf_returning_struct() { "+--------------------------------------------------+", "| first(t.value,t.time) |", "+--------------------------------------------------+", - "| {\"value\": 2, \"time\": 1970-01-01 00:00:00.000002} |", + "| {\"value\": 2, \"time\": 1970-01-01T00:00:00.000002} |", "+--------------------------------------------------+", ]; assert_batches_eq!(expected, &execute(&ctx, sql).await); @@ -62,7 +62,7 @@ async fn test_udf_returning_struct_sq() { "+-----------------+----------------------------+", "| sq.first[value] | sq.first[time] |", "+-----------------+----------------------------+", - "| 2 | 1970-01-01 00:00:00.000002 |", + "| 2 | 1970-01-01T00:00:00.000002 |", "+-----------------+----------------------------+", ]; assert_batches_eq!(expected, &execute(&ctx, sql).await); @@ -78,13 +78,13 @@ async fn execute(ctx: &SessionContext, sql: &str) -> Vec { /// /// ```text /// value | time -/// 3.0 | 1970-01-01 00:00:00.000003 -/// 2.0 | 1970-01-01 00:00:00.000002 -/// 1.0 | 1970-01-01 00:00:00.000004 +/// 3.0 | 1970-01-01T00:00:00.000003 +/// 2.0 | 1970-01-01T00:00:00.000002 +/// 1.0 | 1970-01-01T00:00:00.000004 /// ``` fn udaf_struct_context() -> SessionContext { let value: Float64Array = vec![3.0, 2.0, 1.0].into_iter().map(Some).collect(); - let time = TimestampNanosecondArray::from_vec(vec![3000, 2000, 4000], None); + let time = TimestampNanosecondArray::from(vec![3000, 2000, 4000]); let batch = RecordBatch::try_from_iter(vec![ ("value", Arc::new(value) as _), diff --git a/datafusion/expr/Cargo.toml b/datafusion/expr/Cargo.toml index afa2be239ffe..b3a3ad234a59 100644 --- a/datafusion/expr/Cargo.toml +++ b/datafusion/expr/Cargo.toml @@ -36,7 +36,7 @@ path = "src/lib.rs" [dependencies] ahash = { version = "0.8", default-features = false, features = ["runtime-rng"] } -arrow = { version = "25.0.0", default-features = false } +arrow = { version = "26.0.0", default-features = false } datafusion-common = { path = "../common", version = "13.0.0" } log = "^0.4" sqlparser = "0.26" diff --git a/datafusion/expr/src/function.rs b/datafusion/expr/src/function.rs index 515cce980fd9..867ad5de7451 100644 --- a/datafusion/expr/src/function.rs +++ b/datafusion/expr/src/function.rs @@ -220,7 +220,7 @@ pub fn return_type( } BuiltinScalarFunction::Now => Ok(DataType::Timestamp( TimeUnit::Nanosecond, - Some("UTC".to_owned()), + Some("+00:00".to_owned()), )), BuiltinScalarFunction::CurrentDate => Ok(DataType::Date32), BuiltinScalarFunction::CurrentTime => Ok(DataType::Time64(TimeUnit::Nanosecond)), diff --git a/datafusion/jit/Cargo.toml b/datafusion/jit/Cargo.toml index 398c658b4065..e9ad22323c5d 100644 --- a/datafusion/jit/Cargo.toml +++ b/datafusion/jit/Cargo.toml @@ -36,7 +36,7 @@ path = "src/lib.rs" jit = [] [dependencies] -arrow = { version = "25.0.0", default-features = false } +arrow = { version = "26.0.0", default-features = false } cranelift = "0.89.0" cranelift-jit = "0.89.0" cranelift-module = "0.89.0" diff --git a/datafusion/optimizer/Cargo.toml b/datafusion/optimizer/Cargo.toml index 729e2306dfb0..343cf9d7060b 100644 --- a/datafusion/optimizer/Cargo.toml +++ b/datafusion/optimizer/Cargo.toml @@ -37,7 +37,7 @@ default = ["unicode_expressions"] unicode_expressions = [] [dependencies] -arrow = { version = "25.0.0", features = ["prettyprint"] } +arrow = { version = "26.0.0", features = ["prettyprint"] } async-trait = "0.1.41" chrono = { version = "0.4.22", default-features = false } datafusion-common = { path = "../common", version = "13.0.0" } diff --git a/datafusion/optimizer/src/simplify_expressions/simplify_exprs.rs b/datafusion/optimizer/src/simplify_expressions/simplify_exprs.rs index 3fda5817f98b..b08d0fafcf4a 100644 --- a/datafusion/optimizer/src/simplify_expressions/simplify_exprs.rs +++ b/datafusion/optimizer/src/simplify_expressions/simplify_exprs.rs @@ -516,7 +516,7 @@ mod tests { // expect the same timestamp appears in both exprs let actual = get_optimized_plan_formatted(&plan, &time); let expected = format!( - "Projection: TimestampNanosecond({}, Some(\"UTC\")) AS now(), TimestampNanosecond({}, Some(\"UTC\")) AS t2\ + "Projection: TimestampNanosecond({}, Some(\"+00:00\")) AS now(), TimestampNanosecond({}, Some(\"+00:00\")) AS t2\ \n TableScan: test", time.timestamp_nanos(), time.timestamp_nanos() diff --git a/datafusion/optimizer/tests/integration-test.rs b/datafusion/optimizer/tests/integration-test.rs index 8d59f6bab78b..b6931586e4fa 100644 --- a/datafusion/optimizer/tests/integration-test.rs +++ b/datafusion/optimizer/tests/integration-test.rs @@ -227,8 +227,6 @@ fn concat_ws_literals() -> Result<()> { } #[test] -#[ignore] -// https://github.com/apache/arrow-datafusion/issues/3938 fn timestamp_nano_ts_none_predicates() -> Result<()> { let sql = "SELECT col_int32 FROM test @@ -237,25 +235,26 @@ fn timestamp_nano_ts_none_predicates() -> Result<()> { // a scan should have the now()... predicate folded to a single // constant and compared to the column without a cast so it can be // pushed down / pruned - let expected = "Projection: test.col_int32\n Filter: test.col_ts_nano_utc < TimestampNanosecond(1666612093000000000, Some(\"UTC\"))\ - \n TableScan: test projection=[col_int32, col_ts_nano_none]"; + let expected = + "Projection: test.col_int32\n Filter: CAST(test.col_ts_nano_none AS Timestamp(Nanosecond, Some(\"+00:00\"))) < TimestampNanosecond(1666612093000000000, Some(\"+00:00\"))\ + \n TableScan: test projection=[col_int32, col_ts_nano_none]"; assert_eq!(expected, format!("{:?}", plan)); Ok(()) } #[test] -fn timestamp_nano_ts_utc_predicates() -> Result<()> { +fn timestamp_nano_ts_utc_predicates() { let sql = "SELECT col_int32 FROM test WHERE col_ts_nano_utc < (now() - interval '1 hour')"; - let plan = test_sql(sql)?; + let plan = test_sql(sql).unwrap(); // a scan should have the now()... predicate folded to a single // constant and compared to the column without a cast so it can be // pushed down / pruned - let expected = "Projection: test.col_int32\n Filter: test.col_ts_nano_utc < TimestampNanosecond(1666612093000000000, Some(\"UTC\"))\ - \n TableScan: test projection=[col_int32, col_ts_nano_utc]"; + let expected = + "Projection: test.col_int32\n Filter: test.col_ts_nano_utc < TimestampNanosecond(1666612093000000000, Some(\"+00:00\"))\ + \n TableScan: test projection=[col_int32, col_ts_nano_utc]"; assert_eq!(expected, format!("{:?}", plan)); - Ok(()) } fn test_sql(sql: &str) -> Result { @@ -305,7 +304,7 @@ impl ContextProvider for MySchemaProvider { // timestamp with UTC timezone Field::new( "col_ts_nano_utc", - DataType::Timestamp(TimeUnit::Nanosecond, Some("UTC".into())), + DataType::Timestamp(TimeUnit::Nanosecond, Some("+00:00".into())), true, ), ], diff --git a/datafusion/physical-expr/Cargo.toml b/datafusion/physical-expr/Cargo.toml index 0b2d72dd3d27..d3e2c7a70b21 100644 --- a/datafusion/physical-expr/Cargo.toml +++ b/datafusion/physical-expr/Cargo.toml @@ -40,9 +40,9 @@ unicode_expressions = ["unicode-segmentation"] [dependencies] ahash = { version = "0.8", default-features = false, features = ["runtime-rng"] } -arrow = { version = "25.0.0", features = ["prettyprint"] } -arrow-buffer = "25.0.0" -arrow-schema = "25.0.0" +arrow = { version = "26.0.0", features = ["prettyprint"] } +arrow-buffer = "26.0.0" +arrow-schema = "26.0.0" blake2 = { version = "^0.10.2", optional = true } blake3 = { version = "1.0", optional = true } chrono = { version = "0.4.22", default-features = false } diff --git a/datafusion/physical-expr/src/datetime_expressions.rs b/datafusion/physical-expr/src/datetime_expressions.rs index 48f093a2fc75..041d7c0eeb7d 100644 --- a/datafusion/physical-expr/src/datetime_expressions.rs +++ b/datafusion/physical-expr/src/datetime_expressions.rs @@ -180,7 +180,7 @@ pub fn make_now( move |_arg| { Ok(ColumnarValue::Scalar(ScalarValue::TimestampNanosecond( now_ts, - Some("UTC".to_owned()), + Some("+00:00".to_owned()), ))) } } @@ -218,7 +218,11 @@ fn quarter_month(date: &NaiveDateTime) -> u32 { } fn date_trunc_single(granularity: &str, value: i64) -> Result { - let value = timestamp_ns_to_datetime(value).with_nanosecond(0); + let value = timestamp_ns_to_datetime(value) + .ok_or_else(|| { + DataFusionError::Execution(format!("Timestamp {} out of range", value)) + })? + .with_nanosecond(0); let value = match granularity { "second" => value, "minute" => value.and_then(|d| d.with_second(0)), diff --git a/datafusion/proto/Cargo.toml b/datafusion/proto/Cargo.toml index eb2e20b01993..823001c20cce 100644 --- a/datafusion/proto/Cargo.toml +++ b/datafusion/proto/Cargo.toml @@ -40,7 +40,7 @@ default = [] json = ["pbjson", "serde", "serde_json"] [dependencies] -arrow = "25.0.0" +arrow = "26.0.0" datafusion = { path = "../core", version = "13.0.0" } datafusion-common = { path = "../common", version = "13.0.0" } datafusion-expr = { path = "../expr", version = "13.0.0" } diff --git a/datafusion/row/Cargo.toml b/datafusion/row/Cargo.toml index 52e6e50c7e85..794882025a38 100644 --- a/datafusion/row/Cargo.toml +++ b/datafusion/row/Cargo.toml @@ -37,7 +37,7 @@ path = "src/lib.rs" jit = ["datafusion-jit"] [dependencies] -arrow = "25.0.0" +arrow = "26.0.0" datafusion-common = { path = "../common", version = "13.0.0" } datafusion-jit = { path = "../jit", version = "13.0.0", optional = true } paste = "^1.0" diff --git a/datafusion/sql/Cargo.toml b/datafusion/sql/Cargo.toml index 44f3860f676a..ebffcb8a0b69 100644 --- a/datafusion/sql/Cargo.toml +++ b/datafusion/sql/Cargo.toml @@ -37,7 +37,7 @@ default = ["unicode_expressions"] unicode_expressions = [] [dependencies] -arrow = { version = "25.0.0", default-features = false } +arrow = { version = "26.0.0", default-features = false } datafusion-common = { path = "../common", version = "13.0.0" } datafusion-expr = { path = "../expr", version = "13.0.0" } sqlparser = "0.26" diff --git a/datafusion/sql/src/planner.rs b/datafusion/sql/src/planner.rs index 2bc854f2e0a7..b51ce83d5d01 100644 --- a/datafusion/sql/src/planner.rs +++ b/datafusion/sql/src/planner.rs @@ -2833,7 +2833,7 @@ pub fn convert_simple_data_type(sql_type: &SQLDataType) -> Result { let tz = if matches!(tz_info, TimezoneInfo::Tz) || matches!(tz_info, TimezoneInfo::WithTimeZone) { - Some("UTC".to_string()) + Some("+00:00".to_string()) } else { None }; diff --git a/parquet-test-utils/Cargo.toml b/parquet-test-utils/Cargo.toml index 599cdc35b17f..5d917490b950 100644 --- a/parquet-test-utils/Cargo.toml +++ b/parquet-test-utils/Cargo.toml @@ -25,4 +25,4 @@ edition = "2021" [dependencies] datafusion = { path = "../datafusion/core" } object_store = "0.5.0" -parquet = "25.0.0" +parquet = "26.0.0" diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index 85d1c0233880..358b6a919d8e 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -23,6 +23,6 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -arrow = { version = "25.0.0", features = ["prettyprint"] } +arrow = { version = "26.0.0", features = ["prettyprint"] } env_logger = "0.9.0" rand = "0.8"