diff --git a/Cargo.lock b/Cargo.lock index 9829647c..bd9977c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -192,44 +192,32 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "arrow" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4caf25cdc4a985f91df42ed9e9308e1adbcd341a31a72605c697033fcef163e3" dependencies = [ - "arrow-arith 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-arith", "arrow-array", "arrow-buffer", - "arrow-cast 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-cast", "arrow-csv", "arrow-data", "arrow-ipc", - "arrow-json 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", - "arrow-ord 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-json", + "arrow-ord", "arrow-row", "arrow-schema", - "arrow-select 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", - "arrow-string 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-select", + "arrow-string", + "chrono", "rand", ] [[package]] name = "arrow-arith" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8a57966e43bfe9a3277984a14c24ec617ad874e4c0e1d2a1b083a39cfbf22c" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "chrono", - "half", - "num", -] - -[[package]] -name = "arrow-arith" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +checksum = "91f2dfd1a7ec0aca967dfaa616096aec49779adc8eccec005e2f5e4111b1192a" dependencies = [ "arrow-array", "arrow-buffer", @@ -242,8 +230,9 @@ dependencies = [ [[package]] name = "arrow-array" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d39387ca628be747394890a6e47f138ceac1aa912eab64f02519fed24b637af8" dependencies = [ "ahash 0.8.11", "arrow-buffer", @@ -258,8 +247,9 @@ dependencies = [ [[package]] name = "arrow-buffer" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e51e05228852ffe3eb391ce7178a0f97d2cf80cc6ef91d3c4a6b3cb688049ec" dependencies = [ "bytes", "half", @@ -268,66 +258,49 @@ dependencies = [ [[package]] name = "arrow-cast" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da26719e76b81d8bc3faad1d4dbdc1bcc10d14704e63dc17fc9f3e7e1e567c8e" +checksum = "d09aea56ec9fa267f3f3f6cdab67d8a9974cbba90b3aa38c8fe9d0bb071bd8c1" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", - "arrow-select 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atoi", - "base64 0.22.1", - "chrono", - "half", - "lexical-core", - "num", - "ryu", -] - -[[package]] -name = "arrow-cast" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-select", "atoi", "base64 0.22.1", "chrono", "comfy-table", "half", - "lexical-core", + "lexical-core 1.0.2", "num", "ryu", ] [[package]] name = "arrow-csv" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07b5232be87d115fde73e32f2ca7f1b353bff1b44ac422d3c6fc6ae38f11f0d" dependencies = [ "arrow-array", "arrow-buffer", - "arrow-cast 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-cast", "arrow-data", "arrow-schema", "chrono", "csv", "csv-core", "lazy_static", - "lexical-core", + "lexical-core 1.0.2", "regex", ] [[package]] name = "arrow-data" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98ae0af50890b494cebd7d6b04b35e896205c1d1df7b29a6272c5d0d0249ef5" dependencies = [ "arrow-buffer", "arrow-schema", @@ -337,20 +310,21 @@ dependencies = [ [[package]] name = "arrow-flight" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703620bf755500804893dc4b42982b8a33ee20d7c20c9c3ab3490a1d0f7cf641" dependencies = [ - "arrow-arith 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-arith", "arrow-array", "arrow-buffer", - "arrow-cast 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-cast", "arrow-data", "arrow-ipc", - "arrow-ord 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-ord", "arrow-row", "arrow-schema", - "arrow-select 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", - "arrow-string 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-select", + "arrow-string", "base64 0.22.1", "bytes", "futures", @@ -364,8 +338,9 @@ dependencies = [ [[package]] name = "arrow-integration-test" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a40356378f4151b906f82f235f4b96e4a7994e2a7dec6fdfeba5c916d1425a87" dependencies = [ "arrow", "arrow-buffer", @@ -377,12 +352,13 @@ dependencies = [ [[package]] name = "arrow-ipc" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed91bdeaff5a1c00d28d8f73466bcb64d32bbd7093b5a30156b4b9f4dba3eee" dependencies = [ "arrow-array", "arrow-buffer", - "arrow-cast 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-cast", "arrow-data", "arrow-schema", "flatbuffers", @@ -391,38 +367,19 @@ dependencies = [ [[package]] name = "arrow-json" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb22284c5a2a01d73cebfd88a33511a3234ab45d66086b2ca2d1228c3498e445" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-cast 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "arrow-data", - "arrow-schema", - "chrono", - "half", - "indexmap 2.6.0", - "lexical-core", - "num", - "serde", - "serde_json", -] - -[[package]] -name = "arrow-json" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +checksum = "0471f51260a5309307e5d409c9dc70aede1cd9cf1d4ff0f0a1e8e1a2dd0e0d3c" dependencies = [ "arrow-array", "arrow-buffer", - "arrow-cast 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-cast", "arrow-data", "arrow-schema", "chrono", "half", "indexmap 2.6.0", - "lexical-core", + "lexical-core 1.0.2", "num", "serde", "serde_json", @@ -430,37 +387,24 @@ dependencies = [ [[package]] name = "arrow-ord" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42745f86b1ab99ef96d1c0bcf49180848a64fe2c7a7a0d945bc64fa2b21ba9bc" +checksum = "2883d7035e0b600fb4c30ce1e50e66e53d8656aa729f2bfa4b51d359cf3ded52" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", - "arrow-select 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "half", - "num", -] - -[[package]] -name = "arrow-ord" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-select", "half", "num", ] [[package]] name = "arrow-row" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552907e8e587a6fde4f8843fd7a27a576a260f65dab6c065741ea79f633fc5be" dependencies = [ "ahash 0.8.11", "arrow-array", @@ -472,8 +416,9 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "539ada65246b949bd99ffa0881a9a15a4a529448af1a07a9838dd78617dafab1" dependencies = [ "bitflags 2.6.0", "serde", @@ -481,22 +426,9 @@ dependencies = [ [[package]] name = "arrow-select" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600bae05d43483d216fb3494f8c32fdbefd8aa4e1de237e790dbb3d9f44690a3" -dependencies = [ - "ahash 0.8.11", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "num", -] - -[[package]] -name = "arrow-select" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" +checksum = "6259e566b752da6dceab91766ed8b2e67bf6270eb9ad8a6e07a33c1bede2b125" dependencies = [ "ahash 0.8.11", "arrow-array", @@ -508,31 +440,15 @@ dependencies = [ [[package]] name = "arrow-string" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dc1985b67cb45f6606a248ac2b4a288849f196bab8c657ea5589f47cdd55e6" +checksum = "f3179ccbd18ebf04277a095ba7321b93fd1f774f18816bd5f6b3ce2f594edb6c" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", - "arrow-select 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr", - "num", - "regex", - "regex-syntax 0.8.5", -] - -[[package]] -name = "arrow-string" -version = "52.2.0" -source = "git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729#edb549a7489562de1b3748d67e78ecfaf7fcd957" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-select", "memchr", "num", "regex", @@ -995,18 +911,17 @@ dependencies = [ [[package]] name = "axum" -version = "0.6.20" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.31", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "itoa", "matchit", "memchr", @@ -1015,25 +930,28 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper 0.1.2", - "tower 0.4.13", + "sync_wrapper 1.0.1", + "tower 0.5.1", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", ] @@ -1223,9 +1141,9 @@ dependencies = [ [[package]] name = "brotli" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1514,9 +1432,9 @@ dependencies = [ [[package]] name = "chrono-tz" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" +checksum = "cd6dd8046d00723a59a2f8c5f295c515b9bb9a331ee4f8f3d4dd49e428acd3b6" dependencies = [ "chrono", "chrono-tz-build", @@ -1525,12 +1443,11 @@ dependencies = [ [[package]] name = "chrono-tz-build" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c088aee841df9c3041febbb73934cfc39708749bf96dc827e3359cd39ef11b1" +checksum = "e94fea34d77a245229e7746bd2beb786cd2a896f306ff491fb8cecb3074b10a7" dependencies = [ "parse-zoneinfo", - "phf", "phf_codegen", ] @@ -1666,8 +1583,8 @@ dependencies = [ [[package]] name = "connectorx" -version = "0.3.4-alpha.2" -source = "git+https://github.com/splitgraph/connector-x?branch=datafusion-41-upgrade#76e82fd1530f83d0429be2a180b115b25f98f666" +version = "0.4.0" +source = "git+https://github.com/splitgraph/connector-x?branch=datafusion-43-upgrade#41e481632d34c87a9874bb55934ecc0a1aa07311" dependencies = [ "anyhow", "arrow", @@ -1737,13 +1654,13 @@ checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convergence" version = "0.16.0" -source = "git+https://github.com/splitgraph/convergence?branch=datafusion-41-upgrade#b1332ba41b6c03b70c4912b353925dc8f30be97d" +source = "git+https://github.com/splitgraph/convergence?branch=datafusion-43-upgrade#fe90ba47075dafa811feb671fd4070052a183301" dependencies = [ "async-trait", "bytes", "chrono", "futures", - "sqlparser 0.49.0", + "sqlparser 0.51.0", "thiserror 1.0.69", "tokio", "tokio-util", @@ -1752,7 +1669,7 @@ dependencies = [ [[package]] name = "convergence-arrow" version = "0.16.0" -source = "git+https://github.com/splitgraph/convergence?branch=datafusion-41-upgrade#b1332ba41b6c03b70c4912b353925dc8f30be97d" +source = "git+https://github.com/splitgraph/convergence?branch=datafusion-43-upgrade#fe90ba47075dafa811feb671fd4070052a183301" dependencies = [ "async-trait", "chrono", @@ -2206,9 +2123,9 @@ checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "datafusion" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4fd4a99fc70d40ef7e52b243b4a399c3f8d353a40d5ecb200deee05e49c61bb" +checksum = "cbba0799cf6913b456ed07a94f0f3b6e12c62a5d88b10809e2284a0f2b915c05" dependencies = [ "ahash 0.8.11", "arrow", @@ -2229,6 +2146,7 @@ dependencies = [ "datafusion-functions", "datafusion-functions-aggregate", "datafusion-functions-nested", + "datafusion-functions-window", "datafusion-optimizer", "datafusion-physical-expr", "datafusion-physical-expr-common", @@ -2241,7 +2159,7 @@ dependencies = [ "half", "hashbrown 0.14.5", "indexmap 2.6.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "num_cpus", "object_store", @@ -2250,7 +2168,7 @@ dependencies = [ "paste", "pin-project-lite", "rand", - "sqlparser 0.49.0", + "sqlparser 0.51.0", "tempfile", "tokio", "tokio-util", @@ -2262,9 +2180,9 @@ dependencies = [ [[package]] name = "datafusion-catalog" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13b3cfbd84c6003594ae1972314e3df303a27ce8ce755fcea3240c90f4c0529" +checksum = "7493c5c2d40eec435b13d92e5703554f4efc7059451fcb8d3a79580ff0e45560" dependencies = [ "arrow-schema", "async-trait", @@ -2272,13 +2190,14 @@ dependencies = [ "datafusion-execution", "datafusion-expr", "datafusion-physical-plan", + "parking_lot", ] [[package]] name = "datafusion-common" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fdbc877e3e40dcf88cc8f283d9f5c8851f0a3aa07fee657b1b75ac1ad49b9c" +checksum = "24953049ebbd6f8964f91f60aa3514e121b5e81e068e33b60e77815ab369b25c" dependencies = [ "ahash 0.8.11", "arrow", @@ -2288,28 +2207,32 @@ dependencies = [ "chrono", "half", "hashbrown 0.14.5", + "indexmap 2.6.0", "instant", "libc", "num_cpus", "object_store", "parquet", - "sqlparser 0.49.0", + "paste", + "sqlparser 0.51.0", + "tokio", ] [[package]] name = "datafusion-common-runtime" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7496d1f664179f6ce3a5cbef6566056ccaf3ea4aa72cc455f80e62c1dd86b1" +checksum = "f06df4ef76872e11c924d3c814fd2a8dd09905ed2e2195f71c857d78abd19685" dependencies = [ + "log", "tokio", ] [[package]] name = "datafusion-execution" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799e70968c815b611116951e3dd876aef04bf217da31b72eec01ee6a959336a1" +checksum = "6bbdcb628d690f3ce5fea7de81642b514486d58ff9779a51f180a69a4eadb361" dependencies = [ "arrow", "chrono", @@ -2328,9 +2251,9 @@ dependencies = [ [[package]] name = "datafusion-expr" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c1841c409d9518c17971d15c9bae62e629eb937e6fb6c68cd32e9186f8b30d2" +checksum = "8036495980e3131f706b7d33ab00b4492d73dc714e3cb74d11b50f9602a73246" dependencies = [ "ahash 0.8.11", "arrow", @@ -2338,18 +2261,35 @@ dependencies = [ "arrow-buffer", "chrono", "datafusion-common", + "datafusion-expr-common", + "datafusion-functions-aggregate-common", + "datafusion-functions-window-common", + "datafusion-physical-expr-common", + "indexmap 2.6.0", "paste", "serde_json", - "sqlparser 0.49.0", + "sqlparser 0.51.0", "strum", "strum_macros", ] +[[package]] +name = "datafusion-expr-common" +version = "43.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4da0f3cb4669f9523b403d6b5a0ec85023e0ab3bf0183afd1517475b3e64fdd2" +dependencies = [ + "arrow", + "datafusion-common", + "itertools 0.13.0", + "paste", +] + [[package]] name = "datafusion-functions" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8e481cf34d2a444bd8fa09b65945f0ce83dc92df8665b761505b3d9f351bebb" +checksum = "f52c4012648b34853e40a2c6bcaa8772f837831019b68aca384fb38436dba162" dependencies = [ "arrow", "arrow-buffer", @@ -2362,7 +2302,7 @@ dependencies = [ "datafusion-expr", "hashbrown 0.14.5", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "log", "md-5", "rand", @@ -2374,9 +2314,9 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b4ece19f73c02727e5e8654d79cd5652de371352c1df3c4ac3e419ecd6943fb" +checksum = "e5b8bb624597ba28ed7446df4a9bd7c7a7bde7c578b6b527da3f47371d5f6741" dependencies = [ "ahash 0.8.11", "arrow", @@ -2384,39 +2324,82 @@ dependencies = [ "datafusion-common", "datafusion-execution", "datafusion-expr", + "datafusion-functions-aggregate-common", + "datafusion-physical-expr", "datafusion-physical-expr-common", + "half", + "indexmap 2.6.0", "log", "paste", - "sqlparser 0.49.0", +] + +[[package]] +name = "datafusion-functions-aggregate-common" +version = "43.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb06208fc470bc8cf1ce2d9a1159d42db591f2c7264a8c1776b53ad8f675143" +dependencies = [ + "ahash 0.8.11", + "arrow", + "datafusion-common", + "datafusion-expr-common", + "datafusion-physical-expr-common", + "rand", ] [[package]] name = "datafusion-functions-nested" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1474552cc824e8c9c88177d454db5781d4b66757d4aca75719306b8343a5e8d" +checksum = "fca25bbb87323716d05e54114666e942172ccca23c5a507e9c7851db6e965317" dependencies = [ "arrow", "arrow-array", "arrow-buffer", - "arrow-ord 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrow-ord", "arrow-schema", "datafusion-common", "datafusion-execution", "datafusion-expr", "datafusion-functions", "datafusion-functions-aggregate", - "itertools 0.12.1", + "datafusion-physical-expr-common", + "itertools 0.13.0", "log", "paste", "rand", ] +[[package]] +name = "datafusion-functions-window" +version = "43.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ae23356c634e54c59f7c51acb7a5b9f6240ffb2cf997049a1a24a8a88598dbe" +dependencies = [ + "datafusion-common", + "datafusion-expr", + "datafusion-functions-window-common", + "datafusion-physical-expr", + "datafusion-physical-expr-common", + "log", + "paste", +] + +[[package]] +name = "datafusion-functions-window-common" +version = "43.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b3d6ff7794acea026de36007077a06b18b89e4f9c3fea7f2215f9f7dd9059b" +dependencies = [ + "datafusion-common", + "datafusion-physical-expr-common", +] + [[package]] name = "datafusion-optimizer" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791ff56f55608bc542d1ea7a68a64bdc86a9413f5a381d06a39fd49c2a3ab906" +checksum = "bec6241eb80c595fa0e1a8a6b69686b5cf3bd5fdacb8319582a0943b0bd788aa" dependencies = [ "arrow", "async-trait", @@ -2426,7 +2409,7 @@ dependencies = [ "datafusion-physical-expr", "hashbrown 0.14.5", "indexmap 2.6.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "paste", "regex-syntax 0.8.5", @@ -2434,71 +2417,73 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a223962b3041304a3e20ed07a21d5de3d88d7e4e71ca192135db6d24e3365a4" +checksum = "3370357b8fc75ec38577700644e5d1b0bc78f38babab99c0b8bd26bafb3e4335" dependencies = [ "ahash 0.8.11", "arrow", "arrow-array", "arrow-buffer", - "arrow-ord 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrow-ord", "arrow-schema", - "arrow-string 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.22.1", + "arrow-string", "chrono", "datafusion-common", - "datafusion-execution", "datafusion-expr", + "datafusion-expr-common", + "datafusion-functions-aggregate-common", "datafusion-physical-expr-common", "half", "hashbrown 0.14.5", - "hex", "indexmap 2.6.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "paste", "petgraph", - "regex", ] [[package]] name = "datafusion-physical-expr-common" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db5e7d8532a1601cd916881db87a70b0a599900d23f3db2897d389032da53bc6" +checksum = "b8b7734d94bf2fa6f6e570935b0ddddd8421179ce200065be97874e13d46a47b" dependencies = [ "ahash 0.8.11", "arrow", "datafusion-common", - "datafusion-expr", + "datafusion-expr-common", "hashbrown 0.14.5", "rand", ] [[package]] name = "datafusion-physical-optimizer" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb9c78f308e050f5004671039786a925c3fee83b90004e9fcfd328d7febdcc0" +checksum = "7eee8c479522df21d7b395640dff88c5ed05361852dce6544d7c98e9dbcebffe" dependencies = [ + "arrow", + "arrow-schema", "datafusion-common", "datafusion-execution", + "datafusion-expr-common", "datafusion-physical-expr", "datafusion-physical-plan", + "itertools 0.13.0", ] [[package]] name = "datafusion-physical-plan" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d1116949432eb2d30f6362707e2846d942e491052a206f2ddcb42d08aea1ffe" +checksum = "17e1fc2e2c239d14e8556f2622b19a726bf6bc6962cc00c71fc52626274bee24" dependencies = [ "ahash 0.8.11", "arrow", "arrow-array", "arrow-buffer", - "arrow-ord 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrow-ord", "arrow-schema", "async-trait", "chrono", @@ -2506,14 +2491,15 @@ dependencies = [ "datafusion-common-runtime", "datafusion-execution", "datafusion-expr", - "datafusion-functions-aggregate", + "datafusion-functions-aggregate-common", + "datafusion-functions-window-common", "datafusion-physical-expr", "datafusion-physical-expr-common", "futures", "half", "hashbrown 0.14.5", "indexmap 2.6.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "once_cell", "parking_lot", @@ -2524,9 +2510,9 @@ dependencies = [ [[package]] name = "datafusion-proto" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1d25864c18178d0e51438648f5e0fa08417dbbc39b642c1752cbbb1013abf0" +checksum = "f730f7fc5a20134d4e5ecdf7bbf392002ac58163d58423ea28a702dc077b06e1" dependencies = [ "arrow", "chrono", @@ -2540,9 +2526,9 @@ dependencies = [ [[package]] name = "datafusion-proto-common" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a683253732334526b1cc5314a73a0f786803831f7e189ed3fe387ac50d7222" +checksum = "12c225fe49e4f943e35446b263613ada7a9e9f8d647544e6b07037b9803567df" dependencies = [ "arrow", "chrono", @@ -2571,18 +2557,19 @@ dependencies = [ [[package]] name = "datafusion-sql" -version = "41.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45d0180711165fe94015d7c4123eb3e1cf5fb60b1506453200b8d1ce666bef0" +checksum = "63e3a4ed41dbee20a5d947a59ca035c225d67dc9cbe869c10f66dcdf25e7ce51" dependencies = [ "arrow", "arrow-array", "arrow-schema", "datafusion-common", "datafusion-expr", + "indexmap 2.6.0", "log", "regex", - "sqlparser 0.49.0", + "sqlparser 0.51.0", "strum", ] @@ -2615,17 +2602,18 @@ dependencies = [ [[package]] name = "delta_kernel" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa08a82239f51e6d3d249c38f0f5bf7c8a78b28587e1b466893c9eac84d252d8" +checksum = "16155315d01e177d0d2217fbe972f03b1383b1618a07955b2e38e853cdf0e77b" dependencies = [ - "arrow-arith 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrow-arith", "arrow-array", - "arrow-cast 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "arrow-json 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "arrow-ord 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrow-buffer", + "arrow-cast", + "arrow-json", + "arrow-ord", "arrow-schema", - "arrow-select 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrow-select", "bytes", "chrono", "delta_kernel_derive", @@ -2661,28 +2649,28 @@ dependencies = [ [[package]] name = "deltalake" -version = "0.20.1" -source = "git+https://github.com/splitgraph/delta-rs?branch=pr-2975-with-arrow-pr-6729-backport#d16af1723265f5ec7ff37d012c202772fe7845a7" +version = "0.22.0" +source = "git+https://github.com/splitgraph/delta-rs?branch=fix-decimal-stat-overflow#3012da568e8a5e4707016dd5f92abee8f3431c75" dependencies = [ "deltalake-core", ] [[package]] name = "deltalake-core" -version = "0.20.1" -source = "git+https://github.com/splitgraph/delta-rs?branch=pr-2975-with-arrow-pr-6729-backport#d16af1723265f5ec7ff37d012c202772fe7845a7" +version = "0.22.0" +source = "git+https://github.com/splitgraph/delta-rs?branch=fix-decimal-stat-overflow#3012da568e8a5e4707016dd5f92abee8f3431c75" dependencies = [ "arrow", - "arrow-arith 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-arith", "arrow-array", "arrow-buffer", - "arrow-cast 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-cast", "arrow-ipc", - "arrow-json 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", - "arrow-ord 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-json", + "arrow-ord", "arrow-row", "arrow-schema", - "arrow-select 52.2.0 (git+https://github.com/splitgraph/arrow-rs?branch=backport-pr6729)", + "arrow-select", "async-trait", "bytes", "cfg-if", @@ -2723,7 +2711,7 @@ dependencies = [ "serde", "serde_json", "sqlparser 0.51.0", - "thiserror 1.0.69", + "thiserror 2.0.3", "tokio", "tracing", "url", @@ -3713,14 +3701,15 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 0.14.31", + "hyper 1.5.0", + "hyper-util", "pin-project-lite", "tokio", - "tokio-io-timeout", + "tower-service", ] [[package]] @@ -4117,7 +4106,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7aefb36fd43fef7003334742cbf77b243fcd36418a1d1bdd480d613a67968f6" dependencies = [ - "lexical-core", + "lexical-core 0.8.5", ] [[package]] @@ -4126,11 +4115,24 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" dependencies = [ - "lexical-parse-float", - "lexical-parse-integer", - "lexical-util", - "lexical-write-float", - "lexical-write-integer", + "lexical-parse-float 0.8.5", + "lexical-parse-integer 0.8.6", + "lexical-util 0.8.5", + "lexical-write-float 0.8.5", + "lexical-write-integer 0.8.5", +] + +[[package]] +name = "lexical-core" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0431c65b318a590c1de6b8fd6e72798c92291d27762d94c9e6c37ed7a73d8458" +dependencies = [ + "lexical-parse-float 1.0.2", + "lexical-parse-integer 1.0.2", + "lexical-util 1.0.3", + "lexical-write-float 1.0.2", + "lexical-write-integer 1.0.2", ] [[package]] @@ -4139,8 +4141,19 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" dependencies = [ - "lexical-parse-integer", - "lexical-util", + "lexical-parse-integer 0.8.6", + "lexical-util 0.8.5", + "static_assertions", +] + +[[package]] +name = "lexical-parse-float" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb17a4bdb9b418051aa59d41d65b1c9be5affab314a872e5ad7f06231fb3b4e0" +dependencies = [ + "lexical-parse-integer 1.0.2", + "lexical-util 1.0.3", "static_assertions", ] @@ -4150,7 +4163,17 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" dependencies = [ - "lexical-util", + "lexical-util 0.8.5", + "static_assertions", +] + +[[package]] +name = "lexical-parse-integer" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df98f4a4ab53bf8b175b363a34c7af608fe31f93cc1fb1bf07130622ca4ef61" +dependencies = [ + "lexical-util 1.0.3", "static_assertions", ] @@ -4163,14 +4186,34 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "lexical-util" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85314db53332e5c192b6bca611fb10c114a80d1b831ddac0af1e9be1b9232ca0" +dependencies = [ + "static_assertions", +] + [[package]] name = "lexical-write-float" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" dependencies = [ - "lexical-util", - "lexical-write-integer", + "lexical-util 0.8.5", + "lexical-write-integer 0.8.5", + "static_assertions", +] + +[[package]] +name = "lexical-write-float" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e7c3ad4e37db81c1cbe7cf34610340adc09c322871972f74877a712abc6c809" +dependencies = [ + "lexical-util 1.0.3", + "lexical-write-integer 1.0.2", "static_assertions", ] @@ -4180,7 +4223,17 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" dependencies = [ - "lexical-util", + "lexical-util 0.8.5", + "static_assertions", +] + +[[package]] +name = "lexical-write-integer" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb89e9f6958b83258afa3deed90b5de9ef68eef090ad5086c791cd2345610162" +dependencies = [ + "lexical-util 1.0.3", "static_assertions", ] @@ -4783,9 +4836,9 @@ dependencies = [ [[package]] name = "object_store" -version = "0.10.2" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6da452820c715ce78221e8202ccc599b4a52f3e1eb3eedb487b680c81a8e3f3" +checksum = "6eb4c22c6154a1e759d7099f9ffad7cc5ef8245f9efbab4a41b92623079c82f3" dependencies = [ "async-trait", "base64 0.22.1", @@ -4961,18 +5014,18 @@ dependencies = [ [[package]] name = "parquet" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e977b9066b4d3b03555c22bdc442f3fadebd96a39111249113087d0edb2691cd" +checksum = "dea02606ba6f5e856561d8d507dba8bac060aefca2a6c0f1aa1d361fed91ff3e" dependencies = [ "ahash 0.8.11", "arrow-array", "arrow-buffer", - "arrow-cast 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrow-cast", "arrow-data", "arrow-ipc", "arrow-schema", - "arrow-select 52.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrow-select", "base64 0.22.1", "brotli", "bytes", @@ -5361,9 +5414,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.6" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", "prost-derive", @@ -5371,13 +5424,13 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.12.6" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" dependencies = [ "bytes", "heck 0.5.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "multimap", "once_cell", @@ -5392,12 +5445,12 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.6" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.13.0", "proc-macro2", "quote", "syn 2.0.87", @@ -5405,9 +5458,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.12.6" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" dependencies = [ "prost", ] @@ -6304,7 +6357,7 @@ dependencies = [ "serde_json", "serial_test", "sha2", - "sqlparser 0.49.0", + "sqlparser 0.51.0", "sqlx", "strum", "strum_macros", @@ -6568,24 +6621,23 @@ dependencies = [ [[package]] name = "snafu" -version = "0.7.5" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" +checksum = "223891c85e2a29c3fe8fb900c1fae5e69c2e42415e3177752e8718475efa5019" dependencies = [ - "doc-comment", "snafu-derive", ] [[package]] name = "snafu-derive" -version = "0.7.5" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" +checksum = "03c3c6b7927ffe7ecaa769ee0e3994da3b8cafc8f444578982c83ecb161af917" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.87", ] [[package]] @@ -6658,16 +6710,6 @@ dependencies = [ "log", ] -[[package]] -name = "sqlparser" -version = "0.49.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a404d0e14905361b918cb8afdb73605e25c1d5029312bd9785142dcb3aa49e" -dependencies = [ - "log", - "sqlparser_derive", -] - [[package]] name = "sqlparser" version = "0.51.0" @@ -6675,6 +6717,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fe11944a61da0da3f592e19a45ebe5ab92dc14a779907ff1f08fbb797bfefc7" dependencies = [ "log", + "sqlparser_derive", ] [[package]] @@ -7260,16 +7303,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.4.0" @@ -7421,23 +7454,26 @@ dependencies = [ [[package]] name = "tonic" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64 0.22.1", "bytes", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.31", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.5.0", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", "prost", + "socket2 0.5.7", "tokio", "tokio-stream", "tower 0.4.13", @@ -7448,22 +7484,23 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" dependencies = [ "prettyplease", "proc-macro2", "prost-build", + "prost-types", "quote", "syn 2.0.87", ] [[package]] name = "tonic-reflection" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "548c227bd5c0fae5925812c4ec6c66ffcfced23ea370cb823f4d18f0fc1cb6a7" +checksum = "878d81f52e7fcfd80026b7fdb6a9b578b3c3653ba987f87f0dce4b64043cba27" dependencies = [ "prost", "prost-types", @@ -7498,6 +7535,10 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", "tower-layer", "tower-service", ] diff --git a/Cargo.toml b/Cargo.toml index acc1d418..87cf33a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,51 +2,40 @@ members = ["clade", "object_store_factory"] [workspace.dependencies] -arrow = { version = "52.2.0", features = ["test_utils"] } -arrow-buffer = "52.2.0" -arrow-csv = "52.2.0" -arrow-flight = "52.2.0" +arrow = { version = "53.2.0", features = ["test_utils"] } +arrow-buffer = "53.2.0" +arrow-csv = "53.2.0" +arrow-flight = "53.2.0" # For the JSON format support # https://github.com/apache/arrow-rs/pull/2868 # https://github.com/apache/arrow-rs/pull/2724 -arrow-integration-test = "52.2.0" -arrow-row = "52.2.0" -arrow-schema = "52.2.0" +arrow-integration-test = "53.2.0" +arrow-row = "53.2.0" +arrow-schema = "53.2.0" async-trait = "0.1.83" -datafusion = { version = "41.0.0", features = ["backtrace"] } -datafusion-common = "41.0.0" -datafusion-expr = "41.0.0" -datafusion-functions-nested = "41.0.0" +datafusion = { version = "43.0.0", features = ["backtrace"] } +datafusion-common = "43.0.0" +datafusion-expr = "43.0.0" +datafusion-functions-nested = "43.0.0" futures = "0.3" itertools = ">=0.10.0" -object_store = { version = "0.10.2", features = ["aws", "azure", "gcp"] } -prost = "0.12.6" +object_store = { version = "0.11", features = ["aws", "azure", "gcp"] } +prost = "0.13" serde = "1.0.213" serde_json = "1.0.132" tempfile = "3" tokio = { version = "1.40", features = ["macros", "rt", "rt-multi-thread", "signal", "process"] } +tonic = "0.12" tracing = { version = "0.1", features = ["log"] } tracing-log = "0.2" tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] } url = "2.5" -[patch.crates-io] -arrow = { git = "https://github.com/splitgraph/arrow-rs", branch = "backport-pr6729" } -arrow-array = { git = "https://github.com/splitgraph/arrow-rs", branch = "backport-pr6729" } -arrow-buffer = { git = "https://github.com/splitgraph/arrow-rs", branch = "backport-pr6729" } -arrow-csv = { git = "https://github.com/splitgraph/arrow-rs", branch = "backport-pr6729" } -arrow-data = { git = "https://github.com/splitgraph/arrow-rs", branch = "backport-pr6729" } -arrow-flight = { git = "https://github.com/splitgraph/arrow-rs", branch = "backport-pr6729" } -arrow-integration-test = { git = "https://github.com/splitgraph/arrow-rs", branch = "backport-pr6729" } -arrow-ipc = { git = "https://github.com/splitgraph/arrow-rs", branch = "backport-pr6729" } -arrow-row = { git = "https://github.com/splitgraph/arrow-rs", branch = "backport-pr6729" } -arrow-schema = { git = "https://github.com/splitgraph/arrow-rs", branch = "backport-pr6729" } - [package] name = "seafowl" build = "build.rs" @@ -95,8 +84,8 @@ clap = { version = "4.5.21", features = [ "derive" ] } config = "0.14.0" # PG wire protocol support -convergence = { git = "https://github.com/splitgraph/convergence", branch = "datafusion-41-upgrade", optional = true } -convergence-arrow = { git = "https://github.com/splitgraph/convergence", branch = "datafusion-41-upgrade", optional = true } +convergence = { git = "https://github.com/splitgraph/convergence", branch = "datafusion-43-upgrade", optional = true } +convergence-arrow = { git = "https://github.com/splitgraph/convergence", branch = "datafusion-43-upgrade", optional = true } dashmap = "6.1.0" @@ -107,8 +96,7 @@ datafusion-functions-nested = { workspace = true } datafusion-remote-tables = { path = "./datafusion_remote_tables", optional = true } -# pr-2975-backport, pick up https://github.com/delta-io/delta-rs/pull/2975 -deltalake = { git = "https://github.com/splitgraph/delta-rs", branch = "pr-2975-with-arrow-pr-6729-backport", features = ["datafusion"] } +deltalake = { git = "https://github.com/splitgraph/delta-rs", branch = "fix-decimal-stat-overflow", features = ["datafusion"] } futures = "0.3" hex = ">=0.4.0" @@ -118,7 +106,7 @@ lazy_static = ">=1.4.0" metrics = { version = "0.23.0" } metrics-exporter-prometheus = { version = "0.15.3" } moka = { version = "0.12.5", default-features = false, features = ["future", "atomic64", "quanta"] } -object_store = { version = "0.10.2", features = ["aws", "azure", "gcp"] } +object_store = { workspace = true } object_store_factory = { path = "object_store_factory" } percent-encoding = "2.2.0" prost = { workspace = true } @@ -135,7 +123,7 @@ rustyline = "14.0" serde = { workspace = true } serde_json = { workspace = true } sha2 = ">=0.10.1" -sqlparser = { version = "0.49", features = ["visitor"] } +sqlparser = { version = "0.51", features = ["visitor"] } sqlx = { version = "0.7.1", features = [ "runtime-tokio-rustls", "sqlite", "any", "uuid" ] } strum = ">=0.24" strum_macros = ">=0.24" @@ -143,7 +131,7 @@ tempfile = "3" thiserror = "2" tokio = { workspace = true } tokio-graceful-shutdown = { version = "0.15" } -tonic = { version = "0.11.0", optional = true } +tonic = { workspace = true, optional = true } tower = "0.5" tracing = { workspace = true } tracing-log = "0.2" @@ -165,7 +153,7 @@ aws-credential-types = { version = "1.2.1", features = ["hardcoded-credentials"] aws-sdk-sts = { version = "1.46.0", features = ["behavior-version-latest"] } rstest = "*" serial_test = "3" -tonic-reflection = "0.11" +tonic-reflection = "0.12" wiremock = "0.6" [build-dependencies] diff --git a/clade/Cargo.toml b/clade/Cargo.toml index 3943f323..b1d610e9 100644 --- a/clade/Cargo.toml +++ b/clade/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" [dependencies] arrow-flight = { workspace = true } prost = { workspace = true } -tonic = "0.11" +tonic = { workspace = true } [build-dependencies] -tonic-build = "0.11" +tonic-build = "0.12" diff --git a/clade/build.rs b/clade/build.rs index 6503f16a..0a1f0951 100644 --- a/clade/build.rs +++ b/clade/build.rs @@ -8,7 +8,7 @@ fn main() -> Result<(), Box> { .build_server(true) .build_client(true) .type_attribute("clade.sync.ColumnDescriptor", "#[derive(Eq, Hash)]") - .compile(&["proto/schema.proto", "proto/sync.proto"], &["proto"])?; + .compile_protos(&["proto/schema.proto", "proto/sync.proto"], &["proto"])?; Ok(()) } diff --git a/datafusion_remote_tables/Cargo.toml b/datafusion_remote_tables/Cargo.toml index b99cfea5..03e5c6b9 100644 --- a/datafusion_remote_tables/Cargo.toml +++ b/datafusion_remote_tables/Cargo.toml @@ -19,7 +19,7 @@ arrow-schema = { workspace = true } async-trait = { workspace = true } # Remote query execution for a variety of DBs -connectorx = { git = "https://github.com/splitgraph/connector-x", branch = "datafusion-41-upgrade", features = [ "dst_arrow", "src_postgres", "src_mysql", "src_sqlite" ] } +connectorx = { git = "https://github.com/splitgraph/connector-x", branch = "datafusion-43-upgrade", features = [ "dst_arrow", "src_postgres", "src_mysql", "src_sqlite" ] } datafusion = { workspace = true } datafusion-common = { workspace = true } diff --git a/datafusion_remote_tables/src/factory.rs b/datafusion_remote_tables/src/factory.rs index 9662492d..7d35bcbd 100644 --- a/datafusion_remote_tables/src/factory.rs +++ b/datafusion_remote_tables/src/factory.rs @@ -9,6 +9,7 @@ use std::ops::Deref; use std::sync::Arc; /// Factory for creating remote tables +#[derive(Debug)] pub struct RemoteTableFactory {} #[async_trait] diff --git a/datafusion_remote_tables/src/provider.rs b/datafusion_remote_tables/src/provider.rs index ec79ab12..aec8b73a 100644 --- a/datafusion_remote_tables/src/provider.rs +++ b/datafusion_remote_tables/src/provider.rs @@ -23,6 +23,7 @@ use tokio::task; use tracing::debug; // Implementation of a remote table, capable of querying Postgres, MySQL, SQLite, etc... +#[derive(Debug)] pub struct RemoteTable { // We manually escape the field names during scans, but expect the user to escape the table name // appropriately in the remote table definition diff --git a/src/catalog/empty.rs b/src/catalog/empty.rs index d25e47e1..dcac29cc 100644 --- a/src/catalog/empty.rs +++ b/src/catalog/empty.rs @@ -9,7 +9,7 @@ use clade::schema::ListSchemaResponse; use super::CatalogError; -#[derive(Clone)] +#[derive(Debug, Clone)] pub struct EmptyStore {} #[async_trait] diff --git a/src/catalog/external.rs b/src/catalog/external.rs index 54f6bf40..b94eb080 100644 --- a/src/catalog/external.rs +++ b/src/catalog/external.rs @@ -8,7 +8,7 @@ use tonic::transport::{channel::Channel, Endpoint, Error}; use tonic::Request; // An external store, facilitated via a remote clade server implementation -#[derive(Clone)] +#[derive(Debug, Clone)] pub struct ExternalStore { client: SchemaStoreServiceClient, } diff --git a/src/catalog/memory.rs b/src/catalog/memory.rs index 8750e32d..40504f91 100644 --- a/src/catalog/memory.rs +++ b/src/catalog/memory.rs @@ -4,7 +4,7 @@ use crate::catalog::{ use crate::repository::interface::AllDatabaseFunctionsResult; use clade::schema::ListSchemaResponse; -#[derive(Clone)] +#[derive(Debug, Clone)] pub struct MemoryStore { pub schemas: ListSchemaResponse, } diff --git a/src/catalog/metastore.rs b/src/catalog/metastore.rs index 4059c7c7..43b4cd01 100644 --- a/src/catalog/metastore.rs +++ b/src/catalog/metastore.rs @@ -34,7 +34,7 @@ type LocationAndOptions = (String, HashMap); // This is the main entrypoint to all individual catalogs for various objects types. // The intention is to make it extensible and de-coupled from the underlying metastore // persistence mechanism (such as the presently used `Repository`). -#[derive(Clone)] +#[derive(Debug, Clone)] pub struct Metastore { pub catalogs: Arc, pub schemas: Arc, diff --git a/src/catalog/mod.rs b/src/catalog/mod.rs index 6320b332..0e8f0707 100644 --- a/src/catalog/mod.rs +++ b/src/catalog/mod.rs @@ -8,6 +8,7 @@ use arrow_schema::Schema; use async_trait::async_trait; use clade::schema::ListSchemaResponse; use datafusion_common::DataFusionError; +use std::fmt::Debug; use tonic::Status; use uuid::Uuid; @@ -149,7 +150,7 @@ impl From for CreateFunctionError { pub type CatalogResult = Result; #[async_trait] -pub trait CatalogStore: Sync + Send { +pub trait CatalogStore: Debug + Sync + Send { async fn create(&self, _name: &str) -> CatalogResult<()> { not_impl() } @@ -164,7 +165,7 @@ pub trait CatalogStore: Sync + Send { } #[async_trait] -pub trait SchemaStore: Sync + Send { +pub trait SchemaStore: Debug + Sync + Send { async fn create(&self, _catalog_name: &str, _schema_name: &str) -> CatalogResult<()> { not_impl() } @@ -187,7 +188,7 @@ pub trait SchemaStore: Sync + Send { } #[async_trait] -pub trait TableStore: Sync + Send { +pub trait TableStore: Debug + Sync + Send { async fn create( &self, _catalog_name: &str, @@ -275,7 +276,7 @@ pub trait TableStore: Sync + Send { } #[async_trait] -pub trait FunctionStore: Sync + Send { +pub trait FunctionStore: Debug + Sync + Send { async fn create( &self, _catalog_name: &str, diff --git a/src/catalog/repository.rs b/src/catalog/repository.rs index 5352071f..e3960048 100644 --- a/src/catalog/repository.rs +++ b/src/catalog/repository.rs @@ -21,6 +21,7 @@ use crate::repository::interface::{ use crate::wasm_udf::data_types::CreateFunctionDetails; // The native catalog implementation for Seafowl. +#[derive(Debug)] pub struct RepositoryStore { pub repository: Arc, } diff --git a/src/config/context.rs b/src/config/context.rs index 6e9d467f..07d0cbaf 100644 --- a/src/config/context.rs +++ b/src/config/context.rs @@ -151,7 +151,7 @@ pub async fn build_context(cfg: schema::SeafowlConfig) -> Result .with_information_schema(true) .with_default_catalog_and_schema(DEFAULT_DB, DEFAULT_SCHEMA); - let runtime_env = RuntimeEnv::new(runtime_config)?; + let runtime_env = RuntimeEnv::try_new(runtime_config)?; let state = build_state_with_table_factories(session_config, Arc::new(runtime_env)); let context = SessionContext::new_with_state(state); diff --git a/src/context/delta.rs b/src/context/delta.rs index 2549dd83..4966726a 100644 --- a/src/context/delta.rs +++ b/src/context/delta.rs @@ -582,7 +582,7 @@ mod tests { vec![ ( PART_0_FILE_NAME.to_string(), - 1298, + 1164, true, true, json!({ @@ -606,7 +606,7 @@ mod tests { ), ( PART_1_FILE_NAME.to_string(), - 1313, + 1176, true, true, json!({ diff --git a/src/context/logical.rs b/src/context/logical.rs index 38ddaad0..d58a4b91 100644 --- a/src/context/logical.rs +++ b/src/context/logical.rs @@ -246,9 +246,9 @@ impl SeafowlContext { })), })) }, - Statement::Truncate { table: false, table_name, partitions, .. } => { + Statement::Truncate { table: false, table_names, partitions, .. } => { let table_name = if partitions.is_none() { - Some(table_name.to_string()) + Some(table_names[0].to_string()) } else { None }; @@ -268,10 +268,10 @@ impl SeafowlContext { })), })) } - Statement::Truncate { table: true, table_name, .. } => { + Statement::Truncate { table: true, table_names, .. } => { Ok(LogicalPlan::Extension(Extension { node: Arc::new(SeafowlExtensionNode::Truncate(Truncate { - table_name: table_name.to_string(), + table_name: table_names[0].to_string(), output_schema: Arc::new(DFSchema::empty()) })), })) diff --git a/src/context/physical.rs b/src/context/physical.rs index 3c5b8e6d..640eac94 100644 --- a/src/context/physical.rs +++ b/src/context/physical.rs @@ -37,6 +37,7 @@ use datafusion::{ physical_plan::{ExecutionPlan, SendableRecordBatchStream}, sql::TableReference, }; +use datafusion_common::config::TableParquetOptions; use datafusion_common::tree_node::{Transformed, TransformedResult, TreeNode}; use datafusion_common::{Column as ColumnExpr, ResolvedTableReference, SchemaReference}; use datafusion_expr::logical_plan::{ @@ -190,7 +191,7 @@ impl SeafowlContext { } LogicalPlan::Dml(DmlStatement { table_name, - op: WriteOp::InsertInto, + op: WriteOp::Insert(_), input, .. }) => { @@ -941,7 +942,12 @@ impl SeafowlContext { let table_path = ListingTableUrl::parse(file_path)?; let file_format: Arc = match file_type { "csv" => Arc::new(CsvFormat::default().with_has_header(has_header)), - "parquet" => Arc::new(ParquetFormat::default()), + "parquet" => { + // TODO: We can remove this once delta-rs supports Utf8View + let mut options = TableParquetOptions::default(); + options.global.schema_force_view_types = false; + Arc::new(ParquetFormat::default().with_options(options)) + } _ => { return Err(Error::Plan(format!( "File type {file_type:?} not supported!" diff --git a/src/datafusion/parser.rs b/src/datafusion/parser.rs index d0d259d3..066a374c 100644 --- a/src/datafusion/parser.rs +++ b/src/datafusion/parser.rs @@ -28,7 +28,9 @@ pub use datafusion::sql::parser::Statement; use datafusion::sql::parser::{CopyToSource, CopyToStatement, CreateExternalTable}; use lazy_static::lazy_static; -use sqlparser::ast::{CreateFunctionBody, Expr, ObjectName, OrderByExpr, Value}; +use sqlparser::ast::{ + CreateFunctionBody, Expr, ObjectName, OrderByExpr, TruncateTableTarget, Value, +}; use sqlparser::tokenizer::{TokenWithLocation, Word}; use sqlparser::{ ast::{ColumnDef, ColumnOptionDef, Statement as SQLStatement, TableConstraint}, @@ -217,9 +219,12 @@ impl<'a> DFParser<'a> { } Ok(Statement::Statement(Box::new(SQLStatement::Truncate { - table_name, + table_names: vec![TruncateTableTarget { name: table_name }], partitions, table: false, + only: false, + identity: None, + cascade: None, }))) } @@ -231,9 +236,12 @@ impl<'a> DFParser<'a> { let table_name = self.parser.parse_object_name(true)?; Ok(Statement::Statement(Box::new(SQLStatement::Truncate { - table_name, + table_names: vec![TruncateTableTarget { name: table_name }], partitions: None, table: true, + only: false, + identity: None, + cascade: None, }))) } @@ -315,12 +323,7 @@ impl<'a> DFParser<'a> { Token::SingleQuotedString(s) => Ok(Value::SingleQuotedString(s)), Token::DoubleQuotedString(s) => Ok(Value::DoubleQuotedString(s)), Token::EscapedStringLiteral(s) => Ok(Value::EscapedStringLiteral(s)), - Token::Number(ref n, l) => { - let n = n - .parse() - .expect("Token::Number should always contain a valid number"); - Ok(Value::Number(n, l)) - } + Token::Number(n, l) => Ok(Value::Number(n, l)), _ => self.parser.expected("string or numeric value", next_token), } } @@ -655,13 +658,14 @@ impl<'a> DFParser<'a> { } let create = CreateExternalTable { - name: table_name.to_string(), + name: table_name, columns, file_type: builder.file_type.unwrap(), location: builder.location.unwrap(), table_partition_cols: builder.table_partition_cols.unwrap_or(vec![]), order_exprs: builder.order_exprs, if_not_exists, + temporary: false, unbounded, options: builder.options.unwrap_or(Vec::new()), constraints, diff --git a/src/datafusion/utils.rs b/src/datafusion/utils.rs index df2f3cf6..fe0c4753 100644 --- a/src/datafusion/utils.rs +++ b/src/datafusion/utils.rs @@ -137,7 +137,7 @@ pub(crate) fn convert_simple_data_type(sql_type: &SQLDataType) -> Result Result not_impl_err!( "Unsupported SQL type {sql_type:?}" ), diff --git a/src/frontend/http.rs b/src/frontend/http.rs index f5074c70..b55e6193 100644 --- a/src/frontend/http.rs +++ b/src/frontend/http.rs @@ -28,7 +28,7 @@ use percent_encoding::{percent_decode_str, utf8_percent_encode, NON_ALPHANUMERIC use serde::Deserialize; use serde_json::json; use sha2::{Digest, Sha256}; - +use tempfile::NamedTempFile; use tracing::{debug, info, warn}; use warp::http::HeaderValue; use warp::log::Info; @@ -397,9 +397,9 @@ pub async fn upload( let mut has_header = true; let mut schema: Option = None; let mut filename = String::new(); - let ref_temp_file = context.inner.runtime_env().disk_manager.create_tmp_file( - format!("Creating a target file to append to {database_name}.{schema_name}.{table_name}").as_str(), - )?; + let mut file_type = String::new(); + let mut temp_path = String::new(); + let mut temp_file: NamedTempFile; while let Some(maybe_part) = form.next().await { let mut part = maybe_part.map_err(ApiError::UploadBodyLoadError)?; @@ -426,34 +426,41 @@ pub async fn upload( .ok_or(ApiError::UploadMissingFile)? .to_string(); + if filename.is_empty() { + return Err(ApiError::UploadMissingFile); + } + + file_type = filename + .split('.') + .last() + .ok_or_else(|| { + ApiError::UploadMissingFilenameExtension(filename.clone()) + })? + .to_string(); + + temp_file = tempfile::Builder::new() + .suffix(&format!(".{file_type}")) + .tempfile()?; + temp_path = temp_file.path().display().to_string(); + // Write out the incoming bytes into the temporary file while let Some(maybe_bytes) = part.data().await { - ref_temp_file.inner().write_all( + temp_file.write_all( maybe_bytes.map_err(ApiError::UploadBodyLoadError)?.chunk(), )?; } } } - if filename.is_empty() { - return Err(ApiError::UploadMissingFile); - } - - let file_type = filename - .split('.') - .last() - .ok_or_else(|| ApiError::UploadMissingFilenameExtension(filename.clone()))?; - if file_type != "csv" && file_type != "parquet" { return Err(ApiError::UploadUnsupportedFileFormat(filename)); }; // Execute the plan and persist objects as well as table/partition metadata - let temp_path = ref_temp_file.path(); let table = context .file_to_table( - temp_path.display().to_string(), - file_type, + temp_path, + &file_type, schema, has_header, schema_name.clone(), @@ -1205,25 +1212,6 @@ pub mod tests { ); } - #[rstest] - #[tokio::test] - async fn test_error_json_conversion( - #[values(None, Some("test_db"))] new_db: Option<&str>, - ) { - let context = in_memory_context_with_single_table(new_db).await; - let handler = filters(context, http_config_from_access_policy(free_for_all())); - - let resp = - query_uncached_endpoint(&handler, "SELECT 1::NUMERIC", new_db, None).await; - assert_eq!(resp.status(), StatusCode::OK); - - let error_msg = String::from_utf8_lossy(resp.body()); - assert_eq!( - error_msg, - "Invalid argument error: JSON Writer does not support data type: Decimal128(38, 10)" - ); - } - #[rstest] #[tokio::test] async fn test_password_read_anonymous_cant_cached_get( diff --git a/src/nodes.rs b/src/nodes.rs index 528bd979..9c10913b 100644 --- a/src/nodes.rs +++ b/src/nodes.rs @@ -1,11 +1,11 @@ use datafusion::common::DFSchemaRef; +use crate::wasm_udf::data_types::CreateFunctionDetails; use arrow_schema::Schema; +use datafusion_expr::{Expr, LogicalPlan, UserDefinedLogicalNode}; +use std::cmp::Ordering; use std::hash::{Hash, Hasher}; use std::{any::Any, fmt, sync::Arc, vec}; - -use crate::wasm_udf::data_types::CreateFunctionDetails; -use datafusion_expr::{Expr, LogicalPlan, UserDefinedLogicalNode}; use strum_macros::AsRefStr; #[derive(Debug, Clone, Hash, PartialEq, Eq)] @@ -208,4 +208,11 @@ impl UserDefinedLogicalNode for SeafowlExtensionNode { None => false, } } + + fn dyn_ord(&self, other: &dyn UserDefinedLogicalNode) -> Option { + match other.as_any().downcast_ref::() { + Some(o) if self == o => Some(Ordering::Equal), + _ => None, + } + } } diff --git a/src/object_store/factory.rs b/src/object_store/factory.rs index e4732540..c1783e4e 100644 --- a/src/object_store/factory.rs +++ b/src/object_store/factory.rs @@ -40,7 +40,7 @@ pub fn build_object_store( } } -#[derive(PartialEq, Eq)] +#[derive(Debug, PartialEq, Eq)] struct StoreCacheKey { url: Url, options: HashMap, @@ -57,6 +57,7 @@ impl Hash for StoreCacheKey { } } +#[derive(Debug)] pub struct ObjectStoreFactory { default_store: Option>, custom_stores: DashMap>, diff --git a/src/provider.rs b/src/provider.rs index bdd7f3f2..ea26d43f 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -21,6 +21,7 @@ use crate::repository::interface::FunctionId; use crate::system_tables::{SystemSchemaProvider, SYSTEM_SCHEMA}; use crate::{catalog::STAGING_SCHEMA, wasm_udf::data_types::CreateFunctionDetails}; +#[derive(Debug)] pub struct SeafowlDatabase { pub name: Arc, pub schemas: HashMap, Arc>, @@ -52,6 +53,7 @@ impl CatalogProvider for SeafowlDatabase { } } +#[derive(Debug)] pub struct SeafowlSchema { pub name: Arc, pub tables: DashMap, Arc>, diff --git a/src/sync/planner.rs b/src/sync/planner.rs index 34d68686..5a75af11 100644 --- a/src/sync/planner.rs +++ b/src/sync/planner.rs @@ -975,9 +975,9 @@ mod tests { } }); let expected_plan = vec![ - "ProjectionExec: expr=[CASE WHEN __upsert_col@5 IS NULL THEN c1@0 ELSE new_pk_c1@3 END as c1, CASE WHEN __upsert_col@5 IS NULL THEN c2@1 ELSE value_c2@4 END as c2]", + "ProjectionExec: expr=[CASE WHEN __upsert_col@4 IS NULL THEN c1@0 ELSE new_pk_c1@2 END as c1, CASE WHEN __upsert_col@4 IS NULL THEN c2@1 ELSE value_c2@3 END as c2]", " CoalesceBatchesExec: target_batch_size=8192", - " FilterExec: __upsert_col@5 IS DISTINCT FROM false", + " FilterExec: __upsert_col@5 IS DISTINCT FROM false, projection=[c1@0, c2@1, new_pk_c1@3, value_c2@4, __upsert_col@5]", " CoalesceBatchesExec: target_batch_size=8192", " HashJoinExec: mode=Partitioned, join_type=Full, on=[(c1@0, new_pk_c1@0)]", " CoalesceBatchesExec: target_batch_size=8192", @@ -985,7 +985,7 @@ mod tests { " ProjectionExec: expr=[c1@0 as c1, c2@1 as c2, true as __lower_rel]", " DeltaScan", " RepartitionExec: partitioning=RoundRobinBatch", - " ParquetExec: file_groups={0 groups: []}, projection=[c1, c2]", + " ParquetExec: file_groups={1 group: [[]]}, projection=[c1, c2]", " CoalesceBatchesExec: target_batch_size=8192", " RepartitionExec: partitioning=Hash", " UnnestExec", diff --git a/src/system_tables.rs b/src/system_tables.rs index ffdb2a74..f77f4e99 100644 --- a/src/system_tables.rs +++ b/src/system_tables.rs @@ -15,12 +15,14 @@ use datafusion::physical_plan::memory::MemoryExec; use datafusion::physical_plan::ExecutionPlan; use datafusion_expr::{Expr, TableType}; use std::any::Any; +use std::fmt::Debug; use std::sync::Arc; pub const SYSTEM_SCHEMA: &str = "system"; const TABLE_VERSIONS: &str = "table_versions"; const DROPPED_TABLES: &str = "dropped_tables"; +#[derive(Debug)] pub struct SystemSchemaProvider { database: Arc, table_catalog: Arc, @@ -80,7 +82,7 @@ impl SchemaProvider for SystemSchemaProvider { // Base trait for Seafowl system tables, as a way to imitate OOP #[async_trait] -trait SeafowlSystemTable: Send + Sync { +trait SeafowlSystemTable: Debug + Send + Sync { /// The schema for this system table fn schema(&self) -> SchemaRef; @@ -89,6 +91,7 @@ trait SeafowlSystemTable: Send + Sync { } /// Adapter that makes any `SeafowlSystemTable` a DataFusion `TableProvider` +#[derive(Debug)] struct SystemTableProvider { table: Arc, } @@ -127,6 +130,7 @@ where } // Table listing all available version for the given database +#[derive(Debug)] struct TableVersionsTable { database: Arc, schema: SchemaRef, @@ -206,6 +210,7 @@ impl SeafowlSystemTable for TableVersionsTable { } // Table listing all dropped tables that are pending lazy deletion on subsequent `VACUUM`s +#[derive(Debug)] struct DroppedTablesTable { database: Arc, schema: SchemaRef, diff --git a/src/testutils.rs b/src/testutils.rs index 9ac7e259..1a9a4573 100644 --- a/src/testutils.rs +++ b/src/testutils.rs @@ -74,7 +74,7 @@ pub async fn make_mock_parquet_server( let input_batch = RecordBatch::try_new( schema.clone(), - vec![Arc::new(Int32Array::from(vec![1, 2, 3]))], + vec![Arc::new(Int32Array::from(vec![1, 2, 3, 4, 5, 6, 7]))], ) .unwrap(); diff --git a/src/version.rs b/src/version.rs index 83c7e854..f45ad528 100644 --- a/src/version.rs +++ b/src/version.rs @@ -2,7 +2,8 @@ use chrono::{DateTime, FixedOffset, NaiveDateTime, Utc}; use datafusion::error::{DataFusionError, Result}; use datafusion::sql::TableReference; use sqlparser::ast::{ - Expr, FunctionArg, FunctionArgExpr, Ident, ObjectName, TableFactor, Value, VisitorMut, + Expr, FunctionArg, FunctionArgExpr, Ident, ObjectName, TableFactor, + TableFunctionArgs, Value, VisitorMut, }; use std::collections::HashSet; use std::ops::ControlFlow; @@ -68,29 +69,35 @@ impl VisitorMut for TableVersionProcessor { name, ref mut args, .. } = table_factor { - // If a function arg expression is a single string interpret this as a version specifier - if let Some( - [FunctionArg::Unnamed(FunctionArgExpr::Expr(Expr::Value( - Value::SingleQuotedString(value), - )))], - ) = &args.as_deref() + if let Some(TableFunctionArgs { + args: func_args, .. + }) = args { - let unresolved_name = name.to_string(); - let resolved_ref = TableReference::from(unresolved_name.as_str()) - .resolve(&self.default_catalog, &self.default_schema); - let full_object_name = ObjectName(vec![ - Ident::new(resolved_ref.catalog.as_ref()), - Ident::new(resolved_ref.schema.as_ref()), - Ident::new(resolved_ref.table.as_ref()), - ]); - - self.table_versions - .insert((full_object_name.clone(), value.to_string())); - // Do the actual name rewrite - name.0.last_mut().unwrap().value = - TableVersionProcessor::table_with_version(&full_object_name, value); - // Void the function table arg struct to leave a clean printable statement - *args = None; + // If a function arg expression is a single string interpret this as a version specifier + if let [FunctionArg::Unnamed(FunctionArgExpr::Expr(Expr::Value( + Value::SingleQuotedString(value), + )))] = &func_args[..] + { + let unresolved_name = name.to_string(); + let resolved_ref = TableReference::from(unresolved_name.as_str()) + .resolve(&self.default_catalog, &self.default_schema); + let full_object_name = ObjectName(vec![ + Ident::new(resolved_ref.catalog.as_ref()), + Ident::new(resolved_ref.schema.as_ref()), + Ident::new(resolved_ref.table.as_ref()), + ]); + + self.table_versions + .insert((full_object_name.clone(), value.clone())); + // Do the actual name rewrite + name.0.last_mut().unwrap().value = + TableVersionProcessor::table_with_version( + &full_object_name, + value, + ); + // Void the function table arg struct to leave a clean printable statement + *args = None; + } } } diff --git a/src/wasm_udf/wasm.rs b/src/wasm_udf/wasm.rs index 1d71b19a..9b875beb 100644 --- a/src/wasm_udf/wasm.rs +++ b/src/wasm_udf/wasm.rs @@ -777,7 +777,7 @@ pub fn create_udf_from_wasm( .iter() .map(sql_type_to_arrow_type) .collect::>()?; - let df_return_type = Arc::new(sql_type_to_arrow_type(return_type)?); + let df_return_type = sql_type_to_arrow_type(return_type)?; let function = match language { CreateFunctionLanguage::Wasm => { diff --git a/tests/clade/mod.rs b/tests/clade/mod.rs index bd946851..be7f48e5 100644 --- a/tests/clade/mod.rs +++ b/tests/clade/mod.rs @@ -81,7 +81,7 @@ async fn run_clade_server(addr: SocketAddr) { let reflection = tonic_reflection::server::Builder::configure() .register_encoded_file_descriptor_set(FILE_DESCRIPTOR_SET) - .build() + .build_v1() .unwrap(); Server::builder() diff --git a/tests/http/upload.rs b/tests/http/upload.rs index 23f2dfb1..172d2c61 100644 --- a/tests/http/upload.rs +++ b/tests/http/upload.rs @@ -337,9 +337,8 @@ async fn test_upload_to_existing_table() { dbg!("Upload status is {}", status); - assert_eq!( - "Error during planning: Cannot cast file schema field col_4 of type Boolean to table schema field of type Timestamp(Microsecond, None)".to_string(), - String::from_utf8(output.stdout).unwrap() + assert!( + String::from_utf8(output.stdout).unwrap().contains("Error during planning: Cannot cast file schema field col_4 of type Boolean to table schema field of type Timestamp(Microsecond, None)") ); terminate.send(()).unwrap(); diff --git a/tests/statements/convert.rs b/tests/statements/convert.rs index cca0b9c6..05ac8573 100644 --- a/tests/statements/convert.rs +++ b/tests/statements/convert.rs @@ -143,7 +143,7 @@ async fn test_convert_from_flat_parquet_table() -> Result<()> { table.statistics(), Some(Statistics { num_rows: Exact(6), - total_byte_size: Inexact(1985), + total_byte_size: Inexact(1708), column_statistics: vec![ ColumnStatistics { null_count: Exact(0), diff --git a/tests/statements/ddl.rs b/tests/statements/ddl.rs index c36ed594..e0ce242d 100644 --- a/tests/statements/ddl.rs +++ b/tests/statements/ddl.rs @@ -616,6 +616,10 @@ async fn test_create_external_table( "| 1 |", "| 2 |", "| 3 |", + "| 4 |", + "| 5 |", + "| 6 |", + "| 7 |", "+-------+", ] } else {