From f5f983cfd694ce7aba813f94aa13ae23b186601c Mon Sep 17 00:00:00 2001 From: Tim Saucer Date: Fri, 18 Oct 2024 18:26:10 -0400 Subject: [PATCH] Set DF to 42.0.0 --- Cargo.lock | 357 ++++++++++++++++++++++++++++++++++++++----------- Cargo.toml | 10 +- src/context.rs | 4 +- src/udf.rs | 2 +- src/udwf.rs | 17 +-- 5 files changed, 287 insertions(+), 103 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e974ebc1..12bf0d45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,54 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "abi_stable" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d6512d3eb05ffe5004c59c206de7f99c34951504056ce23fc953842f12c445" +dependencies = [ + "abi_stable_derive", + "abi_stable_shared", + "const_panic", + "core_extensions", + "crossbeam-channel", + "generational-arena", + "libloading", + "lock_api", + "parking_lot", + "paste", + "repr_offset", + "rustc_version", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "abi_stable_derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7178468b407a4ee10e881bc7a328a65e739f0863615cca4429d43916b05e898" +dependencies = [ + "abi_stable_shared", + "as_derive_utils", + "core_extensions", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", + "typed-arena", +] + +[[package]] +name = "abi_stable_shared" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b5df7688c123e63f4d4d649cba63f2967ba7f7861b1664fca3f77d3dad2b63" +dependencies = [ + "core_extensions", +] + [[package]] name = "addr2line" version = "0.24.2" @@ -349,6 +397,18 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "as_derive_utils" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff3c96645900a44cf11941c111bd08a6573b0e2f9f69bc9264b179d8fae753c4" +dependencies = [ + "core_extensions", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "async-compression" version = "0.4.13" @@ -367,6 +427,15 @@ dependencies = [ "zstd-safe 7.2.1", ] +[[package]] +name = "async-ffi" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4de21c0feef7e5a556e51af767c953f0501f7f300ba785cc99c47bdc8081a50" +dependencies = [ + "abi_stable", +] + [[package]] name = "async-recursion" version = "1.1.1" @@ -375,7 +444,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -386,7 +455,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -631,6 +700,12 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "const_panic" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "013b6c2c3a14d678f38cd23994b02da3a1a1b6a5d1eedddfe63a5a5f11b13a81" + [[package]] name = "constant_time_eq" version = "0.3.1" @@ -662,6 +737,21 @@ dependencies = [ "memchr", ] +[[package]] +name = "core_extensions" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c71dc07c9721607e7a16108336048ee978c3a8b129294534272e8bac96c0ee" +dependencies = [ + "core_extensions_proc_macros", +] + +[[package]] +name = "core_extensions_proc_macros" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69f3b219d28b6e3b4ac87bc1fc522e0803ab22e055da177bff0068c4150c61a6" + [[package]] name = "cpufeatures" version = "0.2.14" @@ -680,6 +770,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.20" @@ -746,7 +845,8 @@ dependencies = [ [[package]] name = "datafusion" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee907b081e45e1d14e1f327e89ef134f91fcebad0bfc2dc229fa9f6044379682" dependencies = [ "ahash", "apache-avro", @@ -804,7 +904,8 @@ dependencies = [ [[package]] name = "datafusion-catalog" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2b914f6e33c429af7d8696c72a47ed9225d7e2b82c747ebdfa2408ed53579f" dependencies = [ "arrow-schema", "async-trait", @@ -818,7 +919,8 @@ dependencies = [ [[package]] name = "datafusion-common" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a84f8e76330c582a6b8ada0b2c599ca46cfe46b7585e458fc3f4092bc722a18" dependencies = [ "ahash", "apache-avro", @@ -843,7 +945,8 @@ dependencies = [ [[package]] name = "datafusion-common-runtime" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf08cc30d92720d557df13bd5a5696213bd5ea0f38a866d8d85055d866fba774" dependencies = [ "log", "tokio", @@ -852,7 +955,8 @@ dependencies = [ [[package]] name = "datafusion-execution" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86bc4183d5c45b9f068a6f351678a0d1eb1225181424542bb75db18ec280b822" dependencies = [ "arrow", "chrono", @@ -872,7 +976,8 @@ dependencies = [ [[package]] name = "datafusion-expr" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "202119ce58e4d103e37ae64aab40d4e574c97bdd2bea994bf307b175fcbfa74d" dependencies = [ "ahash", "arrow", @@ -882,9 +987,7 @@ dependencies = [ "datafusion-common", "datafusion-expr-common", "datafusion-functions-aggregate-common", - "datafusion-functions-window-common", "datafusion-physical-expr-common", - "indexmap", "paste", "serde_json", "sqlparser", @@ -895,7 +998,8 @@ dependencies = [ [[package]] name = "datafusion-expr-common" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8b181ce8569216abb01ef3294aa16c0a40d7d39350c2ff01ede00f167a535f2" dependencies = [ "arrow", "datafusion-common", @@ -904,13 +1008,15 @@ dependencies = [ [[package]] name = "datafusion-ffi" -version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +version = "0.1.0" dependencies = [ + "abi_stable", "arrow", + "async-ffi", "async-trait", "datafusion", "datafusion-proto", + "doc-comment", "futures", "prost", "tokio", @@ -919,7 +1025,8 @@ dependencies = [ [[package]] name = "datafusion-functions" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4124b8066444e05a24472f852e94cf56546c0f4d92d00f018f207216902712" dependencies = [ "arrow", "arrow-buffer", @@ -945,7 +1052,8 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94acdac235ea21810150a89751617ef2db7e32eba27f54be48a81bde2bfe119" dependencies = [ "ahash", "arrow", @@ -957,15 +1065,16 @@ dependencies = [ "datafusion-physical-expr", "datafusion-physical-expr-common", "half", - "indexmap", "log", "paste", + "sqlparser", ] [[package]] name = "datafusion-functions-aggregate-common" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c9ea085bbf900bf16e2ca0f56fc56236b2e4f2e1a2cccb67bcd83c5ab4ad0ef" dependencies = [ "ahash", "arrow", @@ -978,7 +1087,8 @@ dependencies = [ [[package]] name = "datafusion-functions-nested" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c882e61665ed60c5ce9b061c1e587aeb8ae5ae4bcb5e5f2465139ab25328e0f" dependencies = [ "arrow", "arrow-array", @@ -1000,29 +1110,20 @@ dependencies = [ [[package]] name = "datafusion-functions-window" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98a354ce96df3ca6d025093adac9fd55ca09931c9b6f2630140721a95873fde4" dependencies = [ "datafusion-common", "datafusion-expr", - "datafusion-functions-window-common", "datafusion-physical-expr-common", "log", - "paste", -] - -[[package]] -name = "datafusion-functions-window-common" -version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" -dependencies = [ - "datafusion-common", - "datafusion-physical-expr-common", ] [[package]] name = "datafusion-optimizer" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf677c74fb7b5a1899ef52709e4a70fff3ed80bdfb4bbe495909810e83d5f39" dependencies = [ "arrow", "async-trait", @@ -1041,7 +1142,8 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b077999f6eb6c43d6b25bc66332a3be2f693c382840f008dd763b8540f9530" dependencies = [ "ahash", "arrow", @@ -1050,25 +1152,30 @@ dependencies = [ "arrow-ord", "arrow-schema", "arrow-string", + "base64 0.22.1", "chrono", "datafusion-common", + "datafusion-execution", "datafusion-expr", "datafusion-expr-common", "datafusion-functions-aggregate-common", "datafusion-physical-expr-common", "half", "hashbrown 0.14.5", + "hex", "indexmap", "itertools", "log", "paste", "petgraph", + "regex", ] [[package]] name = "datafusion-physical-expr-common" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce847f885c2b13bbe29f5c8b7948797131aa470af6e16d2a94f4428b4f4f1bd" dependencies = [ "ahash", "arrow", @@ -1081,13 +1188,12 @@ dependencies = [ [[package]] name = "datafusion-physical-optimizer" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d13238e3b9fdd62a4c18760bfef714bb990d1e1d3430e9f416aae4b3cfaa71af" dependencies = [ - "arrow", "arrow-schema", "datafusion-common", "datafusion-execution", - "datafusion-expr-common", "datafusion-physical-expr", "datafusion-physical-plan", "itertools", @@ -1096,7 +1202,8 @@ dependencies = [ [[package]] name = "datafusion-physical-plan" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faba6f55a7eaf0241d07d12c2640de52742646b10f754485d5192bdfe2c9ceae" dependencies = [ "ahash", "arrow", @@ -1110,8 +1217,8 @@ dependencies = [ "datafusion-common-runtime", "datafusion-execution", "datafusion-expr", + "datafusion-functions-aggregate", "datafusion-functions-aggregate-common", - "datafusion-functions-window-common", "datafusion-physical-expr", "datafusion-physical-expr-common", "futures", @@ -1130,7 +1237,8 @@ dependencies = [ [[package]] name = "datafusion-proto" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "585357d621fa03ea85a7fefca79ebc5ef0ee13a7f82be0762a414879a4d190a7" dependencies = [ "arrow", "chrono", @@ -1145,7 +1253,8 @@ dependencies = [ [[package]] name = "datafusion-proto-common" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4db6534382f92f528bdb5d925b4214c31ffd84fa7fe1eff3ed0d2f1286851ab8" dependencies = [ "arrow", "chrono", @@ -1162,7 +1271,6 @@ dependencies = [ "async-trait", "datafusion", "datafusion-ffi", - "datafusion-functions-window-common", "datafusion-proto", "datafusion-substrait", "futures", @@ -1180,7 +1288,8 @@ dependencies = [ [[package]] name = "datafusion-sql" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dad8d96a9b52e1aa24f9373696a815be828193efce7cb0bbd2140b6bb67d1819" dependencies = [ "arrow", "arrow-array", @@ -1196,7 +1305,8 @@ dependencies = [ [[package]] name = "datafusion-substrait" version = "42.0.0" -source = "git+https://github.com/timsaucer/datafusion.git?rev=20756df736006253f1ce9e94385b75ab44e268f8#20756df736006253f1ce9e94385b75ab44e268f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f92b1b80e98bf5a9921bf118816e0e766d18527e343153321fcccfe4d68c5c45" dependencies = [ "arrow-buffer", "async-recursion", @@ -1221,6 +1331,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + [[package]] name = "dyn-clone" version = "1.0.17" @@ -1352,7 +1468,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -1385,6 +1501,15 @@ dependencies = [ "slab", ] +[[package]] +name = "generational-arena" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877e94aff08e743b651baaea359664321055749b398adff8740a7399af7796e7" +dependencies = [ + "cfg-if", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -1797,6 +1922,16 @@ dependencies = [ "rle-decode-fast", ] +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + [[package]] name = "libm" version = "0.2.8" @@ -2272,7 +2407,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn", + "syn 2.0.79", ] [[package]] @@ -2311,7 +2446,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn", + "syn 2.0.79", "tempfile", ] @@ -2325,7 +2460,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -2393,7 +2528,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -2406,7 +2541,7 @@ dependencies = [ "proc-macro2", "pyo3-build-config", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -2558,14 +2693,23 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "regress" -version = "0.10.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1541daf4e4ed43a0922b7969bdc2170178bcacc5dabf7e39bc508a9fa3953a7a" +checksum = "0eae2a1ebfecc58aff952ef8ccd364329abe627762f5bf09ff42eb9d98522479" dependencies = [ "hashbrown 0.14.5", "memchr", ] +[[package]] +name = "repr_offset" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb1070755bd29dffc19d0971cab794e607839ba2ef4b69a9e6fbc8733c1b72ea" +dependencies = [ + "tstr", +] + [[package]] name = "reqwest" version = "0.12.8" @@ -2770,7 +2914,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn", + "syn 2.0.79", ] [[package]] @@ -2834,7 +2978,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -2845,7 +2989,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -2869,7 +3013,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn", + "syn 2.0.79", ] [[package]] @@ -2953,7 +3097,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -2980,9 +3124,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "sqlparser" -version = "0.51.0" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe11944a61da0da3f592e19a45ebe5ab92dc14a779907ff1f08fbb797bfefc7" +checksum = "b2e5b515a2bd5168426033e9efbfd05500114833916f1d5c268f938b4ee130ac" dependencies = [ "log", "sqlparser_derive", @@ -2996,7 +3140,7 @@ checksum = "01b2e185515564f15375f593fb966b5718bc624ba77fe49fa4616ad619690554" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -3030,7 +3174,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn", + "syn 2.0.79", ] [[package]] @@ -3043,14 +3187,14 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn", + "syn 2.0.79", ] [[package]] name = "substrait" -version = "0.42.5" +version = "0.41.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ca6ee75851d416352985fba9ed3d9bd246be800c71c98bdf19db8b2b6192dad" +checksum = "2a3bf05f1d7a3fd7a97790d410f6e859b3a98dcde05e7a3fc00b31b0f60fe7cb" dependencies = [ "heck 0.5.0", "pbjson", @@ -3061,13 +3205,12 @@ dependencies = [ "prost-build", "prost-types", "protobuf-src", - "regress", "schemars", "semver", "serde", "serde_json", "serde_yaml", - "syn", + "syn 2.0.79", "typify", "walkdir", ] @@ -3078,6 +3221,17 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "syn" version = "2.0.79" @@ -3134,7 +3288,7 @@ checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -3196,7 +3350,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -3248,7 +3402,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -3266,6 +3420,21 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tstr" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8e0294f14baae476d0dd0a2d780b2e24d66e349a9de876f5126777a37bdba7" +dependencies = [ + "tstr_proc_macros", +] + +[[package]] +name = "tstr_proc_macros" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78122066b0cb818b8afd08f7ed22f7fdbc3e90815035726f0840d0d26c0747a" + [[package]] name = "twox-hash" version = "1.6.3" @@ -3276,6 +3445,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + [[package]] name = "typed-builder" version = "0.16.2" @@ -3293,7 +3468,7 @@ checksum = "f03ca4cb38206e2bef0700092660bb74d696f808514dae47fa1467cbfe26e96e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] @@ -3304,9 +3479,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "typify" -version = "0.2.0" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c644dda9862f0fef3a570d8ddb3c2cfb1d5ac824a1f2ddfa7bc8f071a5ad8a" +checksum = "adb6beec125971dda80a086f90b4a70f60f222990ce4d63ad0fc140492f53444" dependencies = [ "typify-impl", "typify-macro", @@ -3314,9 +3489,9 @@ dependencies = [ [[package]] name = "typify-impl" -version = "0.2.0" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59ab345b6c0d8ae9500b9ff334a4c7c0d316c1c628dc55726b95887eb8dbd11" +checksum = "93bbb24e990654aff858d80fee8114f4322f7d7a1b1ecb45129e2fcb0d0ad5ae" dependencies = [ "heck 0.5.0", "log", @@ -3327,16 +3502,16 @@ dependencies = [ "semver", "serde", "serde_json", - "syn", + "syn 2.0.79", "thiserror", "unicode-ident", ] [[package]] name = "typify-macro" -version = "0.2.0" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "785e2cdcef0df8160fdd762ed548a637aaec1e83704fdbc14da0df66013ee8d0" +checksum = "f8e6491896e955692d68361c68db2b263e3bec317ec0b684e0e2fa882fb6e31e" dependencies = [ "proc-macro2", "quote", @@ -3345,7 +3520,7 @@ dependencies = [ "serde", "serde_json", "serde_tokenstream", - "syn", + "syn 2.0.79", "typify-impl", ] @@ -3474,7 +3649,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.79", "wasm-bindgen-shared", ] @@ -3508,7 +3683,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3542,6 +3717,22 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-util" version = "0.1.9" @@ -3551,6 +3742,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + [[package]] name = "windows-core" version = "0.52.0" @@ -3699,7 +3896,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.79", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 9f8b3535..560d46f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,11 +38,11 @@ tokio = { version = "1.39", features = ["macros", "rt", "rt-multi-thread", "sync pyo3 = { version = "0.22", features = ["extension-module", "abi3", "abi3-py38"] } arrow = { version = "53", features = ["pyarrow"] } # TODO remove this intermediate branch once ffi merges into DataFusion -datafusion = { git = "https://github.com/timsaucer/datafusion.git", rev = "20756df736006253f1ce9e94385b75ab44e268f8", features = ["pyarrow", "avro", "unicode_expressions"] } -datafusion-substrait = { git = "https://github.com/timsaucer/datafusion.git", rev = "20756df736006253f1ce9e94385b75ab44e268f8", optional = true } -datafusion-proto = { git = "https://github.com/timsaucer/datafusion.git", rev = "20756df736006253f1ce9e94385b75ab44e268f8" } -datafusion-ffi = { git = "https://github.com/timsaucer/datafusion.git", rev = "20756df736006253f1ce9e94385b75ab44e268f8" } -datafusion-functions-window-common = { git = "https://github.com/timsaucer/datafusion.git", rev = "20756df736006253f1ce9e94385b75ab44e268f8" } +datafusion = { version = "42.0.0", features = ["pyarrow", "avro", "unicode_expressions"] } +datafusion-substrait = { version = "42.0.0", optional = true } +datafusion-proto = { version = "42.0.0" } +# datafusion-functions-window-common = { version = "42.0.0" } +datafusion-ffi = { path = "../datafusion-ffi" } prost = "0.13" # keep in line with `datafusion-substrait` uuid = { version = "1.11", features = ["v4"] } mimalloc = { version = "0.1", optional = true, default-features = false, features = ["local_dynamic_tls"] } diff --git a/src/context.rs b/src/context.rs index f6832dc0..97cc5624 100644 --- a/src/context.rs +++ b/src/context.rs @@ -581,10 +581,8 @@ impl PySessionContext { let capsule = capsule.downcast::()?; // validate_pycapsule(capsule, "arrow_array_stream")?; - let provider = unsafe { FFI_TableProvider::from_raw(capsule.pointer() as _) }; + let provider = unsafe { capsule.reference::() }; let provider = ForeignTableProvider::new(provider); - let schema = provider.schema(); - println!("Got schema through TableProvider trait."); let _ = self.ctx.register_table(name, Arc::new(provider))?; } diff --git a/src/udf.rs b/src/udf.rs index ea56930e..ec8efb16 100644 --- a/src/udf.rs +++ b/src/udf.rs @@ -97,7 +97,7 @@ impl PyScalarUDF { let function = create_udf( name, input_types.0, - return_type.0, + Arc::new(return_type.0), parse_volatility(volatility)?, to_scalar_function_impl(func), ); diff --git a/src/udwf.rs b/src/udwf.rs index 106a8314..3a49aaed 100644 --- a/src/udwf.rs +++ b/src/udwf.rs @@ -22,7 +22,6 @@ use std::sync::Arc; use arrow::array::{make_array, Array, ArrayData, ArrayRef}; use datafusion::logical_expr::window_state::WindowAggState; use datafusion::scalar::ScalarValue; -use datafusion_functions_window_common::partition::PartitionEvaluatorArgs; use pyo3::exceptions::PyValueError; use pyo3::prelude::*; @@ -300,21 +299,11 @@ impl WindowUDFImpl for MultiColumnWindowUDF { &self.signature } - fn partition_evaluator( - &self, - partition_evaluator_args: PartitionEvaluatorArgs, - ) -> Result> { + fn partition_evaluator(&self) -> Result> { (self.partition_evaluator_factory)() } - fn field( - &self, - field_args: datafusion::logical_expr::function::WindowUDFFieldArgs, - ) -> Result { - Ok(arrow::datatypes::Field::new( - field_args.name(), - self.return_type.clone(), - true, - )) + fn return_type(&self, _arg_types: &[DataType]) -> Result { + Ok(self.return_type.clone()) } }