From c1e4b8d592300d35a958f4f66d2ba1a067006492 Mon Sep 17 00:00:00 2001 From: nuno-faria Date: Tue, 25 Nov 2025 11:30:50 +0000 Subject: [PATCH 01/20] Upgrade to Datafusion 51 --- Cargo.lock | 801 +++++++++++---------- Cargo.toml | 24 +- examples/datafusion-ffi-example/Cargo.lock | 707 +++++++++--------- examples/datafusion-ffi-example/Cargo.toml | 14 +- python/datafusion/expr.py | 2 +- python/tests/test_expr.py | 8 +- python/tests/test_functions.py | 2 +- src/catalog.rs | 36 +- src/common/data_type.rs | 8 +- src/config.rs | 4 +- src/context.rs | 4 +- src/dataframe.rs | 38 +- src/dataset.rs | 6 +- src/dataset_exec.rs | 12 +- src/expr.rs | 6 +- src/expr/create_external_table.rs | 4 +- src/expr/placeholder.rs | 13 +- src/expr/statement.rs | 20 +- src/functions.rs | 5 +- src/physical_plan.rs | 2 +- src/pyarrow_filter_expression.rs | 8 +- src/pyarrow_util.rs | 9 +- src/record_batch.rs | 4 +- src/sql/logical.rs | 2 +- src/substrait.rs | 4 +- src/table.rs | 4 +- src/udaf.rs | 24 +- src/udf.rs | 8 +- src/udtf.rs | 6 +- src/udwf.rs | 28 +- src/utils.rs | 6 +- 31 files changed, 918 insertions(+), 901 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a291189fc..97a17abb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -50,15 +50,6 @@ dependencies = [ "core_extensions", ] -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.1" @@ -132,7 +123,7 @@ checksum = "3a033b4ced7c585199fb78ef50fca7fe2f444369ec48080c5fd072efa1a03cc7" dependencies = [ "bigdecimal", "bon", - "bzip2 0.6.0", + "bzip2 0.6.1", "crc32fast", "digest", "log", @@ -173,9 +164,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "arrow" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e833808ff2d94ed40d9379848a950d995043c7fb3e81a30b383f4c6033821cc" +checksum = "4df8bb5b0bd64c0b9bc61317fcc480bad0f00e56d3bc32c69a4c8dada4786bae" dependencies = [ "arrow-arith", "arrow-array", @@ -195,23 +186,23 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad08897b81588f60ba983e3ca39bda2b179bdd84dced378e7df81a5313802ef8" +checksum = "a1a640186d3bd30a24cb42264c2dafb30e236a6f50d510e56d40b708c9582491" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", "chrono", - "num", + "num-traits", ] [[package]] name = "arrow-array" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8548ca7c070d8db9ce7aa43f37393e4bfcf3f2d3681df278490772fd1673d08d" +checksum = "219fe420e6800979744c8393b687afb0252b3f8a89b91027d27887b72aa36d31" dependencies = [ "ahash", "arrow-buffer", @@ -221,25 +212,28 @@ dependencies = [ "chrono-tz", "half", "hashbrown 0.16.0", - "num", + "num-complex", + "num-integer", + "num-traits", ] [[package]] name = "arrow-buffer" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e003216336f70446457e280807a73899dd822feaf02087d31febca1363e2fccc" +checksum = "76885a2697a7edf6b59577f568b456afc94ce0e2edc15b784ce3685b6c3c5c27" dependencies = [ "bytes", "half", - "num", + "num-bigint", + "num-traits", ] [[package]] name = "arrow-cast" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919418a0681298d3a77d1a315f625916cb5678ad0d74b9c60108eb15fd083023" +checksum = "9c9ebb4c987e6b3b236fb4a14b20b34835abfdd80acead3ccf1f9bf399e1f168" dependencies = [ "arrow-array", "arrow-buffer", @@ -247,20 +241,20 @@ dependencies = [ "arrow-schema", "arrow-select", "atoi", - "base64 0.22.1", + "base64", "chrono", "comfy-table", "half", "lexical-core", - "num", + "num-traits", "ryu", ] [[package]] name = "arrow-csv" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa9bf02705b5cf762b6f764c65f04ae9082c7cfc4e96e0c33548ee3f67012eb" +checksum = "92386159c8d4bce96f8bd396b0642a0d544d471bdc2ef34d631aec80db40a09c" dependencies = [ "arrow-array", "arrow-cast", @@ -273,21 +267,22 @@ dependencies = [ [[package]] name = "arrow-data" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5c64fff1d142f833d78897a772f2e5b55b36cb3e6320376f0961ab0db7bd6d0" +checksum = "727681b95de313b600eddc2a37e736dcb21980a40f640314dcf360e2f36bc89b" dependencies = [ "arrow-buffer", "arrow-schema", "half", - "num", + "num-integer", + "num-traits", ] [[package]] name = "arrow-ipc" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3594dcddccc7f20fd069bc8e9828ce37220372680ff638c5e00dea427d88f5" +checksum = "da9ba92e3de170295c98a84e5af22e2b037f0c7b32449445e6c493b5fca27f27" dependencies = [ "arrow-array", "arrow-buffer", @@ -301,9 +296,9 @@ dependencies = [ [[package]] name = "arrow-json" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88cf36502b64a127dc659e3b305f1d993a544eab0d48cce704424e62074dc04b" +checksum = "b969b4a421ae83828591c6bf5450bd52e6d489584142845ad6a861f42fe35df8" dependencies = [ "arrow-array", "arrow-buffer", @@ -313,19 +308,21 @@ dependencies = [ "chrono", "half", "indexmap", + "itoa", "lexical-core", "memchr", - "num", - "serde", + "num-traits", + "ryu", + "serde_core", "serde_json", "simdutf8", ] [[package]] name = "arrow-ord" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c8f82583eb4f8d84d4ee55fd1cb306720cddead7596edce95b50ee418edf66f" +checksum = "141c05298b21d03e88062317a1f1a73f5ba7b6eb041b350015b1cd6aabc0519b" dependencies = [ "arrow-array", "arrow-buffer", @@ -336,9 +333,9 @@ dependencies = [ [[package]] name = "arrow-pyarrow" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d924b32e96f8bb74d94cd82bd97b313c432fcb0ea331689ef9e7c6b8be4b258" +checksum = "cfcfb2be2e9096236f449c11f425cddde18c4cc540f516d90f066f10a29ed515" dependencies = [ "arrow-array", "arrow-data", @@ -348,9 +345,9 @@ dependencies = [ [[package]] name = "arrow-row" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d07ba24522229d9085031df6b94605e0f4b26e099fb7cdeec37abd941a73753" +checksum = "c5f3c06a6abad6164508ed283c7a02151515cef3de4b4ff2cebbcaeb85533db2" dependencies = [ "arrow-array", "arrow-buffer", @@ -361,34 +358,34 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3aa9e59c611ebc291c28582077ef25c97f1975383f1479b12f3b9ffee2ffabe" +checksum = "9cfa7a03d1eee2a4d061476e1840ad5c9867a544ca6c4c59256496af5d0a8be5" dependencies = [ "bitflags", - "serde", + "serde_core", "serde_json", ] [[package]] name = "arrow-select" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c41dbbd1e97bfcaee4fcb30e29105fb2c75e4d82ae4de70b792a5d3f66b2e7a" +checksum = "bafa595babaad59f2455f4957d0f26448fb472722c186739f4fac0823a1bdb47" dependencies = [ "ahash", "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", - "num", + "num-traits", ] [[package]] name = "arrow-string" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f5183c150fbc619eede22b861ea7c0eebed8eaac0333eaa7f6da5205fd504d" +checksum = "32f46457dbbb99f2650ff3ac23e46a929e0ab81db809b02aa5511c258348bef2" dependencies = [ "arrow-array", "arrow-buffer", @@ -396,7 +393,7 @@ dependencies = [ "arrow-schema", "arrow-select", "memchr", - "num", + "num-traits", "regex", "regex-syntax", ] @@ -447,7 +444,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -458,7 +455,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -482,27 +479,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -582,7 +558,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -635,9 +611,9 @@ dependencies = [ [[package]] name = "bzip2" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea8dcd42434048e4f7a304411d9273a411f647446c1234a65ce0554923f4cff" +checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" dependencies = [ "libbz2-rs-sys", ] @@ -885,7 +861,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -896,7 +872,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -915,22 +891,22 @@ dependencies = [ [[package]] name = "datafusion" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af15bb3c6ffa33011ef579f6b0bcbe7c26584688bd6c994f548e44df67f011a" +checksum = "8ba7cb113e9c0bedf9e9765926031e132fa05a1b09ba6e93a6d1a4d7044457b8" dependencies = [ "arrow", - "arrow-ipc", "arrow-schema", "async-trait", "bytes", - "bzip2 0.6.0", + "bzip2 0.6.1", "chrono", "datafusion-catalog", "datafusion-catalog-listing", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", + "datafusion-datasource-arrow", "datafusion-datasource-avro", "datafusion-datasource-csv", "datafusion-datasource-json", @@ -953,13 +929,14 @@ dependencies = [ "datafusion-sql", "flate2", "futures", - "itertools 0.14.0", + "itertools", "log", "object_store", "parking_lot", "parquet", "rand", "regex", + "rstest", "sqlparser", "tempfile", "tokio", @@ -971,9 +948,9 @@ dependencies = [ [[package]] name = "datafusion-catalog" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187622262ad8f7d16d3be9202b4c1e0116f1c9aa387e5074245538b755261621" +checksum = "66a3a799f914a59b1ea343906a0486f17061f39509af74e874a866428951130d" dependencies = [ "arrow", "async-trait", @@ -986,9 +963,8 @@ dependencies = [ "datafusion-physical-expr", "datafusion-physical-plan", "datafusion-session", - "datafusion-sql", "futures", - "itertools 0.14.0", + "itertools", "log", "object_store", "parking_lot", @@ -997,9 +973,9 @@ dependencies = [ [[package]] name = "datafusion-catalog-listing" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9657314f0a32efd0382b9a46fdeb2d233273ece64baa68a7c45f5a192daf0f83" +checksum = "6db1b113c80d7a0febcd901476a57aef378e717c54517a163ed51417d87621b0" dependencies = [ "arrow", "async-trait", @@ -1009,10 +985,11 @@ dependencies = [ "datafusion-execution", "datafusion-expr", "datafusion-physical-expr", + "datafusion-physical-expr-adapter", "datafusion-physical-expr-common", "datafusion-physical-plan", - "datafusion-session", "futures", + "itertools", "log", "object_store", "tokio", @@ -1020,15 +997,14 @@ dependencies = [ [[package]] name = "datafusion-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a83760d9a13122d025fbdb1d5d5aaf93dd9ada5e90ea229add92aa30898b2d1" +checksum = "7c10f7659e96127d25e8366be7c8be4109595d6a2c3eac70421f380a7006a1b0" dependencies = [ "ahash", "apache-avro", "arrow", "arrow-ipc", - "base64 0.22.1", "chrono", "half", "hashbrown 0.14.5", @@ -1046,9 +1022,9 @@ dependencies = [ [[package]] name = "datafusion-common-runtime" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b6234a6c7173fe5db1c6c35c01a12b2aa0f803a3007feee53483218817f8b1e" +checksum = "b92065bbc6532c6651e2f7dd30b55cba0c7a14f860c7e1d15f165c41a1868d95" dependencies = [ "futures", "log", @@ -1057,15 +1033,15 @@ dependencies = [ [[package]] name = "datafusion-datasource" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7256c9cb27a78709dd42d0c80f0178494637209cac6e29d5c93edd09b6721b86" +checksum = "fde13794244bc7581cd82f6fff217068ed79cdc344cafe4ab2c3a1c3510b38d6" dependencies = [ "arrow", "async-compression", "async-trait", "bytes", - "bzip2 0.6.0", + "bzip2 0.6.1", "chrono", "datafusion-common", "datafusion-common-runtime", @@ -1079,12 +1055,10 @@ dependencies = [ "flate2", "futures", "glob", - "itertools 0.14.0", + "itertools", "log", "object_store", - "parquet", "rand", - "tempfile", "tokio", "tokio-util", "url", @@ -1092,47 +1066,64 @@ dependencies = [ "zstd", ] +[[package]] +name = "datafusion-datasource-arrow" +version = "51.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "804fa9b4ecf3157982021770617200ef7c1b2979d57bec9044748314775a9aea" +dependencies = [ + "arrow", + "arrow-ipc", + "async-trait", + "bytes", + "datafusion-common", + "datafusion-common-runtime", + "datafusion-datasource", + "datafusion-execution", + "datafusion-expr", + "datafusion-physical-expr-common", + "datafusion-physical-plan", + "datafusion-session", + "futures", + "itertools", + "object_store", + "tokio", +] + [[package]] name = "datafusion-datasource-avro" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d40b6953ebc9099b37adfd12fde97eb73ff0cee44355c6dea64b8a4537d561" +checksum = "388ed8be535f562cc655b9c3d22edbfb0f1a50a25c242647a98b6d92a75b55a1" dependencies = [ "apache-avro", "arrow", "async-trait", "bytes", - "chrono", - "datafusion-catalog", "datafusion-common", "datafusion-datasource", - "datafusion-execution", - "datafusion-physical-expr", "datafusion-physical-expr-common", "datafusion-physical-plan", "datafusion-session", "futures", "num-traits", "object_store", - "tokio", ] [[package]] name = "datafusion-datasource-csv" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64533a90f78e1684bfb113d200b540f18f268134622d7c96bbebc91354d04825" +checksum = "61a1641a40b259bab38131c5e6f48fac0717bedb7dc93690e604142a849e0568" dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", "datafusion-execution", "datafusion-expr", - "datafusion-physical-expr", "datafusion-physical-expr-common", "datafusion-physical-plan", "datafusion-session", @@ -1144,73 +1135,67 @@ dependencies = [ [[package]] name = "datafusion-datasource-json" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d7ebeb12c77df0aacad26f21b0d033aeede423a64b2b352f53048a75bf1d6e6" +checksum = "adeacdb00c1d37271176f8fb6a1d8ce096baba16ea7a4b2671840c5c9c64fe85" dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", "datafusion-execution", "datafusion-expr", - "datafusion-physical-expr", "datafusion-physical-expr-common", "datafusion-physical-plan", "datafusion-session", "futures", "object_store", - "serde_json", "tokio", ] [[package]] name = "datafusion-datasource-parquet" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09e783c4c7d7faa1199af2df4761c68530634521b176a8d1331ddbc5a5c75133" +checksum = "43d0b60ffd66f28bfb026565d62b0a6cbc416da09814766a3797bba7d85a3cd9" dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", "datafusion-execution", "datafusion-expr", - "datafusion-functions-aggregate", + "datafusion-functions-aggregate-common", "datafusion-physical-expr", "datafusion-physical-expr-adapter", "datafusion-physical-expr-common", - "datafusion-physical-optimizer", "datafusion-physical-plan", "datafusion-pruning", "datafusion-session", "futures", - "itertools 0.14.0", + "itertools", "log", "object_store", "parking_lot", "parquet", - "rand", "tokio", ] [[package]] name = "datafusion-doc" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ee6b1d9a80d13f9deb2291f45c07044b8e62fb540dbde2453a18be17a36429" +checksum = "2b99e13947667b36ad713549237362afb054b2d8f8cc447751e23ec61202db07" [[package]] name = "datafusion-execution" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4cec0a57653bec7b933fb248d3ffa3fa3ab3bd33bd140dc917f714ac036f531" +checksum = "63695643190679037bc946ad46a263b62016931547bf119859c511f7ff2f5178" dependencies = [ "arrow", "async-trait", @@ -1228,9 +1213,9 @@ dependencies = [ [[package]] name = "datafusion-expr" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef76910bdca909722586389156d0aa4da4020e1631994d50fadd8ad4b1aa05fe" +checksum = "f9a4787cbf5feb1ab351f789063398f67654a6df75c4d37d7f637dc96f951a91" dependencies = [ "arrow", "async-trait", @@ -1242,6 +1227,7 @@ dependencies = [ "datafusion-functions-window-common", "datafusion-physical-expr-common", "indexmap", + "itertools", "paste", "recursive", "serde_json", @@ -1250,22 +1236,22 @@ dependencies = [ [[package]] name = "datafusion-expr-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d155ccbda29591ca71a1344dd6bed26c65a4438072b400df9db59447f590bb6" +checksum = "5ce2fb1b8c15c9ac45b0863c30b268c69dc9ee7a1ee13ecf5d067738338173dc" dependencies = [ "arrow", "datafusion-common", "indexmap", - "itertools 0.14.0", + "itertools", "paste", ] [[package]] name = "datafusion-ffi" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ddb7c4e645df080c27dad13a198d191da328dd1c98e198664a7a0f64b335cc" +checksum = "ec510e7787641279b0336e8b79e4b7bd1385d5976875ff9b97f4269ce5231a67" dependencies = [ "abi_stable", "arrow", @@ -1273,6 +1259,7 @@ dependencies = [ "async-ffi", "async-trait", "datafusion", + "datafusion-common", "datafusion-functions-aggregate-common", "datafusion-proto", "datafusion-proto-common", @@ -1285,13 +1272,13 @@ dependencies = [ [[package]] name = "datafusion-functions" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de2782136bd6014670fd84fe3b0ca3b3e4106c96403c3ae05c0598577139977" +checksum = "794a9db7f7b96b3346fc007ff25e994f09b8f0511b4cf7dff651fadfe3ebb28f" dependencies = [ "arrow", "arrow-buffer", - "base64 0.22.1", + "base64", "blake2", "blake3", "chrono", @@ -1302,9 +1289,10 @@ dependencies = [ "datafusion-expr-common", "datafusion-macros", "hex", - "itertools 0.14.0", + "itertools", "log", "md-5", + "num-traits", "rand", "regex", "sha2", @@ -1314,9 +1302,9 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07331fc13603a9da97b74fd8a273f4238222943dffdbbed1c4c6f862a30105bf" +checksum = "1c25210520a9dcf9c2b2cbbce31ebd4131ef5af7fc60ee92b266dc7d159cb305" dependencies = [ "ahash", "arrow", @@ -1335,9 +1323,9 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5951e572a8610b89968a09b5420515a121fbc305c0258651f318dc07c97ab17" +checksum = "62f4a66f3b87300bb70f4124b55434d2ae3fe80455f3574701d0348da040b55d" dependencies = [ "ahash", "arrow", @@ -1348,9 +1336,9 @@ dependencies = [ [[package]] name = "datafusion-functions-nested" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdacca9302c3d8fc03f3e94f338767e786a88a33f5ebad6ffc0e7b50364b9ea3" +checksum = "ae5c06eed03918dc7fe7a9f082a284050f0e9ecf95d72f57712d1496da03b8c4" dependencies = [ "arrow", "arrow-ord", @@ -1358,21 +1346,22 @@ dependencies = [ "datafusion-doc", "datafusion-execution", "datafusion-expr", + "datafusion-expr-common", "datafusion-functions", "datafusion-functions-aggregate", "datafusion-functions-aggregate-common", "datafusion-macros", "datafusion-physical-expr-common", - "itertools 0.14.0", + "itertools", "log", "paste", ] [[package]] name = "datafusion-functions-table" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37ff8a99434fbbad604a7e0669717c58c7c4f14c472d45067c4b016621d981" +checksum = "db4fed1d71738fbe22e2712d71396db04c25de4111f1ec252b8f4c6d3b25d7f5" dependencies = [ "arrow", "async-trait", @@ -1386,9 +1375,9 @@ dependencies = [ [[package]] name = "datafusion-functions-window" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e2aea7c79c926cffabb13dc27309d4eaeb130f4a21c8ba91cdd241c813652b" +checksum = "1d92206aa5ae21892f1552b4d61758a862a70956e6fd7a95cb85db1de74bc6d1" dependencies = [ "arrow", "datafusion-common", @@ -1404,9 +1393,9 @@ dependencies = [ [[package]] name = "datafusion-functions-window-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fead257ab5fd2ffc3b40fda64da307e20de0040fe43d49197241d9de82a487f" +checksum = "53ae9bcc39800820d53a22d758b3b8726ff84a5a3e24cecef04ef4e5fdf1c7cc" dependencies = [ "datafusion-common", "datafusion-physical-expr-common", @@ -1414,20 +1403,20 @@ dependencies = [ [[package]] name = "datafusion-macros" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec6f637bce95efac05cdfb9b6c19579ed4aa5f6b94d951cfa5bb054b7bb4f730" +checksum = "1063ad4c9e094b3f798acee16d9a47bd7372d9699be2de21b05c3bd3f34ab848" dependencies = [ - "datafusion-expr", + "datafusion-doc", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "datafusion-optimizer" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6583ef666ae000a613a837e69e456681a9faa96347bf3877661e9e89e141d8a" +checksum = "9f35f9ec5d08b87fd1893a30c2929f2559c2f9806ca072d8fefca5009dc0f06a" dependencies = [ "arrow", "chrono", @@ -1436,7 +1425,7 @@ dependencies = [ "datafusion-expr-common", "datafusion-physical-expr", "indexmap", - "itertools 0.14.0", + "itertools", "log", "recursive", "regex", @@ -1445,9 +1434,9 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8668103361a272cbbe3a61f72eca60c9b7c706e87cc3565bcf21e2b277b84f6" +checksum = "c30cc8012e9eedcb48bbe112c6eff4ae5ed19cf3003cb0f505662e88b7014c5d" dependencies = [ "ahash", "arrow", @@ -1459,18 +1448,17 @@ dependencies = [ "half", "hashbrown 0.14.5", "indexmap", - "itertools 0.14.0", - "log", + "itertools", "parking_lot", "paste", - "petgraph 0.8.2", + "petgraph 0.8.3", ] [[package]] name = "datafusion-physical-expr-adapter" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "815acced725d30601b397e39958e0e55630e0a10d66ef7769c14ae6597298bb0" +checksum = "7f9ff2dbd476221b1f67337699eff432781c4e6e1713d2aefdaa517dfbf79768" dependencies = [ "arrow", "datafusion-common", @@ -1478,28 +1466,28 @@ dependencies = [ "datafusion-functions", "datafusion-physical-expr", "datafusion-physical-expr-common", - "itertools 0.14.0", + "itertools", ] [[package]] name = "datafusion-physical-expr-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6652fe7b5bf87e85ed175f571745305565da2c0b599d98e697bcbedc7baa47c3" +checksum = "90da43e1ec550b172f34c87ec68161986ced70fd05c8d2a2add66eef9c276f03" dependencies = [ "ahash", "arrow", "datafusion-common", "datafusion-expr-common", "hashbrown 0.14.5", - "itertools 0.14.0", + "itertools", ] [[package]] name = "datafusion-physical-optimizer" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b7d623eb6162a3332b564a0907ba00895c505d101b99af78345f1acf929b5c" +checksum = "ce9804f799acd7daef3be7aaffe77c0033768ed8fdbf5fb82fc4c5f2e6bc14e6" dependencies = [ "arrow", "datafusion-common", @@ -1510,16 +1498,15 @@ dependencies = [ "datafusion-physical-expr-common", "datafusion-physical-plan", "datafusion-pruning", - "itertools 0.14.0", - "log", + "itertools", "recursive", ] [[package]] name = "datafusion-physical-plan" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f7f778a1a838dec124efb96eae6144237d546945587557c9e6936b3414558c" +checksum = "0acf0ad6b6924c6b1aa7d213b181e012e2d3ec0a64ff5b10ee6282ab0f8532ac" dependencies = [ "ahash", "arrow", @@ -1539,7 +1526,7 @@ dependencies = [ "half", "hashbrown 0.14.5", "indexmap", - "itertools 0.14.0", + "itertools", "log", "parking_lot", "pin-project-lite", @@ -1548,15 +1535,26 @@ dependencies = [ [[package]] name = "datafusion-proto" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7df9f606892e6af45763d94d210634eec69b9bb6ced5353381682ff090028a3" +checksum = "d368093a98a17d1449b1083ac22ed16b7128e4c67789991869480d8c4a40ecb9" dependencies = [ "arrow", "chrono", - "datafusion", + "datafusion-catalog", + "datafusion-catalog-listing", "datafusion-common", + "datafusion-datasource", + "datafusion-datasource-arrow", + "datafusion-datasource-csv", + "datafusion-datasource-json", + "datafusion-datasource-parquet", + "datafusion-execution", "datafusion-expr", + "datafusion-functions-table", + "datafusion-physical-expr", + "datafusion-physical-expr-common", + "datafusion-physical-plan", "datafusion-proto-common", "object_store", "prost", @@ -1564,9 +1562,9 @@ dependencies = [ [[package]] name = "datafusion-proto-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b14f288ca4ef77743d9672cafecf3adfffff0b9b04af9af79ecbeaaf736901" +checksum = "3b6aef3d5e5c1d2bc3114c4876730cb76a9bdc5a8df31ef1b6db48f0c1671895" dependencies = [ "arrow", "datafusion-common", @@ -1575,19 +1573,18 @@ dependencies = [ [[package]] name = "datafusion-pruning" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd1e59e2ca14fe3c30f141600b10ad8815e2856caa59ebbd0e3e07cd3d127a65" +checksum = "ac2c2498a1f134a9e11a9f5ed202a2a7d7e9774bd9249295593053ea3be999db" dependencies = [ "arrow", - "arrow-schema", "datafusion-common", "datafusion-datasource", "datafusion-expr-common", "datafusion-physical-expr", "datafusion-physical-expr-common", "datafusion-physical-plan", - "itertools 0.14.0", + "itertools", "log", ] @@ -1621,36 +1618,27 @@ dependencies = [ [[package]] name = "datafusion-session" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21ef8e2745583619bd7a49474e8f45fbe98ebb31a133f27802217125a7b3d58d" +checksum = "8f96eebd17555386f459037c65ab73aae8df09f464524c709d6a3134ad4f4776" dependencies = [ - "arrow", "async-trait", - "dashmap", "datafusion-common", - "datafusion-common-runtime", "datafusion-execution", "datafusion-expr", - "datafusion-physical-expr", "datafusion-physical-plan", - "datafusion-sql", - "futures", - "itertools 0.14.0", - "log", - "object_store", "parking_lot", - "tokio", ] [[package]] name = "datafusion-sql" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89abd9868770386fede29e5a4b14f49c0bf48d652c3b9d7a8a0332329b87d50b" +checksum = "3fc195fe60634b2c6ccfd131b487de46dc30eccae8a3c35a13f136e7f440414f" dependencies = [ "arrow", "bigdecimal", + "chrono", "datafusion-common", "datafusion-expr", "indexmap", @@ -1662,15 +1650,16 @@ dependencies = [ [[package]] name = "datafusion-substrait" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa011a3814d91a03ab655ad41bbe5e57b203b2859281af8fe2c30aebbbcc5d9" +checksum = "2505af06d103a55b4e8ded0c6aeb6c72a771948da939c0bd3f8eee67af475a9c" dependencies = [ "async-recursion", "async-trait", "chrono", "datafusion", - "itertools 0.14.0", + "half", + "itertools", "object_store", "pbjson-types", "prost", @@ -1699,7 +1688,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -1760,9 +1749,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.1.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" dependencies = [ "crc32fast", "libz-rs-sys", @@ -1846,7 +1835,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -1861,6 +1850,12 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" + [[package]] name = "futures-util" version = "0.3.31" @@ -1925,12 +1920,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - [[package]] name = "glob" version = "0.3.3" @@ -1958,13 +1947,14 @@ dependencies = [ [[package]] name = "half" -version = "2.6.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ "cfg-if", "crunchy", "num-traits", + "zerocopy", ] [[package]] @@ -2097,7 +2087,7 @@ version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-channel", "futures-core", @@ -2254,12 +2244,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.11.3" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92119844f513ffa41556430369ab02c295a3578af21cf945caa3e9e0c2481ac3" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" dependencies = [ "equivalent", - "hashbrown 0.15.5", + "hashbrown 0.16.0", ] [[package]] @@ -2274,17 +2264,6 @@ version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" -[[package]] -name = "io-uring" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" -dependencies = [ - "bitflags", - "cfg-if", - "libc", -] - [[package]] name = "ipnet" version = "2.11.0" @@ -2301,15 +2280,6 @@ dependencies = [ "serde", ] -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.14.0" @@ -2417,9 +2387,9 @@ checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" [[package]] name = "libc" -version = "0.2.175" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libloading" @@ -2550,6 +2520,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] @@ -2569,20 +2540,6 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - [[package]] name = "num-bigint" version = "0.4.6" @@ -2612,28 +2569,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -2644,15 +2579,6 @@ dependencies = [ "libm", ] -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - [[package]] name = "object_store" version = "0.12.4" @@ -2660,7 +2586,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c1be0c6c22ec0817cdc77d3842f721a17fd30ab6965001415b5402a74e6b740" dependencies = [ "async-trait", - "base64 0.22.1", + "base64", "bytes", "chrono", "form_urlencoded", @@ -2670,7 +2596,7 @@ dependencies = [ "httparse", "humantime", "hyper", - "itertools 0.14.0", + "itertools", "md-5", "parking_lot", "percent-encoding", @@ -2737,9 +2663,9 @@ dependencies = [ [[package]] name = "parquet" -version = "56.1.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b56b41d1bd36aae415e42f91cae70ee75cf6cba74416b14dce3e958d5990ec" +checksum = "7a0f31027ef1af7549f7cec603a9a21dce706d3f8d7c2060a68f43c1773be95a" dependencies = [ "ahash", "arrow-array", @@ -2749,20 +2675,20 @@ dependencies = [ "arrow-ipc", "arrow-schema", "arrow-select", - "base64 0.22.1", + "base64", "brotli", "bytes", "chrono", "flate2", "futures", "half", - "hashbrown 0.15.5", + "hashbrown 0.16.0", "lz4_flex", - "num", "num-bigint", + "num-integer", + "num-traits", "object_store", "paste", - "ring", "seq-macro", "simdutf8", "snap", @@ -2780,31 +2706,31 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbjson" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e6349fa080353f4a597daffd05cb81572a9c031a6d4fff7e504947496fcc68" +checksum = "898bac3fa00d0ba57a4e8289837e965baa2dee8c3749f3b11d45a64b4223d9c3" dependencies = [ - "base64 0.21.7", + "base64", "serde", ] [[package]] name = "pbjson-build" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eea3058763d6e656105d1403cb04e0a41b7bbac6362d413e7c33be0c32279c9" +checksum = "af22d08a625a2213a78dbb0ffa253318c5c79ce3133d32d296655a7bdfb02095" dependencies = [ "heck", - "itertools 0.13.0", + "itertools", "prost", "prost-types", ] [[package]] name = "pbjson-types" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54e5e7bfb1652f95bc361d76f3c780d8e526b134b85417e774166ee941f0887" +checksum = "8e748e28374f10a330ee3bb9f29b828c0ac79831a32bab65015ad9b661ead526" dependencies = [ "bytes", "chrono", @@ -2833,9 +2759,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54acf3a685220b533e437e264e4d932cfbdc4cc7ec0cd232ed73c08d03b8a7ca" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset", "hashbrown 0.15.5", @@ -2910,7 +2836,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.106", + "syn 2.0.111", +] + +[[package]] +name = "proc-macro-crate" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit", ] [[package]] @@ -2924,9 +2859,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" dependencies = [ "bytes", "prost-derive", @@ -2934,12 +2869,12 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" +checksum = "ac6c3320f9abac597dcbc668774ef006702672474aad53c6d596b62e487b40b1" dependencies = [ "heck", - "itertools 0.14.0", + "itertools", "log", "multimap", "once_cell", @@ -2948,28 +2883,28 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.106", + "syn 2.0.111", "tempfile", ] [[package]] name = "prost-derive" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "prost-types" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" +checksum = "b9b4db3d6da204ed77bb26ba83b6122a73aeb2e87e25fbf7ad2e84c4ccbf8f72" dependencies = [ "prost", ] @@ -2994,9 +2929,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a" +checksum = "7ba0117f4212101ee6544044dae45abe1083d30ce7b29c4b5cbdfa2354e07383" dependencies = [ "indoc", "libc", @@ -3011,9 +2946,9 @@ dependencies = [ [[package]] name = "pyo3-async-runtimes" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d73cc6b1b7d8b3cef02101d37390dbdfe7e450dfea14921cae80a9534ba59ef2" +checksum = "e6ee6d4cb3e8d5b925f5cdb38da183e0ff18122eb2048d4041c9e7034d026e23" dependencies = [ "futures", "once_cell", @@ -3024,19 +2959,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598" +checksum = "4fc6ddaf24947d12a9aa31ac65431fb1b851b8f4365426e182901eabfb87df5f" dependencies = [ - "once_cell", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c" +checksum = "025474d3928738efb38ac36d4744a74a400c901c7596199e20e45d98eb194105" dependencies = [ "libc", "pyo3-build-config", @@ -3044,9 +2978,9 @@ dependencies = [ [[package]] name = "pyo3-log" -version = "0.12.4" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45192e5e4a4d2505587e27806c7b710c231c40c56f3bfc19535d0bb25df52264" +checksum = "2f8bae9ad5ba08b0b0ed2bb9c2bdbaeccc69cafca96d78cf0fbcea0d45d122bb" dependencies = [ "arc-swap", "log", @@ -3055,27 +2989,27 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50" +checksum = "2e64eb489f22fe1c95911b77c44cc41e7c19f3082fc81cce90f657cdc42ffded" dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "pyo3-macros-backend" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc" +checksum = "100246c0ecf400b475341b8455a9213344569af29a3c841d29270e53102e0fcf" dependencies = [ "heck", "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3151,9 +3085,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.40" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] @@ -3210,7 +3144,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76009fbe0614077fc1a2ce255e3a1881a2e3a3527097d5dc6d8212c585e7e38b" dependencies = [ "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3224,9 +3158,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.2" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -3236,9 +3170,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -3267,6 +3201,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "relative-path" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" + [[package]] name = "repr_offset" version = "0.2.2" @@ -3282,7 +3222,7 @@ version = "0.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-core", "futures-util", @@ -3333,10 +3273,33 @@ dependencies = [ ] [[package]] -name = "rustc-demangle" -version = "0.1.26" +name = "rstest" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" +checksum = "f5a3193c063baaa2a95a33f03035c8a72b83d97a54916055ba22d35ed3839d49" +dependencies = [ + "futures-timer", + "futures-util", + "rstest_macros", +] + +[[package]] +name = "rstest_macros" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c845311f0ff7951c5506121a9ad75aec44d083c31583b2ea5a30bcb0b0abba0" +dependencies = [ + "cfg-if", + "glob", + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version", + "syn 2.0.111", + "unicode-ident", +] [[package]] name = "rustc-hash" @@ -3473,7 +3436,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3523,9 +3486,9 @@ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" [[package]] name = "serde" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", @@ -3543,22 +3506,22 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3569,7 +3532,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3594,7 +3557,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3639,6 +3602,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "simdutf8" version = "0.1.5" @@ -3681,9 +3650,9 @@ dependencies = [ [[package]] name = "sqlparser" -version = "0.58.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4b661c54b1e4b603b37873a18c59920e4c51ea8ea2cf527d925424dbd4437c" +checksum = "4591acadbcf52f0af60eafbb2c003232b2b4cd8de5f0e9437cb8b1b59046cc0f" dependencies = [ "log", "recursive", @@ -3698,7 +3667,7 @@ checksum = "da5fc6819faabb412da764b99d3b713bb55083c11e7e0c00144d386cd6a1939c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3754,7 +3723,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3766,14 +3735,14 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "substrait" -version = "0.58.0" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de6d24c270c6c672a86c183c3a8439ba46c1936f93cf7296aa692de3b0ff0228" +checksum = "21f1cb6d0bcd097a39fc25f7236236be29881fe122e282e4173d6d007a929927" dependencies = [ "heck", "pbjson", @@ -3790,7 +3759,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml", - "syn 2.0.106", + "syn 2.0.111", "typify", "walkdir", ] @@ -3814,9 +3783,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.106" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -3840,7 +3809,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3864,22 +3833,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.16" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.16" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3929,31 +3898,28 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.47.1" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ - "backtrace", "bytes", - "io-uring", "libc", "mio", "pin-project-lite", - "slab", "socket2", "tokio-macros", - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3979,6 +3945,36 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml_datetime" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.23.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +dependencies = [ + "winnow", +] + [[package]] name = "tower" version = "0.5.2" @@ -4043,7 +4039,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -4102,9 +4098,9 @@ checksum = "f8c1ae7cc0fdb8b842d65d127cb981574b0d2b249b74d1c7a2986863dc134f71" [[package]] name = "typify" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7144144e97e987c94758a3017c920a027feac0799df325d6df4fc8f08d02068e" +checksum = "e6d5bcc6f62eb1fa8aa4098f39b29f93dcb914e17158b76c50360911257aa629" dependencies = [ "typify-impl", "typify-macro", @@ -4112,9 +4108,9 @@ dependencies = [ [[package]] name = "typify-impl" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062879d46aa4c9dfe0d33b035bbaf512da192131645d05deacb7033ec8581a09" +checksum = "a1eb359f7ffa4f9ebe947fa11a1b2da054564502968db5f317b7e37693cb2240" dependencies = [ "heck", "log", @@ -4125,16 +4121,16 @@ dependencies = [ "semver", "serde", "serde_json", - "syn 2.0.106", + "syn 2.0.111", "thiserror", "unicode-ident", ] [[package]] name = "typify-macro" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9708a3ceb6660ba3f8d2b8f0567e7d4b8b198e2b94d093b8a6077a751425de9e" +checksum = "911c32f3c8514b048c1b228361bebb5e6d73aeec01696e8cc0e82e2ffef8ab7a" dependencies = [ "proc-macro2", "quote", @@ -4143,7 +4139,7 @@ dependencies = [ "serde", "serde_json", "serde_tokenstream", - "syn 2.0.106", + "syn 2.0.111", "typify-impl", ] @@ -4285,7 +4281,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "wasm-bindgen-shared", ] @@ -4320,7 +4316,7 @@ checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4419,7 +4415,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -4430,7 +4426,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -4628,6 +4624,15 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +[[package]] +name = "winnow" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +dependencies = [ + "memchr", +] + [[package]] name = "wit-bindgen" version = "0.46.0" @@ -4669,7 +4674,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "synstructure", ] @@ -4690,7 +4695,7 @@ checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -4710,7 +4715,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "synstructure", ] @@ -4750,7 +4755,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 1e8c3366d..095ba9b3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,20 +48,20 @@ tokio = { version = "1.47", features = [ "rt-multi-thread", "sync", ] } -pyo3 = { version = "0.25", features = [ +pyo3 = { version = "0.26", features = [ "extension-module", "abi3", "abi3-py310", ] } -pyo3-async-runtimes = { version = "0.25", features = ["tokio-runtime"] } -pyo3-log = "0.12.4" -arrow = { version = "56", features = ["pyarrow"] } -arrow-select = { version = "56" } -datafusion = { version = "50", features = ["avro", "unicode_expressions"] } -datafusion-substrait = { version = "50", optional = true } -datafusion-proto = { version = "50" } -datafusion-ffi = { version = "50" } -prost = "0.13.1" # keep in line with `datafusion-substrait` +pyo3-async-runtimes = { version = "0.26", features = ["tokio-runtime"] } +pyo3-log = "0.13.2" +arrow = { version = "57", features = ["pyarrow"] } +arrow-select = { version = "57" } +datafusion = { version = "51", features = ["avro", "unicode_expressions"] } +datafusion-substrait = { version = "51", optional = true } +datafusion-proto = { version = "51" } +datafusion-ffi = { version = "51" } +prost = "0.14.1" # keep in line with `datafusion-substrait` uuid = { version = "1.18", features = ["v4"] } mimalloc = { version = "0.1", optional = true, default-features = false, features = [ "local_dynamic_tls", @@ -80,8 +80,8 @@ log = "0.4.27" parking_lot = "0.12" [build-dependencies] -prost-types = "0.13.1" # keep in line with `datafusion-substrait` -pyo3-build-config = "0.25" +prost-types = "0.14.1" # keep in line with `datafusion-substrait` +pyo3-build-config = "0.26" [lib] name = "datafusion_python" diff --git a/examples/datafusion-ffi-example/Cargo.lock b/examples/datafusion-ffi-example/Cargo.lock index b2d8a3d52..148c05edd 100644 --- a/examples/datafusion-ffi-example/Cargo.lock +++ b/examples/datafusion-ffi-example/Cargo.lock @@ -50,15 +50,6 @@ dependencies = [ "core_extensions", ] -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.1" @@ -109,12 +100,6 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -144,9 +129,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "arrow" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e833808ff2d94ed40d9379848a950d995043c7fb3e81a30b383f4c6033821cc" +checksum = "4df8bb5b0bd64c0b9bc61317fcc480bad0f00e56d3bc32c69a4c8dada4786bae" dependencies = [ "arrow-arith", "arrow-array", @@ -165,23 +150,23 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad08897b81588f60ba983e3ca39bda2b179bdd84dced378e7df81a5313802ef8" +checksum = "a1a640186d3bd30a24cb42264c2dafb30e236a6f50d510e56d40b708c9582491" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", "chrono", - "num", + "num-traits", ] [[package]] name = "arrow-array" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8548ca7c070d8db9ce7aa43f37393e4bfcf3f2d3681df278490772fd1673d08d" +checksum = "219fe420e6800979744c8393b687afb0252b3f8a89b91027d27887b72aa36d31" dependencies = [ "ahash", "arrow-buffer", @@ -191,25 +176,28 @@ dependencies = [ "chrono-tz", "half", "hashbrown 0.16.0", - "num", + "num-complex", + "num-integer", + "num-traits", ] [[package]] name = "arrow-buffer" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e003216336f70446457e280807a73899dd822feaf02087d31febca1363e2fccc" +checksum = "76885a2697a7edf6b59577f568b456afc94ce0e2edc15b784ce3685b6c3c5c27" dependencies = [ "bytes", "half", - "num", + "num-bigint", + "num-traits", ] [[package]] name = "arrow-cast" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919418a0681298d3a77d1a315f625916cb5678ad0d74b9c60108eb15fd083023" +checksum = "9c9ebb4c987e6b3b236fb4a14b20b34835abfdd80acead3ccf1f9bf399e1f168" dependencies = [ "arrow-array", "arrow-buffer", @@ -222,15 +210,15 @@ dependencies = [ "comfy-table", "half", "lexical-core", - "num", + "num-traits", "ryu", ] [[package]] name = "arrow-csv" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa9bf02705b5cf762b6f764c65f04ae9082c7cfc4e96e0c33548ee3f67012eb" +checksum = "92386159c8d4bce96f8bd396b0642a0d544d471bdc2ef34d631aec80db40a09c" dependencies = [ "arrow-array", "arrow-cast", @@ -243,21 +231,22 @@ dependencies = [ [[package]] name = "arrow-data" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5c64fff1d142f833d78897a772f2e5b55b36cb3e6320376f0961ab0db7bd6d0" +checksum = "727681b95de313b600eddc2a37e736dcb21980a40f640314dcf360e2f36bc89b" dependencies = [ "arrow-buffer", "arrow-schema", "half", - "num", + "num-integer", + "num-traits", ] [[package]] name = "arrow-ipc" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3594dcddccc7f20fd069bc8e9828ce37220372680ff638c5e00dea427d88f5" +checksum = "da9ba92e3de170295c98a84e5af22e2b037f0c7b32449445e6c493b5fca27f27" dependencies = [ "arrow-array", "arrow-buffer", @@ -271,9 +260,9 @@ dependencies = [ [[package]] name = "arrow-json" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88cf36502b64a127dc659e3b305f1d993a544eab0d48cce704424e62074dc04b" +checksum = "b969b4a421ae83828591c6bf5450bd52e6d489584142845ad6a861f42fe35df8" dependencies = [ "arrow-array", "arrow-buffer", @@ -283,19 +272,21 @@ dependencies = [ "chrono", "half", "indexmap", + "itoa", "lexical-core", "memchr", - "num", - "serde", + "num-traits", + "ryu", + "serde_core", "serde_json", "simdutf8", ] [[package]] name = "arrow-ord" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c8f82583eb4f8d84d4ee55fd1cb306720cddead7596edce95b50ee418edf66f" +checksum = "141c05298b21d03e88062317a1f1a73f5ba7b6eb041b350015b1cd6aabc0519b" dependencies = [ "arrow-array", "arrow-buffer", @@ -306,9 +297,9 @@ dependencies = [ [[package]] name = "arrow-row" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d07ba24522229d9085031df6b94605e0f4b26e099fb7cdeec37abd941a73753" +checksum = "c5f3c06a6abad6164508ed283c7a02151515cef3de4b4ff2cebbcaeb85533db2" dependencies = [ "arrow-array", "arrow-buffer", @@ -319,34 +310,34 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3aa9e59c611ebc291c28582077ef25c97f1975383f1479b12f3b9ffee2ffabe" +checksum = "9cfa7a03d1eee2a4d061476e1840ad5c9867a544ca6c4c59256496af5d0a8be5" dependencies = [ "bitflags", - "serde", + "serde_core", "serde_json", ] [[package]] name = "arrow-select" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c41dbbd1e97bfcaee4fcb30e29105fb2c75e4d82ae4de70b792a5d3f66b2e7a" +checksum = "bafa595babaad59f2455f4957d0f26448fb472722c186739f4fac0823a1bdb47" dependencies = [ "ahash", "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", - "num", + "num-traits", ] [[package]] name = "arrow-string" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f5183c150fbc619eede22b861ea7c0eebed8eaac0333eaa7f6da5205fd504d" +checksum = "32f46457dbbb99f2650ff3ac23e46a929e0ab81db809b02aa5511c258348bef2" dependencies = [ "arrow-array", "arrow-buffer", @@ -354,7 +345,7 @@ dependencies = [ "arrow-schema", "arrow-select", "memchr", - "num", + "num-traits", "regex", "regex-syntax", ] @@ -405,7 +396,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -423,21 +414,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - [[package]] name = "base64" version = "0.22.1" @@ -544,9 +520,9 @@ dependencies = [ [[package]] name = "bzip2" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea8dcd42434048e4f7a304411d9273a411f647446c1234a65ce0554923f4cff" +checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" dependencies = [ "libbz2-rs-sys", ] @@ -580,14 +556,13 @@ checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "num-traits", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -753,22 +728,22 @@ dependencies = [ [[package]] name = "datafusion" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af15bb3c6ffa33011ef579f6b0bcbe7c26584688bd6c994f548e44df67f011a" +checksum = "8ba7cb113e9c0bedf9e9765926031e132fa05a1b09ba6e93a6d1a4d7044457b8" dependencies = [ "arrow", - "arrow-ipc", "arrow-schema", "async-trait", "bytes", - "bzip2 0.6.0", + "bzip2 0.6.1", "chrono", "datafusion-catalog", "datafusion-catalog-listing", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", + "datafusion-datasource-arrow", "datafusion-datasource-csv", "datafusion-datasource-json", "datafusion-datasource-parquet", @@ -797,6 +772,7 @@ dependencies = [ "parquet", "rand", "regex", + "rstest", "sqlparser", "tempfile", "tokio", @@ -808,9 +784,9 @@ dependencies = [ [[package]] name = "datafusion-catalog" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187622262ad8f7d16d3be9202b4c1e0116f1c9aa387e5074245538b755261621" +checksum = "66a3a799f914a59b1ea343906a0486f17061f39509af74e874a866428951130d" dependencies = [ "arrow", "async-trait", @@ -823,7 +799,6 @@ dependencies = [ "datafusion-physical-expr", "datafusion-physical-plan", "datafusion-session", - "datafusion-sql", "futures", "itertools", "log", @@ -834,9 +809,9 @@ dependencies = [ [[package]] name = "datafusion-catalog-listing" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9657314f0a32efd0382b9a46fdeb2d233273ece64baa68a7c45f5a192daf0f83" +checksum = "6db1b113c80d7a0febcd901476a57aef378e717c54517a163ed51417d87621b0" dependencies = [ "arrow", "async-trait", @@ -846,10 +821,11 @@ dependencies = [ "datafusion-execution", "datafusion-expr", "datafusion-physical-expr", + "datafusion-physical-expr-adapter", "datafusion-physical-expr-common", "datafusion-physical-plan", - "datafusion-session", "futures", + "itertools", "log", "object_store", "tokio", @@ -857,14 +833,13 @@ dependencies = [ [[package]] name = "datafusion-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a83760d9a13122d025fbdb1d5d5aaf93dd9ada5e90ea229add92aa30898b2d1" +checksum = "7c10f7659e96127d25e8366be7c8be4109595d6a2c3eac70421f380a7006a1b0" dependencies = [ "ahash", "arrow", "arrow-ipc", - "base64", "chrono", "half", "hashbrown 0.14.5", @@ -882,9 +857,9 @@ dependencies = [ [[package]] name = "datafusion-common-runtime" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b6234a6c7173fe5db1c6c35c01a12b2aa0f803a3007feee53483218817f8b1e" +checksum = "b92065bbc6532c6651e2f7dd30b55cba0c7a14f860c7e1d15f165c41a1868d95" dependencies = [ "futures", "log", @@ -893,15 +868,15 @@ dependencies = [ [[package]] name = "datafusion-datasource" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7256c9cb27a78709dd42d0c80f0178494637209cac6e29d5c93edd09b6721b86" +checksum = "fde13794244bc7581cd82f6fff217068ed79cdc344cafe4ab2c3a1c3510b38d6" dependencies = [ "arrow", "async-compression", "async-trait", "bytes", - "bzip2 0.6.0", + "bzip2 0.6.1", "chrono", "datafusion-common", "datafusion-common-runtime", @@ -918,9 +893,7 @@ dependencies = [ "itertools", "log", "object_store", - "parquet", "rand", - "tempfile", "tokio", "tokio-util", "url", @@ -928,22 +901,44 @@ dependencies = [ "zstd", ] +[[package]] +name = "datafusion-datasource-arrow" +version = "51.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "804fa9b4ecf3157982021770617200ef7c1b2979d57bec9044748314775a9aea" +dependencies = [ + "arrow", + "arrow-ipc", + "async-trait", + "bytes", + "datafusion-common", + "datafusion-common-runtime", + "datafusion-datasource", + "datafusion-execution", + "datafusion-expr", + "datafusion-physical-expr-common", + "datafusion-physical-plan", + "datafusion-session", + "futures", + "itertools", + "object_store", + "tokio", +] + [[package]] name = "datafusion-datasource-csv" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64533a90f78e1684bfb113d200b540f18f268134622d7c96bbebc91354d04825" +checksum = "61a1641a40b259bab38131c5e6f48fac0717bedb7dc93690e604142a849e0568" dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", "datafusion-execution", "datafusion-expr", - "datafusion-physical-expr", "datafusion-physical-expr-common", "datafusion-physical-plan", "datafusion-session", @@ -955,49 +950,44 @@ dependencies = [ [[package]] name = "datafusion-datasource-json" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d7ebeb12c77df0aacad26f21b0d033aeede423a64b2b352f53048a75bf1d6e6" +checksum = "adeacdb00c1d37271176f8fb6a1d8ce096baba16ea7a4b2671840c5c9c64fe85" dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", "datafusion-execution", "datafusion-expr", - "datafusion-physical-expr", "datafusion-physical-expr-common", "datafusion-physical-plan", "datafusion-session", "futures", "object_store", - "serde_json", "tokio", ] [[package]] name = "datafusion-datasource-parquet" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09e783c4c7d7faa1199af2df4761c68530634521b176a8d1331ddbc5a5c75133" +checksum = "43d0b60ffd66f28bfb026565d62b0a6cbc416da09814766a3797bba7d85a3cd9" dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", "datafusion-execution", "datafusion-expr", - "datafusion-functions-aggregate", + "datafusion-functions-aggregate-common", "datafusion-physical-expr", "datafusion-physical-expr-adapter", "datafusion-physical-expr-common", - "datafusion-physical-optimizer", "datafusion-physical-plan", "datafusion-pruning", "datafusion-session", @@ -1007,21 +997,20 @@ dependencies = [ "object_store", "parking_lot", "parquet", - "rand", "tokio", ] [[package]] name = "datafusion-doc" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ee6b1d9a80d13f9deb2291f45c07044b8e62fb540dbde2453a18be17a36429" +checksum = "2b99e13947667b36ad713549237362afb054b2d8f8cc447751e23ec61202db07" [[package]] name = "datafusion-execution" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4cec0a57653bec7b933fb248d3ffa3fa3ab3bd33bd140dc917f714ac036f531" +checksum = "63695643190679037bc946ad46a263b62016931547bf119859c511f7ff2f5178" dependencies = [ "arrow", "async-trait", @@ -1039,9 +1028,9 @@ dependencies = [ [[package]] name = "datafusion-expr" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef76910bdca909722586389156d0aa4da4020e1631994d50fadd8ad4b1aa05fe" +checksum = "f9a4787cbf5feb1ab351f789063398f67654a6df75c4d37d7f637dc96f951a91" dependencies = [ "arrow", "async-trait", @@ -1053,6 +1042,7 @@ dependencies = [ "datafusion-functions-window-common", "datafusion-physical-expr-common", "indexmap", + "itertools", "paste", "recursive", "serde_json", @@ -1061,9 +1051,9 @@ dependencies = [ [[package]] name = "datafusion-expr-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d155ccbda29591ca71a1344dd6bed26c65a4438072b400df9db59447f590bb6" +checksum = "5ce2fb1b8c15c9ac45b0863c30b268c69dc9ee7a1ee13ecf5d067738338173dc" dependencies = [ "arrow", "datafusion-common", @@ -1074,9 +1064,9 @@ dependencies = [ [[package]] name = "datafusion-ffi" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ddb7c4e645df080c27dad13a198d191da328dd1c98e198664a7a0f64b335cc" +checksum = "ec510e7787641279b0336e8b79e4b7bd1385d5976875ff9b97f4269ce5231a67" dependencies = [ "abi_stable", "arrow", @@ -1084,6 +1074,7 @@ dependencies = [ "async-ffi", "async-trait", "datafusion", + "datafusion-common", "datafusion-functions-aggregate-common", "datafusion-proto", "datafusion-proto-common", @@ -1110,9 +1101,9 @@ dependencies = [ [[package]] name = "datafusion-functions" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de2782136bd6014670fd84fe3b0ca3b3e4106c96403c3ae05c0598577139977" +checksum = "794a9db7f7b96b3346fc007ff25e994f09b8f0511b4cf7dff651fadfe3ebb28f" dependencies = [ "arrow", "arrow-buffer", @@ -1130,6 +1121,7 @@ dependencies = [ "itertools", "log", "md-5", + "num-traits", "rand", "regex", "sha2", @@ -1139,9 +1131,9 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07331fc13603a9da97b74fd8a273f4238222943dffdbbed1c4c6f862a30105bf" +checksum = "1c25210520a9dcf9c2b2cbbce31ebd4131ef5af7fc60ee92b266dc7d159cb305" dependencies = [ "ahash", "arrow", @@ -1160,9 +1152,9 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5951e572a8610b89968a09b5420515a121fbc305c0258651f318dc07c97ab17" +checksum = "62f4a66f3b87300bb70f4124b55434d2ae3fe80455f3574701d0348da040b55d" dependencies = [ "ahash", "arrow", @@ -1173,9 +1165,9 @@ dependencies = [ [[package]] name = "datafusion-functions-nested" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdacca9302c3d8fc03f3e94f338767e786a88a33f5ebad6ffc0e7b50364b9ea3" +checksum = "ae5c06eed03918dc7fe7a9f082a284050f0e9ecf95d72f57712d1496da03b8c4" dependencies = [ "arrow", "arrow-ord", @@ -1183,6 +1175,7 @@ dependencies = [ "datafusion-doc", "datafusion-execution", "datafusion-expr", + "datafusion-expr-common", "datafusion-functions", "datafusion-functions-aggregate", "datafusion-functions-aggregate-common", @@ -1195,9 +1188,9 @@ dependencies = [ [[package]] name = "datafusion-functions-table" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37ff8a99434fbbad604a7e0669717c58c7c4f14c472d45067c4b016621d981" +checksum = "db4fed1d71738fbe22e2712d71396db04c25de4111f1ec252b8f4c6d3b25d7f5" dependencies = [ "arrow", "async-trait", @@ -1211,9 +1204,9 @@ dependencies = [ [[package]] name = "datafusion-functions-window" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e2aea7c79c926cffabb13dc27309d4eaeb130f4a21c8ba91cdd241c813652b" +checksum = "1d92206aa5ae21892f1552b4d61758a862a70956e6fd7a95cb85db1de74bc6d1" dependencies = [ "arrow", "datafusion-common", @@ -1229,9 +1222,9 @@ dependencies = [ [[package]] name = "datafusion-functions-window-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fead257ab5fd2ffc3b40fda64da307e20de0040fe43d49197241d9de82a487f" +checksum = "53ae9bcc39800820d53a22d758b3b8726ff84a5a3e24cecef04ef4e5fdf1c7cc" dependencies = [ "datafusion-common", "datafusion-physical-expr-common", @@ -1239,20 +1232,20 @@ dependencies = [ [[package]] name = "datafusion-macros" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec6f637bce95efac05cdfb9b6c19579ed4aa5f6b94d951cfa5bb054b7bb4f730" +checksum = "1063ad4c9e094b3f798acee16d9a47bd7372d9699be2de21b05c3bd3f34ab848" dependencies = [ - "datafusion-expr", + "datafusion-doc", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "datafusion-optimizer" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6583ef666ae000a613a837e69e456681a9faa96347bf3877661e9e89e141d8a" +checksum = "9f35f9ec5d08b87fd1893a30c2929f2559c2f9806ca072d8fefca5009dc0f06a" dependencies = [ "arrow", "chrono", @@ -1270,9 +1263,9 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8668103361a272cbbe3a61f72eca60c9b7c706e87cc3565bcf21e2b277b84f6" +checksum = "c30cc8012e9eedcb48bbe112c6eff4ae5ed19cf3003cb0f505662e88b7014c5d" dependencies = [ "ahash", "arrow", @@ -1285,7 +1278,6 @@ dependencies = [ "hashbrown 0.14.5", "indexmap", "itertools", - "log", "parking_lot", "paste", "petgraph", @@ -1293,9 +1285,9 @@ dependencies = [ [[package]] name = "datafusion-physical-expr-adapter" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "815acced725d30601b397e39958e0e55630e0a10d66ef7769c14ae6597298bb0" +checksum = "7f9ff2dbd476221b1f67337699eff432781c4e6e1713d2aefdaa517dfbf79768" dependencies = [ "arrow", "datafusion-common", @@ -1308,9 +1300,9 @@ dependencies = [ [[package]] name = "datafusion-physical-expr-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6652fe7b5bf87e85ed175f571745305565da2c0b599d98e697bcbedc7baa47c3" +checksum = "90da43e1ec550b172f34c87ec68161986ced70fd05c8d2a2add66eef9c276f03" dependencies = [ "ahash", "arrow", @@ -1322,9 +1314,9 @@ dependencies = [ [[package]] name = "datafusion-physical-optimizer" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b7d623eb6162a3332b564a0907ba00895c505d101b99af78345f1acf929b5c" +checksum = "ce9804f799acd7daef3be7aaffe77c0033768ed8fdbf5fb82fc4c5f2e6bc14e6" dependencies = [ "arrow", "datafusion-common", @@ -1336,15 +1328,14 @@ dependencies = [ "datafusion-physical-plan", "datafusion-pruning", "itertools", - "log", "recursive", ] [[package]] name = "datafusion-physical-plan" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f7f778a1a838dec124efb96eae6144237d546945587557c9e6936b3414558c" +checksum = "0acf0ad6b6924c6b1aa7d213b181e012e2d3ec0a64ff5b10ee6282ab0f8532ac" dependencies = [ "ahash", "arrow", @@ -1373,15 +1364,26 @@ dependencies = [ [[package]] name = "datafusion-proto" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7df9f606892e6af45763d94d210634eec69b9bb6ced5353381682ff090028a3" +checksum = "d368093a98a17d1449b1083ac22ed16b7128e4c67789991869480d8c4a40ecb9" dependencies = [ "arrow", "chrono", - "datafusion", + "datafusion-catalog", + "datafusion-catalog-listing", "datafusion-common", + "datafusion-datasource", + "datafusion-datasource-arrow", + "datafusion-datasource-csv", + "datafusion-datasource-json", + "datafusion-datasource-parquet", + "datafusion-execution", "datafusion-expr", + "datafusion-functions-table", + "datafusion-physical-expr", + "datafusion-physical-expr-common", + "datafusion-physical-plan", "datafusion-proto-common", "object_store", "prost", @@ -1389,9 +1391,9 @@ dependencies = [ [[package]] name = "datafusion-proto-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b14f288ca4ef77743d9672cafecf3adfffff0b9b04af9af79ecbeaaf736901" +checksum = "3b6aef3d5e5c1d2bc3114c4876730cb76a9bdc5a8df31ef1b6db48f0c1671895" dependencies = [ "arrow", "datafusion-common", @@ -1400,12 +1402,11 @@ dependencies = [ [[package]] name = "datafusion-pruning" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd1e59e2ca14fe3c30f141600b10ad8815e2856caa59ebbd0e3e07cd3d127a65" +checksum = "ac2c2498a1f134a9e11a9f5ed202a2a7d7e9774bd9249295593053ea3be999db" dependencies = [ "arrow", - "arrow-schema", "datafusion-common", "datafusion-datasource", "datafusion-expr-common", @@ -1418,36 +1419,27 @@ dependencies = [ [[package]] name = "datafusion-session" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21ef8e2745583619bd7a49474e8f45fbe98ebb31a133f27802217125a7b3d58d" +checksum = "8f96eebd17555386f459037c65ab73aae8df09f464524c709d6a3134ad4f4776" dependencies = [ - "arrow", "async-trait", - "dashmap", "datafusion-common", - "datafusion-common-runtime", "datafusion-execution", "datafusion-expr", - "datafusion-physical-expr", "datafusion-physical-plan", - "datafusion-sql", - "futures", - "itertools", - "log", - "object_store", "parking_lot", - "tokio", ] [[package]] name = "datafusion-sql" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89abd9868770386fede29e5a4b14f49c0bf48d652c3b9d7a8a0332329b87d50b" +checksum = "3fc195fe60634b2c6ccfd131b487de46dc30eccae8a3c35a13f136e7f440414f" dependencies = [ "arrow", "bigdecimal", + "chrono", "datafusion-common", "datafusion-expr", "indexmap", @@ -1476,7 +1468,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -1525,9 +1517,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.1.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" dependencies = [ "crc32fast", "libz-rs-sys", @@ -1611,7 +1603,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -1626,6 +1618,12 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" + [[package]] name = "futures-util" version = "0.3.31" @@ -1670,10 +1668,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.11.1+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -1688,12 +1684,6 @@ dependencies = [ "wasi 0.14.2+wasi-0.2.4", ] -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - [[package]] name = "glob" version = "0.3.3" @@ -1702,13 +1692,14 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "half" -version = "2.6.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ "cfg-if", "crunchy", "num-traits", + "zerocopy", ] [[package]] @@ -1727,8 +1718,6 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "allocator-api2", - "equivalent", "foldhash", ] @@ -1900,12 +1889,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" dependencies = [ "equivalent", - "hashbrown 0.15.5", + "hashbrown 0.16.0", ] [[package]] @@ -1920,17 +1909,6 @@ version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" -[[package]] -name = "io-uring" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" -dependencies = [ - "bitflags", - "cfg-if", - "libc", -] - [[package]] name = "itertools" version = "0.14.0" @@ -2038,9 +2016,9 @@ checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" [[package]] name = "libc" -version = "0.2.175" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libloading" @@ -2147,31 +2125,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", -] - -[[package]] -name = "mio" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" -dependencies = [ - "libc", - "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.59.0", -] - -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", + "simd-adler32", ] [[package]] @@ -2202,28 +2156,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -2234,20 +2166,11 @@ dependencies = [ "libm", ] -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - [[package]] name = "object_store" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efc4f07659e11cd45a341cd24d71e683e3be65d9ff1f8150061678fe60437496" +checksum = "4c1be0c6c22ec0817cdc77d3842f721a17fd30ab6965001415b5402a74e6b740" dependencies = [ "async-trait", "bytes", @@ -2307,9 +2230,9 @@ dependencies = [ [[package]] name = "parquet" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dbd48ad52d7dccf8ea1b90a3ddbfaea4f69878dd7683e51c507d4bc52b5b27" +checksum = "7a0f31027ef1af7549f7cec603a9a21dce706d3f8d7c2060a68f43c1773be95a" dependencies = [ "ahash", "arrow-array", @@ -2328,11 +2251,11 @@ dependencies = [ "half", "hashbrown 0.16.0", "lz4_flex", - "num", "num-bigint", + "num-integer", + "num-traits", "object_store", "paste", - "ring", "seq-macro", "simdutf8", "snap", @@ -2356,9 +2279,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "petgraph" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54acf3a685220b533e437e264e4d932cfbdc4cc7ec0cd232ed73c08d03b8a7ca" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset", "hashbrown 0.15.5", @@ -2426,6 +2349,15 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "proc-macro-crate" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit", +] + [[package]] name = "proc-macro2" version = "1.0.101" @@ -2437,9 +2369,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" dependencies = [ "bytes", "prost-derive", @@ -2447,15 +2379,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2469,9 +2401,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a" +checksum = "37a6df7eab65fc7bee654a421404947e10a0f7085b6951bf2ea395f4659fb0cf" dependencies = [ "indoc", "libc", @@ -2486,19 +2418,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598" +checksum = "f77d387774f6f6eec64a004eac0ed525aab7fa1966d94b42f743797b3e395afb" dependencies = [ - "once_cell", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c" +checksum = "2dd13844a4242793e02df3e2ec093f540d948299a6a77ea9ce7afd8623f542be" dependencies = [ "libc", "pyo3-build-config", @@ -2506,34 +2437,34 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50" +checksum = "eaf8f9f1108270b90d3676b8679586385430e5c0bb78bb5f043f95499c821a71" dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "pyo3-macros-backend" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc" +checksum = "70a3b2274450ba5288bc9b8c1b69ff569d1d61189d4bff38f8d22e03d17f932b" dependencies = [ "heck", "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "quote" -version = "1.0.40" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] @@ -2590,7 +2521,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76009fbe0614077fc1a2ce255e3a1881a2e3a3527097d5dc6d8212c585e7e38b" dependencies = [ "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2604,9 +2535,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.2" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -2616,9 +2547,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -2631,6 +2562,12 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" +[[package]] +name = "relative-path" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" + [[package]] name = "repr_offset" version = "0.2.2" @@ -2641,24 +2578,33 @@ dependencies = [ ] [[package]] -name = "ring" -version = "0.17.14" +name = "rstest" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +checksum = "f5a3193c063baaa2a95a33f03035c8a72b83d97a54916055ba22d35ed3839d49" dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.16", - "libc", - "untrusted", - "windows-sys 0.52.0", + "futures-timer", + "futures-util", + "rstest_macros", ] [[package]] -name = "rustc-demangle" -version = "0.1.26" +name = "rstest_macros" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" +checksum = "9c845311f0ff7951c5506121a9ad75aec44d083c31583b2ea5a30bcb0b0abba0" +dependencies = [ + "cfg-if", + "glob", + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version", + "syn 2.0.111", + "unicode-ident", +] [[package]] name = "rustc_version" @@ -2711,9 +2657,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "seq-macro" @@ -2723,22 +2669,32 @@ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2770,6 +2726,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "simdutf8" version = "0.1.5" @@ -2802,9 +2764,9 @@ checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "sqlparser" -version = "0.58.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4b661c54b1e4b603b37873a18c59920e4c51ea8ea2cf527d925424dbd4437c" +checksum = "4591acadbcf52f0af60eafbb2c003232b2b4cd8de5f0e9437cb8b1b59046cc0f" dependencies = [ "log", "recursive", @@ -2819,7 +2781,7 @@ checksum = "da5fc6819faabb412da764b99d3b713bb55083c11e7e0c00144d386cd6a1939c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2863,7 +2825,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2885,9 +2847,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.106" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -2902,7 +2864,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2941,7 +2903,7 @@ checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2976,29 +2938,24 @@ dependencies = [ [[package]] name = "tokio" -version = "1.47.1" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ - "backtrace", "bytes", - "io-uring", - "libc", - "mio", "pin-project-lite", - "slab", "tokio-macros", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3014,6 +2971,36 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml_datetime" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.23.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +dependencies = [ + "winnow", +] + [[package]] name = "tracing" version = "0.1.41" @@ -3033,7 +3020,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3108,12 +3095,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "url" version = "2.5.7" @@ -3196,7 +3177,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "wasm-bindgen-shared", ] @@ -3231,7 +3212,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3304,7 +3285,7 @@ checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", - "windows-link", + "windows-link 0.1.3", "windows-result", "windows-strings", ] @@ -3317,7 +3298,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3328,7 +3309,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3337,13 +3318,19 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + [[package]] name = "windows-result" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -3352,16 +3339,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", + "windows-link 0.1.3", ] [[package]] @@ -3404,7 +3382,7 @@ version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ - "windows-link", + "windows-link 0.1.3", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -3511,6 +3489,15 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +[[package]] +name = "winnow" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +dependencies = [ + "memchr", +] + [[package]] name = "wit-bindgen-rt" version = "0.39.0" @@ -3555,7 +3542,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "synstructure", ] @@ -3576,7 +3563,7 @@ checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3596,7 +3583,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "synstructure", ] @@ -3630,7 +3617,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] diff --git a/examples/datafusion-ffi-example/Cargo.toml b/examples/datafusion-ffi-example/Cargo.toml index b47403f09..8150156d6 100644 --- a/examples/datafusion-ffi-example/Cargo.toml +++ b/examples/datafusion-ffi-example/Cargo.toml @@ -21,16 +21,16 @@ version = "0.2.0" edition = "2021" [dependencies] -datafusion = { version = "50" } -datafusion-ffi = { version = "50" } -pyo3 = { version = "0.25", features = ["extension-module", "abi3", "abi3-py310"] } -arrow = { version = "56" } -arrow-array = { version = "56" } -arrow-schema = { version = "56" } +datafusion = { version = "51" } +datafusion-ffi = { version = "51" } +pyo3 = { version = "0.27", features = ["extension-module", "abi3", "abi3-py310"] } +arrow = { version = "57" } +arrow-array = { version = "57" } +arrow-schema = { version = "57" } async-trait = "0.1.88" [build-dependencies] -pyo3-build-config = "0.25" +pyo3-build-config = "0.27" [lib] name = "datafusion_ffi_example" diff --git a/python/datafusion/expr.py b/python/datafusion/expr.py index 3a6d04413..695fe7c49 100644 --- a/python/datafusion/expr.py +++ b/python/datafusion/expr.py @@ -695,7 +695,7 @@ def types(self) -> DataTypeMap: return self.expr.types() def python_value(self) -> Any: - """Extracts the Expr value into a PyObject. + """Extracts the Expr value into `Any`. This is only valid for literal expressions. diff --git a/python/tests/test_expr.py b/python/tests/test_expr.py index 7847826ac..28c71549b 100644 --- a/python/tests/test_expr.py +++ b/python/tests/test_expr.py @@ -895,10 +895,10 @@ def test_alias_with_metadata(df): col("d").arrow_typeof(), pa.array( [ - 'List(Field { name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })', # noqa: E501 - 'List(Field { name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })', # noqa: E501 - 'List(Field { name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })', # noqa: E501 - 'List(Field { name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })', # noqa: E501 + "List(nullable Int64)", + "List(nullable Int64)", + "List(nullable Int64)", + "List(nullable Int64)", ], type=pa.string(), ), diff --git a/python/tests/test_functions.py b/python/tests/test_functions.py index 2b253051f..34c8c5c9f 100644 --- a/python/tests/test_functions.py +++ b/python/tests/test_functions.py @@ -766,7 +766,7 @@ def test_array_function_obj_tests(stmt, py_expr): ), ( f.regexp_replace(column("a"), literal("(ell|orl)"), literal("-")), - pa.array(["H-o", "W-d", "!"]), + pa.array(["H-o", "W-d", "!"], type=pa.string_view()), ), ( f.regexp_count(column("a"), literal("(ell|orl)"), literal(1)), diff --git a/src/catalog.rs b/src/catalog.rs index 6f949f8ca..f8b86ec6a 100644 --- a/src/catalog.rs +++ b/src/catalog.rs @@ -63,7 +63,7 @@ impl From> for PySchema { #[pymethods] impl PyCatalog { #[new] - fn new(catalog: PyObject) -> Self { + fn new(catalog: Py) -> Self { let catalog_provider = Arc::new(RustWrappedPyCatalogProvider::new(catalog)) as Arc; catalog_provider.into() @@ -81,7 +81,7 @@ impl PyCatalog { } #[pyo3(signature = (name="public"))] - fn schema(&self, name: &str) -> PyResult { + fn schema(&self, name: &str) -> PyResult> { let schema = self .catalog .schema(name) @@ -89,7 +89,7 @@ impl PyCatalog { "Schema with name {name} doesn't exist." )))?; - Python::with_gil(|py| { + Python::attach(|py| { match schema .as_any() .downcast_ref::() @@ -146,7 +146,7 @@ impl PyCatalog { #[pymethods] impl PySchema { #[new] - fn new(schema_provider: PyObject) -> Self { + fn new(schema_provider: Py) -> Self { let schema_provider = Arc::new(RustWrappedPySchemaProvider::new(schema_provider)) as Arc; schema_provider.into() @@ -202,13 +202,13 @@ impl PySchema { #[derive(Debug)] pub(crate) struct RustWrappedPySchemaProvider { - schema_provider: PyObject, + schema_provider: Py, owner_name: Option, } impl RustWrappedPySchemaProvider { - pub fn new(schema_provider: PyObject) -> Self { - let owner_name = Python::with_gil(|py| { + pub fn new(schema_provider: Py) -> Self { + let owner_name = Python::attach(|py| { schema_provider .bind(py) .getattr("owner_name") @@ -223,7 +223,7 @@ impl RustWrappedPySchemaProvider { } fn table_inner(&self, name: &str) -> PyResult>> { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.schema_provider.bind(py); let py_table_method = provider.getattr("table")?; @@ -250,7 +250,7 @@ impl SchemaProvider for RustWrappedPySchemaProvider { } fn table_names(&self) -> Vec { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.schema_provider.bind(py); provider @@ -276,7 +276,7 @@ impl SchemaProvider for RustWrappedPySchemaProvider { table: Arc, ) -> datafusion::common::Result>> { let py_table = PyTable::from(table); - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.schema_provider.bind(py); let _ = provider .call_method1("register_table", (name, py_table)) @@ -292,7 +292,7 @@ impl SchemaProvider for RustWrappedPySchemaProvider { &self, name: &str, ) -> datafusion::common::Result>> { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.schema_provider.bind(py); let table = provider .call_method1("deregister_table", (name,)) @@ -313,7 +313,7 @@ impl SchemaProvider for RustWrappedPySchemaProvider { } fn table_exist(&self, name: &str) -> bool { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.schema_provider.bind(py); provider .call_method1("table_exist", (name,)) @@ -325,16 +325,16 @@ impl SchemaProvider for RustWrappedPySchemaProvider { #[derive(Debug)] pub(crate) struct RustWrappedPyCatalogProvider { - pub(crate) catalog_provider: PyObject, + pub(crate) catalog_provider: Py, } impl RustWrappedPyCatalogProvider { - pub fn new(catalog_provider: PyObject) -> Self { + pub fn new(catalog_provider: Py) -> Self { Self { catalog_provider } } fn schema_inner(&self, name: &str) -> PyResult>> { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.catalog_provider.bind(py); let py_schema = provider.call_method1("schema", (name,))?; @@ -379,7 +379,7 @@ impl CatalogProvider for RustWrappedPyCatalogProvider { } fn schema_names(&self) -> Vec { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.catalog_provider.bind(py); provider .getattr("schema_names") @@ -405,7 +405,7 @@ impl CatalogProvider for RustWrappedPyCatalogProvider { ) -> datafusion::common::Result>> { // JRIGHT HERE // let py_schema: PySchema = schema.into(); - Python::with_gil(|py| { + Python::attach(|py| { let py_schema = match schema .as_any() .downcast_ref::() @@ -436,7 +436,7 @@ impl CatalogProvider for RustWrappedPyCatalogProvider { name: &str, cascade: bool, ) -> datafusion::common::Result>> { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.catalog_provider.bind(py); let schema = provider .call_method1("deregister_schema", (name, cascade)) diff --git a/src/common/data_type.rs b/src/common/data_type.rs index 69f686f78..55848da5c 100644 --- a/src/common/data_type.rs +++ b/src/common/data_type.rs @@ -18,7 +18,7 @@ use datafusion::arrow::array::Array; use datafusion::arrow::datatypes::{DataType, IntervalUnit, TimeUnit}; use datafusion::common::ScalarValue; -use datafusion::logical_expr::sqlparser::ast::NullTreatment as DFNullTreatment; +use datafusion::logical_expr::expr::NullTreatment as DFNullTreatment; use pyo3::exceptions::{PyNotImplementedError, PyValueError}; use pyo3::prelude::*; @@ -261,6 +261,12 @@ impl DataTypeMap { ScalarValue::Float16(_) => Ok(DataType::Float16), ScalarValue::Float32(_) => Ok(DataType::Float32), ScalarValue::Float64(_) => Ok(DataType::Float64), + ScalarValue::Decimal32(_, precision, scale) => { + Ok(DataType::Decimal32(*precision, *scale)) + } + ScalarValue::Decimal64(_, precision, scale) => { + Ok(DataType::Decimal64(*precision, *scale)) + } ScalarValue::Decimal128(_, precision, scale) => { Ok(DataType::Decimal128(*precision, *scale)) } diff --git a/src/config.rs b/src/config.rs index a25a4072e..583dea7ef 100644 --- a/src/config.rs +++ b/src/config.rs @@ -64,7 +64,7 @@ impl PyConfig { } /// Set a configuration option - pub fn set(&self, key: &str, value: PyObject, py: Python) -> PyDataFusionResult<()> { + pub fn set(&self, key: &str, value: Py, py: Python) -> PyDataFusionResult<()> { let scalar_value = py_obj_to_scalar_value(py, value)?; let mut options = self.config.write(); options.set(key, scalar_value.to_string().as_str())?; @@ -72,7 +72,7 @@ impl PyConfig { } /// Get all configuration options - pub fn get_all(&self, py: Python) -> PyResult { + pub fn get_all(&self, py: Python) -> PyResult> { let entries: Vec<(String, Option)> = { let options = self.config.read(); options diff --git a/src/context.rs b/src/context.rs index f64cc1683..f71dca2b4 100644 --- a/src/context.rs +++ b/src/context.rs @@ -845,12 +845,12 @@ impl PySessionContext { } #[pyo3(signature = (name="datafusion"))] - pub fn catalog(&self, name: &str) -> PyResult { + pub fn catalog(&self, name: &str) -> PyResult> { let catalog = self.ctx.catalog(name).ok_or(PyKeyError::new_err(format!( "Catalog with name {name} doesn't exist." )))?; - Python::with_gil(|py| { + Python::attach(|py| { match catalog .as_any() .downcast_ref::() diff --git a/src/dataframe.rs b/src/dataframe.rs index 21eb6e0e2..f8f3ee8e6 100644 --- a/src/dataframe.rs +++ b/src/dataframe.rs @@ -281,7 +281,11 @@ impl PyDataFrame { Arc::clone(&self.df) } - fn prepare_repr_string(&self, py: Python, as_html: bool) -> PyDataFusionResult { + fn prepare_repr_string<'py>( + &self, + py: Python<'py>, + as_html: bool, + ) -> PyDataFusionResult { // Get the Python formatter and config let PythonFormatter { formatter, config } = get_python_formatter_with_config(py)?; @@ -309,11 +313,11 @@ impl PyDataFrame { let table_uuid = uuid::Uuid::new_v4().to_string(); - // Convert record batches to PyObject list + // Convert record batches to Py list let py_batches = batches .iter() .map(|rb| rb.to_pyarrow(py)) - .collect::>>()?; + .collect::>>>()?; let py_schema = self.schema().into_pyobject(py)?; @@ -378,7 +382,7 @@ impl Iterator for PartitionedDataFrameStreamReader { while self.current < self.streams.len() { let stream = &mut self.streams[self.current]; let fut = poll_next_batch(stream); - let result = Python::with_gil(|py| wait_for_future(py, fut)); + let result = Python::attach(|py| wait_for_future(py, fut)); match result { Ok(Ok(Some(batch))) => { @@ -486,7 +490,7 @@ impl PyDataFrame { /// Returns the schema from the logical plan fn schema(&self) -> PyArrowType { - PyArrowType(self.df.schema().into()) + PyArrowType(self.df.schema().as_arrow().clone()) } /// Convert this DataFrame into a Table Provider that can be used in register_table @@ -597,7 +601,7 @@ impl PyDataFrame { /// Executes the plan, returning a list of `RecordBatch`es. /// Unless some order is specified in the plan, there is no /// guarantee of the order of the result. - fn collect(&self, py: Python) -> PyResult> { + fn collect<'py>(&self, py: Python<'py>) -> PyResult>> { let batches = wait_for_future(py, self.df.as_ref().clone().collect())? .map_err(PyDataFusionError::from)?; // cannot use PyResult> return type due to @@ -613,7 +617,7 @@ impl PyDataFrame { /// Executes this DataFrame and collects all results into a vector of vector of RecordBatch /// maintaining the input partitioning. - fn collect_partitioned(&self, py: Python) -> PyResult>> { + fn collect_partitioned<'py>(&self, py: Python<'py>) -> PyResult>>> { let batches = wait_for_future(py, self.df.as_ref().clone().collect_partitioned())? .map_err(PyDataFusionError::from)?; @@ -623,7 +627,7 @@ impl PyDataFrame { .collect() } - fn collect_column(&self, py: Python, column: &str) -> PyResult { + fn collect_column<'py>(&self, py: Python<'py>, column: &str) -> PyResult> { wait_for_future(py, self.collect_column_inner(column))? .map_err(PyDataFusionError::from)? .to_data() @@ -1022,14 +1026,14 @@ impl PyDataFrame { /// Convert to Arrow Table /// Collect the batches and pass to Arrow Table - fn to_arrow_table(&self, py: Python<'_>) -> PyResult { + fn to_arrow_table(&self, py: Python<'_>) -> PyResult> { let batches = self.collect(py)?.into_pyobject(py)?; let schema = self.schema().into_pyobject(py)?; // Instantiate pyarrow Table object and use its from_batches method let table_class = py.import("pyarrow")?.getattr("Table")?; let args = PyTuple::new(py, &[batches, schema])?; - let table: PyObject = table_class.call_method1("from_batches", args)?.into(); + let table: Py = table_class.call_method1("from_batches", args)?.into(); Ok(table) } @@ -1042,7 +1046,7 @@ impl PyDataFrame { let df = self.df.as_ref().clone(); let streams = spawn_future(py, async move { df.execute_stream_partitioned().await })?; - let mut schema: Schema = self.df.schema().to_owned().into(); + let mut schema: Schema = self.df.schema().to_owned().as_arrow().clone(); let mut projection: Option = None; if let Some(schema_capsule) = requested_schema { @@ -1088,7 +1092,7 @@ impl PyDataFrame { /// Convert to pandas dataframe with pyarrow /// Collect the batches, pass to Arrow Table & then convert to Pandas DataFrame - fn to_pandas(&self, py: Python<'_>) -> PyResult { + fn to_pandas(&self, py: Python<'_>) -> PyResult> { let table = self.to_arrow_table(py)?; // See also: https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.to_pandas @@ -1098,7 +1102,7 @@ impl PyDataFrame { /// Convert to Python list using pyarrow /// Each list item represents one row encoded as dictionary - fn to_pylist(&self, py: Python<'_>) -> PyResult { + fn to_pylist(&self, py: Python<'_>) -> PyResult> { let table = self.to_arrow_table(py)?; // See also: https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.to_pylist @@ -1108,7 +1112,7 @@ impl PyDataFrame { /// Convert to Python dictionary using pyarrow /// Each dictionary key is a column and the dictionary value represents the column values - fn to_pydict(&self, py: Python) -> PyResult { + fn to_pydict(&self, py: Python) -> PyResult> { let table = self.to_arrow_table(py)?; // See also: https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.to_pydict @@ -1118,11 +1122,11 @@ impl PyDataFrame { /// Convert to polars dataframe with pyarrow /// Collect the batches, pass to Arrow Table & then convert to polars DataFrame - fn to_polars(&self, py: Python<'_>) -> PyResult { + fn to_polars(&self, py: Python<'_>) -> PyResult> { let table = self.to_arrow_table(py)?; let dataframe = py.import("polars")?.getattr("DataFrame")?; let args = PyTuple::new(py, &[table])?; - let result: PyObject = dataframe.call1(args)?.into(); + let result: Py = dataframe.call1(args)?.into(); Ok(result) } @@ -1135,7 +1139,7 @@ impl PyDataFrame { #[pyo3(signature = (value, columns=None))] fn fill_null( &self, - value: PyObject, + value: Py, columns: Option>, py: Python, ) -> PyDataFusionResult { diff --git a/src/dataset.rs b/src/dataset.rs index 6abe8ae3b..6a4fdb1fa 100644 --- a/src/dataset.rs +++ b/src/dataset.rs @@ -38,7 +38,7 @@ use crate::pyarrow_filter_expression::PyArrowFilterExpression; // Wraps a pyarrow.dataset.Dataset class and implements a Datafusion TableProvider around it #[derive(Debug)] pub(crate) struct Dataset { - dataset: PyObject, + dataset: Py, } impl Dataset { @@ -70,7 +70,7 @@ impl TableProvider for Dataset { /// Get a reference to the schema for this table fn schema(&self) -> SchemaRef { - Python::with_gil(|py| { + Python::attach(|py| { let dataset = self.dataset.bind(py); // This can panic but since we checked that self.dataset is a pyarrow.dataset.Dataset it should never Arc::new( @@ -104,7 +104,7 @@ impl TableProvider for Dataset { // The datasource should return *at least* this number of rows if available. _limit: Option, ) -> DFResult> { - Python::with_gil(|py| { + Python::attach(|py| { let plan: Arc = Arc::new( DatasetExec::new(py, self.dataset.bind(py), projection.cloned(), filters) .map_err(|err| DataFusionError::External(Box::new(err)))?, diff --git a/src/dataset_exec.rs b/src/dataset_exec.rs index a35951394..a83b10941 100644 --- a/src/dataset_exec.rs +++ b/src/dataset_exec.rs @@ -50,7 +50,7 @@ impl Iterator for PyArrowBatchesAdapter { type Item = ArrowResult; fn next(&mut self) -> Option { - Python::with_gil(|py| { + Python::attach(|py| { let mut batches = self.batches.clone_ref(py).into_bound(py); Some( batches @@ -65,11 +65,11 @@ impl Iterator for PyArrowBatchesAdapter { // Wraps a pyarrow.dataset.Dataset class and implements a Datafusion ExecutionPlan around it #[derive(Debug)] pub(crate) struct DatasetExec { - dataset: PyObject, + dataset: Py, schema: SchemaRef, fragments: Py, columns: Option>, - filter_expr: Option, + filter_expr: Option>, projected_statistics: Statistics, plan_properties: datafusion::physical_plan::PlanProperties, } @@ -94,7 +94,7 @@ impl DatasetExec { .collect() }); let columns: Option> = columns.transpose()?; - let filter_expr: Option = conjunction(filters.to_owned()) + let filter_expr: Option> = conjunction(filters.to_owned()) .map(|filters| { PyArrowFilterExpression::try_from(&filters) .map(|filter_expr| filter_expr.inner().clone_ref(py)) @@ -184,7 +184,7 @@ impl ExecutionPlan for DatasetExec { context: Arc, ) -> DFResult { let batch_size = context.session_config().batch_size(); - Python::with_gil(|py| { + Python::attach(|py| { let dataset = self.dataset.bind(py); let fragments = self.fragments.bind(py); let fragment = fragments @@ -269,7 +269,7 @@ impl ExecutionPlanProperties for DatasetExec { impl DisplayAs for DatasetExec { fn fmt_as(&self, t: DisplayFormatType, f: &mut std::fmt::Formatter) -> std::fmt::Result { - Python::with_gil(|py| { + Python::attach(|py| { let number_of_fragments = self.fragments.bind(py).len(); match t { DisplayFormatType::Default diff --git a/src/expr.rs b/src/expr.rs index 78bee3d4a..fc8023b20 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -141,7 +141,7 @@ pub fn py_expr_list(expr: &[Expr]) -> PyResult> { impl PyExpr { /// Return the specific expression fn to_variant<'py>(&self, py: Python<'py>) -> PyResult> { - Python::with_gil(|_| { + Python::attach(|_| { match &self.expr { Expr::Alias(alias) => Ok(PyAlias::from(alias.clone()).into_bound_py_any(py)?), Expr::Column(col) => Ok(PyColumn::from(col.clone()).into_bound_py_any(py)?), @@ -379,8 +379,8 @@ impl PyExpr { Self::_types(&self.expr) } - /// Extracts the Expr value into a PyObject that can be shared with Python - pub fn python_value(&self, py: Python) -> PyResult { + /// Extracts the Expr value into a Py that can be shared with Python + pub fn python_value<'py>(&self, py: Python<'py>) -> PyResult> { match &self.expr { Expr::Literal(scalar_value, _) => scalar_to_pyarrow(scalar_value, py), _ => Err(py_type_err(format!( diff --git a/src/expr/create_external_table.rs b/src/expr/create_external_table.rs index 1bd37b376..05f9249b0 100644 --- a/src/expr/create_external_table.rs +++ b/src/expr/create_external_table.rs @@ -67,7 +67,7 @@ impl Display for PyCreateExternalTable { impl PyCreateExternalTable { #[allow(clippy::too_many_arguments)] #[new] - #[pyo3(signature = (schema, name, location, file_type, table_partition_cols, if_not_exists, temporary, order_exprs, unbounded, options, constraints, column_defaults, definition=None))] + #[pyo3(signature = (schema, name, location, file_type, table_partition_cols, if_not_exists, or_replace, temporary, order_exprs, unbounded, options, constraints, column_defaults, definition=None))] pub fn new( schema: PyDFSchema, name: String, @@ -75,6 +75,7 @@ impl PyCreateExternalTable { file_type: String, table_partition_cols: Vec, if_not_exists: bool, + or_replace: bool, temporary: bool, order_exprs: Vec>, unbounded: bool, @@ -90,6 +91,7 @@ impl PyCreateExternalTable { file_type, table_partition_cols, if_not_exists, + or_replace, temporary, definition, order_exprs: order_exprs diff --git a/src/expr/placeholder.rs b/src/expr/placeholder.rs index 268263d41..f1e8694a9 100644 --- a/src/expr/placeholder.rs +++ b/src/expr/placeholder.rs @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. +use arrow::datatypes::Field; +use arrow::pyarrow::PyArrowType; use datafusion::logical_expr::expr::Placeholder; use pyo3::prelude::*; @@ -40,8 +42,15 @@ impl PyPlaceholder { fn data_type(&self) -> Option { self.placeholder - .data_type + .field .as_ref() - .map(|e| e.clone().into()) + .map(|f| f.data_type().clone().into()) + } + + fn field(&self) -> Option> { + self.placeholder + .field + .as_ref() + .map(|f| f.as_ref().clone().into()) } } diff --git a/src/expr/statement.rs b/src/expr/statement.rs index 47f5c4337..40666dd8b 100644 --- a/src/expr/statement.rs +++ b/src/expr/statement.rs @@ -15,6 +15,10 @@ // specific language governing permissions and limitations // under the License. +use std::sync::Arc; + +use arrow::datatypes::Field; +use arrow::pyarrow::PyArrowType; use datafusion::logical_expr::{ Deallocate, Execute, Prepare, SetVariable, TransactionAccessMode, TransactionConclusion, TransactionEnd, TransactionIsolationLevel, TransactionStart, @@ -24,7 +28,6 @@ use pyo3::IntoPyObjectExt; use super::logical_node::LogicalNode; use super::PyExpr; -use crate::common::data_type::PyDataType; use crate::sql::logical::PyLogicalPlan; #[pyclass( @@ -337,16 +340,13 @@ impl LogicalNode for PyPrepare { #[pymethods] impl PyPrepare { #[new] - pub fn new(name: String, data_types: Vec, input: PyLogicalPlan) -> Self { + pub fn new(name: String, fields: Vec>, input: PyLogicalPlan) -> Self { let input = input.plan().clone(); - let data_types = data_types - .into_iter() - .map(|data_type| data_type.into()) - .collect(); + let fields = fields.into_iter().map(|field| Arc::new(field.0)).collect(); PyPrepare { prepare: Prepare { name, - data_types, + fields, input, }, } @@ -356,12 +356,12 @@ impl PyPrepare { self.prepare.name.clone() } - pub fn data_types(&self) -> Vec { + pub fn fields(&self) -> Vec> { self.prepare - .data_types + .fields .clone() .into_iter() - .map(|t| t.into()) + .map(|f| f.as_ref().clone().into()) .collect() } diff --git a/src/functions.rs b/src/functions.rs index 38f54d1ff..e67781ccd 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -21,8 +21,9 @@ use datafusion::common::{Column, ScalarValue, TableReference}; use datafusion::execution::FunctionRegistry; use datafusion::functions_aggregate::all_default_aggregate_functions; use datafusion::functions_window::all_default_window_functions; -use datafusion::logical_expr::expr::{Alias, FieldMetadata, WindowFunction, WindowFunctionParams}; -use datafusion::logical_expr::sqlparser::ast::NullTreatment as DFNullTreatment; +use datafusion::logical_expr::expr::{ + Alias, FieldMetadata, NullTreatment as DFNullTreatment, WindowFunction, WindowFunctionParams, +}; use datafusion::logical_expr::{lit, Expr, ExprFunctionExt, WindowFrame, WindowFunctionDefinition}; use datafusion::{functions, functions_aggregate, functions_window}; use pyo3::prelude::*; diff --git a/src/physical_plan.rs b/src/physical_plan.rs index 62ec5e881..c768c0fe4 100644 --- a/src/physical_plan.rs +++ b/src/physical_plan.rs @@ -86,7 +86,7 @@ impl PyExecutionPlan { })?; let codec = DefaultPhysicalExtensionCodec {}; - let plan = proto_plan.try_into_physical_plan(&ctx.ctx, &ctx.ctx.runtime_env(), &codec)?; + let plan = proto_plan.try_into_physical_plan(&ctx.ctx.task_ctx().as_ref(), &codec)?; Ok(Self::new(plan)) } diff --git a/src/pyarrow_filter_expression.rs b/src/pyarrow_filter_expression.rs index db6146955..c9d3df32d 100644 --- a/src/pyarrow_filter_expression.rs +++ b/src/pyarrow_filter_expression.rs @@ -29,7 +29,7 @@ use crate::pyarrow_util::scalar_to_pyarrow; #[derive(Debug)] #[repr(transparent)] -pub(crate) struct PyArrowFilterExpression(PyObject); +pub(crate) struct PyArrowFilterExpression(Py); fn operator_to_py<'py>( operator: &Operator, @@ -88,7 +88,7 @@ fn extract_scalar_list<'py>( } impl PyArrowFilterExpression { - pub fn inner(&self) -> &PyObject { + pub fn inner(&self) -> &Py { &self.0 } } @@ -101,12 +101,12 @@ impl TryFrom<&Expr> for PyArrowFilterExpression { // isin, is_null, and is_valid (~is_null) are methods of pyarrow.dataset.Expression // https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Expression.html#pyarrow-dataset-expression fn try_from(expr: &Expr) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { let pc = Python::import(py, "pyarrow.compute")?; let op_module = Python::import(py, "operator")?; let pc_expr: PyDataFusionResult> = match expr { Expr::Column(Column { name, .. }) => Ok(pc.getattr("field")?.call1((name,))?), - Expr::Literal(scalar, _) => Ok(scalar_to_pyarrow(scalar, py)?.into_bound(py)), + Expr::Literal(scalar, _) => Ok(scalar_to_pyarrow(scalar, py)?), Expr::BinaryExpr(BinaryExpr { left, op, right }) => { let operator = operator_to_py(op, &op_module)?; let left = PyArrowFilterExpression::try_from(left.as_ref())?.0; diff --git a/src/pyarrow_util.rs b/src/pyarrow_util.rs index cab708458..cd9e396ab 100644 --- a/src/pyarrow_util.rs +++ b/src/pyarrow_util.rs @@ -21,7 +21,7 @@ use arrow::array::{Array, ArrayData}; use arrow::pyarrow::{FromPyArrow, ToPyArrow}; use datafusion::scalar::ScalarValue; use pyo3::types::{PyAnyMethods, PyList}; -use pyo3::{Bound, FromPyObject, PyAny, PyObject, PyResult, Python}; +use pyo3::{Bound, FromPyObject, PyAny, PyResult, Python}; use crate::common::data_type::PyScalarValue; use crate::errors::PyDataFusionError; @@ -51,11 +51,14 @@ impl<'source> FromPyObject<'source> for PyScalarValue { } } -pub fn scalar_to_pyarrow(scalar: &ScalarValue, py: Python) -> PyResult { +pub fn scalar_to_pyarrow<'py>( + scalar: &ScalarValue, + py: Python<'py>, +) -> PyResult> { let array = scalar.to_array().map_err(PyDataFusionError::from)?; // convert to pyarrow array using C data interface let pyarray = array.to_data().to_pyarrow(py)?; - let pyscalar = pyarray.call_method1(py, "__getitem__", (0,))?; + let pyscalar = pyarray.call_method1("__getitem__", (0,))?; Ok(pyscalar) } diff --git a/src/record_batch.rs b/src/record_batch.rs index 8c1933a1c..2e50ba75e 100644 --- a/src/record_batch.rs +++ b/src/record_batch.rs @@ -23,7 +23,7 @@ use datafusion::physical_plan::SendableRecordBatchStream; use futures::StreamExt; use pyo3::exceptions::{PyStopAsyncIteration, PyStopIteration}; use pyo3::prelude::*; -use pyo3::{pyclass, pymethods, PyObject, PyResult, Python}; +use pyo3::{pyclass, pymethods, PyAny, PyResult, Python}; use tokio::sync::Mutex; use crate::errors::PyDataFusionError; @@ -36,7 +36,7 @@ pub struct PyRecordBatch { #[pymethods] impl PyRecordBatch { - fn to_pyarrow(&self, py: Python) -> PyResult { + fn to_pyarrow<'py>(&self, py: Python<'py>) -> PyResult> { self.batch.to_pyarrow(py) } } diff --git a/src/sql/logical.rs b/src/sql/logical.rs index 86373fc7c..37f20d287 100644 --- a/src/sql/logical.rs +++ b/src/sql/logical.rs @@ -208,7 +208,7 @@ impl PyLogicalPlan { })?; let codec = DefaultLogicalExtensionCodec {}; - let plan = proto_plan.try_into_logical_plan(&ctx.ctx, &codec)?; + let plan = proto_plan.try_into_logical_plan(&ctx.ctx.task_ctx(), &codec)?; Ok(Self::new(plan)) } } diff --git a/src/substrait.rs b/src/substrait.rs index 0e0305cfe..7b06aff74 100644 --- a/src/substrait.rs +++ b/src/substrait.rs @@ -35,7 +35,7 @@ pub struct PyPlan { #[pymethods] impl PyPlan { - fn encode(&self, py: Python) -> PyResult { + fn encode(&self, py: Python) -> PyResult> { let mut proto_bytes = Vec::::new(); self.plan .encode(&mut proto_bytes) @@ -93,7 +93,7 @@ impl PySubstraitSerializer { sql: &str, ctx: PySessionContext, py: Python, - ) -> PyDataFusionResult { + ) -> PyDataFusionResult> { let proto_bytes: Vec = wait_for_future(py, serializer::serialize_bytes(sql, &ctx.ctx))??; Ok(PyBytes::new(py, &proto_bytes).into()) diff --git a/src/table.rs b/src/table.rs index 1e8542134..0eec57f75 100644 --- a/src/table.rs +++ b/src/table.rs @@ -88,7 +88,7 @@ impl PyTable { /// Get a reference to the schema for this table #[getter] - fn schema(&self, py: Python) -> PyResult { + fn schema<'py>(&self, py: Python<'py>) -> PyResult> { self.table.schema().to_pyarrow(py) } @@ -136,7 +136,7 @@ impl TableProvider for TempViewTable { } fn schema(&self) -> SchemaRef { - Arc::new(self.df.schema().into()) + Arc::new(self.df.schema().as_arrow().clone()) } fn table_type(&self) -> TableType { diff --git a/src/udaf.rs b/src/udaf.rs index b3d497557..92857f9f7 100644 --- a/src/udaf.rs +++ b/src/udaf.rs @@ -36,18 +36,18 @@ use crate::utils::{parse_volatility, validate_pycapsule}; #[derive(Debug)] struct RustAccumulator { - accum: PyObject, + accum: Py, } impl RustAccumulator { - fn new(accum: PyObject) -> Self { + fn new(accum: Py) -> Self { Self { accum } } } impl Accumulator for RustAccumulator { fn state(&mut self) -> Result> { - Python::with_gil(|py| { + Python::attach(|py| { self.accum .bind(py) .call_method0("state")? @@ -58,7 +58,7 @@ impl Accumulator for RustAccumulator { } fn evaluate(&mut self) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { self.accum .bind(py) .call_method0("evaluate")? @@ -69,7 +69,7 @@ impl Accumulator for RustAccumulator { } fn update_batch(&mut self, values: &[ArrayRef]) -> Result<()> { - Python::with_gil(|py| { + Python::attach(|py| { // 1. cast args to Pyarrow array let py_args = values .iter() @@ -88,9 +88,9 @@ impl Accumulator for RustAccumulator { } fn merge_batch(&mut self, states: &[ArrayRef]) -> Result<()> { - Python::with_gil(|py| { + Python::attach(|py| { // // 1. cast states to Pyarrow arrays - let py_states: Result> = states + let py_states: Result>> = states .iter() .map(|state| { state @@ -115,7 +115,7 @@ impl Accumulator for RustAccumulator { } fn retract_batch(&mut self, values: &[ArrayRef]) -> Result<()> { - Python::with_gil(|py| { + Python::attach(|py| { // 1. cast args to Pyarrow array let py_args = values .iter() @@ -134,7 +134,7 @@ impl Accumulator for RustAccumulator { } fn supports_retract_batch(&self) -> bool { - Python::with_gil( + Python::attach( |py| match self.accum.bind(py).call_method0("supports_retract_batch") { Ok(x) => x.extract().unwrap_or(false), Err(_) => false, @@ -143,9 +143,9 @@ impl Accumulator for RustAccumulator { } } -pub fn to_rust_accumulator(accum: PyObject) -> AccumulatorFactoryFunction { +pub fn to_rust_accumulator(accum: Py) -> AccumulatorFactoryFunction { Arc::new(move |_| -> Result> { - let accum = Python::with_gil(|py| { + let accum = Python::attach(|py| { accum .call0(py) .map_err(|e| DataFusionError::Execution(format!("{e}"))) @@ -176,7 +176,7 @@ impl PyAggregateUDF { #[pyo3(signature=(name, accumulator, input_type, return_type, state_type, volatility))] fn new( name: &str, - accumulator: PyObject, + accumulator: Py, input_type: PyArrowType>, return_type: PyArrowType, state_type: PyArrowType>, diff --git a/src/udf.rs b/src/udf.rs index 25043d2ea..5cf87c825 100644 --- a/src/udf.rs +++ b/src/udf.rs @@ -33,10 +33,10 @@ use crate::utils::{parse_volatility, validate_pycapsule}; /// Create a Rust callable function from a python function that expects pyarrow arrays fn pyarrow_function_to_rust( - func: PyObject, + func: Py, ) -> impl Fn(&[ArrayRef]) -> Result { move |args: &[ArrayRef]| -> Result { - Python::with_gil(|py| { + Python::attach(|py| { // 1. cast args to Pyarrow arrays let py_args = args .iter() @@ -64,7 +64,7 @@ fn pyarrow_function_to_rust( /// Create a DataFusion's UDF implementation from a python function /// that expects pyarrow arrays. This is more efficient as it performs /// a zero-copy of the contents. -fn to_scalar_function_impl(func: PyObject) -> ScalarFunctionImplementation { +fn to_scalar_function_impl(func: Py) -> ScalarFunctionImplementation { // Make the python function callable from rust let pyarrow_func = pyarrow_function_to_rust(func); @@ -89,7 +89,7 @@ impl PyScalarUDF { #[pyo3(signature=(name, func, input_types, return_type, volatility))] fn new( name: &str, - func: PyObject, + func: Py, input_types: PyArrowType>, return_type: PyArrowType, volatility: &str, diff --git a/src/udtf.rs b/src/udtf.rs index 15006edf4..7226dbe92 100644 --- a/src/udtf.rs +++ b/src/udtf.rs @@ -40,7 +40,7 @@ pub struct PyTableFunction { // TODO: Implement pure python based user defined table functions #[derive(Debug, Clone)] pub(crate) enum PyTableFunctionInner { - PythonFunction(Arc), + PythonFunction(Arc>), FFIFunction(Arc), } @@ -84,7 +84,7 @@ impl PyTableFunction { #[allow(clippy::result_large_err)] fn call_python_table_function( - func: &Arc, + func: &Arc>, args: &[Expr], ) -> DataFusionResult> { let args = args @@ -93,7 +93,7 @@ fn call_python_table_function( .collect::>(); // move |args: &[ArrayRef]| -> Result { - Python::with_gil(|py| { + Python::attach(|py| { let py_args = PyTuple::new(py, args)?; let provider_obj = func.call1(py, py_args)?; let provider = provider_obj.bind(py); diff --git a/src/udwf.rs b/src/udwf.rs index aae9f4c4c..d347ec0f1 100644 --- a/src/udwf.rs +++ b/src/udwf.rs @@ -42,23 +42,23 @@ use crate::utils::{parse_volatility, validate_pycapsule}; #[derive(Debug)] struct RustPartitionEvaluator { - evaluator: PyObject, + evaluator: Py, } impl RustPartitionEvaluator { - fn new(evaluator: PyObject) -> Self { + fn new(evaluator: Py) -> Self { Self { evaluator } } } impl PartitionEvaluator for RustPartitionEvaluator { fn memoize(&mut self, _state: &mut WindowAggState) -> Result<()> { - Python::with_gil(|py| self.evaluator.bind(py).call_method0("memoize").map(|_| ())) + Python::attach(|py| self.evaluator.bind(py).call_method0("memoize").map(|_| ())) .map_err(|e| DataFusionError::Execution(format!("{e}"))) } fn get_range(&self, idx: usize, n_rows: usize) -> Result> { - Python::with_gil(|py| { + Python::attach(|py| { let py_args = vec![idx.into_pyobject(py)?, n_rows.into_pyobject(py)?]; let py_args = PyTuple::new(py, py_args)?; @@ -84,7 +84,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { } fn is_causal(&self) -> bool { - Python::with_gil(|py| { + Python::attach(|py| { self.evaluator .bind(py) .call_method0("is_causal") @@ -95,7 +95,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { fn evaluate_all(&mut self, values: &[ArrayRef], num_rows: usize) -> Result { println!("evaluate all called with number of values {}", values.len()); - Python::with_gil(|py| { + Python::attach(|py| { let py_values = PyList::new( py, values @@ -117,7 +117,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { } fn evaluate(&mut self, values: &[ArrayRef], range: &Range) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { let py_values = PyList::new( py, values @@ -141,7 +141,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { num_rows: usize, ranks_in_partition: &[Range], ) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { let ranks = ranks_in_partition .iter() .map(|r| PyTuple::new(py, vec![r.start, r.end])) @@ -168,7 +168,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { } fn supports_bounded_execution(&self) -> bool { - Python::with_gil(|py| { + Python::attach(|py| { self.evaluator .bind(py) .call_method0("supports_bounded_execution") @@ -178,7 +178,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { } fn uses_window_frame(&self) -> bool { - Python::with_gil(|py| { + Python::attach(|py| { self.evaluator .bind(py) .call_method0("uses_window_frame") @@ -188,7 +188,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { } fn include_rank(&self) -> bool { - Python::with_gil(|py| { + Python::attach(|py| { self.evaluator .bind(py) .call_method0("include_rank") @@ -198,9 +198,9 @@ impl PartitionEvaluator for RustPartitionEvaluator { } } -pub fn to_rust_partition_evaluator(evaluator: PyObject) -> PartitionEvaluatorFactory { +pub fn to_rust_partition_evaluator(evaluator: Py) -> PartitionEvaluatorFactory { Arc::new(move || -> Result> { - let evaluator = Python::with_gil(|py| { + let evaluator = Python::attach(|py| { evaluator .call0(py) .map_err(|e| DataFusionError::Execution(e.to_string())) @@ -222,7 +222,7 @@ impl PyWindowUDF { #[pyo3(signature=(name, evaluator, input_types, return_type, volatility))] fn new( name: &str, - evaluator: PyObject, + evaluator: Py, input_types: Vec>, return_type: PyArrowType, volatility: &str, diff --git a/src/utils.rs b/src/utils.rs index ce7395e95..6cc9626fb 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -77,14 +77,14 @@ where let runtime: &Runtime = &get_tokio_runtime().0; const INTERVAL_CHECK_SIGNALS: Duration = Duration::from_millis(1_000); - py.allow_threads(|| { + py.detach(|| { runtime.block_on(async { tokio::pin!(fut); loop { tokio::select! { res = &mut fut => break Ok(res), _ = sleep(INTERVAL_CHECK_SIGNALS) => { - Python::with_gil(|py| py.check_signals())?; + Python::attach(|py| py.check_signals())?; } } } @@ -170,7 +170,7 @@ pub(crate) fn table_provider_from_pycapsule( } } -pub(crate) fn py_obj_to_scalar_value(py: Python, obj: PyObject) -> PyResult { +pub(crate) fn py_obj_to_scalar_value(py: Python, obj: Py) -> PyResult { // convert Python object to PyScalarValue to ScalarValue let pa = py.import("pyarrow")?; From 908d6c8eabf81ac3a83525b8ebc78369d1d984c8 Mon Sep 17 00:00:00 2001 From: nuno-faria Date: Tue, 25 Nov 2025 11:56:58 +0000 Subject: [PATCH 02/20] Fix clippy --- src/physical_plan.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physical_plan.rs b/src/physical_plan.rs index c768c0fe4..645649e2c 100644 --- a/src/physical_plan.rs +++ b/src/physical_plan.rs @@ -86,7 +86,7 @@ impl PyExecutionPlan { })?; let codec = DefaultPhysicalExtensionCodec {}; - let plan = proto_plan.try_into_physical_plan(&ctx.ctx.task_ctx().as_ref(), &codec)?; + let plan = proto_plan.try_into_physical_plan(ctx.ctx.task_ctx().as_ref(), &codec)?; Ok(Self::new(plan)) } From 6bb9678b1645452f3e7dd85d996a3ca68d0ce347 Mon Sep 17 00:00:00 2001 From: nuno-faria Date: Tue, 25 Nov 2025 11:30:50 +0000 Subject: [PATCH 03/20] Upgrade to Datafusion 51 --- Cargo.lock | 801 +++++++++++---------- Cargo.toml | 24 +- examples/datafusion-ffi-example/Cargo.lock | 707 +++++++++--------- examples/datafusion-ffi-example/Cargo.toml | 14 +- python/datafusion/expr.py | 2 +- python/tests/test_expr.py | 8 +- python/tests/test_functions.py | 2 +- src/catalog.rs | 36 +- src/common/data_type.rs | 8 +- src/config.rs | 4 +- src/context.rs | 4 +- src/dataframe.rs | 38 +- src/dataset.rs | 6 +- src/dataset_exec.rs | 12 +- src/expr.rs | 6 +- src/expr/create_external_table.rs | 4 +- src/expr/placeholder.rs | 13 +- src/expr/statement.rs | 20 +- src/functions.rs | 5 +- src/physical_plan.rs | 2 +- src/pyarrow_filter_expression.rs | 8 +- src/pyarrow_util.rs | 9 +- src/record_batch.rs | 4 +- src/sql/logical.rs | 2 +- src/substrait.rs | 4 +- src/table.rs | 4 +- src/udaf.rs | 24 +- src/udf.rs | 8 +- src/udtf.rs | 6 +- src/udwf.rs | 28 +- src/utils.rs | 6 +- 31 files changed, 918 insertions(+), 901 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a291189fc..97a17abb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -50,15 +50,6 @@ dependencies = [ "core_extensions", ] -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.1" @@ -132,7 +123,7 @@ checksum = "3a033b4ced7c585199fb78ef50fca7fe2f444369ec48080c5fd072efa1a03cc7" dependencies = [ "bigdecimal", "bon", - "bzip2 0.6.0", + "bzip2 0.6.1", "crc32fast", "digest", "log", @@ -173,9 +164,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "arrow" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e833808ff2d94ed40d9379848a950d995043c7fb3e81a30b383f4c6033821cc" +checksum = "4df8bb5b0bd64c0b9bc61317fcc480bad0f00e56d3bc32c69a4c8dada4786bae" dependencies = [ "arrow-arith", "arrow-array", @@ -195,23 +186,23 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad08897b81588f60ba983e3ca39bda2b179bdd84dced378e7df81a5313802ef8" +checksum = "a1a640186d3bd30a24cb42264c2dafb30e236a6f50d510e56d40b708c9582491" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", "chrono", - "num", + "num-traits", ] [[package]] name = "arrow-array" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8548ca7c070d8db9ce7aa43f37393e4bfcf3f2d3681df278490772fd1673d08d" +checksum = "219fe420e6800979744c8393b687afb0252b3f8a89b91027d27887b72aa36d31" dependencies = [ "ahash", "arrow-buffer", @@ -221,25 +212,28 @@ dependencies = [ "chrono-tz", "half", "hashbrown 0.16.0", - "num", + "num-complex", + "num-integer", + "num-traits", ] [[package]] name = "arrow-buffer" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e003216336f70446457e280807a73899dd822feaf02087d31febca1363e2fccc" +checksum = "76885a2697a7edf6b59577f568b456afc94ce0e2edc15b784ce3685b6c3c5c27" dependencies = [ "bytes", "half", - "num", + "num-bigint", + "num-traits", ] [[package]] name = "arrow-cast" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919418a0681298d3a77d1a315f625916cb5678ad0d74b9c60108eb15fd083023" +checksum = "9c9ebb4c987e6b3b236fb4a14b20b34835abfdd80acead3ccf1f9bf399e1f168" dependencies = [ "arrow-array", "arrow-buffer", @@ -247,20 +241,20 @@ dependencies = [ "arrow-schema", "arrow-select", "atoi", - "base64 0.22.1", + "base64", "chrono", "comfy-table", "half", "lexical-core", - "num", + "num-traits", "ryu", ] [[package]] name = "arrow-csv" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa9bf02705b5cf762b6f764c65f04ae9082c7cfc4e96e0c33548ee3f67012eb" +checksum = "92386159c8d4bce96f8bd396b0642a0d544d471bdc2ef34d631aec80db40a09c" dependencies = [ "arrow-array", "arrow-cast", @@ -273,21 +267,22 @@ dependencies = [ [[package]] name = "arrow-data" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5c64fff1d142f833d78897a772f2e5b55b36cb3e6320376f0961ab0db7bd6d0" +checksum = "727681b95de313b600eddc2a37e736dcb21980a40f640314dcf360e2f36bc89b" dependencies = [ "arrow-buffer", "arrow-schema", "half", - "num", + "num-integer", + "num-traits", ] [[package]] name = "arrow-ipc" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3594dcddccc7f20fd069bc8e9828ce37220372680ff638c5e00dea427d88f5" +checksum = "da9ba92e3de170295c98a84e5af22e2b037f0c7b32449445e6c493b5fca27f27" dependencies = [ "arrow-array", "arrow-buffer", @@ -301,9 +296,9 @@ dependencies = [ [[package]] name = "arrow-json" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88cf36502b64a127dc659e3b305f1d993a544eab0d48cce704424e62074dc04b" +checksum = "b969b4a421ae83828591c6bf5450bd52e6d489584142845ad6a861f42fe35df8" dependencies = [ "arrow-array", "arrow-buffer", @@ -313,19 +308,21 @@ dependencies = [ "chrono", "half", "indexmap", + "itoa", "lexical-core", "memchr", - "num", - "serde", + "num-traits", + "ryu", + "serde_core", "serde_json", "simdutf8", ] [[package]] name = "arrow-ord" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c8f82583eb4f8d84d4ee55fd1cb306720cddead7596edce95b50ee418edf66f" +checksum = "141c05298b21d03e88062317a1f1a73f5ba7b6eb041b350015b1cd6aabc0519b" dependencies = [ "arrow-array", "arrow-buffer", @@ -336,9 +333,9 @@ dependencies = [ [[package]] name = "arrow-pyarrow" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d924b32e96f8bb74d94cd82bd97b313c432fcb0ea331689ef9e7c6b8be4b258" +checksum = "cfcfb2be2e9096236f449c11f425cddde18c4cc540f516d90f066f10a29ed515" dependencies = [ "arrow-array", "arrow-data", @@ -348,9 +345,9 @@ dependencies = [ [[package]] name = "arrow-row" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d07ba24522229d9085031df6b94605e0f4b26e099fb7cdeec37abd941a73753" +checksum = "c5f3c06a6abad6164508ed283c7a02151515cef3de4b4ff2cebbcaeb85533db2" dependencies = [ "arrow-array", "arrow-buffer", @@ -361,34 +358,34 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3aa9e59c611ebc291c28582077ef25c97f1975383f1479b12f3b9ffee2ffabe" +checksum = "9cfa7a03d1eee2a4d061476e1840ad5c9867a544ca6c4c59256496af5d0a8be5" dependencies = [ "bitflags", - "serde", + "serde_core", "serde_json", ] [[package]] name = "arrow-select" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c41dbbd1e97bfcaee4fcb30e29105fb2c75e4d82ae4de70b792a5d3f66b2e7a" +checksum = "bafa595babaad59f2455f4957d0f26448fb472722c186739f4fac0823a1bdb47" dependencies = [ "ahash", "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", - "num", + "num-traits", ] [[package]] name = "arrow-string" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f5183c150fbc619eede22b861ea7c0eebed8eaac0333eaa7f6da5205fd504d" +checksum = "32f46457dbbb99f2650ff3ac23e46a929e0ab81db809b02aa5511c258348bef2" dependencies = [ "arrow-array", "arrow-buffer", @@ -396,7 +393,7 @@ dependencies = [ "arrow-schema", "arrow-select", "memchr", - "num", + "num-traits", "regex", "regex-syntax", ] @@ -447,7 +444,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -458,7 +455,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -482,27 +479,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -582,7 +558,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -635,9 +611,9 @@ dependencies = [ [[package]] name = "bzip2" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea8dcd42434048e4f7a304411d9273a411f647446c1234a65ce0554923f4cff" +checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" dependencies = [ "libbz2-rs-sys", ] @@ -885,7 +861,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -896,7 +872,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -915,22 +891,22 @@ dependencies = [ [[package]] name = "datafusion" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af15bb3c6ffa33011ef579f6b0bcbe7c26584688bd6c994f548e44df67f011a" +checksum = "8ba7cb113e9c0bedf9e9765926031e132fa05a1b09ba6e93a6d1a4d7044457b8" dependencies = [ "arrow", - "arrow-ipc", "arrow-schema", "async-trait", "bytes", - "bzip2 0.6.0", + "bzip2 0.6.1", "chrono", "datafusion-catalog", "datafusion-catalog-listing", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", + "datafusion-datasource-arrow", "datafusion-datasource-avro", "datafusion-datasource-csv", "datafusion-datasource-json", @@ -953,13 +929,14 @@ dependencies = [ "datafusion-sql", "flate2", "futures", - "itertools 0.14.0", + "itertools", "log", "object_store", "parking_lot", "parquet", "rand", "regex", + "rstest", "sqlparser", "tempfile", "tokio", @@ -971,9 +948,9 @@ dependencies = [ [[package]] name = "datafusion-catalog" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187622262ad8f7d16d3be9202b4c1e0116f1c9aa387e5074245538b755261621" +checksum = "66a3a799f914a59b1ea343906a0486f17061f39509af74e874a866428951130d" dependencies = [ "arrow", "async-trait", @@ -986,9 +963,8 @@ dependencies = [ "datafusion-physical-expr", "datafusion-physical-plan", "datafusion-session", - "datafusion-sql", "futures", - "itertools 0.14.0", + "itertools", "log", "object_store", "parking_lot", @@ -997,9 +973,9 @@ dependencies = [ [[package]] name = "datafusion-catalog-listing" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9657314f0a32efd0382b9a46fdeb2d233273ece64baa68a7c45f5a192daf0f83" +checksum = "6db1b113c80d7a0febcd901476a57aef378e717c54517a163ed51417d87621b0" dependencies = [ "arrow", "async-trait", @@ -1009,10 +985,11 @@ dependencies = [ "datafusion-execution", "datafusion-expr", "datafusion-physical-expr", + "datafusion-physical-expr-adapter", "datafusion-physical-expr-common", "datafusion-physical-plan", - "datafusion-session", "futures", + "itertools", "log", "object_store", "tokio", @@ -1020,15 +997,14 @@ dependencies = [ [[package]] name = "datafusion-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a83760d9a13122d025fbdb1d5d5aaf93dd9ada5e90ea229add92aa30898b2d1" +checksum = "7c10f7659e96127d25e8366be7c8be4109595d6a2c3eac70421f380a7006a1b0" dependencies = [ "ahash", "apache-avro", "arrow", "arrow-ipc", - "base64 0.22.1", "chrono", "half", "hashbrown 0.14.5", @@ -1046,9 +1022,9 @@ dependencies = [ [[package]] name = "datafusion-common-runtime" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b6234a6c7173fe5db1c6c35c01a12b2aa0f803a3007feee53483218817f8b1e" +checksum = "b92065bbc6532c6651e2f7dd30b55cba0c7a14f860c7e1d15f165c41a1868d95" dependencies = [ "futures", "log", @@ -1057,15 +1033,15 @@ dependencies = [ [[package]] name = "datafusion-datasource" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7256c9cb27a78709dd42d0c80f0178494637209cac6e29d5c93edd09b6721b86" +checksum = "fde13794244bc7581cd82f6fff217068ed79cdc344cafe4ab2c3a1c3510b38d6" dependencies = [ "arrow", "async-compression", "async-trait", "bytes", - "bzip2 0.6.0", + "bzip2 0.6.1", "chrono", "datafusion-common", "datafusion-common-runtime", @@ -1079,12 +1055,10 @@ dependencies = [ "flate2", "futures", "glob", - "itertools 0.14.0", + "itertools", "log", "object_store", - "parquet", "rand", - "tempfile", "tokio", "tokio-util", "url", @@ -1092,47 +1066,64 @@ dependencies = [ "zstd", ] +[[package]] +name = "datafusion-datasource-arrow" +version = "51.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "804fa9b4ecf3157982021770617200ef7c1b2979d57bec9044748314775a9aea" +dependencies = [ + "arrow", + "arrow-ipc", + "async-trait", + "bytes", + "datafusion-common", + "datafusion-common-runtime", + "datafusion-datasource", + "datafusion-execution", + "datafusion-expr", + "datafusion-physical-expr-common", + "datafusion-physical-plan", + "datafusion-session", + "futures", + "itertools", + "object_store", + "tokio", +] + [[package]] name = "datafusion-datasource-avro" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d40b6953ebc9099b37adfd12fde97eb73ff0cee44355c6dea64b8a4537d561" +checksum = "388ed8be535f562cc655b9c3d22edbfb0f1a50a25c242647a98b6d92a75b55a1" dependencies = [ "apache-avro", "arrow", "async-trait", "bytes", - "chrono", - "datafusion-catalog", "datafusion-common", "datafusion-datasource", - "datafusion-execution", - "datafusion-physical-expr", "datafusion-physical-expr-common", "datafusion-physical-plan", "datafusion-session", "futures", "num-traits", "object_store", - "tokio", ] [[package]] name = "datafusion-datasource-csv" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64533a90f78e1684bfb113d200b540f18f268134622d7c96bbebc91354d04825" +checksum = "61a1641a40b259bab38131c5e6f48fac0717bedb7dc93690e604142a849e0568" dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", "datafusion-execution", "datafusion-expr", - "datafusion-physical-expr", "datafusion-physical-expr-common", "datafusion-physical-plan", "datafusion-session", @@ -1144,73 +1135,67 @@ dependencies = [ [[package]] name = "datafusion-datasource-json" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d7ebeb12c77df0aacad26f21b0d033aeede423a64b2b352f53048a75bf1d6e6" +checksum = "adeacdb00c1d37271176f8fb6a1d8ce096baba16ea7a4b2671840c5c9c64fe85" dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", "datafusion-execution", "datafusion-expr", - "datafusion-physical-expr", "datafusion-physical-expr-common", "datafusion-physical-plan", "datafusion-session", "futures", "object_store", - "serde_json", "tokio", ] [[package]] name = "datafusion-datasource-parquet" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09e783c4c7d7faa1199af2df4761c68530634521b176a8d1331ddbc5a5c75133" +checksum = "43d0b60ffd66f28bfb026565d62b0a6cbc416da09814766a3797bba7d85a3cd9" dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", "datafusion-execution", "datafusion-expr", - "datafusion-functions-aggregate", + "datafusion-functions-aggregate-common", "datafusion-physical-expr", "datafusion-physical-expr-adapter", "datafusion-physical-expr-common", - "datafusion-physical-optimizer", "datafusion-physical-plan", "datafusion-pruning", "datafusion-session", "futures", - "itertools 0.14.0", + "itertools", "log", "object_store", "parking_lot", "parquet", - "rand", "tokio", ] [[package]] name = "datafusion-doc" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ee6b1d9a80d13f9deb2291f45c07044b8e62fb540dbde2453a18be17a36429" +checksum = "2b99e13947667b36ad713549237362afb054b2d8f8cc447751e23ec61202db07" [[package]] name = "datafusion-execution" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4cec0a57653bec7b933fb248d3ffa3fa3ab3bd33bd140dc917f714ac036f531" +checksum = "63695643190679037bc946ad46a263b62016931547bf119859c511f7ff2f5178" dependencies = [ "arrow", "async-trait", @@ -1228,9 +1213,9 @@ dependencies = [ [[package]] name = "datafusion-expr" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef76910bdca909722586389156d0aa4da4020e1631994d50fadd8ad4b1aa05fe" +checksum = "f9a4787cbf5feb1ab351f789063398f67654a6df75c4d37d7f637dc96f951a91" dependencies = [ "arrow", "async-trait", @@ -1242,6 +1227,7 @@ dependencies = [ "datafusion-functions-window-common", "datafusion-physical-expr-common", "indexmap", + "itertools", "paste", "recursive", "serde_json", @@ -1250,22 +1236,22 @@ dependencies = [ [[package]] name = "datafusion-expr-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d155ccbda29591ca71a1344dd6bed26c65a4438072b400df9db59447f590bb6" +checksum = "5ce2fb1b8c15c9ac45b0863c30b268c69dc9ee7a1ee13ecf5d067738338173dc" dependencies = [ "arrow", "datafusion-common", "indexmap", - "itertools 0.14.0", + "itertools", "paste", ] [[package]] name = "datafusion-ffi" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ddb7c4e645df080c27dad13a198d191da328dd1c98e198664a7a0f64b335cc" +checksum = "ec510e7787641279b0336e8b79e4b7bd1385d5976875ff9b97f4269ce5231a67" dependencies = [ "abi_stable", "arrow", @@ -1273,6 +1259,7 @@ dependencies = [ "async-ffi", "async-trait", "datafusion", + "datafusion-common", "datafusion-functions-aggregate-common", "datafusion-proto", "datafusion-proto-common", @@ -1285,13 +1272,13 @@ dependencies = [ [[package]] name = "datafusion-functions" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de2782136bd6014670fd84fe3b0ca3b3e4106c96403c3ae05c0598577139977" +checksum = "794a9db7f7b96b3346fc007ff25e994f09b8f0511b4cf7dff651fadfe3ebb28f" dependencies = [ "arrow", "arrow-buffer", - "base64 0.22.1", + "base64", "blake2", "blake3", "chrono", @@ -1302,9 +1289,10 @@ dependencies = [ "datafusion-expr-common", "datafusion-macros", "hex", - "itertools 0.14.0", + "itertools", "log", "md-5", + "num-traits", "rand", "regex", "sha2", @@ -1314,9 +1302,9 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07331fc13603a9da97b74fd8a273f4238222943dffdbbed1c4c6f862a30105bf" +checksum = "1c25210520a9dcf9c2b2cbbce31ebd4131ef5af7fc60ee92b266dc7d159cb305" dependencies = [ "ahash", "arrow", @@ -1335,9 +1323,9 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5951e572a8610b89968a09b5420515a121fbc305c0258651f318dc07c97ab17" +checksum = "62f4a66f3b87300bb70f4124b55434d2ae3fe80455f3574701d0348da040b55d" dependencies = [ "ahash", "arrow", @@ -1348,9 +1336,9 @@ dependencies = [ [[package]] name = "datafusion-functions-nested" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdacca9302c3d8fc03f3e94f338767e786a88a33f5ebad6ffc0e7b50364b9ea3" +checksum = "ae5c06eed03918dc7fe7a9f082a284050f0e9ecf95d72f57712d1496da03b8c4" dependencies = [ "arrow", "arrow-ord", @@ -1358,21 +1346,22 @@ dependencies = [ "datafusion-doc", "datafusion-execution", "datafusion-expr", + "datafusion-expr-common", "datafusion-functions", "datafusion-functions-aggregate", "datafusion-functions-aggregate-common", "datafusion-macros", "datafusion-physical-expr-common", - "itertools 0.14.0", + "itertools", "log", "paste", ] [[package]] name = "datafusion-functions-table" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37ff8a99434fbbad604a7e0669717c58c7c4f14c472d45067c4b016621d981" +checksum = "db4fed1d71738fbe22e2712d71396db04c25de4111f1ec252b8f4c6d3b25d7f5" dependencies = [ "arrow", "async-trait", @@ -1386,9 +1375,9 @@ dependencies = [ [[package]] name = "datafusion-functions-window" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e2aea7c79c926cffabb13dc27309d4eaeb130f4a21c8ba91cdd241c813652b" +checksum = "1d92206aa5ae21892f1552b4d61758a862a70956e6fd7a95cb85db1de74bc6d1" dependencies = [ "arrow", "datafusion-common", @@ -1404,9 +1393,9 @@ dependencies = [ [[package]] name = "datafusion-functions-window-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fead257ab5fd2ffc3b40fda64da307e20de0040fe43d49197241d9de82a487f" +checksum = "53ae9bcc39800820d53a22d758b3b8726ff84a5a3e24cecef04ef4e5fdf1c7cc" dependencies = [ "datafusion-common", "datafusion-physical-expr-common", @@ -1414,20 +1403,20 @@ dependencies = [ [[package]] name = "datafusion-macros" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec6f637bce95efac05cdfb9b6c19579ed4aa5f6b94d951cfa5bb054b7bb4f730" +checksum = "1063ad4c9e094b3f798acee16d9a47bd7372d9699be2de21b05c3bd3f34ab848" dependencies = [ - "datafusion-expr", + "datafusion-doc", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "datafusion-optimizer" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6583ef666ae000a613a837e69e456681a9faa96347bf3877661e9e89e141d8a" +checksum = "9f35f9ec5d08b87fd1893a30c2929f2559c2f9806ca072d8fefca5009dc0f06a" dependencies = [ "arrow", "chrono", @@ -1436,7 +1425,7 @@ dependencies = [ "datafusion-expr-common", "datafusion-physical-expr", "indexmap", - "itertools 0.14.0", + "itertools", "log", "recursive", "regex", @@ -1445,9 +1434,9 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8668103361a272cbbe3a61f72eca60c9b7c706e87cc3565bcf21e2b277b84f6" +checksum = "c30cc8012e9eedcb48bbe112c6eff4ae5ed19cf3003cb0f505662e88b7014c5d" dependencies = [ "ahash", "arrow", @@ -1459,18 +1448,17 @@ dependencies = [ "half", "hashbrown 0.14.5", "indexmap", - "itertools 0.14.0", - "log", + "itertools", "parking_lot", "paste", - "petgraph 0.8.2", + "petgraph 0.8.3", ] [[package]] name = "datafusion-physical-expr-adapter" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "815acced725d30601b397e39958e0e55630e0a10d66ef7769c14ae6597298bb0" +checksum = "7f9ff2dbd476221b1f67337699eff432781c4e6e1713d2aefdaa517dfbf79768" dependencies = [ "arrow", "datafusion-common", @@ -1478,28 +1466,28 @@ dependencies = [ "datafusion-functions", "datafusion-physical-expr", "datafusion-physical-expr-common", - "itertools 0.14.0", + "itertools", ] [[package]] name = "datafusion-physical-expr-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6652fe7b5bf87e85ed175f571745305565da2c0b599d98e697bcbedc7baa47c3" +checksum = "90da43e1ec550b172f34c87ec68161986ced70fd05c8d2a2add66eef9c276f03" dependencies = [ "ahash", "arrow", "datafusion-common", "datafusion-expr-common", "hashbrown 0.14.5", - "itertools 0.14.0", + "itertools", ] [[package]] name = "datafusion-physical-optimizer" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b7d623eb6162a3332b564a0907ba00895c505d101b99af78345f1acf929b5c" +checksum = "ce9804f799acd7daef3be7aaffe77c0033768ed8fdbf5fb82fc4c5f2e6bc14e6" dependencies = [ "arrow", "datafusion-common", @@ -1510,16 +1498,15 @@ dependencies = [ "datafusion-physical-expr-common", "datafusion-physical-plan", "datafusion-pruning", - "itertools 0.14.0", - "log", + "itertools", "recursive", ] [[package]] name = "datafusion-physical-plan" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f7f778a1a838dec124efb96eae6144237d546945587557c9e6936b3414558c" +checksum = "0acf0ad6b6924c6b1aa7d213b181e012e2d3ec0a64ff5b10ee6282ab0f8532ac" dependencies = [ "ahash", "arrow", @@ -1539,7 +1526,7 @@ dependencies = [ "half", "hashbrown 0.14.5", "indexmap", - "itertools 0.14.0", + "itertools", "log", "parking_lot", "pin-project-lite", @@ -1548,15 +1535,26 @@ dependencies = [ [[package]] name = "datafusion-proto" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7df9f606892e6af45763d94d210634eec69b9bb6ced5353381682ff090028a3" +checksum = "d368093a98a17d1449b1083ac22ed16b7128e4c67789991869480d8c4a40ecb9" dependencies = [ "arrow", "chrono", - "datafusion", + "datafusion-catalog", + "datafusion-catalog-listing", "datafusion-common", + "datafusion-datasource", + "datafusion-datasource-arrow", + "datafusion-datasource-csv", + "datafusion-datasource-json", + "datafusion-datasource-parquet", + "datafusion-execution", "datafusion-expr", + "datafusion-functions-table", + "datafusion-physical-expr", + "datafusion-physical-expr-common", + "datafusion-physical-plan", "datafusion-proto-common", "object_store", "prost", @@ -1564,9 +1562,9 @@ dependencies = [ [[package]] name = "datafusion-proto-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b14f288ca4ef77743d9672cafecf3adfffff0b9b04af9af79ecbeaaf736901" +checksum = "3b6aef3d5e5c1d2bc3114c4876730cb76a9bdc5a8df31ef1b6db48f0c1671895" dependencies = [ "arrow", "datafusion-common", @@ -1575,19 +1573,18 @@ dependencies = [ [[package]] name = "datafusion-pruning" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd1e59e2ca14fe3c30f141600b10ad8815e2856caa59ebbd0e3e07cd3d127a65" +checksum = "ac2c2498a1f134a9e11a9f5ed202a2a7d7e9774bd9249295593053ea3be999db" dependencies = [ "arrow", - "arrow-schema", "datafusion-common", "datafusion-datasource", "datafusion-expr-common", "datafusion-physical-expr", "datafusion-physical-expr-common", "datafusion-physical-plan", - "itertools 0.14.0", + "itertools", "log", ] @@ -1621,36 +1618,27 @@ dependencies = [ [[package]] name = "datafusion-session" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21ef8e2745583619bd7a49474e8f45fbe98ebb31a133f27802217125a7b3d58d" +checksum = "8f96eebd17555386f459037c65ab73aae8df09f464524c709d6a3134ad4f4776" dependencies = [ - "arrow", "async-trait", - "dashmap", "datafusion-common", - "datafusion-common-runtime", "datafusion-execution", "datafusion-expr", - "datafusion-physical-expr", "datafusion-physical-plan", - "datafusion-sql", - "futures", - "itertools 0.14.0", - "log", - "object_store", "parking_lot", - "tokio", ] [[package]] name = "datafusion-sql" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89abd9868770386fede29e5a4b14f49c0bf48d652c3b9d7a8a0332329b87d50b" +checksum = "3fc195fe60634b2c6ccfd131b487de46dc30eccae8a3c35a13f136e7f440414f" dependencies = [ "arrow", "bigdecimal", + "chrono", "datafusion-common", "datafusion-expr", "indexmap", @@ -1662,15 +1650,16 @@ dependencies = [ [[package]] name = "datafusion-substrait" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa011a3814d91a03ab655ad41bbe5e57b203b2859281af8fe2c30aebbbcc5d9" +checksum = "2505af06d103a55b4e8ded0c6aeb6c72a771948da939c0bd3f8eee67af475a9c" dependencies = [ "async-recursion", "async-trait", "chrono", "datafusion", - "itertools 0.14.0", + "half", + "itertools", "object_store", "pbjson-types", "prost", @@ -1699,7 +1688,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -1760,9 +1749,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.1.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" dependencies = [ "crc32fast", "libz-rs-sys", @@ -1846,7 +1835,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -1861,6 +1850,12 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" + [[package]] name = "futures-util" version = "0.3.31" @@ -1925,12 +1920,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - [[package]] name = "glob" version = "0.3.3" @@ -1958,13 +1947,14 @@ dependencies = [ [[package]] name = "half" -version = "2.6.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ "cfg-if", "crunchy", "num-traits", + "zerocopy", ] [[package]] @@ -2097,7 +2087,7 @@ version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-channel", "futures-core", @@ -2254,12 +2244,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.11.3" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92119844f513ffa41556430369ab02c295a3578af21cf945caa3e9e0c2481ac3" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" dependencies = [ "equivalent", - "hashbrown 0.15.5", + "hashbrown 0.16.0", ] [[package]] @@ -2274,17 +2264,6 @@ version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" -[[package]] -name = "io-uring" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" -dependencies = [ - "bitflags", - "cfg-if", - "libc", -] - [[package]] name = "ipnet" version = "2.11.0" @@ -2301,15 +2280,6 @@ dependencies = [ "serde", ] -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.14.0" @@ -2417,9 +2387,9 @@ checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" [[package]] name = "libc" -version = "0.2.175" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libloading" @@ -2550,6 +2520,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] @@ -2569,20 +2540,6 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - [[package]] name = "num-bigint" version = "0.4.6" @@ -2612,28 +2569,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -2644,15 +2579,6 @@ dependencies = [ "libm", ] -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - [[package]] name = "object_store" version = "0.12.4" @@ -2660,7 +2586,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c1be0c6c22ec0817cdc77d3842f721a17fd30ab6965001415b5402a74e6b740" dependencies = [ "async-trait", - "base64 0.22.1", + "base64", "bytes", "chrono", "form_urlencoded", @@ -2670,7 +2596,7 @@ dependencies = [ "httparse", "humantime", "hyper", - "itertools 0.14.0", + "itertools", "md-5", "parking_lot", "percent-encoding", @@ -2737,9 +2663,9 @@ dependencies = [ [[package]] name = "parquet" -version = "56.1.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b56b41d1bd36aae415e42f91cae70ee75cf6cba74416b14dce3e958d5990ec" +checksum = "7a0f31027ef1af7549f7cec603a9a21dce706d3f8d7c2060a68f43c1773be95a" dependencies = [ "ahash", "arrow-array", @@ -2749,20 +2675,20 @@ dependencies = [ "arrow-ipc", "arrow-schema", "arrow-select", - "base64 0.22.1", + "base64", "brotli", "bytes", "chrono", "flate2", "futures", "half", - "hashbrown 0.15.5", + "hashbrown 0.16.0", "lz4_flex", - "num", "num-bigint", + "num-integer", + "num-traits", "object_store", "paste", - "ring", "seq-macro", "simdutf8", "snap", @@ -2780,31 +2706,31 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbjson" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e6349fa080353f4a597daffd05cb81572a9c031a6d4fff7e504947496fcc68" +checksum = "898bac3fa00d0ba57a4e8289837e965baa2dee8c3749f3b11d45a64b4223d9c3" dependencies = [ - "base64 0.21.7", + "base64", "serde", ] [[package]] name = "pbjson-build" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eea3058763d6e656105d1403cb04e0a41b7bbac6362d413e7c33be0c32279c9" +checksum = "af22d08a625a2213a78dbb0ffa253318c5c79ce3133d32d296655a7bdfb02095" dependencies = [ "heck", - "itertools 0.13.0", + "itertools", "prost", "prost-types", ] [[package]] name = "pbjson-types" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54e5e7bfb1652f95bc361d76f3c780d8e526b134b85417e774166ee941f0887" +checksum = "8e748e28374f10a330ee3bb9f29b828c0ac79831a32bab65015ad9b661ead526" dependencies = [ "bytes", "chrono", @@ -2833,9 +2759,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54acf3a685220b533e437e264e4d932cfbdc4cc7ec0cd232ed73c08d03b8a7ca" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset", "hashbrown 0.15.5", @@ -2910,7 +2836,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.106", + "syn 2.0.111", +] + +[[package]] +name = "proc-macro-crate" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit", ] [[package]] @@ -2924,9 +2859,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" dependencies = [ "bytes", "prost-derive", @@ -2934,12 +2869,12 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" +checksum = "ac6c3320f9abac597dcbc668774ef006702672474aad53c6d596b62e487b40b1" dependencies = [ "heck", - "itertools 0.14.0", + "itertools", "log", "multimap", "once_cell", @@ -2948,28 +2883,28 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.106", + "syn 2.0.111", "tempfile", ] [[package]] name = "prost-derive" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "prost-types" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" +checksum = "b9b4db3d6da204ed77bb26ba83b6122a73aeb2e87e25fbf7ad2e84c4ccbf8f72" dependencies = [ "prost", ] @@ -2994,9 +2929,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a" +checksum = "7ba0117f4212101ee6544044dae45abe1083d30ce7b29c4b5cbdfa2354e07383" dependencies = [ "indoc", "libc", @@ -3011,9 +2946,9 @@ dependencies = [ [[package]] name = "pyo3-async-runtimes" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d73cc6b1b7d8b3cef02101d37390dbdfe7e450dfea14921cae80a9534ba59ef2" +checksum = "e6ee6d4cb3e8d5b925f5cdb38da183e0ff18122eb2048d4041c9e7034d026e23" dependencies = [ "futures", "once_cell", @@ -3024,19 +2959,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598" +checksum = "4fc6ddaf24947d12a9aa31ac65431fb1b851b8f4365426e182901eabfb87df5f" dependencies = [ - "once_cell", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c" +checksum = "025474d3928738efb38ac36d4744a74a400c901c7596199e20e45d98eb194105" dependencies = [ "libc", "pyo3-build-config", @@ -3044,9 +2978,9 @@ dependencies = [ [[package]] name = "pyo3-log" -version = "0.12.4" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45192e5e4a4d2505587e27806c7b710c231c40c56f3bfc19535d0bb25df52264" +checksum = "2f8bae9ad5ba08b0b0ed2bb9c2bdbaeccc69cafca96d78cf0fbcea0d45d122bb" dependencies = [ "arc-swap", "log", @@ -3055,27 +2989,27 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50" +checksum = "2e64eb489f22fe1c95911b77c44cc41e7c19f3082fc81cce90f657cdc42ffded" dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "pyo3-macros-backend" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc" +checksum = "100246c0ecf400b475341b8455a9213344569af29a3c841d29270e53102e0fcf" dependencies = [ "heck", "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3151,9 +3085,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.40" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] @@ -3210,7 +3144,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76009fbe0614077fc1a2ce255e3a1881a2e3a3527097d5dc6d8212c585e7e38b" dependencies = [ "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3224,9 +3158,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.2" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -3236,9 +3170,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -3267,6 +3201,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "relative-path" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" + [[package]] name = "repr_offset" version = "0.2.2" @@ -3282,7 +3222,7 @@ version = "0.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-core", "futures-util", @@ -3333,10 +3273,33 @@ dependencies = [ ] [[package]] -name = "rustc-demangle" -version = "0.1.26" +name = "rstest" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" +checksum = "f5a3193c063baaa2a95a33f03035c8a72b83d97a54916055ba22d35ed3839d49" +dependencies = [ + "futures-timer", + "futures-util", + "rstest_macros", +] + +[[package]] +name = "rstest_macros" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c845311f0ff7951c5506121a9ad75aec44d083c31583b2ea5a30bcb0b0abba0" +dependencies = [ + "cfg-if", + "glob", + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version", + "syn 2.0.111", + "unicode-ident", +] [[package]] name = "rustc-hash" @@ -3473,7 +3436,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3523,9 +3486,9 @@ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" [[package]] name = "serde" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", @@ -3543,22 +3506,22 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3569,7 +3532,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3594,7 +3557,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3639,6 +3602,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "simdutf8" version = "0.1.5" @@ -3681,9 +3650,9 @@ dependencies = [ [[package]] name = "sqlparser" -version = "0.58.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4b661c54b1e4b603b37873a18c59920e4c51ea8ea2cf527d925424dbd4437c" +checksum = "4591acadbcf52f0af60eafbb2c003232b2b4cd8de5f0e9437cb8b1b59046cc0f" dependencies = [ "log", "recursive", @@ -3698,7 +3667,7 @@ checksum = "da5fc6819faabb412da764b99d3b713bb55083c11e7e0c00144d386cd6a1939c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3754,7 +3723,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3766,14 +3735,14 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "substrait" -version = "0.58.0" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de6d24c270c6c672a86c183c3a8439ba46c1936f93cf7296aa692de3b0ff0228" +checksum = "21f1cb6d0bcd097a39fc25f7236236be29881fe122e282e4173d6d007a929927" dependencies = [ "heck", "pbjson", @@ -3790,7 +3759,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml", - "syn 2.0.106", + "syn 2.0.111", "typify", "walkdir", ] @@ -3814,9 +3783,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.106" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -3840,7 +3809,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3864,22 +3833,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.16" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.16" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3929,31 +3898,28 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.47.1" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ - "backtrace", "bytes", - "io-uring", "libc", "mio", "pin-project-lite", - "slab", "socket2", "tokio-macros", - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3979,6 +3945,36 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml_datetime" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.23.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +dependencies = [ + "winnow", +] + [[package]] name = "tower" version = "0.5.2" @@ -4043,7 +4039,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -4102,9 +4098,9 @@ checksum = "f8c1ae7cc0fdb8b842d65d127cb981574b0d2b249b74d1c7a2986863dc134f71" [[package]] name = "typify" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7144144e97e987c94758a3017c920a027feac0799df325d6df4fc8f08d02068e" +checksum = "e6d5bcc6f62eb1fa8aa4098f39b29f93dcb914e17158b76c50360911257aa629" dependencies = [ "typify-impl", "typify-macro", @@ -4112,9 +4108,9 @@ dependencies = [ [[package]] name = "typify-impl" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062879d46aa4c9dfe0d33b035bbaf512da192131645d05deacb7033ec8581a09" +checksum = "a1eb359f7ffa4f9ebe947fa11a1b2da054564502968db5f317b7e37693cb2240" dependencies = [ "heck", "log", @@ -4125,16 +4121,16 @@ dependencies = [ "semver", "serde", "serde_json", - "syn 2.0.106", + "syn 2.0.111", "thiserror", "unicode-ident", ] [[package]] name = "typify-macro" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9708a3ceb6660ba3f8d2b8f0567e7d4b8b198e2b94d093b8a6077a751425de9e" +checksum = "911c32f3c8514b048c1b228361bebb5e6d73aeec01696e8cc0e82e2ffef8ab7a" dependencies = [ "proc-macro2", "quote", @@ -4143,7 +4139,7 @@ dependencies = [ "serde", "serde_json", "serde_tokenstream", - "syn 2.0.106", + "syn 2.0.111", "typify-impl", ] @@ -4285,7 +4281,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "wasm-bindgen-shared", ] @@ -4320,7 +4316,7 @@ checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4419,7 +4415,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -4430,7 +4426,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -4628,6 +4624,15 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +[[package]] +name = "winnow" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +dependencies = [ + "memchr", +] + [[package]] name = "wit-bindgen" version = "0.46.0" @@ -4669,7 +4674,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "synstructure", ] @@ -4690,7 +4695,7 @@ checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -4710,7 +4715,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "synstructure", ] @@ -4750,7 +4755,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 1e8c3366d..095ba9b3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,20 +48,20 @@ tokio = { version = "1.47", features = [ "rt-multi-thread", "sync", ] } -pyo3 = { version = "0.25", features = [ +pyo3 = { version = "0.26", features = [ "extension-module", "abi3", "abi3-py310", ] } -pyo3-async-runtimes = { version = "0.25", features = ["tokio-runtime"] } -pyo3-log = "0.12.4" -arrow = { version = "56", features = ["pyarrow"] } -arrow-select = { version = "56" } -datafusion = { version = "50", features = ["avro", "unicode_expressions"] } -datafusion-substrait = { version = "50", optional = true } -datafusion-proto = { version = "50" } -datafusion-ffi = { version = "50" } -prost = "0.13.1" # keep in line with `datafusion-substrait` +pyo3-async-runtimes = { version = "0.26", features = ["tokio-runtime"] } +pyo3-log = "0.13.2" +arrow = { version = "57", features = ["pyarrow"] } +arrow-select = { version = "57" } +datafusion = { version = "51", features = ["avro", "unicode_expressions"] } +datafusion-substrait = { version = "51", optional = true } +datafusion-proto = { version = "51" } +datafusion-ffi = { version = "51" } +prost = "0.14.1" # keep in line with `datafusion-substrait` uuid = { version = "1.18", features = ["v4"] } mimalloc = { version = "0.1", optional = true, default-features = false, features = [ "local_dynamic_tls", @@ -80,8 +80,8 @@ log = "0.4.27" parking_lot = "0.12" [build-dependencies] -prost-types = "0.13.1" # keep in line with `datafusion-substrait` -pyo3-build-config = "0.25" +prost-types = "0.14.1" # keep in line with `datafusion-substrait` +pyo3-build-config = "0.26" [lib] name = "datafusion_python" diff --git a/examples/datafusion-ffi-example/Cargo.lock b/examples/datafusion-ffi-example/Cargo.lock index b2d8a3d52..148c05edd 100644 --- a/examples/datafusion-ffi-example/Cargo.lock +++ b/examples/datafusion-ffi-example/Cargo.lock @@ -50,15 +50,6 @@ dependencies = [ "core_extensions", ] -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.1" @@ -109,12 +100,6 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -144,9 +129,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "arrow" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e833808ff2d94ed40d9379848a950d995043c7fb3e81a30b383f4c6033821cc" +checksum = "4df8bb5b0bd64c0b9bc61317fcc480bad0f00e56d3bc32c69a4c8dada4786bae" dependencies = [ "arrow-arith", "arrow-array", @@ -165,23 +150,23 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad08897b81588f60ba983e3ca39bda2b179bdd84dced378e7df81a5313802ef8" +checksum = "a1a640186d3bd30a24cb42264c2dafb30e236a6f50d510e56d40b708c9582491" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", "chrono", - "num", + "num-traits", ] [[package]] name = "arrow-array" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8548ca7c070d8db9ce7aa43f37393e4bfcf3f2d3681df278490772fd1673d08d" +checksum = "219fe420e6800979744c8393b687afb0252b3f8a89b91027d27887b72aa36d31" dependencies = [ "ahash", "arrow-buffer", @@ -191,25 +176,28 @@ dependencies = [ "chrono-tz", "half", "hashbrown 0.16.0", - "num", + "num-complex", + "num-integer", + "num-traits", ] [[package]] name = "arrow-buffer" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e003216336f70446457e280807a73899dd822feaf02087d31febca1363e2fccc" +checksum = "76885a2697a7edf6b59577f568b456afc94ce0e2edc15b784ce3685b6c3c5c27" dependencies = [ "bytes", "half", - "num", + "num-bigint", + "num-traits", ] [[package]] name = "arrow-cast" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919418a0681298d3a77d1a315f625916cb5678ad0d74b9c60108eb15fd083023" +checksum = "9c9ebb4c987e6b3b236fb4a14b20b34835abfdd80acead3ccf1f9bf399e1f168" dependencies = [ "arrow-array", "arrow-buffer", @@ -222,15 +210,15 @@ dependencies = [ "comfy-table", "half", "lexical-core", - "num", + "num-traits", "ryu", ] [[package]] name = "arrow-csv" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa9bf02705b5cf762b6f764c65f04ae9082c7cfc4e96e0c33548ee3f67012eb" +checksum = "92386159c8d4bce96f8bd396b0642a0d544d471bdc2ef34d631aec80db40a09c" dependencies = [ "arrow-array", "arrow-cast", @@ -243,21 +231,22 @@ dependencies = [ [[package]] name = "arrow-data" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5c64fff1d142f833d78897a772f2e5b55b36cb3e6320376f0961ab0db7bd6d0" +checksum = "727681b95de313b600eddc2a37e736dcb21980a40f640314dcf360e2f36bc89b" dependencies = [ "arrow-buffer", "arrow-schema", "half", - "num", + "num-integer", + "num-traits", ] [[package]] name = "arrow-ipc" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3594dcddccc7f20fd069bc8e9828ce37220372680ff638c5e00dea427d88f5" +checksum = "da9ba92e3de170295c98a84e5af22e2b037f0c7b32449445e6c493b5fca27f27" dependencies = [ "arrow-array", "arrow-buffer", @@ -271,9 +260,9 @@ dependencies = [ [[package]] name = "arrow-json" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88cf36502b64a127dc659e3b305f1d993a544eab0d48cce704424e62074dc04b" +checksum = "b969b4a421ae83828591c6bf5450bd52e6d489584142845ad6a861f42fe35df8" dependencies = [ "arrow-array", "arrow-buffer", @@ -283,19 +272,21 @@ dependencies = [ "chrono", "half", "indexmap", + "itoa", "lexical-core", "memchr", - "num", - "serde", + "num-traits", + "ryu", + "serde_core", "serde_json", "simdutf8", ] [[package]] name = "arrow-ord" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c8f82583eb4f8d84d4ee55fd1cb306720cddead7596edce95b50ee418edf66f" +checksum = "141c05298b21d03e88062317a1f1a73f5ba7b6eb041b350015b1cd6aabc0519b" dependencies = [ "arrow-array", "arrow-buffer", @@ -306,9 +297,9 @@ dependencies = [ [[package]] name = "arrow-row" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d07ba24522229d9085031df6b94605e0f4b26e099fb7cdeec37abd941a73753" +checksum = "c5f3c06a6abad6164508ed283c7a02151515cef3de4b4ff2cebbcaeb85533db2" dependencies = [ "arrow-array", "arrow-buffer", @@ -319,34 +310,34 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3aa9e59c611ebc291c28582077ef25c97f1975383f1479b12f3b9ffee2ffabe" +checksum = "9cfa7a03d1eee2a4d061476e1840ad5c9867a544ca6c4c59256496af5d0a8be5" dependencies = [ "bitflags", - "serde", + "serde_core", "serde_json", ] [[package]] name = "arrow-select" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c41dbbd1e97bfcaee4fcb30e29105fb2c75e4d82ae4de70b792a5d3f66b2e7a" +checksum = "bafa595babaad59f2455f4957d0f26448fb472722c186739f4fac0823a1bdb47" dependencies = [ "ahash", "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", - "num", + "num-traits", ] [[package]] name = "arrow-string" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f5183c150fbc619eede22b861ea7c0eebed8eaac0333eaa7f6da5205fd504d" +checksum = "32f46457dbbb99f2650ff3ac23e46a929e0ab81db809b02aa5511c258348bef2" dependencies = [ "arrow-array", "arrow-buffer", @@ -354,7 +345,7 @@ dependencies = [ "arrow-schema", "arrow-select", "memchr", - "num", + "num-traits", "regex", "regex-syntax", ] @@ -405,7 +396,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -423,21 +414,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - [[package]] name = "base64" version = "0.22.1" @@ -544,9 +520,9 @@ dependencies = [ [[package]] name = "bzip2" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea8dcd42434048e4f7a304411d9273a411f647446c1234a65ce0554923f4cff" +checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" dependencies = [ "libbz2-rs-sys", ] @@ -580,14 +556,13 @@ checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "num-traits", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -753,22 +728,22 @@ dependencies = [ [[package]] name = "datafusion" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af15bb3c6ffa33011ef579f6b0bcbe7c26584688bd6c994f548e44df67f011a" +checksum = "8ba7cb113e9c0bedf9e9765926031e132fa05a1b09ba6e93a6d1a4d7044457b8" dependencies = [ "arrow", - "arrow-ipc", "arrow-schema", "async-trait", "bytes", - "bzip2 0.6.0", + "bzip2 0.6.1", "chrono", "datafusion-catalog", "datafusion-catalog-listing", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", + "datafusion-datasource-arrow", "datafusion-datasource-csv", "datafusion-datasource-json", "datafusion-datasource-parquet", @@ -797,6 +772,7 @@ dependencies = [ "parquet", "rand", "regex", + "rstest", "sqlparser", "tempfile", "tokio", @@ -808,9 +784,9 @@ dependencies = [ [[package]] name = "datafusion-catalog" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187622262ad8f7d16d3be9202b4c1e0116f1c9aa387e5074245538b755261621" +checksum = "66a3a799f914a59b1ea343906a0486f17061f39509af74e874a866428951130d" dependencies = [ "arrow", "async-trait", @@ -823,7 +799,6 @@ dependencies = [ "datafusion-physical-expr", "datafusion-physical-plan", "datafusion-session", - "datafusion-sql", "futures", "itertools", "log", @@ -834,9 +809,9 @@ dependencies = [ [[package]] name = "datafusion-catalog-listing" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9657314f0a32efd0382b9a46fdeb2d233273ece64baa68a7c45f5a192daf0f83" +checksum = "6db1b113c80d7a0febcd901476a57aef378e717c54517a163ed51417d87621b0" dependencies = [ "arrow", "async-trait", @@ -846,10 +821,11 @@ dependencies = [ "datafusion-execution", "datafusion-expr", "datafusion-physical-expr", + "datafusion-physical-expr-adapter", "datafusion-physical-expr-common", "datafusion-physical-plan", - "datafusion-session", "futures", + "itertools", "log", "object_store", "tokio", @@ -857,14 +833,13 @@ dependencies = [ [[package]] name = "datafusion-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a83760d9a13122d025fbdb1d5d5aaf93dd9ada5e90ea229add92aa30898b2d1" +checksum = "7c10f7659e96127d25e8366be7c8be4109595d6a2c3eac70421f380a7006a1b0" dependencies = [ "ahash", "arrow", "arrow-ipc", - "base64", "chrono", "half", "hashbrown 0.14.5", @@ -882,9 +857,9 @@ dependencies = [ [[package]] name = "datafusion-common-runtime" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b6234a6c7173fe5db1c6c35c01a12b2aa0f803a3007feee53483218817f8b1e" +checksum = "b92065bbc6532c6651e2f7dd30b55cba0c7a14f860c7e1d15f165c41a1868d95" dependencies = [ "futures", "log", @@ -893,15 +868,15 @@ dependencies = [ [[package]] name = "datafusion-datasource" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7256c9cb27a78709dd42d0c80f0178494637209cac6e29d5c93edd09b6721b86" +checksum = "fde13794244bc7581cd82f6fff217068ed79cdc344cafe4ab2c3a1c3510b38d6" dependencies = [ "arrow", "async-compression", "async-trait", "bytes", - "bzip2 0.6.0", + "bzip2 0.6.1", "chrono", "datafusion-common", "datafusion-common-runtime", @@ -918,9 +893,7 @@ dependencies = [ "itertools", "log", "object_store", - "parquet", "rand", - "tempfile", "tokio", "tokio-util", "url", @@ -928,22 +901,44 @@ dependencies = [ "zstd", ] +[[package]] +name = "datafusion-datasource-arrow" +version = "51.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "804fa9b4ecf3157982021770617200ef7c1b2979d57bec9044748314775a9aea" +dependencies = [ + "arrow", + "arrow-ipc", + "async-trait", + "bytes", + "datafusion-common", + "datafusion-common-runtime", + "datafusion-datasource", + "datafusion-execution", + "datafusion-expr", + "datafusion-physical-expr-common", + "datafusion-physical-plan", + "datafusion-session", + "futures", + "itertools", + "object_store", + "tokio", +] + [[package]] name = "datafusion-datasource-csv" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64533a90f78e1684bfb113d200b540f18f268134622d7c96bbebc91354d04825" +checksum = "61a1641a40b259bab38131c5e6f48fac0717bedb7dc93690e604142a849e0568" dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", "datafusion-execution", "datafusion-expr", - "datafusion-physical-expr", "datafusion-physical-expr-common", "datafusion-physical-plan", "datafusion-session", @@ -955,49 +950,44 @@ dependencies = [ [[package]] name = "datafusion-datasource-json" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d7ebeb12c77df0aacad26f21b0d033aeede423a64b2b352f53048a75bf1d6e6" +checksum = "adeacdb00c1d37271176f8fb6a1d8ce096baba16ea7a4b2671840c5c9c64fe85" dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", "datafusion-execution", "datafusion-expr", - "datafusion-physical-expr", "datafusion-physical-expr-common", "datafusion-physical-plan", "datafusion-session", "futures", "object_store", - "serde_json", "tokio", ] [[package]] name = "datafusion-datasource-parquet" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09e783c4c7d7faa1199af2df4761c68530634521b176a8d1331ddbc5a5c75133" +checksum = "43d0b60ffd66f28bfb026565d62b0a6cbc416da09814766a3797bba7d85a3cd9" dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-datasource", "datafusion-execution", "datafusion-expr", - "datafusion-functions-aggregate", + "datafusion-functions-aggregate-common", "datafusion-physical-expr", "datafusion-physical-expr-adapter", "datafusion-physical-expr-common", - "datafusion-physical-optimizer", "datafusion-physical-plan", "datafusion-pruning", "datafusion-session", @@ -1007,21 +997,20 @@ dependencies = [ "object_store", "parking_lot", "parquet", - "rand", "tokio", ] [[package]] name = "datafusion-doc" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ee6b1d9a80d13f9deb2291f45c07044b8e62fb540dbde2453a18be17a36429" +checksum = "2b99e13947667b36ad713549237362afb054b2d8f8cc447751e23ec61202db07" [[package]] name = "datafusion-execution" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4cec0a57653bec7b933fb248d3ffa3fa3ab3bd33bd140dc917f714ac036f531" +checksum = "63695643190679037bc946ad46a263b62016931547bf119859c511f7ff2f5178" dependencies = [ "arrow", "async-trait", @@ -1039,9 +1028,9 @@ dependencies = [ [[package]] name = "datafusion-expr" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef76910bdca909722586389156d0aa4da4020e1631994d50fadd8ad4b1aa05fe" +checksum = "f9a4787cbf5feb1ab351f789063398f67654a6df75c4d37d7f637dc96f951a91" dependencies = [ "arrow", "async-trait", @@ -1053,6 +1042,7 @@ dependencies = [ "datafusion-functions-window-common", "datafusion-physical-expr-common", "indexmap", + "itertools", "paste", "recursive", "serde_json", @@ -1061,9 +1051,9 @@ dependencies = [ [[package]] name = "datafusion-expr-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d155ccbda29591ca71a1344dd6bed26c65a4438072b400df9db59447f590bb6" +checksum = "5ce2fb1b8c15c9ac45b0863c30b268c69dc9ee7a1ee13ecf5d067738338173dc" dependencies = [ "arrow", "datafusion-common", @@ -1074,9 +1064,9 @@ dependencies = [ [[package]] name = "datafusion-ffi" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ddb7c4e645df080c27dad13a198d191da328dd1c98e198664a7a0f64b335cc" +checksum = "ec510e7787641279b0336e8b79e4b7bd1385d5976875ff9b97f4269ce5231a67" dependencies = [ "abi_stable", "arrow", @@ -1084,6 +1074,7 @@ dependencies = [ "async-ffi", "async-trait", "datafusion", + "datafusion-common", "datafusion-functions-aggregate-common", "datafusion-proto", "datafusion-proto-common", @@ -1110,9 +1101,9 @@ dependencies = [ [[package]] name = "datafusion-functions" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de2782136bd6014670fd84fe3b0ca3b3e4106c96403c3ae05c0598577139977" +checksum = "794a9db7f7b96b3346fc007ff25e994f09b8f0511b4cf7dff651fadfe3ebb28f" dependencies = [ "arrow", "arrow-buffer", @@ -1130,6 +1121,7 @@ dependencies = [ "itertools", "log", "md-5", + "num-traits", "rand", "regex", "sha2", @@ -1139,9 +1131,9 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07331fc13603a9da97b74fd8a273f4238222943dffdbbed1c4c6f862a30105bf" +checksum = "1c25210520a9dcf9c2b2cbbce31ebd4131ef5af7fc60ee92b266dc7d159cb305" dependencies = [ "ahash", "arrow", @@ -1160,9 +1152,9 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5951e572a8610b89968a09b5420515a121fbc305c0258651f318dc07c97ab17" +checksum = "62f4a66f3b87300bb70f4124b55434d2ae3fe80455f3574701d0348da040b55d" dependencies = [ "ahash", "arrow", @@ -1173,9 +1165,9 @@ dependencies = [ [[package]] name = "datafusion-functions-nested" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdacca9302c3d8fc03f3e94f338767e786a88a33f5ebad6ffc0e7b50364b9ea3" +checksum = "ae5c06eed03918dc7fe7a9f082a284050f0e9ecf95d72f57712d1496da03b8c4" dependencies = [ "arrow", "arrow-ord", @@ -1183,6 +1175,7 @@ dependencies = [ "datafusion-doc", "datafusion-execution", "datafusion-expr", + "datafusion-expr-common", "datafusion-functions", "datafusion-functions-aggregate", "datafusion-functions-aggregate-common", @@ -1195,9 +1188,9 @@ dependencies = [ [[package]] name = "datafusion-functions-table" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37ff8a99434fbbad604a7e0669717c58c7c4f14c472d45067c4b016621d981" +checksum = "db4fed1d71738fbe22e2712d71396db04c25de4111f1ec252b8f4c6d3b25d7f5" dependencies = [ "arrow", "async-trait", @@ -1211,9 +1204,9 @@ dependencies = [ [[package]] name = "datafusion-functions-window" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e2aea7c79c926cffabb13dc27309d4eaeb130f4a21c8ba91cdd241c813652b" +checksum = "1d92206aa5ae21892f1552b4d61758a862a70956e6fd7a95cb85db1de74bc6d1" dependencies = [ "arrow", "datafusion-common", @@ -1229,9 +1222,9 @@ dependencies = [ [[package]] name = "datafusion-functions-window-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fead257ab5fd2ffc3b40fda64da307e20de0040fe43d49197241d9de82a487f" +checksum = "53ae9bcc39800820d53a22d758b3b8726ff84a5a3e24cecef04ef4e5fdf1c7cc" dependencies = [ "datafusion-common", "datafusion-physical-expr-common", @@ -1239,20 +1232,20 @@ dependencies = [ [[package]] name = "datafusion-macros" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec6f637bce95efac05cdfb9b6c19579ed4aa5f6b94d951cfa5bb054b7bb4f730" +checksum = "1063ad4c9e094b3f798acee16d9a47bd7372d9699be2de21b05c3bd3f34ab848" dependencies = [ - "datafusion-expr", + "datafusion-doc", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "datafusion-optimizer" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6583ef666ae000a613a837e69e456681a9faa96347bf3877661e9e89e141d8a" +checksum = "9f35f9ec5d08b87fd1893a30c2929f2559c2f9806ca072d8fefca5009dc0f06a" dependencies = [ "arrow", "chrono", @@ -1270,9 +1263,9 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8668103361a272cbbe3a61f72eca60c9b7c706e87cc3565bcf21e2b277b84f6" +checksum = "c30cc8012e9eedcb48bbe112c6eff4ae5ed19cf3003cb0f505662e88b7014c5d" dependencies = [ "ahash", "arrow", @@ -1285,7 +1278,6 @@ dependencies = [ "hashbrown 0.14.5", "indexmap", "itertools", - "log", "parking_lot", "paste", "petgraph", @@ -1293,9 +1285,9 @@ dependencies = [ [[package]] name = "datafusion-physical-expr-adapter" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "815acced725d30601b397e39958e0e55630e0a10d66ef7769c14ae6597298bb0" +checksum = "7f9ff2dbd476221b1f67337699eff432781c4e6e1713d2aefdaa517dfbf79768" dependencies = [ "arrow", "datafusion-common", @@ -1308,9 +1300,9 @@ dependencies = [ [[package]] name = "datafusion-physical-expr-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6652fe7b5bf87e85ed175f571745305565da2c0b599d98e697bcbedc7baa47c3" +checksum = "90da43e1ec550b172f34c87ec68161986ced70fd05c8d2a2add66eef9c276f03" dependencies = [ "ahash", "arrow", @@ -1322,9 +1314,9 @@ dependencies = [ [[package]] name = "datafusion-physical-optimizer" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b7d623eb6162a3332b564a0907ba00895c505d101b99af78345f1acf929b5c" +checksum = "ce9804f799acd7daef3be7aaffe77c0033768ed8fdbf5fb82fc4c5f2e6bc14e6" dependencies = [ "arrow", "datafusion-common", @@ -1336,15 +1328,14 @@ dependencies = [ "datafusion-physical-plan", "datafusion-pruning", "itertools", - "log", "recursive", ] [[package]] name = "datafusion-physical-plan" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f7f778a1a838dec124efb96eae6144237d546945587557c9e6936b3414558c" +checksum = "0acf0ad6b6924c6b1aa7d213b181e012e2d3ec0a64ff5b10ee6282ab0f8532ac" dependencies = [ "ahash", "arrow", @@ -1373,15 +1364,26 @@ dependencies = [ [[package]] name = "datafusion-proto" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7df9f606892e6af45763d94d210634eec69b9bb6ced5353381682ff090028a3" +checksum = "d368093a98a17d1449b1083ac22ed16b7128e4c67789991869480d8c4a40ecb9" dependencies = [ "arrow", "chrono", - "datafusion", + "datafusion-catalog", + "datafusion-catalog-listing", "datafusion-common", + "datafusion-datasource", + "datafusion-datasource-arrow", + "datafusion-datasource-csv", + "datafusion-datasource-json", + "datafusion-datasource-parquet", + "datafusion-execution", "datafusion-expr", + "datafusion-functions-table", + "datafusion-physical-expr", + "datafusion-physical-expr-common", + "datafusion-physical-plan", "datafusion-proto-common", "object_store", "prost", @@ -1389,9 +1391,9 @@ dependencies = [ [[package]] name = "datafusion-proto-common" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b14f288ca4ef77743d9672cafecf3adfffff0b9b04af9af79ecbeaaf736901" +checksum = "3b6aef3d5e5c1d2bc3114c4876730cb76a9bdc5a8df31ef1b6db48f0c1671895" dependencies = [ "arrow", "datafusion-common", @@ -1400,12 +1402,11 @@ dependencies = [ [[package]] name = "datafusion-pruning" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd1e59e2ca14fe3c30f141600b10ad8815e2856caa59ebbd0e3e07cd3d127a65" +checksum = "ac2c2498a1f134a9e11a9f5ed202a2a7d7e9774bd9249295593053ea3be999db" dependencies = [ "arrow", - "arrow-schema", "datafusion-common", "datafusion-datasource", "datafusion-expr-common", @@ -1418,36 +1419,27 @@ dependencies = [ [[package]] name = "datafusion-session" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21ef8e2745583619bd7a49474e8f45fbe98ebb31a133f27802217125a7b3d58d" +checksum = "8f96eebd17555386f459037c65ab73aae8df09f464524c709d6a3134ad4f4776" dependencies = [ - "arrow", "async-trait", - "dashmap", "datafusion-common", - "datafusion-common-runtime", "datafusion-execution", "datafusion-expr", - "datafusion-physical-expr", "datafusion-physical-plan", - "datafusion-sql", - "futures", - "itertools", - "log", - "object_store", "parking_lot", - "tokio", ] [[package]] name = "datafusion-sql" -version = "50.3.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89abd9868770386fede29e5a4b14f49c0bf48d652c3b9d7a8a0332329b87d50b" +checksum = "3fc195fe60634b2c6ccfd131b487de46dc30eccae8a3c35a13f136e7f440414f" dependencies = [ "arrow", "bigdecimal", + "chrono", "datafusion-common", "datafusion-expr", "indexmap", @@ -1476,7 +1468,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -1525,9 +1517,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.1.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" dependencies = [ "crc32fast", "libz-rs-sys", @@ -1611,7 +1603,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -1626,6 +1618,12 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" + [[package]] name = "futures-util" version = "0.3.31" @@ -1670,10 +1668,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.11.1+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -1688,12 +1684,6 @@ dependencies = [ "wasi 0.14.2+wasi-0.2.4", ] -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - [[package]] name = "glob" version = "0.3.3" @@ -1702,13 +1692,14 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "half" -version = "2.6.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ "cfg-if", "crunchy", "num-traits", + "zerocopy", ] [[package]] @@ -1727,8 +1718,6 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "allocator-api2", - "equivalent", "foldhash", ] @@ -1900,12 +1889,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" dependencies = [ "equivalent", - "hashbrown 0.15.5", + "hashbrown 0.16.0", ] [[package]] @@ -1920,17 +1909,6 @@ version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" -[[package]] -name = "io-uring" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" -dependencies = [ - "bitflags", - "cfg-if", - "libc", -] - [[package]] name = "itertools" version = "0.14.0" @@ -2038,9 +2016,9 @@ checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" [[package]] name = "libc" -version = "0.2.175" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libloading" @@ -2147,31 +2125,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", -] - -[[package]] -name = "mio" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" -dependencies = [ - "libc", - "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.59.0", -] - -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", + "simd-adler32", ] [[package]] @@ -2202,28 +2156,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -2234,20 +2166,11 @@ dependencies = [ "libm", ] -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - [[package]] name = "object_store" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efc4f07659e11cd45a341cd24d71e683e3be65d9ff1f8150061678fe60437496" +checksum = "4c1be0c6c22ec0817cdc77d3842f721a17fd30ab6965001415b5402a74e6b740" dependencies = [ "async-trait", "bytes", @@ -2307,9 +2230,9 @@ dependencies = [ [[package]] name = "parquet" -version = "56.2.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dbd48ad52d7dccf8ea1b90a3ddbfaea4f69878dd7683e51c507d4bc52b5b27" +checksum = "7a0f31027ef1af7549f7cec603a9a21dce706d3f8d7c2060a68f43c1773be95a" dependencies = [ "ahash", "arrow-array", @@ -2328,11 +2251,11 @@ dependencies = [ "half", "hashbrown 0.16.0", "lz4_flex", - "num", "num-bigint", + "num-integer", + "num-traits", "object_store", "paste", - "ring", "seq-macro", "simdutf8", "snap", @@ -2356,9 +2279,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "petgraph" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54acf3a685220b533e437e264e4d932cfbdc4cc7ec0cd232ed73c08d03b8a7ca" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset", "hashbrown 0.15.5", @@ -2426,6 +2349,15 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "proc-macro-crate" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit", +] + [[package]] name = "proc-macro2" version = "1.0.101" @@ -2437,9 +2369,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" dependencies = [ "bytes", "prost-derive", @@ -2447,15 +2379,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2469,9 +2401,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a" +checksum = "37a6df7eab65fc7bee654a421404947e10a0f7085b6951bf2ea395f4659fb0cf" dependencies = [ "indoc", "libc", @@ -2486,19 +2418,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598" +checksum = "f77d387774f6f6eec64a004eac0ed525aab7fa1966d94b42f743797b3e395afb" dependencies = [ - "once_cell", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c" +checksum = "2dd13844a4242793e02df3e2ec093f540d948299a6a77ea9ce7afd8623f542be" dependencies = [ "libc", "pyo3-build-config", @@ -2506,34 +2437,34 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50" +checksum = "eaf8f9f1108270b90d3676b8679586385430e5c0bb78bb5f043f95499c821a71" dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "pyo3-macros-backend" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc" +checksum = "70a3b2274450ba5288bc9b8c1b69ff569d1d61189d4bff38f8d22e03d17f932b" dependencies = [ "heck", "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "quote" -version = "1.0.40" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] @@ -2590,7 +2521,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76009fbe0614077fc1a2ce255e3a1881a2e3a3527097d5dc6d8212c585e7e38b" dependencies = [ "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2604,9 +2535,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.2" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -2616,9 +2547,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -2631,6 +2562,12 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" +[[package]] +name = "relative-path" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" + [[package]] name = "repr_offset" version = "0.2.2" @@ -2641,24 +2578,33 @@ dependencies = [ ] [[package]] -name = "ring" -version = "0.17.14" +name = "rstest" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +checksum = "f5a3193c063baaa2a95a33f03035c8a72b83d97a54916055ba22d35ed3839d49" dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.16", - "libc", - "untrusted", - "windows-sys 0.52.0", + "futures-timer", + "futures-util", + "rstest_macros", ] [[package]] -name = "rustc-demangle" -version = "0.1.26" +name = "rstest_macros" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" +checksum = "9c845311f0ff7951c5506121a9ad75aec44d083c31583b2ea5a30bcb0b0abba0" +dependencies = [ + "cfg-if", + "glob", + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version", + "syn 2.0.111", + "unicode-ident", +] [[package]] name = "rustc_version" @@ -2711,9 +2657,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "seq-macro" @@ -2723,22 +2669,32 @@ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2770,6 +2726,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "simdutf8" version = "0.1.5" @@ -2802,9 +2764,9 @@ checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "sqlparser" -version = "0.58.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4b661c54b1e4b603b37873a18c59920e4c51ea8ea2cf527d925424dbd4437c" +checksum = "4591acadbcf52f0af60eafbb2c003232b2b4cd8de5f0e9437cb8b1b59046cc0f" dependencies = [ "log", "recursive", @@ -2819,7 +2781,7 @@ checksum = "da5fc6819faabb412da764b99d3b713bb55083c11e7e0c00144d386cd6a1939c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2863,7 +2825,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2885,9 +2847,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.106" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -2902,7 +2864,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2941,7 +2903,7 @@ checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2976,29 +2938,24 @@ dependencies = [ [[package]] name = "tokio" -version = "1.47.1" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ - "backtrace", "bytes", - "io-uring", - "libc", - "mio", "pin-project-lite", - "slab", "tokio-macros", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3014,6 +2971,36 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml_datetime" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.23.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +dependencies = [ + "winnow", +] + [[package]] name = "tracing" version = "0.1.41" @@ -3033,7 +3020,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3108,12 +3095,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "url" version = "2.5.7" @@ -3196,7 +3177,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "wasm-bindgen-shared", ] @@ -3231,7 +3212,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3304,7 +3285,7 @@ checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", - "windows-link", + "windows-link 0.1.3", "windows-result", "windows-strings", ] @@ -3317,7 +3298,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3328,7 +3309,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3337,13 +3318,19 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + [[package]] name = "windows-result" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -3352,16 +3339,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", + "windows-link 0.1.3", ] [[package]] @@ -3404,7 +3382,7 @@ version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ - "windows-link", + "windows-link 0.1.3", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -3511,6 +3489,15 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +[[package]] +name = "winnow" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +dependencies = [ + "memchr", +] + [[package]] name = "wit-bindgen-rt" version = "0.39.0" @@ -3555,7 +3542,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "synstructure", ] @@ -3576,7 +3563,7 @@ checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3596,7 +3583,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "synstructure", ] @@ -3630,7 +3617,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] diff --git a/examples/datafusion-ffi-example/Cargo.toml b/examples/datafusion-ffi-example/Cargo.toml index b47403f09..8150156d6 100644 --- a/examples/datafusion-ffi-example/Cargo.toml +++ b/examples/datafusion-ffi-example/Cargo.toml @@ -21,16 +21,16 @@ version = "0.2.0" edition = "2021" [dependencies] -datafusion = { version = "50" } -datafusion-ffi = { version = "50" } -pyo3 = { version = "0.25", features = ["extension-module", "abi3", "abi3-py310"] } -arrow = { version = "56" } -arrow-array = { version = "56" } -arrow-schema = { version = "56" } +datafusion = { version = "51" } +datafusion-ffi = { version = "51" } +pyo3 = { version = "0.27", features = ["extension-module", "abi3", "abi3-py310"] } +arrow = { version = "57" } +arrow-array = { version = "57" } +arrow-schema = { version = "57" } async-trait = "0.1.88" [build-dependencies] -pyo3-build-config = "0.25" +pyo3-build-config = "0.27" [lib] name = "datafusion_ffi_example" diff --git a/python/datafusion/expr.py b/python/datafusion/expr.py index 3a6d04413..695fe7c49 100644 --- a/python/datafusion/expr.py +++ b/python/datafusion/expr.py @@ -695,7 +695,7 @@ def types(self) -> DataTypeMap: return self.expr.types() def python_value(self) -> Any: - """Extracts the Expr value into a PyObject. + """Extracts the Expr value into `Any`. This is only valid for literal expressions. diff --git a/python/tests/test_expr.py b/python/tests/test_expr.py index 7847826ac..28c71549b 100644 --- a/python/tests/test_expr.py +++ b/python/tests/test_expr.py @@ -895,10 +895,10 @@ def test_alias_with_metadata(df): col("d").arrow_typeof(), pa.array( [ - 'List(Field { name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })', # noqa: E501 - 'List(Field { name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })', # noqa: E501 - 'List(Field { name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })', # noqa: E501 - 'List(Field { name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })', # noqa: E501 + "List(nullable Int64)", + "List(nullable Int64)", + "List(nullable Int64)", + "List(nullable Int64)", ], type=pa.string(), ), diff --git a/python/tests/test_functions.py b/python/tests/test_functions.py index 2b253051f..34c8c5c9f 100644 --- a/python/tests/test_functions.py +++ b/python/tests/test_functions.py @@ -766,7 +766,7 @@ def test_array_function_obj_tests(stmt, py_expr): ), ( f.regexp_replace(column("a"), literal("(ell|orl)"), literal("-")), - pa.array(["H-o", "W-d", "!"]), + pa.array(["H-o", "W-d", "!"], type=pa.string_view()), ), ( f.regexp_count(column("a"), literal("(ell|orl)"), literal(1)), diff --git a/src/catalog.rs b/src/catalog.rs index 6f949f8ca..f8b86ec6a 100644 --- a/src/catalog.rs +++ b/src/catalog.rs @@ -63,7 +63,7 @@ impl From> for PySchema { #[pymethods] impl PyCatalog { #[new] - fn new(catalog: PyObject) -> Self { + fn new(catalog: Py) -> Self { let catalog_provider = Arc::new(RustWrappedPyCatalogProvider::new(catalog)) as Arc; catalog_provider.into() @@ -81,7 +81,7 @@ impl PyCatalog { } #[pyo3(signature = (name="public"))] - fn schema(&self, name: &str) -> PyResult { + fn schema(&self, name: &str) -> PyResult> { let schema = self .catalog .schema(name) @@ -89,7 +89,7 @@ impl PyCatalog { "Schema with name {name} doesn't exist." )))?; - Python::with_gil(|py| { + Python::attach(|py| { match schema .as_any() .downcast_ref::() @@ -146,7 +146,7 @@ impl PyCatalog { #[pymethods] impl PySchema { #[new] - fn new(schema_provider: PyObject) -> Self { + fn new(schema_provider: Py) -> Self { let schema_provider = Arc::new(RustWrappedPySchemaProvider::new(schema_provider)) as Arc; schema_provider.into() @@ -202,13 +202,13 @@ impl PySchema { #[derive(Debug)] pub(crate) struct RustWrappedPySchemaProvider { - schema_provider: PyObject, + schema_provider: Py, owner_name: Option, } impl RustWrappedPySchemaProvider { - pub fn new(schema_provider: PyObject) -> Self { - let owner_name = Python::with_gil(|py| { + pub fn new(schema_provider: Py) -> Self { + let owner_name = Python::attach(|py| { schema_provider .bind(py) .getattr("owner_name") @@ -223,7 +223,7 @@ impl RustWrappedPySchemaProvider { } fn table_inner(&self, name: &str) -> PyResult>> { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.schema_provider.bind(py); let py_table_method = provider.getattr("table")?; @@ -250,7 +250,7 @@ impl SchemaProvider for RustWrappedPySchemaProvider { } fn table_names(&self) -> Vec { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.schema_provider.bind(py); provider @@ -276,7 +276,7 @@ impl SchemaProvider for RustWrappedPySchemaProvider { table: Arc, ) -> datafusion::common::Result>> { let py_table = PyTable::from(table); - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.schema_provider.bind(py); let _ = provider .call_method1("register_table", (name, py_table)) @@ -292,7 +292,7 @@ impl SchemaProvider for RustWrappedPySchemaProvider { &self, name: &str, ) -> datafusion::common::Result>> { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.schema_provider.bind(py); let table = provider .call_method1("deregister_table", (name,)) @@ -313,7 +313,7 @@ impl SchemaProvider for RustWrappedPySchemaProvider { } fn table_exist(&self, name: &str) -> bool { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.schema_provider.bind(py); provider .call_method1("table_exist", (name,)) @@ -325,16 +325,16 @@ impl SchemaProvider for RustWrappedPySchemaProvider { #[derive(Debug)] pub(crate) struct RustWrappedPyCatalogProvider { - pub(crate) catalog_provider: PyObject, + pub(crate) catalog_provider: Py, } impl RustWrappedPyCatalogProvider { - pub fn new(catalog_provider: PyObject) -> Self { + pub fn new(catalog_provider: Py) -> Self { Self { catalog_provider } } fn schema_inner(&self, name: &str) -> PyResult>> { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.catalog_provider.bind(py); let py_schema = provider.call_method1("schema", (name,))?; @@ -379,7 +379,7 @@ impl CatalogProvider for RustWrappedPyCatalogProvider { } fn schema_names(&self) -> Vec { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.catalog_provider.bind(py); provider .getattr("schema_names") @@ -405,7 +405,7 @@ impl CatalogProvider for RustWrappedPyCatalogProvider { ) -> datafusion::common::Result>> { // JRIGHT HERE // let py_schema: PySchema = schema.into(); - Python::with_gil(|py| { + Python::attach(|py| { let py_schema = match schema .as_any() .downcast_ref::() @@ -436,7 +436,7 @@ impl CatalogProvider for RustWrappedPyCatalogProvider { name: &str, cascade: bool, ) -> datafusion::common::Result>> { - Python::with_gil(|py| { + Python::attach(|py| { let provider = self.catalog_provider.bind(py); let schema = provider .call_method1("deregister_schema", (name, cascade)) diff --git a/src/common/data_type.rs b/src/common/data_type.rs index 69f686f78..55848da5c 100644 --- a/src/common/data_type.rs +++ b/src/common/data_type.rs @@ -18,7 +18,7 @@ use datafusion::arrow::array::Array; use datafusion::arrow::datatypes::{DataType, IntervalUnit, TimeUnit}; use datafusion::common::ScalarValue; -use datafusion::logical_expr::sqlparser::ast::NullTreatment as DFNullTreatment; +use datafusion::logical_expr::expr::NullTreatment as DFNullTreatment; use pyo3::exceptions::{PyNotImplementedError, PyValueError}; use pyo3::prelude::*; @@ -261,6 +261,12 @@ impl DataTypeMap { ScalarValue::Float16(_) => Ok(DataType::Float16), ScalarValue::Float32(_) => Ok(DataType::Float32), ScalarValue::Float64(_) => Ok(DataType::Float64), + ScalarValue::Decimal32(_, precision, scale) => { + Ok(DataType::Decimal32(*precision, *scale)) + } + ScalarValue::Decimal64(_, precision, scale) => { + Ok(DataType::Decimal64(*precision, *scale)) + } ScalarValue::Decimal128(_, precision, scale) => { Ok(DataType::Decimal128(*precision, *scale)) } diff --git a/src/config.rs b/src/config.rs index a25a4072e..583dea7ef 100644 --- a/src/config.rs +++ b/src/config.rs @@ -64,7 +64,7 @@ impl PyConfig { } /// Set a configuration option - pub fn set(&self, key: &str, value: PyObject, py: Python) -> PyDataFusionResult<()> { + pub fn set(&self, key: &str, value: Py, py: Python) -> PyDataFusionResult<()> { let scalar_value = py_obj_to_scalar_value(py, value)?; let mut options = self.config.write(); options.set(key, scalar_value.to_string().as_str())?; @@ -72,7 +72,7 @@ impl PyConfig { } /// Get all configuration options - pub fn get_all(&self, py: Python) -> PyResult { + pub fn get_all(&self, py: Python) -> PyResult> { let entries: Vec<(String, Option)> = { let options = self.config.read(); options diff --git a/src/context.rs b/src/context.rs index f64cc1683..f71dca2b4 100644 --- a/src/context.rs +++ b/src/context.rs @@ -845,12 +845,12 @@ impl PySessionContext { } #[pyo3(signature = (name="datafusion"))] - pub fn catalog(&self, name: &str) -> PyResult { + pub fn catalog(&self, name: &str) -> PyResult> { let catalog = self.ctx.catalog(name).ok_or(PyKeyError::new_err(format!( "Catalog with name {name} doesn't exist." )))?; - Python::with_gil(|py| { + Python::attach(|py| { match catalog .as_any() .downcast_ref::() diff --git a/src/dataframe.rs b/src/dataframe.rs index 21eb6e0e2..f8f3ee8e6 100644 --- a/src/dataframe.rs +++ b/src/dataframe.rs @@ -281,7 +281,11 @@ impl PyDataFrame { Arc::clone(&self.df) } - fn prepare_repr_string(&self, py: Python, as_html: bool) -> PyDataFusionResult { + fn prepare_repr_string<'py>( + &self, + py: Python<'py>, + as_html: bool, + ) -> PyDataFusionResult { // Get the Python formatter and config let PythonFormatter { formatter, config } = get_python_formatter_with_config(py)?; @@ -309,11 +313,11 @@ impl PyDataFrame { let table_uuid = uuid::Uuid::new_v4().to_string(); - // Convert record batches to PyObject list + // Convert record batches to Py list let py_batches = batches .iter() .map(|rb| rb.to_pyarrow(py)) - .collect::>>()?; + .collect::>>>()?; let py_schema = self.schema().into_pyobject(py)?; @@ -378,7 +382,7 @@ impl Iterator for PartitionedDataFrameStreamReader { while self.current < self.streams.len() { let stream = &mut self.streams[self.current]; let fut = poll_next_batch(stream); - let result = Python::with_gil(|py| wait_for_future(py, fut)); + let result = Python::attach(|py| wait_for_future(py, fut)); match result { Ok(Ok(Some(batch))) => { @@ -486,7 +490,7 @@ impl PyDataFrame { /// Returns the schema from the logical plan fn schema(&self) -> PyArrowType { - PyArrowType(self.df.schema().into()) + PyArrowType(self.df.schema().as_arrow().clone()) } /// Convert this DataFrame into a Table Provider that can be used in register_table @@ -597,7 +601,7 @@ impl PyDataFrame { /// Executes the plan, returning a list of `RecordBatch`es. /// Unless some order is specified in the plan, there is no /// guarantee of the order of the result. - fn collect(&self, py: Python) -> PyResult> { + fn collect<'py>(&self, py: Python<'py>) -> PyResult>> { let batches = wait_for_future(py, self.df.as_ref().clone().collect())? .map_err(PyDataFusionError::from)?; // cannot use PyResult> return type due to @@ -613,7 +617,7 @@ impl PyDataFrame { /// Executes this DataFrame and collects all results into a vector of vector of RecordBatch /// maintaining the input partitioning. - fn collect_partitioned(&self, py: Python) -> PyResult>> { + fn collect_partitioned<'py>(&self, py: Python<'py>) -> PyResult>>> { let batches = wait_for_future(py, self.df.as_ref().clone().collect_partitioned())? .map_err(PyDataFusionError::from)?; @@ -623,7 +627,7 @@ impl PyDataFrame { .collect() } - fn collect_column(&self, py: Python, column: &str) -> PyResult { + fn collect_column<'py>(&self, py: Python<'py>, column: &str) -> PyResult> { wait_for_future(py, self.collect_column_inner(column))? .map_err(PyDataFusionError::from)? .to_data() @@ -1022,14 +1026,14 @@ impl PyDataFrame { /// Convert to Arrow Table /// Collect the batches and pass to Arrow Table - fn to_arrow_table(&self, py: Python<'_>) -> PyResult { + fn to_arrow_table(&self, py: Python<'_>) -> PyResult> { let batches = self.collect(py)?.into_pyobject(py)?; let schema = self.schema().into_pyobject(py)?; // Instantiate pyarrow Table object and use its from_batches method let table_class = py.import("pyarrow")?.getattr("Table")?; let args = PyTuple::new(py, &[batches, schema])?; - let table: PyObject = table_class.call_method1("from_batches", args)?.into(); + let table: Py = table_class.call_method1("from_batches", args)?.into(); Ok(table) } @@ -1042,7 +1046,7 @@ impl PyDataFrame { let df = self.df.as_ref().clone(); let streams = spawn_future(py, async move { df.execute_stream_partitioned().await })?; - let mut schema: Schema = self.df.schema().to_owned().into(); + let mut schema: Schema = self.df.schema().to_owned().as_arrow().clone(); let mut projection: Option = None; if let Some(schema_capsule) = requested_schema { @@ -1088,7 +1092,7 @@ impl PyDataFrame { /// Convert to pandas dataframe with pyarrow /// Collect the batches, pass to Arrow Table & then convert to Pandas DataFrame - fn to_pandas(&self, py: Python<'_>) -> PyResult { + fn to_pandas(&self, py: Python<'_>) -> PyResult> { let table = self.to_arrow_table(py)?; // See also: https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.to_pandas @@ -1098,7 +1102,7 @@ impl PyDataFrame { /// Convert to Python list using pyarrow /// Each list item represents one row encoded as dictionary - fn to_pylist(&self, py: Python<'_>) -> PyResult { + fn to_pylist(&self, py: Python<'_>) -> PyResult> { let table = self.to_arrow_table(py)?; // See also: https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.to_pylist @@ -1108,7 +1112,7 @@ impl PyDataFrame { /// Convert to Python dictionary using pyarrow /// Each dictionary key is a column and the dictionary value represents the column values - fn to_pydict(&self, py: Python) -> PyResult { + fn to_pydict(&self, py: Python) -> PyResult> { let table = self.to_arrow_table(py)?; // See also: https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.to_pydict @@ -1118,11 +1122,11 @@ impl PyDataFrame { /// Convert to polars dataframe with pyarrow /// Collect the batches, pass to Arrow Table & then convert to polars DataFrame - fn to_polars(&self, py: Python<'_>) -> PyResult { + fn to_polars(&self, py: Python<'_>) -> PyResult> { let table = self.to_arrow_table(py)?; let dataframe = py.import("polars")?.getattr("DataFrame")?; let args = PyTuple::new(py, &[table])?; - let result: PyObject = dataframe.call1(args)?.into(); + let result: Py = dataframe.call1(args)?.into(); Ok(result) } @@ -1135,7 +1139,7 @@ impl PyDataFrame { #[pyo3(signature = (value, columns=None))] fn fill_null( &self, - value: PyObject, + value: Py, columns: Option>, py: Python, ) -> PyDataFusionResult { diff --git a/src/dataset.rs b/src/dataset.rs index 6abe8ae3b..6a4fdb1fa 100644 --- a/src/dataset.rs +++ b/src/dataset.rs @@ -38,7 +38,7 @@ use crate::pyarrow_filter_expression::PyArrowFilterExpression; // Wraps a pyarrow.dataset.Dataset class and implements a Datafusion TableProvider around it #[derive(Debug)] pub(crate) struct Dataset { - dataset: PyObject, + dataset: Py, } impl Dataset { @@ -70,7 +70,7 @@ impl TableProvider for Dataset { /// Get a reference to the schema for this table fn schema(&self) -> SchemaRef { - Python::with_gil(|py| { + Python::attach(|py| { let dataset = self.dataset.bind(py); // This can panic but since we checked that self.dataset is a pyarrow.dataset.Dataset it should never Arc::new( @@ -104,7 +104,7 @@ impl TableProvider for Dataset { // The datasource should return *at least* this number of rows if available. _limit: Option, ) -> DFResult> { - Python::with_gil(|py| { + Python::attach(|py| { let plan: Arc = Arc::new( DatasetExec::new(py, self.dataset.bind(py), projection.cloned(), filters) .map_err(|err| DataFusionError::External(Box::new(err)))?, diff --git a/src/dataset_exec.rs b/src/dataset_exec.rs index a35951394..a83b10941 100644 --- a/src/dataset_exec.rs +++ b/src/dataset_exec.rs @@ -50,7 +50,7 @@ impl Iterator for PyArrowBatchesAdapter { type Item = ArrowResult; fn next(&mut self) -> Option { - Python::with_gil(|py| { + Python::attach(|py| { let mut batches = self.batches.clone_ref(py).into_bound(py); Some( batches @@ -65,11 +65,11 @@ impl Iterator for PyArrowBatchesAdapter { // Wraps a pyarrow.dataset.Dataset class and implements a Datafusion ExecutionPlan around it #[derive(Debug)] pub(crate) struct DatasetExec { - dataset: PyObject, + dataset: Py, schema: SchemaRef, fragments: Py, columns: Option>, - filter_expr: Option, + filter_expr: Option>, projected_statistics: Statistics, plan_properties: datafusion::physical_plan::PlanProperties, } @@ -94,7 +94,7 @@ impl DatasetExec { .collect() }); let columns: Option> = columns.transpose()?; - let filter_expr: Option = conjunction(filters.to_owned()) + let filter_expr: Option> = conjunction(filters.to_owned()) .map(|filters| { PyArrowFilterExpression::try_from(&filters) .map(|filter_expr| filter_expr.inner().clone_ref(py)) @@ -184,7 +184,7 @@ impl ExecutionPlan for DatasetExec { context: Arc, ) -> DFResult { let batch_size = context.session_config().batch_size(); - Python::with_gil(|py| { + Python::attach(|py| { let dataset = self.dataset.bind(py); let fragments = self.fragments.bind(py); let fragment = fragments @@ -269,7 +269,7 @@ impl ExecutionPlanProperties for DatasetExec { impl DisplayAs for DatasetExec { fn fmt_as(&self, t: DisplayFormatType, f: &mut std::fmt::Formatter) -> std::fmt::Result { - Python::with_gil(|py| { + Python::attach(|py| { let number_of_fragments = self.fragments.bind(py).len(); match t { DisplayFormatType::Default diff --git a/src/expr.rs b/src/expr.rs index 78bee3d4a..fc8023b20 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -141,7 +141,7 @@ pub fn py_expr_list(expr: &[Expr]) -> PyResult> { impl PyExpr { /// Return the specific expression fn to_variant<'py>(&self, py: Python<'py>) -> PyResult> { - Python::with_gil(|_| { + Python::attach(|_| { match &self.expr { Expr::Alias(alias) => Ok(PyAlias::from(alias.clone()).into_bound_py_any(py)?), Expr::Column(col) => Ok(PyColumn::from(col.clone()).into_bound_py_any(py)?), @@ -379,8 +379,8 @@ impl PyExpr { Self::_types(&self.expr) } - /// Extracts the Expr value into a PyObject that can be shared with Python - pub fn python_value(&self, py: Python) -> PyResult { + /// Extracts the Expr value into a Py that can be shared with Python + pub fn python_value<'py>(&self, py: Python<'py>) -> PyResult> { match &self.expr { Expr::Literal(scalar_value, _) => scalar_to_pyarrow(scalar_value, py), _ => Err(py_type_err(format!( diff --git a/src/expr/create_external_table.rs b/src/expr/create_external_table.rs index 1bd37b376..05f9249b0 100644 --- a/src/expr/create_external_table.rs +++ b/src/expr/create_external_table.rs @@ -67,7 +67,7 @@ impl Display for PyCreateExternalTable { impl PyCreateExternalTable { #[allow(clippy::too_many_arguments)] #[new] - #[pyo3(signature = (schema, name, location, file_type, table_partition_cols, if_not_exists, temporary, order_exprs, unbounded, options, constraints, column_defaults, definition=None))] + #[pyo3(signature = (schema, name, location, file_type, table_partition_cols, if_not_exists, or_replace, temporary, order_exprs, unbounded, options, constraints, column_defaults, definition=None))] pub fn new( schema: PyDFSchema, name: String, @@ -75,6 +75,7 @@ impl PyCreateExternalTable { file_type: String, table_partition_cols: Vec, if_not_exists: bool, + or_replace: bool, temporary: bool, order_exprs: Vec>, unbounded: bool, @@ -90,6 +91,7 @@ impl PyCreateExternalTable { file_type, table_partition_cols, if_not_exists, + or_replace, temporary, definition, order_exprs: order_exprs diff --git a/src/expr/placeholder.rs b/src/expr/placeholder.rs index 268263d41..f1e8694a9 100644 --- a/src/expr/placeholder.rs +++ b/src/expr/placeholder.rs @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. +use arrow::datatypes::Field; +use arrow::pyarrow::PyArrowType; use datafusion::logical_expr::expr::Placeholder; use pyo3::prelude::*; @@ -40,8 +42,15 @@ impl PyPlaceholder { fn data_type(&self) -> Option { self.placeholder - .data_type + .field .as_ref() - .map(|e| e.clone().into()) + .map(|f| f.data_type().clone().into()) + } + + fn field(&self) -> Option> { + self.placeholder + .field + .as_ref() + .map(|f| f.as_ref().clone().into()) } } diff --git a/src/expr/statement.rs b/src/expr/statement.rs index 47f5c4337..40666dd8b 100644 --- a/src/expr/statement.rs +++ b/src/expr/statement.rs @@ -15,6 +15,10 @@ // specific language governing permissions and limitations // under the License. +use std::sync::Arc; + +use arrow::datatypes::Field; +use arrow::pyarrow::PyArrowType; use datafusion::logical_expr::{ Deallocate, Execute, Prepare, SetVariable, TransactionAccessMode, TransactionConclusion, TransactionEnd, TransactionIsolationLevel, TransactionStart, @@ -24,7 +28,6 @@ use pyo3::IntoPyObjectExt; use super::logical_node::LogicalNode; use super::PyExpr; -use crate::common::data_type::PyDataType; use crate::sql::logical::PyLogicalPlan; #[pyclass( @@ -337,16 +340,13 @@ impl LogicalNode for PyPrepare { #[pymethods] impl PyPrepare { #[new] - pub fn new(name: String, data_types: Vec, input: PyLogicalPlan) -> Self { + pub fn new(name: String, fields: Vec>, input: PyLogicalPlan) -> Self { let input = input.plan().clone(); - let data_types = data_types - .into_iter() - .map(|data_type| data_type.into()) - .collect(); + let fields = fields.into_iter().map(|field| Arc::new(field.0)).collect(); PyPrepare { prepare: Prepare { name, - data_types, + fields, input, }, } @@ -356,12 +356,12 @@ impl PyPrepare { self.prepare.name.clone() } - pub fn data_types(&self) -> Vec { + pub fn fields(&self) -> Vec> { self.prepare - .data_types + .fields .clone() .into_iter() - .map(|t| t.into()) + .map(|f| f.as_ref().clone().into()) .collect() } diff --git a/src/functions.rs b/src/functions.rs index 38f54d1ff..e67781ccd 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -21,8 +21,9 @@ use datafusion::common::{Column, ScalarValue, TableReference}; use datafusion::execution::FunctionRegistry; use datafusion::functions_aggregate::all_default_aggregate_functions; use datafusion::functions_window::all_default_window_functions; -use datafusion::logical_expr::expr::{Alias, FieldMetadata, WindowFunction, WindowFunctionParams}; -use datafusion::logical_expr::sqlparser::ast::NullTreatment as DFNullTreatment; +use datafusion::logical_expr::expr::{ + Alias, FieldMetadata, NullTreatment as DFNullTreatment, WindowFunction, WindowFunctionParams, +}; use datafusion::logical_expr::{lit, Expr, ExprFunctionExt, WindowFrame, WindowFunctionDefinition}; use datafusion::{functions, functions_aggregate, functions_window}; use pyo3::prelude::*; diff --git a/src/physical_plan.rs b/src/physical_plan.rs index 62ec5e881..c768c0fe4 100644 --- a/src/physical_plan.rs +++ b/src/physical_plan.rs @@ -86,7 +86,7 @@ impl PyExecutionPlan { })?; let codec = DefaultPhysicalExtensionCodec {}; - let plan = proto_plan.try_into_physical_plan(&ctx.ctx, &ctx.ctx.runtime_env(), &codec)?; + let plan = proto_plan.try_into_physical_plan(&ctx.ctx.task_ctx().as_ref(), &codec)?; Ok(Self::new(plan)) } diff --git a/src/pyarrow_filter_expression.rs b/src/pyarrow_filter_expression.rs index db6146955..c9d3df32d 100644 --- a/src/pyarrow_filter_expression.rs +++ b/src/pyarrow_filter_expression.rs @@ -29,7 +29,7 @@ use crate::pyarrow_util::scalar_to_pyarrow; #[derive(Debug)] #[repr(transparent)] -pub(crate) struct PyArrowFilterExpression(PyObject); +pub(crate) struct PyArrowFilterExpression(Py); fn operator_to_py<'py>( operator: &Operator, @@ -88,7 +88,7 @@ fn extract_scalar_list<'py>( } impl PyArrowFilterExpression { - pub fn inner(&self) -> &PyObject { + pub fn inner(&self) -> &Py { &self.0 } } @@ -101,12 +101,12 @@ impl TryFrom<&Expr> for PyArrowFilterExpression { // isin, is_null, and is_valid (~is_null) are methods of pyarrow.dataset.Expression // https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Expression.html#pyarrow-dataset-expression fn try_from(expr: &Expr) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { let pc = Python::import(py, "pyarrow.compute")?; let op_module = Python::import(py, "operator")?; let pc_expr: PyDataFusionResult> = match expr { Expr::Column(Column { name, .. }) => Ok(pc.getattr("field")?.call1((name,))?), - Expr::Literal(scalar, _) => Ok(scalar_to_pyarrow(scalar, py)?.into_bound(py)), + Expr::Literal(scalar, _) => Ok(scalar_to_pyarrow(scalar, py)?), Expr::BinaryExpr(BinaryExpr { left, op, right }) => { let operator = operator_to_py(op, &op_module)?; let left = PyArrowFilterExpression::try_from(left.as_ref())?.0; diff --git a/src/pyarrow_util.rs b/src/pyarrow_util.rs index cab708458..cd9e396ab 100644 --- a/src/pyarrow_util.rs +++ b/src/pyarrow_util.rs @@ -21,7 +21,7 @@ use arrow::array::{Array, ArrayData}; use arrow::pyarrow::{FromPyArrow, ToPyArrow}; use datafusion::scalar::ScalarValue; use pyo3::types::{PyAnyMethods, PyList}; -use pyo3::{Bound, FromPyObject, PyAny, PyObject, PyResult, Python}; +use pyo3::{Bound, FromPyObject, PyAny, PyResult, Python}; use crate::common::data_type::PyScalarValue; use crate::errors::PyDataFusionError; @@ -51,11 +51,14 @@ impl<'source> FromPyObject<'source> for PyScalarValue { } } -pub fn scalar_to_pyarrow(scalar: &ScalarValue, py: Python) -> PyResult { +pub fn scalar_to_pyarrow<'py>( + scalar: &ScalarValue, + py: Python<'py>, +) -> PyResult> { let array = scalar.to_array().map_err(PyDataFusionError::from)?; // convert to pyarrow array using C data interface let pyarray = array.to_data().to_pyarrow(py)?; - let pyscalar = pyarray.call_method1(py, "__getitem__", (0,))?; + let pyscalar = pyarray.call_method1("__getitem__", (0,))?; Ok(pyscalar) } diff --git a/src/record_batch.rs b/src/record_batch.rs index 8c1933a1c..2e50ba75e 100644 --- a/src/record_batch.rs +++ b/src/record_batch.rs @@ -23,7 +23,7 @@ use datafusion::physical_plan::SendableRecordBatchStream; use futures::StreamExt; use pyo3::exceptions::{PyStopAsyncIteration, PyStopIteration}; use pyo3::prelude::*; -use pyo3::{pyclass, pymethods, PyObject, PyResult, Python}; +use pyo3::{pyclass, pymethods, PyAny, PyResult, Python}; use tokio::sync::Mutex; use crate::errors::PyDataFusionError; @@ -36,7 +36,7 @@ pub struct PyRecordBatch { #[pymethods] impl PyRecordBatch { - fn to_pyarrow(&self, py: Python) -> PyResult { + fn to_pyarrow<'py>(&self, py: Python<'py>) -> PyResult> { self.batch.to_pyarrow(py) } } diff --git a/src/sql/logical.rs b/src/sql/logical.rs index 86373fc7c..37f20d287 100644 --- a/src/sql/logical.rs +++ b/src/sql/logical.rs @@ -208,7 +208,7 @@ impl PyLogicalPlan { })?; let codec = DefaultLogicalExtensionCodec {}; - let plan = proto_plan.try_into_logical_plan(&ctx.ctx, &codec)?; + let plan = proto_plan.try_into_logical_plan(&ctx.ctx.task_ctx(), &codec)?; Ok(Self::new(plan)) } } diff --git a/src/substrait.rs b/src/substrait.rs index 0e0305cfe..7b06aff74 100644 --- a/src/substrait.rs +++ b/src/substrait.rs @@ -35,7 +35,7 @@ pub struct PyPlan { #[pymethods] impl PyPlan { - fn encode(&self, py: Python) -> PyResult { + fn encode(&self, py: Python) -> PyResult> { let mut proto_bytes = Vec::::new(); self.plan .encode(&mut proto_bytes) @@ -93,7 +93,7 @@ impl PySubstraitSerializer { sql: &str, ctx: PySessionContext, py: Python, - ) -> PyDataFusionResult { + ) -> PyDataFusionResult> { let proto_bytes: Vec = wait_for_future(py, serializer::serialize_bytes(sql, &ctx.ctx))??; Ok(PyBytes::new(py, &proto_bytes).into()) diff --git a/src/table.rs b/src/table.rs index 1e8542134..0eec57f75 100644 --- a/src/table.rs +++ b/src/table.rs @@ -88,7 +88,7 @@ impl PyTable { /// Get a reference to the schema for this table #[getter] - fn schema(&self, py: Python) -> PyResult { + fn schema<'py>(&self, py: Python<'py>) -> PyResult> { self.table.schema().to_pyarrow(py) } @@ -136,7 +136,7 @@ impl TableProvider for TempViewTable { } fn schema(&self) -> SchemaRef { - Arc::new(self.df.schema().into()) + Arc::new(self.df.schema().as_arrow().clone()) } fn table_type(&self) -> TableType { diff --git a/src/udaf.rs b/src/udaf.rs index b3d497557..92857f9f7 100644 --- a/src/udaf.rs +++ b/src/udaf.rs @@ -36,18 +36,18 @@ use crate::utils::{parse_volatility, validate_pycapsule}; #[derive(Debug)] struct RustAccumulator { - accum: PyObject, + accum: Py, } impl RustAccumulator { - fn new(accum: PyObject) -> Self { + fn new(accum: Py) -> Self { Self { accum } } } impl Accumulator for RustAccumulator { fn state(&mut self) -> Result> { - Python::with_gil(|py| { + Python::attach(|py| { self.accum .bind(py) .call_method0("state")? @@ -58,7 +58,7 @@ impl Accumulator for RustAccumulator { } fn evaluate(&mut self) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { self.accum .bind(py) .call_method0("evaluate")? @@ -69,7 +69,7 @@ impl Accumulator for RustAccumulator { } fn update_batch(&mut self, values: &[ArrayRef]) -> Result<()> { - Python::with_gil(|py| { + Python::attach(|py| { // 1. cast args to Pyarrow array let py_args = values .iter() @@ -88,9 +88,9 @@ impl Accumulator for RustAccumulator { } fn merge_batch(&mut self, states: &[ArrayRef]) -> Result<()> { - Python::with_gil(|py| { + Python::attach(|py| { // // 1. cast states to Pyarrow arrays - let py_states: Result> = states + let py_states: Result>> = states .iter() .map(|state| { state @@ -115,7 +115,7 @@ impl Accumulator for RustAccumulator { } fn retract_batch(&mut self, values: &[ArrayRef]) -> Result<()> { - Python::with_gil(|py| { + Python::attach(|py| { // 1. cast args to Pyarrow array let py_args = values .iter() @@ -134,7 +134,7 @@ impl Accumulator for RustAccumulator { } fn supports_retract_batch(&self) -> bool { - Python::with_gil( + Python::attach( |py| match self.accum.bind(py).call_method0("supports_retract_batch") { Ok(x) => x.extract().unwrap_or(false), Err(_) => false, @@ -143,9 +143,9 @@ impl Accumulator for RustAccumulator { } } -pub fn to_rust_accumulator(accum: PyObject) -> AccumulatorFactoryFunction { +pub fn to_rust_accumulator(accum: Py) -> AccumulatorFactoryFunction { Arc::new(move |_| -> Result> { - let accum = Python::with_gil(|py| { + let accum = Python::attach(|py| { accum .call0(py) .map_err(|e| DataFusionError::Execution(format!("{e}"))) @@ -176,7 +176,7 @@ impl PyAggregateUDF { #[pyo3(signature=(name, accumulator, input_type, return_type, state_type, volatility))] fn new( name: &str, - accumulator: PyObject, + accumulator: Py, input_type: PyArrowType>, return_type: PyArrowType, state_type: PyArrowType>, diff --git a/src/udf.rs b/src/udf.rs index 25043d2ea..5cf87c825 100644 --- a/src/udf.rs +++ b/src/udf.rs @@ -33,10 +33,10 @@ use crate::utils::{parse_volatility, validate_pycapsule}; /// Create a Rust callable function from a python function that expects pyarrow arrays fn pyarrow_function_to_rust( - func: PyObject, + func: Py, ) -> impl Fn(&[ArrayRef]) -> Result { move |args: &[ArrayRef]| -> Result { - Python::with_gil(|py| { + Python::attach(|py| { // 1. cast args to Pyarrow arrays let py_args = args .iter() @@ -64,7 +64,7 @@ fn pyarrow_function_to_rust( /// Create a DataFusion's UDF implementation from a python function /// that expects pyarrow arrays. This is more efficient as it performs /// a zero-copy of the contents. -fn to_scalar_function_impl(func: PyObject) -> ScalarFunctionImplementation { +fn to_scalar_function_impl(func: Py) -> ScalarFunctionImplementation { // Make the python function callable from rust let pyarrow_func = pyarrow_function_to_rust(func); @@ -89,7 +89,7 @@ impl PyScalarUDF { #[pyo3(signature=(name, func, input_types, return_type, volatility))] fn new( name: &str, - func: PyObject, + func: Py, input_types: PyArrowType>, return_type: PyArrowType, volatility: &str, diff --git a/src/udtf.rs b/src/udtf.rs index 15006edf4..7226dbe92 100644 --- a/src/udtf.rs +++ b/src/udtf.rs @@ -40,7 +40,7 @@ pub struct PyTableFunction { // TODO: Implement pure python based user defined table functions #[derive(Debug, Clone)] pub(crate) enum PyTableFunctionInner { - PythonFunction(Arc), + PythonFunction(Arc>), FFIFunction(Arc), } @@ -84,7 +84,7 @@ impl PyTableFunction { #[allow(clippy::result_large_err)] fn call_python_table_function( - func: &Arc, + func: &Arc>, args: &[Expr], ) -> DataFusionResult> { let args = args @@ -93,7 +93,7 @@ fn call_python_table_function( .collect::>(); // move |args: &[ArrayRef]| -> Result { - Python::with_gil(|py| { + Python::attach(|py| { let py_args = PyTuple::new(py, args)?; let provider_obj = func.call1(py, py_args)?; let provider = provider_obj.bind(py); diff --git a/src/udwf.rs b/src/udwf.rs index aae9f4c4c..d347ec0f1 100644 --- a/src/udwf.rs +++ b/src/udwf.rs @@ -42,23 +42,23 @@ use crate::utils::{parse_volatility, validate_pycapsule}; #[derive(Debug)] struct RustPartitionEvaluator { - evaluator: PyObject, + evaluator: Py, } impl RustPartitionEvaluator { - fn new(evaluator: PyObject) -> Self { + fn new(evaluator: Py) -> Self { Self { evaluator } } } impl PartitionEvaluator for RustPartitionEvaluator { fn memoize(&mut self, _state: &mut WindowAggState) -> Result<()> { - Python::with_gil(|py| self.evaluator.bind(py).call_method0("memoize").map(|_| ())) + Python::attach(|py| self.evaluator.bind(py).call_method0("memoize").map(|_| ())) .map_err(|e| DataFusionError::Execution(format!("{e}"))) } fn get_range(&self, idx: usize, n_rows: usize) -> Result> { - Python::with_gil(|py| { + Python::attach(|py| { let py_args = vec![idx.into_pyobject(py)?, n_rows.into_pyobject(py)?]; let py_args = PyTuple::new(py, py_args)?; @@ -84,7 +84,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { } fn is_causal(&self) -> bool { - Python::with_gil(|py| { + Python::attach(|py| { self.evaluator .bind(py) .call_method0("is_causal") @@ -95,7 +95,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { fn evaluate_all(&mut self, values: &[ArrayRef], num_rows: usize) -> Result { println!("evaluate all called with number of values {}", values.len()); - Python::with_gil(|py| { + Python::attach(|py| { let py_values = PyList::new( py, values @@ -117,7 +117,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { } fn evaluate(&mut self, values: &[ArrayRef], range: &Range) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { let py_values = PyList::new( py, values @@ -141,7 +141,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { num_rows: usize, ranks_in_partition: &[Range], ) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { let ranks = ranks_in_partition .iter() .map(|r| PyTuple::new(py, vec![r.start, r.end])) @@ -168,7 +168,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { } fn supports_bounded_execution(&self) -> bool { - Python::with_gil(|py| { + Python::attach(|py| { self.evaluator .bind(py) .call_method0("supports_bounded_execution") @@ -178,7 +178,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { } fn uses_window_frame(&self) -> bool { - Python::with_gil(|py| { + Python::attach(|py| { self.evaluator .bind(py) .call_method0("uses_window_frame") @@ -188,7 +188,7 @@ impl PartitionEvaluator for RustPartitionEvaluator { } fn include_rank(&self) -> bool { - Python::with_gil(|py| { + Python::attach(|py| { self.evaluator .bind(py) .call_method0("include_rank") @@ -198,9 +198,9 @@ impl PartitionEvaluator for RustPartitionEvaluator { } } -pub fn to_rust_partition_evaluator(evaluator: PyObject) -> PartitionEvaluatorFactory { +pub fn to_rust_partition_evaluator(evaluator: Py) -> PartitionEvaluatorFactory { Arc::new(move || -> Result> { - let evaluator = Python::with_gil(|py| { + let evaluator = Python::attach(|py| { evaluator .call0(py) .map_err(|e| DataFusionError::Execution(e.to_string())) @@ -222,7 +222,7 @@ impl PyWindowUDF { #[pyo3(signature=(name, evaluator, input_types, return_type, volatility))] fn new( name: &str, - evaluator: PyObject, + evaluator: Py, input_types: Vec>, return_type: PyArrowType, volatility: &str, diff --git a/src/utils.rs b/src/utils.rs index ce7395e95..6cc9626fb 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -77,14 +77,14 @@ where let runtime: &Runtime = &get_tokio_runtime().0; const INTERVAL_CHECK_SIGNALS: Duration = Duration::from_millis(1_000); - py.allow_threads(|| { + py.detach(|| { runtime.block_on(async { tokio::pin!(fut); loop { tokio::select! { res = &mut fut => break Ok(res), _ = sleep(INTERVAL_CHECK_SIGNALS) => { - Python::with_gil(|py| py.check_signals())?; + Python::attach(|py| py.check_signals())?; } } } @@ -170,7 +170,7 @@ pub(crate) fn table_provider_from_pycapsule( } } -pub(crate) fn py_obj_to_scalar_value(py: Python, obj: PyObject) -> PyResult { +pub(crate) fn py_obj_to_scalar_value(py: Python, obj: Py) -> PyResult { // convert Python object to PyScalarValue to ScalarValue let pa = py.import("pyarrow")?; From 8f65f426ea5a7d51e8e8c4ef6f40a19b619affa5 Mon Sep 17 00:00:00 2001 From: nuno-faria Date: Tue, 25 Nov 2025 11:56:58 +0000 Subject: [PATCH 04/20] Fix clippy --- src/physical_plan.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physical_plan.rs b/src/physical_plan.rs index c768c0fe4..645649e2c 100644 --- a/src/physical_plan.rs +++ b/src/physical_plan.rs @@ -86,7 +86,7 @@ impl PyExecutionPlan { })?; let codec = DefaultPhysicalExtensionCodec {}; - let plan = proto_plan.try_into_physical_plan(&ctx.ctx.task_ctx().as_ref(), &codec)?; + let plan = proto_plan.try_into_physical_plan(ctx.ctx.task_ctx().as_ref(), &codec)?; Ok(Self::new(plan)) } From b991f77df786fcad05ccbc974387911540538dc3 Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Sat, 29 Nov 2025 15:23:27 +0800 Subject: [PATCH 05/20] Refactor test_arrow_c_stream_interrupted to handle exceptions in a separate thread --- python/tests/test_dataframe.py | 52 +++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/python/tests/test_dataframe.py b/python/tests/test_dataframe.py index 486159165..8496378ee 100644 --- a/python/tests/test_dataframe.py +++ b/python/tests/test_dataframe.py @@ -3289,6 +3289,7 @@ def test_arrow_c_stream_interrupted(): interrupted = False interrupt_error = None query_started = threading.Event() + read_thread_id = None max_wait_time = 5.0 def trigger_interrupt(): @@ -3299,34 +3300,59 @@ def trigger_interrupt(): msg = f"Query did not start within {max_wait_time} seconds" raise RuntimeError(msg) - thread_id = threading.main_thread().ident - if thread_id is None: - msg = "Cannot get main thread ID" + # Wait a bit to ensure read operation has started + time.sleep(0.1) + + if read_thread_id is None: + msg = "Cannot get read thread ID" raise RuntimeError(msg) exception = ctypes.py_object(KeyboardInterrupt) res = ctypes.pythonapi.PyThreadState_SetAsyncExc( - ctypes.c_long(thread_id), exception + ctypes.c_long(read_thread_id), exception ) if res != 1: ctypes.pythonapi.PyThreadState_SetAsyncExc( - ctypes.c_long(thread_id), ctypes.py_object(0) + ctypes.c_long(read_thread_id), ctypes.py_object(0) ) - msg = "Failed to raise KeyboardInterrupt in main thread" + msg = "Failed to raise KeyboardInterrupt in read thread" raise RuntimeError(msg) + read_result = [] + read_exception = [] + + def read_stream(): + nonlocal read_thread_id + read_thread_id = threading.get_ident() + try: + query_started.set() + # consume the reader which should block and be interrupted + result = reader.read_all() + read_result.append(result) + except KeyboardInterrupt: + read_exception.append(KeyboardInterrupt) + except Exception as e: + read_exception.append(e) + + read_thread = threading.Thread(target=read_stream) + read_thread.daemon = True + read_thread.start() + interrupt_thread = threading.Thread(target=trigger_interrupt) interrupt_thread.daemon = True interrupt_thread.start() - try: - query_started.set() - # consume the reader which should block and be interrupted - reader.read_all() - except KeyboardInterrupt: + # Wait for the read operation with a timeout + read_thread.join(timeout=10.0) + + if read_thread.is_alive(): + pytest.fail("Stream read operation timed out after 10 seconds") + + # Check if we got the expected KeyboardInterrupt + if read_exception and isinstance(read_exception[0], type) and read_exception[0] == KeyboardInterrupt: interrupted = True - except Exception as e: # pragma: no cover - unexpected errors - interrupt_error = e + elif read_exception: + interrupt_error = read_exception[0] if not interrupted: pytest.fail(f"Stream was not interrupted; got error: {interrupt_error}") From 5748ff0a2650c53ddc5e32e92da9cc074d9fc891 Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Sat, 29 Nov 2025 17:08:22 +0800 Subject: [PATCH 06/20] Improve exception handling in wait_for_future Updated wait_for_future to surface pending Python exceptions by executing bytecode during signal checks, ensuring that asynchronous interrupts are processed promptly. Enhanced PartitionedDataFrameStreamReader to cancel remaining partition streams on projection errors or Python interrupts, allowing for clean iteration stops. Added regression tests to validate interrupted Arrow C stream reads and improve timing for RecordBatchReader.read_all cancellations. --- python/tests/test_dataframe.py | 83 ++++++++++++++++++++++++++++++++-- src/dataframe.rs | 14 +++++- src/utils.rs | 12 ++++- 3 files changed, 103 insertions(+), 6 deletions(-) diff --git a/python/tests/test_dataframe.py b/python/tests/test_dataframe.py index 8496378ee..ed4b8ae92 100644 --- a/python/tests/test_dataframe.py +++ b/python/tests/test_dataframe.py @@ -3349,10 +3349,13 @@ def read_stream(): pytest.fail("Stream read operation timed out after 10 seconds") # Check if we got the expected KeyboardInterrupt - if read_exception and isinstance(read_exception[0], type) and read_exception[0] == KeyboardInterrupt: - interrupted = True - elif read_exception: - interrupt_error = read_exception[0] + if read_exception: + if isinstance(read_exception[0], type) and read_exception[0] == KeyboardInterrupt: + interrupted = True + elif "KeyboardInterrupt" in str(read_exception[0]): + interrupted = True + else: + interrupt_error = read_exception[0] if not interrupted: pytest.fail(f"Stream was not interrupted; got error: {interrupt_error}") @@ -3360,6 +3363,78 @@ def read_stream(): interrupt_thread.join(timeout=1.0) +def test_record_batch_reader_interrupt_exits_quickly(ctx): + df = ctx.sql( + """ + SELECT t1.value AS a, t2.value AS a2 + FROM range(0, 1000000, 1) AS t1 + JOIN range(0, 1000000, 1) AS t2 ON t1.value = t2.value + """ + ) + + reader = pa.RecordBatchReader.from_stream(df) + + query_started = threading.Event() + read_thread_id = None + interrupt_time = None + completion_time = None + read_exception = [] + + def trigger_interrupt(): + nonlocal interrupt_time + if not query_started.wait(timeout=5.0): + pytest.fail("Query did not start in time") + + time.sleep(0.1) + interrupt_time = time.time() + + if read_thread_id is None: + pytest.fail("Read thread did not record an identifier") + + res = ctypes.pythonapi.PyThreadState_SetAsyncExc( + ctypes.c_long(read_thread_id), ctypes.py_object(KeyboardInterrupt) + ) + if res != 1: + ctypes.pythonapi.PyThreadState_SetAsyncExc( + ctypes.c_long(read_thread_id), ctypes.py_object(0) + ) + pytest.fail("Failed to raise KeyboardInterrupt in read thread") + + def read_stream(): + nonlocal read_thread_id, completion_time + read_thread_id = threading.get_ident() + try: + query_started.set() + reader.read_all() + except KeyboardInterrupt: + completion_time = time.time() + except Exception as exc: # pragma: no cover - unexpected failure path + completion_time = time.time() + read_exception.append(exc) + + read_thread = threading.Thread(target=read_stream, daemon=True) + interrupt_thread = threading.Thread(target=trigger_interrupt, daemon=True) + + read_thread.start() + interrupt_thread.start() + + read_thread.join(timeout=10.0) + if read_thread.is_alive(): + pytest.fail("Stream read operation timed out after 10 seconds") + + interrupt_thread.join(timeout=1.0) + + if read_exception and "KeyboardInterrupt" not in str(read_exception[0]): + pytest.fail(f"Read thread raised unexpected exception: {read_exception[0]}") + + assert completion_time is not None, "Read thread did not finish" + assert interrupt_time is not None, "Interrupt was not sent" + + elapsed = completion_time - interrupt_time + assert elapsed >= 0, "Completion recorded before interrupt was sent" + assert elapsed < 1.5, f"Cancellation took too long: {elapsed}s" + + def test_show_select_where_no_rows(capsys) -> None: ctx = SessionContext() df = ctx.sql("SELECT 1 WHERE 1=0") diff --git a/src/dataframe.rs b/src/dataframe.rs index f8f3ee8e6..fda2c6174 100644 --- a/src/dataframe.rs +++ b/src/dataframe.rs @@ -375,6 +375,13 @@ struct PartitionedDataFrameStreamReader { current: usize, } +impl PartitionedDataFrameStreamReader { + fn cancel_streams(&mut self) { + self.streams.drain(self.current..); + self.current = self.streams.len(); + } +} + impl Iterator for PartitionedDataFrameStreamReader { type Item = Result; @@ -389,7 +396,10 @@ impl Iterator for PartitionedDataFrameStreamReader { let batch = if let Some(ref schema) = self.projection { match record_batch_into_schema(batch, schema.as_ref()) { Ok(b) => b, - Err(e) => return Some(Err(e)), + Err(e) => { + self.cancel_streams(); + return Some(Err(e)); + } } } else { batch @@ -401,9 +411,11 @@ impl Iterator for PartitionedDataFrameStreamReader { continue; } Ok(Err(e)) => { + self.cancel_streams(); return Some(Err(ArrowError::ExternalError(Box::new(e)))); } Err(e) => { + self.cancel_streams(); return Some(Err(ArrowError::ExternalError(Box::new(e)))); } } diff --git a/src/utils.rs b/src/utils.rs index 6cc9626fb..7ca5ef875 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -15,6 +15,7 @@ // specific language governing permissions and limitations // under the License. +use std::ffi::CString; use std::future::Future; use std::sync::{Arc, OnceLock}; use std::time::Duration; @@ -27,6 +28,7 @@ use datafusion_ffi::table_provider::{FFI_TableProvider, ForeignTableProvider}; use pyo3::exceptions::PyValueError; use pyo3::prelude::*; use pyo3::types::PyCapsule; +use pyo3::PyErr; use tokio::runtime::Runtime; use tokio::task::JoinHandle; use tokio::time::sleep; @@ -84,7 +86,15 @@ where tokio::select! { res = &mut fut => break Ok(res), _ = sleep(INTERVAL_CHECK_SIGNALS) => { - Python::attach(|py| py.check_signals())?; + Python::attach(|py| { + if let Some(err) = PyErr::take(py) { + Err(err) + } else { + let code = CString::new("pass").unwrap(); + py.run(code.as_c_str(), None, None)?; + py.check_signals() + } + })?; } } } From 0fa8178680dc7217abc0e6c860a7bd366dd96af9 Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Sat, 29 Nov 2025 17:40:13 +0800 Subject: [PATCH 07/20] Refactor signal checking in future collection to simplify error handling --- src/utils.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index 7ca5ef875..a1a4436cd 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -28,7 +28,6 @@ use datafusion_ffi::table_provider::{FFI_TableProvider, ForeignTableProvider}; use pyo3::exceptions::PyValueError; use pyo3::prelude::*; use pyo3::types::PyCapsule; -use pyo3::PyErr; use tokio::runtime::Runtime; use tokio::task::JoinHandle; use tokio::time::sleep; @@ -87,13 +86,9 @@ where res = &mut fut => break Ok(res), _ = sleep(INTERVAL_CHECK_SIGNALS) => { Python::attach(|py| { - if let Some(err) = PyErr::take(py) { - Err(err) - } else { let code = CString::new("pass").unwrap(); py.run(code.as_c_str(), None, None)?; py.check_signals() - } })?; } } From 1297e2c2af083d77d60e2e4e123ccbe423393712 Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Sat, 29 Nov 2025 17:55:14 +0800 Subject: [PATCH 08/20] Simplify KeyboardInterrupt check in test_arrow_c_stream_interrupted --- python/tests/test_dataframe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tests/test_dataframe.py b/python/tests/test_dataframe.py index ed4b8ae92..286ffc0fe 100644 --- a/python/tests/test_dataframe.py +++ b/python/tests/test_dataframe.py @@ -3350,7 +3350,7 @@ def read_stream(): # Check if we got the expected KeyboardInterrupt if read_exception: - if isinstance(read_exception[0], type) and read_exception[0] == KeyboardInterrupt: + if isinstance(read_exception[0], KeyboardInterrupt): interrupted = True elif "KeyboardInterrupt" in str(read_exception[0]): interrupted = True From e8842b13fdd572599b5343f4d5359b7f654631eb Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Sat, 29 Nov 2025 19:39:56 +0800 Subject: [PATCH 09/20] rm test_record_batch_reader_interrupt_exits_quickly --- python/tests/test_dataframe.py | 69 ---------------------------------- 1 file changed, 69 deletions(-) diff --git a/python/tests/test_dataframe.py b/python/tests/test_dataframe.py index 286ffc0fe..99b9b3c81 100644 --- a/python/tests/test_dataframe.py +++ b/python/tests/test_dataframe.py @@ -3363,76 +3363,7 @@ def read_stream(): interrupt_thread.join(timeout=1.0) -def test_record_batch_reader_interrupt_exits_quickly(ctx): - df = ctx.sql( - """ - SELECT t1.value AS a, t2.value AS a2 - FROM range(0, 1000000, 1) AS t1 - JOIN range(0, 1000000, 1) AS t2 ON t1.value = t2.value - """ - ) - - reader = pa.RecordBatchReader.from_stream(df) - - query_started = threading.Event() - read_thread_id = None - interrupt_time = None - completion_time = None - read_exception = [] - - def trigger_interrupt(): - nonlocal interrupt_time - if not query_started.wait(timeout=5.0): - pytest.fail("Query did not start in time") - - time.sleep(0.1) - interrupt_time = time.time() - - if read_thread_id is None: - pytest.fail("Read thread did not record an identifier") - - res = ctypes.pythonapi.PyThreadState_SetAsyncExc( - ctypes.c_long(read_thread_id), ctypes.py_object(KeyboardInterrupt) - ) - if res != 1: - ctypes.pythonapi.PyThreadState_SetAsyncExc( - ctypes.c_long(read_thread_id), ctypes.py_object(0) - ) - pytest.fail("Failed to raise KeyboardInterrupt in read thread") - - def read_stream(): - nonlocal read_thread_id, completion_time - read_thread_id = threading.get_ident() - try: - query_started.set() - reader.read_all() - except KeyboardInterrupt: - completion_time = time.time() - except Exception as exc: # pragma: no cover - unexpected failure path - completion_time = time.time() - read_exception.append(exc) - - read_thread = threading.Thread(target=read_stream, daemon=True) - interrupt_thread = threading.Thread(target=trigger_interrupt, daemon=True) - - read_thread.start() - interrupt_thread.start() - - read_thread.join(timeout=10.0) - if read_thread.is_alive(): - pytest.fail("Stream read operation timed out after 10 seconds") - - interrupt_thread.join(timeout=1.0) - - if read_exception and "KeyboardInterrupt" not in str(read_exception[0]): - pytest.fail(f"Read thread raised unexpected exception: {read_exception[0]}") - - assert completion_time is not None, "Read thread did not finish" - assert interrupt_time is not None, "Interrupt was not sent" - elapsed = completion_time - interrupt_time - assert elapsed >= 0, "Completion recorded before interrupt was sent" - assert elapsed < 1.5, f"Cancellation took too long: {elapsed}s" def test_show_select_where_no_rows(capsys) -> None: From bf8085e3370ca7946c70489d07f01f8b274d606b Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Sat, 29 Nov 2025 19:49:49 +0800 Subject: [PATCH 10/20] Refactor test_arrow_c_stream_interrupted to improve exception handling and readability --- python/tests/test_dataframe.py | 43 ++++++++++++---------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/python/tests/test_dataframe.py b/python/tests/test_dataframe.py index 99b9b3c81..541e63f88 100644 --- a/python/tests/test_dataframe.py +++ b/python/tests/test_dataframe.py @@ -3286,22 +3286,16 @@ def test_arrow_c_stream_interrupted(): reader = pa.RecordBatchReader.from_stream(df) - interrupted = False - interrupt_error = None - query_started = threading.Event() + read_started = threading.Event() + read_exception = [] read_thread_id = None max_wait_time = 5.0 def trigger_interrupt(): - start_time = time.time() - while not query_started.is_set(): - time.sleep(0.1) - if time.time() - start_time > max_wait_time: - msg = f"Query did not start within {max_wait_time} seconds" - raise RuntimeError(msg) - - # Wait a bit to ensure read operation has started - time.sleep(0.1) + """Wait for read to start, then raise KeyboardInterrupt in read thread.""" + if not read_started.wait(timeout=max_wait_time): + msg = f"Read operation did not start within {max_wait_time} seconds" + raise RuntimeError(msg) if read_thread_id is None: msg = "Cannot get read thread ID" @@ -3318,17 +3312,15 @@ def trigger_interrupt(): msg = "Failed to raise KeyboardInterrupt in read thread" raise RuntimeError(msg) - read_result = [] - read_exception = [] - def read_stream(): + """Consume the reader, which should be interrupted.""" nonlocal read_thread_id read_thread_id = threading.get_ident() try: - query_started.set() - # consume the reader which should block and be interrupted + read_started.set() result = reader.read_all() - read_result.append(result) + # If we get here, the read completed without interruption + read_exception.append(RuntimeError("Read completed without interruption")) except KeyboardInterrupt: read_exception.append(KeyboardInterrupt) except Exception as e: @@ -3348,17 +3340,12 @@ def read_stream(): if read_thread.is_alive(): pytest.fail("Stream read operation timed out after 10 seconds") - # Check if we got the expected KeyboardInterrupt - if read_exception: - if isinstance(read_exception[0], KeyboardInterrupt): - interrupted = True - elif "KeyboardInterrupt" in str(read_exception[0]): - interrupted = True - else: - interrupt_error = read_exception[0] + # Verify we got the expected KeyboardInterrupt + if not read_exception: + pytest.fail("No exception was raised during stream read") - if not interrupted: - pytest.fail(f"Stream was not interrupted; got error: {interrupt_error}") + if not isinstance(read_exception[0], type(KeyboardInterrupt)): + pytest.fail(f"Expected KeyboardInterrupt, got: {read_exception[0]}") interrupt_thread.join(timeout=1.0) From b10ff3a5d04a470463dabd59b7a799a7cd2eb124 Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Sat, 29 Nov 2025 19:52:19 +0800 Subject: [PATCH 11/20] Improve exception handling in test_arrow_c_stream_interrupted to check for KeyboardInterrupt --- python/tests/test_dataframe.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/tests/test_dataframe.py b/python/tests/test_dataframe.py index 541e63f88..2305bd9d6 100644 --- a/python/tests/test_dataframe.py +++ b/python/tests/test_dataframe.py @@ -3344,8 +3344,11 @@ def read_stream(): if not read_exception: pytest.fail("No exception was raised during stream read") - if not isinstance(read_exception[0], type(KeyboardInterrupt)): - pytest.fail(f"Expected KeyboardInterrupt, got: {read_exception[0]}") + # Check if we got KeyboardInterrupt directly or wrapped in another exception + exception = read_exception[0] + if not (isinstance(exception, type(KeyboardInterrupt)) or + "KeyboardInterrupt" in str(exception)): + pytest.fail(f"Expected KeyboardInterrupt, got: {exception}") interrupt_thread.join(timeout=1.0) From 3f8e6d9c30c7404c6d90b5a64909f8dc4b2f9bbc Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Sat, 29 Nov 2025 20:03:57 +0800 Subject: [PATCH 12/20] Add comment - handle KeyboardInterrupt more effectively --- src/utils.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils.rs b/src/utils.rs index a1a4436cd..8ca28e57c 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -86,6 +86,12 @@ where res = &mut fut => break Ok(res), _ = sleep(INTERVAL_CHECK_SIGNALS) => { Python::attach(|py| { + // Execute a no-op Python statement to trigger signal processing. + // This is necessary because py.check_signals() alone doesn't + // actually check for signals - it only raises an exception if + // a signal was already set during a previous Python API call. + // Running even trivial Python code forces the interpreter to + // process any pending signals (like KeyboardInterrupt). let code = CString::new("pass").unwrap(); py.run(code.as_c_str(), None, None)?; py.check_signals() From 23999c8026b36d54b8f8926ed91ce6271698ab9b Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Sat, 29 Nov 2025 20:06:25 +0800 Subject: [PATCH 13/20] Remove unnecessary stream cancellation on error in PartitionedDataFrameStreamReader --- src/dataframe.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/dataframe.rs b/src/dataframe.rs index fda2c6174..9a5ecbd69 100644 --- a/src/dataframe.rs +++ b/src/dataframe.rs @@ -375,13 +375,6 @@ struct PartitionedDataFrameStreamReader { current: usize, } -impl PartitionedDataFrameStreamReader { - fn cancel_streams(&mut self) { - self.streams.drain(self.current..); - self.current = self.streams.len(); - } -} - impl Iterator for PartitionedDataFrameStreamReader { type Item = Result; @@ -397,7 +390,6 @@ impl Iterator for PartitionedDataFrameStreamReader { match record_batch_into_schema(batch, schema.as_ref()) { Ok(b) => b, Err(e) => { - self.cancel_streams(); return Some(Err(e)); } } @@ -411,11 +403,9 @@ impl Iterator for PartitionedDataFrameStreamReader { continue; } Ok(Err(e)) => { - self.cancel_streams(); return Some(Err(ArrowError::ExternalError(Box::new(e)))); } Err(e) => { - self.cancel_streams(); return Some(Err(ArrowError::ExternalError(Box::new(e)))); } } From 784929d51e38124cd97a5d054fd6265fbd543343 Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Sat, 29 Nov 2025 20:09:43 +0800 Subject: [PATCH 14/20] Add jupyter notebook for test --- .../test_large_query-checkpoint.ipynb | 150 ++++++++++++++++++ test_large_query.ipynb | 150 ++++++++++++++++++ 2 files changed, 300 insertions(+) create mode 100644 .ipynb_checkpoints/test_large_query-checkpoint.ipynb create mode 100644 test_large_query.ipynb diff --git a/.ipynb_checkpoints/test_large_query-checkpoint.ipynb b/.ipynb_checkpoints/test_large_query-checkpoint.ipynb new file mode 100644 index 000000000..880f77a7d --- /dev/null +++ b/.ipynb_checkpoints/test_large_query-checkpoint.ipynb @@ -0,0 +1,150 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "b8171e80-141a-4f5a-9427-9459b93f9103", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/Users/kosiew/GitHub/datafusion-python/.venv/bin/python3.13\n" + ] + } + ], + "source": [ + "import sys\n", + "print(sys.executable)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "76686311-ea6f-4f24-9870-543837a387bf", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Created dataset with 100 batches, ~1,000,000 rows each\n" + ] + } + ], + "source": [ + "import time\n", + "import pyarrow as pa\n", + "from datafusion import SessionContext\n", + "\n", + "def create_very_large_dataset():\n", + " \"\"\"Create a much larger dataset that will take time to process.\"\"\"\n", + " ctx = SessionContext()\n", + " \n", + " # Create much larger record batches\n", + " batches = []\n", + " for i in range(100): # Increased from 10 to 100\n", + " batch = pa.RecordBatch.from_arrays(\n", + " [\n", + " pa.array(list(range(i * 10000, (i + 1) * 10000))), # 10k rows per batch\n", + " pa.array([f\"value_{j}\" for j in range(i * 10000, (i + 1) * 10000)]),\n", + " pa.array([j * 1.5 for j in range(i * 10000, (i + 1) * 10000)]), # Float column\n", + " pa.array([f\"category_{j % 1000}\" for j in range(i * 10000, (i + 1) * 10000)]), # Categories\n", + " ],\n", + " names=[\"id\", \"text_col\", \"float_col\", \"category\"],\n", + " )\n", + " batches.append(batch)\n", + " \n", + " # Fix: Register multiple large tables - wrap batches in a list for partitions\n", + " ctx.register_record_batches(\"large_table1\", [batches]) # List of partitions\n", + " ctx.register_record_batches(\"large_table2\", [batches]) # List of partitions\n", + " ctx.register_record_batches(\"large_table3\", [batches]) # List of partitions\n", + " \n", + " print(f\"Created dataset with {len(batches)} batches, ~{len(batches) * 10000:,} rows each\")\n", + " return ctx\n", + "\n", + "# Setup the test environment\n", + "ctx = create_very_large_dataset()" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "a163d524-73e7-4905-b3b1-1c83c3001572", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Starting cartesian product query...\n", + "Click ⬜ stop button to interrupt!\n", + "✅ Query was successfully interrupted by ⬜ stop button\n" + ] + } + ], + "source": [ + "# This will definitely be slow enough to interrupt\n", + "df = ctx.sql(\"\"\"\n", + " SELECT \n", + " t1.id,\n", + " t2.id as id2,\n", + " t1.float_col * t2.float_col as product,\n", + " CONCAT(t1.text_col, '_', t2.text_col) as combined_text,\n", + " SIN(t1.float_col) + COS(t2.float_col) as trig_calc,\n", + " CASE \n", + " WHEN t1.id % 2 = 0 THEN 'even'\n", + " ELSE 'odd'\n", + " END as parity\n", + " FROM large_table1 t1\n", + " CROSS JOIN large_table2 t2\n", + " WHERE t1.id BETWEEN 1000 AND 5000\n", + " AND t2.id BETWEEN 1500 AND 5500\n", + " ORDER BY product DESC\n", + " LIMIT 900000\n", + "\"\"\")\n", + "\n", + "print(\"Starting cartesian product query...\")\n", + "print(\"Click ⬜ stop button to interrupt!\")\n", + "\n", + "try:\n", + " result = df.collect()\n", + " print(f\"Query completed! Got {len(result)} batches\")\n", + "except KeyboardInterrupt:\n", + " print(\"✅ Query was successfully interrupted by ⬜ stop button\")\n", + "except Exception as e:\n", + " print(f\"Error: {e}\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ec71bab4-b79e-4ca0-b08e-bec540522784", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.5" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/test_large_query.ipynb b/test_large_query.ipynb new file mode 100644 index 000000000..880f77a7d --- /dev/null +++ b/test_large_query.ipynb @@ -0,0 +1,150 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "b8171e80-141a-4f5a-9427-9459b93f9103", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/Users/kosiew/GitHub/datafusion-python/.venv/bin/python3.13\n" + ] + } + ], + "source": [ + "import sys\n", + "print(sys.executable)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "76686311-ea6f-4f24-9870-543837a387bf", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Created dataset with 100 batches, ~1,000,000 rows each\n" + ] + } + ], + "source": [ + "import time\n", + "import pyarrow as pa\n", + "from datafusion import SessionContext\n", + "\n", + "def create_very_large_dataset():\n", + " \"\"\"Create a much larger dataset that will take time to process.\"\"\"\n", + " ctx = SessionContext()\n", + " \n", + " # Create much larger record batches\n", + " batches = []\n", + " for i in range(100): # Increased from 10 to 100\n", + " batch = pa.RecordBatch.from_arrays(\n", + " [\n", + " pa.array(list(range(i * 10000, (i + 1) * 10000))), # 10k rows per batch\n", + " pa.array([f\"value_{j}\" for j in range(i * 10000, (i + 1) * 10000)]),\n", + " pa.array([j * 1.5 for j in range(i * 10000, (i + 1) * 10000)]), # Float column\n", + " pa.array([f\"category_{j % 1000}\" for j in range(i * 10000, (i + 1) * 10000)]), # Categories\n", + " ],\n", + " names=[\"id\", \"text_col\", \"float_col\", \"category\"],\n", + " )\n", + " batches.append(batch)\n", + " \n", + " # Fix: Register multiple large tables - wrap batches in a list for partitions\n", + " ctx.register_record_batches(\"large_table1\", [batches]) # List of partitions\n", + " ctx.register_record_batches(\"large_table2\", [batches]) # List of partitions\n", + " ctx.register_record_batches(\"large_table3\", [batches]) # List of partitions\n", + " \n", + " print(f\"Created dataset with {len(batches)} batches, ~{len(batches) * 10000:,} rows each\")\n", + " return ctx\n", + "\n", + "# Setup the test environment\n", + "ctx = create_very_large_dataset()" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "a163d524-73e7-4905-b3b1-1c83c3001572", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Starting cartesian product query...\n", + "Click ⬜ stop button to interrupt!\n", + "✅ Query was successfully interrupted by ⬜ stop button\n" + ] + } + ], + "source": [ + "# This will definitely be slow enough to interrupt\n", + "df = ctx.sql(\"\"\"\n", + " SELECT \n", + " t1.id,\n", + " t2.id as id2,\n", + " t1.float_col * t2.float_col as product,\n", + " CONCAT(t1.text_col, '_', t2.text_col) as combined_text,\n", + " SIN(t1.float_col) + COS(t2.float_col) as trig_calc,\n", + " CASE \n", + " WHEN t1.id % 2 = 0 THEN 'even'\n", + " ELSE 'odd'\n", + " END as parity\n", + " FROM large_table1 t1\n", + " CROSS JOIN large_table2 t2\n", + " WHERE t1.id BETWEEN 1000 AND 5000\n", + " AND t2.id BETWEEN 1500 AND 5500\n", + " ORDER BY product DESC\n", + " LIMIT 900000\n", + "\"\"\")\n", + "\n", + "print(\"Starting cartesian product query...\")\n", + "print(\"Click ⬜ stop button to interrupt!\")\n", + "\n", + "try:\n", + " result = df.collect()\n", + " print(f\"Query completed! Got {len(result)} batches\")\n", + "except KeyboardInterrupt:\n", + " print(\"✅ Query was successfully interrupted by ⬜ stop button\")\n", + "except Exception as e:\n", + " print(f\"Error: {e}\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ec71bab4-b79e-4ca0-b08e-bec540522784", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.5" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 5ec0c78ef9e9b82a241e84751ec1b66c4e536e11 Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Sat, 29 Nov 2025 20:12:01 +0800 Subject: [PATCH 15/20] Revert "Add jupyter notebook for test" This reverts commit 784929d51e38124cd97a5d054fd6265fbd543343. --- .../test_large_query-checkpoint.ipynb | 150 ------------------ test_large_query.ipynb | 150 ------------------ 2 files changed, 300 deletions(-) delete mode 100644 .ipynb_checkpoints/test_large_query-checkpoint.ipynb delete mode 100644 test_large_query.ipynb diff --git a/.ipynb_checkpoints/test_large_query-checkpoint.ipynb b/.ipynb_checkpoints/test_large_query-checkpoint.ipynb deleted file mode 100644 index 880f77a7d..000000000 --- a/.ipynb_checkpoints/test_large_query-checkpoint.ipynb +++ /dev/null @@ -1,150 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "b8171e80-141a-4f5a-9427-9459b93f9103", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/Users/kosiew/GitHub/datafusion-python/.venv/bin/python3.13\n" - ] - } - ], - "source": [ - "import sys\n", - "print(sys.executable)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "76686311-ea6f-4f24-9870-543837a387bf", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Created dataset with 100 batches, ~1,000,000 rows each\n" - ] - } - ], - "source": [ - "import time\n", - "import pyarrow as pa\n", - "from datafusion import SessionContext\n", - "\n", - "def create_very_large_dataset():\n", - " \"\"\"Create a much larger dataset that will take time to process.\"\"\"\n", - " ctx = SessionContext()\n", - " \n", - " # Create much larger record batches\n", - " batches = []\n", - " for i in range(100): # Increased from 10 to 100\n", - " batch = pa.RecordBatch.from_arrays(\n", - " [\n", - " pa.array(list(range(i * 10000, (i + 1) * 10000))), # 10k rows per batch\n", - " pa.array([f\"value_{j}\" for j in range(i * 10000, (i + 1) * 10000)]),\n", - " pa.array([j * 1.5 for j in range(i * 10000, (i + 1) * 10000)]), # Float column\n", - " pa.array([f\"category_{j % 1000}\" for j in range(i * 10000, (i + 1) * 10000)]), # Categories\n", - " ],\n", - " names=[\"id\", \"text_col\", \"float_col\", \"category\"],\n", - " )\n", - " batches.append(batch)\n", - " \n", - " # Fix: Register multiple large tables - wrap batches in a list for partitions\n", - " ctx.register_record_batches(\"large_table1\", [batches]) # List of partitions\n", - " ctx.register_record_batches(\"large_table2\", [batches]) # List of partitions\n", - " ctx.register_record_batches(\"large_table3\", [batches]) # List of partitions\n", - " \n", - " print(f\"Created dataset with {len(batches)} batches, ~{len(batches) * 10000:,} rows each\")\n", - " return ctx\n", - "\n", - "# Setup the test environment\n", - "ctx = create_very_large_dataset()" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "a163d524-73e7-4905-b3b1-1c83c3001572", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Starting cartesian product query...\n", - "Click ⬜ stop button to interrupt!\n", - "✅ Query was successfully interrupted by ⬜ stop button\n" - ] - } - ], - "source": [ - "# This will definitely be slow enough to interrupt\n", - "df = ctx.sql(\"\"\"\n", - " SELECT \n", - " t1.id,\n", - " t2.id as id2,\n", - " t1.float_col * t2.float_col as product,\n", - " CONCAT(t1.text_col, '_', t2.text_col) as combined_text,\n", - " SIN(t1.float_col) + COS(t2.float_col) as trig_calc,\n", - " CASE \n", - " WHEN t1.id % 2 = 0 THEN 'even'\n", - " ELSE 'odd'\n", - " END as parity\n", - " FROM large_table1 t1\n", - " CROSS JOIN large_table2 t2\n", - " WHERE t1.id BETWEEN 1000 AND 5000\n", - " AND t2.id BETWEEN 1500 AND 5500\n", - " ORDER BY product DESC\n", - " LIMIT 900000\n", - "\"\"\")\n", - "\n", - "print(\"Starting cartesian product query...\")\n", - "print(\"Click ⬜ stop button to interrupt!\")\n", - "\n", - "try:\n", - " result = df.collect()\n", - " print(f\"Query completed! Got {len(result)} batches\")\n", - "except KeyboardInterrupt:\n", - " print(\"✅ Query was successfully interrupted by ⬜ stop button\")\n", - "except Exception as e:\n", - " print(f\"Error: {e}\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ec71bab4-b79e-4ca0-b08e-bec540522784", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.13.5" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/test_large_query.ipynb b/test_large_query.ipynb deleted file mode 100644 index 880f77a7d..000000000 --- a/test_large_query.ipynb +++ /dev/null @@ -1,150 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "b8171e80-141a-4f5a-9427-9459b93f9103", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/Users/kosiew/GitHub/datafusion-python/.venv/bin/python3.13\n" - ] - } - ], - "source": [ - "import sys\n", - "print(sys.executable)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "76686311-ea6f-4f24-9870-543837a387bf", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Created dataset with 100 batches, ~1,000,000 rows each\n" - ] - } - ], - "source": [ - "import time\n", - "import pyarrow as pa\n", - "from datafusion import SessionContext\n", - "\n", - "def create_very_large_dataset():\n", - " \"\"\"Create a much larger dataset that will take time to process.\"\"\"\n", - " ctx = SessionContext()\n", - " \n", - " # Create much larger record batches\n", - " batches = []\n", - " for i in range(100): # Increased from 10 to 100\n", - " batch = pa.RecordBatch.from_arrays(\n", - " [\n", - " pa.array(list(range(i * 10000, (i + 1) * 10000))), # 10k rows per batch\n", - " pa.array([f\"value_{j}\" for j in range(i * 10000, (i + 1) * 10000)]),\n", - " pa.array([j * 1.5 for j in range(i * 10000, (i + 1) * 10000)]), # Float column\n", - " pa.array([f\"category_{j % 1000}\" for j in range(i * 10000, (i + 1) * 10000)]), # Categories\n", - " ],\n", - " names=[\"id\", \"text_col\", \"float_col\", \"category\"],\n", - " )\n", - " batches.append(batch)\n", - " \n", - " # Fix: Register multiple large tables - wrap batches in a list for partitions\n", - " ctx.register_record_batches(\"large_table1\", [batches]) # List of partitions\n", - " ctx.register_record_batches(\"large_table2\", [batches]) # List of partitions\n", - " ctx.register_record_batches(\"large_table3\", [batches]) # List of partitions\n", - " \n", - " print(f\"Created dataset with {len(batches)} batches, ~{len(batches) * 10000:,} rows each\")\n", - " return ctx\n", - "\n", - "# Setup the test environment\n", - "ctx = create_very_large_dataset()" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "a163d524-73e7-4905-b3b1-1c83c3001572", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Starting cartesian product query...\n", - "Click ⬜ stop button to interrupt!\n", - "✅ Query was successfully interrupted by ⬜ stop button\n" - ] - } - ], - "source": [ - "# This will definitely be slow enough to interrupt\n", - "df = ctx.sql(\"\"\"\n", - " SELECT \n", - " t1.id,\n", - " t2.id as id2,\n", - " t1.float_col * t2.float_col as product,\n", - " CONCAT(t1.text_col, '_', t2.text_col) as combined_text,\n", - " SIN(t1.float_col) + COS(t2.float_col) as trig_calc,\n", - " CASE \n", - " WHEN t1.id % 2 = 0 THEN 'even'\n", - " ELSE 'odd'\n", - " END as parity\n", - " FROM large_table1 t1\n", - " CROSS JOIN large_table2 t2\n", - " WHERE t1.id BETWEEN 1000 AND 5000\n", - " AND t2.id BETWEEN 1500 AND 5500\n", - " ORDER BY product DESC\n", - " LIMIT 900000\n", - "\"\"\")\n", - "\n", - "print(\"Starting cartesian product query...\")\n", - "print(\"Click ⬜ stop button to interrupt!\")\n", - "\n", - "try:\n", - " result = df.collect()\n", - " print(f\"Query completed! Got {len(result)} batches\")\n", - "except KeyboardInterrupt:\n", - " print(\"✅ Query was successfully interrupted by ⬜ stop button\")\n", - "except Exception as e:\n", - " print(f\"Error: {e}\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ec71bab4-b79e-4ca0-b08e-bec540522784", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.13.5" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} From 506091ef9e55569792022aafaceb4bf56078b949 Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Sat, 29 Nov 2025 20:14:56 +0800 Subject: [PATCH 16/20] Simplify error handling in PartitionedDataFrameStreamReader --- python/tests/test_dataframe.py | 3 --- src/dataframe.rs | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/python/tests/test_dataframe.py b/python/tests/test_dataframe.py index 2305bd9d6..3011f8e39 100644 --- a/python/tests/test_dataframe.py +++ b/python/tests/test_dataframe.py @@ -3353,9 +3353,6 @@ def read_stream(): interrupt_thread.join(timeout=1.0) - - - def test_show_select_where_no_rows(capsys) -> None: ctx = SessionContext() df = ctx.sql("SELECT 1 WHERE 1=0") diff --git a/src/dataframe.rs b/src/dataframe.rs index 9a5ecbd69..f8f3ee8e6 100644 --- a/src/dataframe.rs +++ b/src/dataframe.rs @@ -389,9 +389,7 @@ impl Iterator for PartitionedDataFrameStreamReader { let batch = if let Some(ref schema) = self.projection { match record_batch_into_schema(batch, schema.as_ref()) { Ok(b) => b, - Err(e) => { - return Some(Err(e)); - } + Err(e) => return Some(Err(e)), } } else { batch From 96fccbc9bd6a3f94e3bb619210e39770e4ee968f Mon Sep 17 00:00:00 2001 From: nuno-faria Date: Sat, 29 Nov 2025 17:50:52 +0000 Subject: [PATCH 17/20] Fix ruff warnings --- python/tests/test_dataframe.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python/tests/test_dataframe.py b/python/tests/test_dataframe.py index 3011f8e39..d167aa78c 100644 --- a/python/tests/test_dataframe.py +++ b/python/tests/test_dataframe.py @@ -3230,7 +3230,7 @@ def trigger_interrupt(): interrupt_thread.join(timeout=1.0) -def test_arrow_c_stream_interrupted(): +def test_arrow_c_stream_interrupted(): # noqa: C901 PLR0915 """__arrow_c_stream__ responds to ``KeyboardInterrupt`` signals. Similar to ``test_collect_interrupted`` this test issues a long running @@ -3318,7 +3318,7 @@ def read_stream(): read_thread_id = threading.get_ident() try: read_started.set() - result = reader.read_all() + reader.read_all() # If we get here, the read completed without interruption read_exception.append(RuntimeError("Read completed without interruption")) except KeyboardInterrupt: @@ -3346,8 +3346,10 @@ def read_stream(): # Check if we got KeyboardInterrupt directly or wrapped in another exception exception = read_exception[0] - if not (isinstance(exception, type(KeyboardInterrupt)) or - "KeyboardInterrupt" in str(exception)): + if not ( + isinstance(exception, type(KeyboardInterrupt)) + or "KeyboardInterrupt" in str(exception) + ): pytest.fail(f"Expected KeyboardInterrupt, got: {exception}") interrupt_thread.join(timeout=1.0) From d3c46bbd8f81268ed35ac3def359a3ec27cdc0bc Mon Sep 17 00:00:00 2001 From: nuno-faria Date: Sat, 29 Nov 2025 17:52:15 +0000 Subject: [PATCH 18/20] Fix ruff warnings --- python/tests/test_dataframe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tests/test_dataframe.py b/python/tests/test_dataframe.py index d167aa78c..fa6a5fde7 100644 --- a/python/tests/test_dataframe.py +++ b/python/tests/test_dataframe.py @@ -3230,7 +3230,7 @@ def trigger_interrupt(): interrupt_thread.join(timeout=1.0) -def test_arrow_c_stream_interrupted(): # noqa: C901 PLR0915 +def test_arrow_c_stream_interrupted(): # noqa: C901 PLR0915 """__arrow_c_stream__ responds to ``KeyboardInterrupt`` signals. Similar to ``test_collect_interrupted`` this test issues a long running From b58812296b616f1f3ef7af65f301d13056c7beb9 Mon Sep 17 00:00:00 2001 From: Nuno Faria Date: Sun, 30 Nov 2025 18:31:11 +0000 Subject: [PATCH 19/20] Update src/utils.rs Co-authored-by: Tim Saucer --- src/utils.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index 8ca28e57c..921dda70c 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -92,8 +92,7 @@ where // a signal was already set during a previous Python API call. // Running even trivial Python code forces the interpreter to // process any pending signals (like KeyboardInterrupt). - let code = CString::new("pass").unwrap(); - py.run(code.as_c_str(), None, None)?; + py.run(cr"pass", None, None)?; py.check_signals() })?; } From 7f108364743d8eb848c696423c7dfa85970923e2 Mon Sep 17 00:00:00 2001 From: nuno-faria Date: Sun, 30 Nov 2025 18:47:12 +0000 Subject: [PATCH 20/20] Fix clippy --- src/utils.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index 921dda70c..cbc3d6d9b 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -15,7 +15,6 @@ // specific language governing permissions and limitations // under the License. -use std::ffi::CString; use std::future::Future; use std::sync::{Arc, OnceLock}; use std::time::Duration;