From dc33dcc2bbd305ebecafd5e73729c81dcc7beb3d Mon Sep 17 00:00:00 2001 From: Tim Van Wassenhove Date: Tue, 23 Apr 2024 12:43:46 +0200 Subject: [PATCH 1/5] feat: support for deltalake (wip) --- Cargo.lock | 933 +++++++++++++++++++++++++++++++---- Cargo.toml | 5 + examples/demo.rs | 11 +- src/catalog_provider/glue.rs | 96 +++- src/error.rs | 3 + 5 files changed, 962 insertions(+), 86 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8918017..377b620 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -82,6 +82,12 @@ dependencies = [ "libc", ] +[[package]] +name = "anyhow" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" + [[package]] name = "apache-avro" version = "0.16.0" @@ -90,7 +96,7 @@ checksum = "ceb7c683b2f8f40970b70e39ff8be514c95b96fcb9c4af87e1ed2cb2e10801a0" dependencies = [ "bzip2", "crc32fast", - "digest", + "digest 0.10.7", "lazy_static", "libflate", "log", @@ -197,7 +203,7 @@ dependencies = [ "arrow-data", "arrow-schema", "arrow-select", - "base64", + "base64 0.21.7", "chrono", "comfy-table", "half", @@ -306,6 +312,9 @@ name = "arrow-schema" version = "50.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ff3e9c01f7cd169379d269f926892d0e622a704960350d09d331be3ec9e0029" +dependencies = [ + "serde", +] [[package]] name = "arrow-select" @@ -395,7 +404,7 @@ dependencies = [ "hex", "http 0.2.12", "hyper", - "ring", + "ring 0.17.8", "time", "tokio", "tracing", @@ -540,12 +549,12 @@ dependencies = [ "bytes", "form_urlencoded", "hex", - "hmac", + "hmac 0.12.1", "http 0.2.12", "http 1.1.0", "once_cell", "percent-encoding", - "sha2", + "sha2 0.10.8", "time", "tracing", ] @@ -617,11 +626,11 @@ dependencies = [ "http-body 0.4.6", "http-body 1.0.0", "hyper", - "hyper-rustls", + "hyper-rustls 0.24.2", "once_cell", "pin-project-lite", "pin-utils", - "rustls", + "rustls 0.21.11", "tokio", "tracing", ] @@ -693,6 +702,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "backoff" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +dependencies = [ + "futures-core", + "getrandom", + "instant", + "pin-project-lite", + "rand", + "tokio", +] + [[package]] name = "backtrace" version = "0.3.71" @@ -708,6 +731,12 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "base64" version = "0.21.7" @@ -742,7 +771,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -758,6 +787,15 @@ dependencies = [ "constant_time_eq", ] +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -794,6 +832,12 @@ version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +[[package]] +name = "bytemuck" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" + [[package]] name = "byteorder" version = "1.5.0" @@ -856,9 +900,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", @@ -985,6 +1029,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-mac" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +dependencies = [ + "generic-array", + "subtle", +] + [[package]] name = "csv" version = "1.3.0" @@ -1006,6 +1060,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "ct-logs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" +dependencies = [ + "sct 0.6.1", +] + [[package]] name = "dary_heap" version = "0.3.6" @@ -1025,6 +1088,54 @@ dependencies = [ "parking_lot_core", ] +[[package]] +name = "datafusion" +version = "35.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4328f5467f76d890fe3f924362dbc3a838c6a733f762b32d87f9e0b7bef5fb49" +dependencies = [ + "ahash", + "arrow", + "arrow-array", + "arrow-ipc", + "arrow-schema", + "async-compression", + "async-trait", + "bytes", + "bzip2", + "chrono", + "dashmap", + "datafusion-common 35.0.0", + "datafusion-execution 35.0.0", + "datafusion-expr 35.0.0", + "datafusion-optimizer 35.0.0", + "datafusion-physical-expr 35.0.0", + "datafusion-physical-plan 35.0.0", + "datafusion-sql 35.0.0", + "flate2", + "futures", + "glob", + "half", + "hashbrown 0.14.3", + "indexmap", + "itertools", + "log", + "num_cpus", + "object_store", + "parking_lot", + "parquet", + "pin-project-lite", + "rand", + "sqlparser 0.41.0", + "tempfile", + "tokio", + "tokio-util", + "url", + "uuid", + "xz2", + "zstd 0.13.1", +] + [[package]] name = "datafusion" version = "36.0.0" @@ -1043,15 +1154,15 @@ dependencies = [ "bzip2", "chrono", "dashmap", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", + "datafusion-common 36.0.0", + "datafusion-execution 36.0.0", + "datafusion-expr 36.0.0", "datafusion-functions", "datafusion-functions-array", - "datafusion-optimizer", - "datafusion-physical-expr", - "datafusion-physical-plan", - "datafusion-sql", + "datafusion-optimizer 36.0.0", + "datafusion-physical-expr 36.0.0", + "datafusion-physical-plan 36.0.0", + "datafusion-sql 36.0.0", "flate2", "futures", "glob", @@ -1067,7 +1178,7 @@ dependencies = [ "parquet", "pin-project-lite", "rand", - "sqlparser", + "sqlparser 0.43.1", "tempfile", "tokio", "tokio-util", @@ -1085,7 +1196,8 @@ dependencies = [ "aws-sdk-glue", "aws-types", "dashmap", - "datafusion", + "datafusion 36.0.0", + "deltalake", "object_store", "pest", "pest_derive", @@ -1093,6 +1205,26 @@ dependencies = [ "url", ] +[[package]] +name = "datafusion-common" +version = "35.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29a7752143b446db4a2cccd9a6517293c6b97e8c39e520ca43ccd07135a4f7e" +dependencies = [ + "ahash", + "arrow", + "arrow-array", + "arrow-buffer", + "arrow-schema", + "chrono", + "half", + "libc", + "num_cpus", + "object_store", + "parquet", + "sqlparser 0.41.0", +] + [[package]] name = "datafusion-common" version = "36.0.0" @@ -1111,7 +1243,28 @@ dependencies = [ "num_cpus", "object_store", "parquet", - "sqlparser", + "sqlparser 0.43.1", +] + +[[package]] +name = "datafusion-execution" +version = "35.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d447650af16e138c31237f53ddaef6dd4f92f0e2d3f2f35d190e16c214ca496" +dependencies = [ + "arrow", + "chrono", + "dashmap", + "datafusion-common 35.0.0", + "datafusion-expr 35.0.0", + "futures", + "hashbrown 0.14.3", + "log", + "object_store", + "parking_lot", + "rand", + "tempfile", + "url", ] [[package]] @@ -1123,8 +1276,8 @@ dependencies = [ "arrow", "chrono", "dashmap", - "datafusion-common", - "datafusion-expr", + "datafusion-common 36.0.0", + "datafusion-expr 36.0.0", "futures", "hashbrown 0.14.3", "log", @@ -1135,6 +1288,22 @@ dependencies = [ "url", ] +[[package]] +name = "datafusion-expr" +version = "35.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8d19598e48a498850fb79f97a9719b1f95e7deb64a7a06f93f313e8fa1d524b" +dependencies = [ + "ahash", + "arrow", + "arrow-array", + "datafusion-common 35.0.0", + "paste", + "sqlparser 0.41.0", + "strum 0.25.0", + "strum_macros 0.25.3", +] + [[package]] name = "datafusion-expr" version = "36.0.0" @@ -1144,9 +1313,9 @@ dependencies = [ "ahash", "arrow", "arrow-array", - "datafusion-common", + "datafusion-common 36.0.0", "paste", - "sqlparser", + "sqlparser 0.43.1", "strum 0.26.2", "strum_macros 0.26.2", ] @@ -1158,10 +1327,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98f1c73f7801b2b8ba2297b3ad78ffcf6c1fc6b8171f502987eb9ad5cb244ee7" dependencies = [ "arrow", - "base64", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", + "base64 0.21.7", + "datafusion-common 36.0.0", + "datafusion-execution 36.0.0", + "datafusion-expr 36.0.0", "hex", "log", ] @@ -1173,13 +1342,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42d16a0ddf2c991526f6ffe2f47a72c6da0b7354d6c32411dd20631fe2e38937" dependencies = [ "arrow", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", + "datafusion-common 36.0.0", + "datafusion-execution 36.0.0", + "datafusion-expr 36.0.0", "log", "paste", ] +[[package]] +name = "datafusion-optimizer" +version = "35.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b7feb0391f1fc75575acb95b74bfd276903dc37a5409fcebe160bc7ddff2010" +dependencies = [ + "arrow", + "async-trait", + "chrono", + "datafusion-common 35.0.0", + "datafusion-expr 35.0.0", + "datafusion-physical-expr 35.0.0", + "hashbrown 0.14.3", + "itertools", + "log", + "regex-syntax", +] + [[package]] name = "datafusion-optimizer" version = "36.0.0" @@ -1189,15 +1376,49 @@ dependencies = [ "arrow", "async-trait", "chrono", - "datafusion-common", - "datafusion-expr", - "datafusion-physical-expr", + "datafusion-common 36.0.0", + "datafusion-expr 36.0.0", + "datafusion-physical-expr 36.0.0", "hashbrown 0.14.3", "itertools", "log", "regex-syntax", ] +[[package]] +name = "datafusion-physical-expr" +version = "35.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e911bca609c89a54e8f014777449d8290327414d3e10c57a3e3c2122e38878d0" +dependencies = [ + "ahash", + "arrow", + "arrow-array", + "arrow-buffer", + "arrow-ord", + "arrow-schema", + "base64 0.21.7", + "blake2", + "blake3", + "chrono", + "datafusion-common 35.0.0", + "datafusion-expr 35.0.0", + "half", + "hashbrown 0.14.3", + "hex", + "indexmap", + "itertools", + "log", + "md-5 0.10.6", + "paste", + "petgraph", + "rand", + "regex", + "sha2 0.10.8", + "unicode-segmentation", + "uuid", +] + [[package]] name = "datafusion-physical-expr" version = "36.0.0" @@ -1211,29 +1432,60 @@ dependencies = [ "arrow-ord", "arrow-schema", "arrow-string", - "base64", + "base64 0.21.7", "blake2", "blake3", "chrono", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", + "datafusion-common 36.0.0", + "datafusion-execution 36.0.0", + "datafusion-expr 36.0.0", "half", "hashbrown 0.14.3", "hex", "indexmap", "itertools", "log", - "md-5", + "md-5 0.10.6", "paste", "petgraph", "rand", "regex", - "sha2", + "sha2 0.10.8", "unicode-segmentation", "uuid", ] +[[package]] +name = "datafusion-physical-plan" +version = "35.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e96b546b8a02e9c2ab35ac6420d511f12a4701950c1eb2e568c122b4fefb0be3" +dependencies = [ + "ahash", + "arrow", + "arrow-array", + "arrow-buffer", + "arrow-schema", + "async-trait", + "chrono", + "datafusion-common 35.0.0", + "datafusion-execution 35.0.0", + "datafusion-expr 35.0.0", + "datafusion-physical-expr 35.0.0", + "futures", + "half", + "hashbrown 0.14.3", + "indexmap", + "itertools", + "log", + "once_cell", + "parking_lot", + "pin-project-lite", + "rand", + "tokio", + "uuid", +] + [[package]] name = "datafusion-physical-plan" version = "36.0.0" @@ -1247,10 +1499,10 @@ dependencies = [ "arrow-schema", "async-trait", "chrono", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr", + "datafusion-common 36.0.0", + "datafusion-execution 36.0.0", + "datafusion-expr 36.0.0", + "datafusion-physical-expr 36.0.0", "futures", "half", "hashbrown 0.14.3", @@ -1265,6 +1517,35 @@ dependencies = [ "uuid", ] +[[package]] +name = "datafusion-proto" +version = "35.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5742f993d1812d6bb3cdc4ce2a0aa99e10f6dc0daa11dd69b0ff57f2d8e7518c" +dependencies = [ + "arrow", + "chrono", + "datafusion 35.0.0", + "datafusion-common 35.0.0", + "datafusion-expr 35.0.0", + "object_store", + "prost", +] + +[[package]] +name = "datafusion-sql" +version = "35.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d18d36f260bbbd63aafdb55339213a23d540d3419810575850ef0a798a6b768" +dependencies = [ + "arrow", + "arrow-schema", + "datafusion-common 35.0.0", + "datafusion-expr 35.0.0", + "log", + "sqlparser 0.41.0", +] + [[package]] name = "datafusion-sql" version = "36.0.0" @@ -1273,10 +1554,107 @@ checksum = "21474a95c3a62d113599d21b439fa15091b538bac06bd20be0bb2e7d22903c09" dependencies = [ "arrow", "arrow-schema", - "datafusion-common", - "datafusion-expr", + "datafusion-common 36.0.0", + "datafusion-expr 36.0.0", "log", - "sqlparser", + "sqlparser 0.43.1", +] + +[[package]] +name = "deltalake" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e5fa38c2d00cc8a96789eaf3e7a2b27f0bd4c4c7a23e1e59bd5b7b4ceb796fe" +dependencies = [ + "deltalake-aws", + "deltalake-core", +] + +[[package]] +name = "deltalake-aws" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c27bed8839d53570bbaf9c4ae3a6b187b34f9e07cebd2f0abf2118774f466d9" +dependencies = [ + "async-trait", + "backoff", + "bytes", + "deltalake-core", + "futures", + "lazy_static", + "maplit", + "object_store", + "regex", + "rusoto_core", + "rusoto_credential", + "rusoto_dynamodb", + "rusoto_sts", + "thiserror", + "tokio", + "tracing", + "url", + "uuid", +] + +[[package]] +name = "deltalake-core" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "607be097d9bf5998bfbde3c5e6364f775e5adde0be55843130e5e50f2a2a4387" +dependencies = [ + "arrow", + "arrow-arith", + "arrow-array", + "arrow-buffer", + "arrow-cast", + "arrow-ipc", + "arrow-json", + "arrow-ord", + "arrow-row", + "arrow-schema", + "arrow-select", + "async-trait", + "bytes", + "cfg-if", + "chrono", + "dashmap", + "datafusion 35.0.0", + "datafusion-common 35.0.0", + "datafusion-expr 35.0.0", + "datafusion-physical-expr 35.0.0", + "datafusion-proto", + "datafusion-sql 35.0.0", + "either", + "errno", + "fix-hidden-lifetime-bug", + "futures", + "hashbrown 0.14.3", + "indexmap", + "itertools", + "lazy_static", + "libc", + "maplit", + "num-bigint", + "num-traits", + "num_cpus", + "object_store", + "once_cell", + "parking_lot", + "parquet", + "percent-encoding", + "pin-project-lite", + "rand", + "regex", + "roaring", + "serde", + "serde_json", + "sqlparser 0.41.0", + "thiserror", + "tokio", + "tracing", + "url", + "uuid", + "z85", ] [[package]] @@ -1289,14 +1667,44 @@ dependencies = [ ] [[package]] -name = "digest" -version = "0.10.7" +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ - "block-buffer", - "crypto-common", - "subtle", + "libc", + "redox_users", + "winapi", ] [[package]] @@ -1342,6 +1750,26 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +[[package]] +name = "fix-hidden-lifetime-bug" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ae9c2016a663983d4e40a9ff967d6dcac59819672f0b47f2b17574e99c33c8" +dependencies = [ + "fix-hidden-lifetime-bug-proc_macros", +] + +[[package]] +name = "fix-hidden-lifetime-bug-proc_macros" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c81935e123ab0741c4c4f0d9b8377e5fb21d3de7e062fa4b1263b1fbcba1ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "fixedbitset" version = "0.4.2" @@ -1572,13 +2000,23 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hmac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + [[package]] name = "hmac" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -1679,6 +2117,23 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +dependencies = [ + "ct-logs", + "futures-util", + "hyper", + "log", + "rustls 0.19.1", + "rustls-native-certs 0.5.0", + "tokio", + "tokio-rustls 0.22.0", + "webpki", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -1689,10 +2144,10 @@ dependencies = [ "http 0.2.12", "hyper", "log", - "rustls", - "rustls-native-certs", + "rustls 0.21.11", + "rustls-native-certs 0.6.3", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", ] [[package]] @@ -1738,6 +2193,15 @@ dependencies = [ "hashbrown 0.14.3", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "integer-encoding" version = "3.0.4" @@ -1889,6 +2353,16 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -1931,6 +2405,23 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + +[[package]] +name = "md-5" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "opaque-debug", +] + [[package]] name = "md-5" version = "0.10.6" @@ -1938,7 +2429,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ "cfg-if", - "digest", + "digest 0.10.7", ] [[package]] @@ -2076,25 +2567,24 @@ dependencies = [ [[package]] name = "object_store" -version = "0.9.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8718f8b65fdf67a45108d1548347d4af7d71fb81ce727bbf9e3b2535e079db3" +checksum = "d139f545f64630e2e3688fd9f81c470888ab01edeb72d13b4e86c566f1130000" dependencies = [ "async-trait", - "base64", + "base64 0.21.7", "bytes", "chrono", "futures", "humantime", "hyper", "itertools", - "md-5", "parking_lot", "percent-encoding", "quick-xml", "rand", "reqwest", - "ring", + "ring 0.17.8", "serde", "serde_json", "snafu", @@ -2110,6 +2600,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + [[package]] name = "openssl-probe" version = "0.1.5" @@ -2168,7 +2664,7 @@ dependencies = [ "arrow-ipc", "arrow-schema", "arrow-select", - "base64", + "base64 0.21.7", "brotli", "bytes", "chrono", @@ -2252,7 +2748,7 @@ checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" dependencies = [ "once_cell", "pest", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -2342,6 +2838,29 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prost" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f5d036824e4761737860779c906171497f6d55681139d8312388f8fe398922" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19de2de2a00075bf566bee3bd4db014b11587e84184d3f7a791bc17f1a8e9e48" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "quad-rand" version = "0.2.1" @@ -2406,6 +2925,17 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + [[package]] name = "regex" version = "1.10.4" @@ -2447,7 +2977,7 @@ version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", @@ -2456,7 +2986,7 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "hyper", - "hyper-rustls", + "hyper-rustls 0.24.2", "ipnet", "js-sys", "log", @@ -2464,8 +2994,8 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", - "rustls-native-certs", + "rustls 0.21.11", + "rustls-native-certs 0.6.3", "rustls-pemfile", "serde", "serde_json", @@ -2473,7 +3003,7 @@ dependencies = [ "sync_wrapper", "system-configuration", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "tower-service", "url", @@ -2484,6 +3014,21 @@ dependencies = [ "winreg", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + [[package]] name = "ring" version = "0.17.8" @@ -2494,8 +3039,8 @@ dependencies = [ "cfg-if", "getrandom", "libc", - "spin", - "untrusted", + "spin 0.9.8", + "untrusted 0.9.0", "windows-sys 0.52.0", ] @@ -2505,6 +3050,114 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" +[[package]] +name = "roaring" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1c77081a55300e016cb86f2864415b7518741879db925b8d488a0ee0d2da6bf" +dependencies = [ + "bytemuck", + "byteorder", +] + +[[package]] +name = "rusoto_core" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b4f000e8934c1b4f70adde180056812e7ea6b1a247952db8ee98c94cd3116cc" +dependencies = [ + "async-trait", + "base64 0.13.1", + "bytes", + "crc32fast", + "futures", + "http 0.2.12", + "hyper", + "hyper-rustls 0.22.1", + "lazy_static", + "log", + "rusoto_credential", + "rusoto_signature", + "rustc_version", + "serde", + "serde_json", + "tokio", + "xml-rs", +] + +[[package]] +name = "rusoto_credential" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a46b67db7bb66f5541e44db22b0a02fed59c9603e146db3a9e633272d3bac2f" +dependencies = [ + "async-trait", + "chrono", + "dirs-next", + "futures", + "hyper", + "serde", + "serde_json", + "shlex", + "tokio", + "zeroize", +] + +[[package]] +name = "rusoto_dynamodb" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7935e1f9ca57c4ee92a4d823dcd698eb8c992f7e84ca21976ae72cd2b03016e7" +dependencies = [ + "async-trait", + "bytes", + "futures", + "rusoto_core", + "serde", + "serde_json", +] + +[[package]] +name = "rusoto_signature" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6264e93384b90a747758bcc82079711eacf2e755c3a8b5091687b5349d870bcc" +dependencies = [ + "base64 0.13.1", + "bytes", + "chrono", + "digest 0.9.0", + "futures", + "hex", + "hmac 0.11.0", + "http 0.2.12", + "hyper", + "log", + "md-5 0.9.1", + "percent-encoding", + "pin-project-lite", + "rusoto_credential", + "rustc_version", + "serde", + "sha2 0.9.9", + "tokio", +] + +[[package]] +name = "rusoto_sts" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7edd42473ac006fd54105f619e480b0a94136e7f53cf3fb73541363678fd92" +dependencies = [ + "async-trait", + "bytes", + "chrono", + "futures", + "rusoto_core", + "serde_urlencoded", + "xml-rs", +] + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -2533,6 +3186,19 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64 0.13.1", + "log", + "ring 0.16.20", + "sct 0.6.1", + "webpki", +] + [[package]] name = "rustls" version = "0.21.11" @@ -2540,9 +3206,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" dependencies = [ "log", - "ring", + "ring 0.17.8", "rustls-webpki", - "sct", + "sct 0.7.1", +] + +[[package]] +name = "rustls-native-certs" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +dependencies = [ + "openssl-probe", + "rustls 0.19.1", + "schannel", + "security-framework", ] [[package]] @@ -2563,7 +3241,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64", + "base64 0.21.7", ] [[package]] @@ -2572,8 +3250,8 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] @@ -2612,14 +3290,24 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring 0.16.20", + "untrusted 0.7.1", +] + [[package]] name = "sct" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] @@ -2700,6 +3388,19 @@ dependencies = [ "serde", ] +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + [[package]] name = "sha2" version = "0.10.8" @@ -2708,9 +3409,15 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -2779,12 +3486,28 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "sqlparser" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc2c25a6c66789625ef164b4c7d2e548d627902280c13710d33da8222169964" +dependencies = [ + "log", + "sqlparser_derive", +] + [[package]] name = "sqlparser" version = "0.43.1" @@ -2817,6 +3540,9 @@ name = "strum" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +dependencies = [ + "strum_macros 0.25.3", +] [[package]] name = "strum" @@ -2855,9 +3581,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.5.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" @@ -3016,6 +3742,7 @@ dependencies = [ "libc", "mio", "num_cpus", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", @@ -3034,13 +3761,24 @@ dependencies = [ "syn 2.0.60", ] +[[package]] +name = "tokio-rustls" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +dependencies = [ + "rustls 0.19.1", + "tokio", + "webpki", +] + [[package]] name = "tokio-rustls" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.11", "tokio", ] @@ -3070,6 +3808,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3176,6 +3915,12 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "untrusted" version = "0.9.0" @@ -3335,6 +4080,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring 0.16.20", + "untrusted 0.7.1", +] + [[package]] name = "winapi" version = "0.3.9" @@ -3524,6 +4279,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "xml-rs" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" + [[package]] name = "xmlparser" version = "0.13.6" @@ -3539,6 +4300,12 @@ dependencies = [ "lzma-sys", ] +[[package]] +name = "z85" +version = "3.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a599daf1b507819c1121f0bf87fa37eb19daac6aff3aefefd4e6e2e0f2020fc" + [[package]] name = "zerocopy" version = "0.7.32" diff --git a/Cargo.toml b/Cargo.toml index edd76ef..c0fef31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,4 +27,9 @@ pest_derive = "2" tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread", "sync", "fs"] } url = "2" dashmap = "5" +deltalake = {version = "0.17", optional=true, features=["datafusion", "deltalake-aws", "s3"]} + +[features] +default = ["deltalake"] +deltalake = ["dep:deltalake"] diff --git a/examples/demo.rs b/examples/demo.rs index f36107b..fd2c151 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -50,7 +50,8 @@ async fn main() -> Result<()> { let mut glue_catalog_provider = GlueCatalogProvider::new(&sdk_config); let register_results = glue_catalog_provider - .register_all_with_options(&TableRegistrationOptions::InferSchemaFromData, &ctx.state()) + .register_tables("oidc_aggregates", &ctx.state()) + //.register_all_with_options(&TableRegistrationOptions::InferSchemaFromData, &ctx.state()) .await?; for result in register_results { if result.is_err() { @@ -66,6 +67,12 @@ async fn main() -> Result<()> { .show() .await?; + ctx.sql("select * from glue.oidc_aggregates.customer_frequency_v2 limit 1") + .await? + .show() + .await?; + + /* let tables = ctx .sql( r#" @@ -104,7 +111,7 @@ async fn main() -> Result<()> { } }; } - } + }*/ Ok(()) } diff --git a/src/catalog_provider/glue.rs b/src/catalog_provider/glue.rs index 6863581..0a7404c 100644 --- a/src/catalog_provider/glue.rs +++ b/src/catalog_provider/glue.rs @@ -17,7 +17,10 @@ use datafusion::datasource::file_format::FileFormat; use datafusion::datasource::listing::{ ListingOptions, ListingTable, ListingTableConfig, ListingTableUrl, }; +use datafusion::datasource::object_store::ObjectStoreRegistry; +use datafusion::datasource::TableProvider; use datafusion::execution::context::SessionState; +use deltalake::DeltaTableBuilder; use std::any::Any; use std::collections::HashMap; use std::sync::Arc; @@ -34,6 +37,7 @@ pub enum TableRegistrationOptions { pub struct GlueCatalogProvider { client: Client, schema_provider_by_database: HashMap>, + object_store_registry: Option>, } impl GlueCatalogProvider { @@ -185,6 +189,76 @@ impl GlueCatalogProvider { let sd = Self::get_storage_descriptor(glue_table)?; let storage_location_uri = Self::get_storage_location(&sd)?; + let table_parameters = match &glue_table.parameters { + Some(x) => x.clone(), + None => HashMap::new(), + }; + + let table_type = table_parameters.get("table_type"); + if table_type.unwrap().to_lowercase() == "delta" { + self.register_delta_table( + glue_table, + ctx, + database_name, + table_name, + &sd, + storage_location_uri, + ) + .await?; + } else { + self.register_listing_table( + glue_table, + table_registration_options, + ctx, + database_name, + table_name, + &sd, + storage_location_uri, + ) + .await?; + } + + Ok(()) + } + + async fn register_delta_table( + &mut self, + glue_table: &Table, + ctx: &SessionState, + database_name: &str, + table_name: &String, + sd: &StorageDescriptor, + storage_location_uri: &str, + ) -> Result<()> { + + let mut builder = DeltaTableBuilder::from_uri(&storage_location_uri); + + self. + + if let Ok(object_store) = get_object_store(object_store_registry, &location) { + builder = builder.with_storage_backend(object_store, url); + } + + builder + .with_storage_options(std::env::vars().collect()) + .load() + .await + .map(|t| Arc::new(t) as Arc) + .map_err(|e| GlueError::Deltalake(e)) + + Ok(()) + } + + async fn register_listing_table( + &mut self, + glue_table: &Table, + table_registration_options: &TableRegistrationOptions, + ctx: &SessionState, + database_name: &str, + table_name: &String, + sd: &StorageDescriptor, + storage_location_uri: &str, + ) -> Result<()> { let listing_options = Self::get_listing_options(database_name, table_name, &sd, glue_table)?; @@ -206,7 +280,6 @@ impl GlueCatalogProvider { schema_provider_for_database .register_table(table_name.to_string(), Arc::new(listing_table))?; - Ok(()) } @@ -508,6 +581,27 @@ impl CatalogProvider for GlueCatalogProvider { } } +/* +async fn create_delta_table( + table: &Table, + object_store_registry: &Option>, +) -> Result> { + let location = table_location(table)?; + let url = url::Url::parse(&location)?; + let mut builder = DeltaTableBuilder::from_uri(&location); + + if let Ok(object_store) = get_object_store(object_store_registry, &location) { + builder = builder.with_storage_backend(object_store, url); + } + + builder + .with_storage_options(std::env::vars().collect()) + .load() + .await + .map(|t| Arc::new(t) as Arc) + .map_err(|e| GlueError::Deltalake(e)) +}*/ + #[cfg(test)] mod tests { use super::*; diff --git a/src/error.rs b/src/error.rs index 0703226..5d3cfed 100644 --- a/src/error.rs +++ b/src/error.rs @@ -18,6 +18,8 @@ pub enum GlueError { DataFusion(DataFusionError), /// Error during mapping of GlueDataType GlueDataTypeMapping(String), + /// Error during loading of delta lake table + Deltalake(deltalake::errors::DeltaTableError), } impl Display for GlueError { @@ -29,6 +31,7 @@ impl Display for GlueError { GlueError::GlueDataTypeMapping(desc) => { write!(f, "Could not map glue data type: {}", desc) } + GlueError::Deltalake(e) => e.fmt(f), } } } From 6959db1153d2bdde3f7966c046ef094347d8eed9 Mon Sep 17 00:00:00 2001 From: Tim Van Wassenhove Date: Tue, 23 Apr 2024 15:06:44 +0200 Subject: [PATCH 2/5] feat: add support for deltalake --- Cargo.lock | 757 ++++++----------------------------- Cargo.toml | 3 + examples/demo.rs | 45 +-- src/catalog_provider/glue.rs | 86 ++-- src/error.rs | 3 + 5 files changed, 195 insertions(+), 699 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 377b620..6becaa5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -96,7 +96,7 @@ checksum = "ceb7c683b2f8f40970b70e39ff8be514c95b96fcb9c4af87e1ed2cb2e10801a0" dependencies = [ "bzip2", "crc32fast", - "digest 0.10.7", + "digest", "lazy_static", "libflate", "log", @@ -203,7 +203,7 @@ dependencies = [ "arrow-data", "arrow-schema", "arrow-select", - "base64 0.21.7", + "base64", "chrono", "comfy-table", "half", @@ -404,7 +404,7 @@ dependencies = [ "hex", "http 0.2.12", "hyper", - "ring 0.17.8", + "ring", "time", "tokio", "tracing", @@ -447,6 +447,29 @@ dependencies = [ "uuid", ] +[[package]] +name = "aws-sdk-dynamodb" +version = "1.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "059a3cf6c50bc79b05153a18563be062f55a8b7b3e73392aec7ba479f825fc97" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "once_cell", + "regex-lite", + "tracing", +] + [[package]] name = "aws-sdk-glue" version = "1.27.0" @@ -549,12 +572,12 @@ dependencies = [ "bytes", "form_urlencoded", "hex", - "hmac 0.12.1", + "hmac", "http 0.2.12", "http 1.1.0", "once_cell", "percent-encoding", - "sha2 0.10.8", + "sha2", "time", "tracing", ] @@ -626,11 +649,11 @@ dependencies = [ "http-body 0.4.6", "http-body 1.0.0", "hyper", - "hyper-rustls 0.24.2", + "hyper-rustls", "once_cell", "pin-project-lite", "pin-utils", - "rustls 0.21.11", + "rustls", "tokio", "tracing", ] @@ -731,12 +754,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.7" @@ -771,7 +788,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -787,15 +804,6 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -900,9 +908,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1029,16 +1037,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "csv" version = "1.3.0" @@ -1060,15 +1058,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "ct-logs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" -dependencies = [ - "sct 0.6.1", -] - [[package]] name = "dary_heap" version = "0.3.6" @@ -1088,54 +1077,6 @@ dependencies = [ "parking_lot_core", ] -[[package]] -name = "datafusion" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4328f5467f76d890fe3f924362dbc3a838c6a733f762b32d87f9e0b7bef5fb49" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "arrow-ipc", - "arrow-schema", - "async-compression", - "async-trait", - "bytes", - "bzip2", - "chrono", - "dashmap", - "datafusion-common 35.0.0", - "datafusion-execution 35.0.0", - "datafusion-expr 35.0.0", - "datafusion-optimizer 35.0.0", - "datafusion-physical-expr 35.0.0", - "datafusion-physical-plan 35.0.0", - "datafusion-sql 35.0.0", - "flate2", - "futures", - "glob", - "half", - "hashbrown 0.14.3", - "indexmap", - "itertools", - "log", - "num_cpus", - "object_store", - "parking_lot", - "parquet", - "pin-project-lite", - "rand", - "sqlparser 0.41.0", - "tempfile", - "tokio", - "tokio-util", - "url", - "uuid", - "xz2", - "zstd 0.13.1", -] - [[package]] name = "datafusion" version = "36.0.0" @@ -1154,15 +1095,15 @@ dependencies = [ "bzip2", "chrono", "dashmap", - "datafusion-common 36.0.0", - "datafusion-execution 36.0.0", - "datafusion-expr 36.0.0", + "datafusion-common", + "datafusion-execution", + "datafusion-expr", "datafusion-functions", "datafusion-functions-array", - "datafusion-optimizer 36.0.0", - "datafusion-physical-expr 36.0.0", - "datafusion-physical-plan 36.0.0", - "datafusion-sql 36.0.0", + "datafusion-optimizer", + "datafusion-physical-expr", + "datafusion-physical-plan", + "datafusion-sql", "flate2", "futures", "glob", @@ -1196,7 +1137,7 @@ dependencies = [ "aws-sdk-glue", "aws-types", "dashmap", - "datafusion 36.0.0", + "datafusion", "deltalake", "object_store", "pest", @@ -1205,26 +1146,6 @@ dependencies = [ "url", ] -[[package]] -name = "datafusion-common" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29a7752143b446db4a2cccd9a6517293c6b97e8c39e520ca43ccd07135a4f7e" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "arrow-buffer", - "arrow-schema", - "chrono", - "half", - "libc", - "num_cpus", - "object_store", - "parquet", - "sqlparser 0.41.0", -] - [[package]] name = "datafusion-common" version = "36.0.0" @@ -1246,27 +1167,6 @@ dependencies = [ "sqlparser 0.43.1", ] -[[package]] -name = "datafusion-execution" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d447650af16e138c31237f53ddaef6dd4f92f0e2d3f2f35d190e16c214ca496" -dependencies = [ - "arrow", - "chrono", - "dashmap", - "datafusion-common 35.0.0", - "datafusion-expr 35.0.0", - "futures", - "hashbrown 0.14.3", - "log", - "object_store", - "parking_lot", - "rand", - "tempfile", - "url", -] - [[package]] name = "datafusion-execution" version = "36.0.0" @@ -1276,8 +1176,8 @@ dependencies = [ "arrow", "chrono", "dashmap", - "datafusion-common 36.0.0", - "datafusion-expr 36.0.0", + "datafusion-common", + "datafusion-expr", "futures", "hashbrown 0.14.3", "log", @@ -1288,22 +1188,6 @@ dependencies = [ "url", ] -[[package]] -name = "datafusion-expr" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8d19598e48a498850fb79f97a9719b1f95e7deb64a7a06f93f313e8fa1d524b" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "datafusion-common 35.0.0", - "paste", - "sqlparser 0.41.0", - "strum 0.25.0", - "strum_macros 0.25.3", -] - [[package]] name = "datafusion-expr" version = "36.0.0" @@ -1313,7 +1197,7 @@ dependencies = [ "ahash", "arrow", "arrow-array", - "datafusion-common 36.0.0", + "datafusion-common", "paste", "sqlparser 0.43.1", "strum 0.26.2", @@ -1327,10 +1211,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98f1c73f7801b2b8ba2297b3ad78ffcf6c1fc6b8171f502987eb9ad5cb244ee7" dependencies = [ "arrow", - "base64 0.21.7", - "datafusion-common 36.0.0", - "datafusion-execution 36.0.0", - "datafusion-expr 36.0.0", + "base64", + "datafusion-common", + "datafusion-execution", + "datafusion-expr", "hex", "log", ] @@ -1342,31 +1226,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42d16a0ddf2c991526f6ffe2f47a72c6da0b7354d6c32411dd20631fe2e38937" dependencies = [ "arrow", - "datafusion-common 36.0.0", - "datafusion-execution 36.0.0", - "datafusion-expr 36.0.0", + "datafusion-common", + "datafusion-execution", + "datafusion-expr", "log", "paste", ] -[[package]] -name = "datafusion-optimizer" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7feb0391f1fc75575acb95b74bfd276903dc37a5409fcebe160bc7ddff2010" -dependencies = [ - "arrow", - "async-trait", - "chrono", - "datafusion-common 35.0.0", - "datafusion-expr 35.0.0", - "datafusion-physical-expr 35.0.0", - "hashbrown 0.14.3", - "itertools", - "log", - "regex-syntax", -] - [[package]] name = "datafusion-optimizer" version = "36.0.0" @@ -1376,49 +1242,15 @@ dependencies = [ "arrow", "async-trait", "chrono", - "datafusion-common 36.0.0", - "datafusion-expr 36.0.0", - "datafusion-physical-expr 36.0.0", + "datafusion-common", + "datafusion-expr", + "datafusion-physical-expr", "hashbrown 0.14.3", "itertools", "log", "regex-syntax", ] -[[package]] -name = "datafusion-physical-expr" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e911bca609c89a54e8f014777449d8290327414d3e10c57a3e3c2122e38878d0" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "arrow-buffer", - "arrow-ord", - "arrow-schema", - "base64 0.21.7", - "blake2", - "blake3", - "chrono", - "datafusion-common 35.0.0", - "datafusion-expr 35.0.0", - "half", - "hashbrown 0.14.3", - "hex", - "indexmap", - "itertools", - "log", - "md-5 0.10.6", - "paste", - "petgraph", - "rand", - "regex", - "sha2 0.10.8", - "unicode-segmentation", - "uuid", -] - [[package]] name = "datafusion-physical-expr" version = "36.0.0" @@ -1432,60 +1264,29 @@ dependencies = [ "arrow-ord", "arrow-schema", "arrow-string", - "base64 0.21.7", + "base64", "blake2", "blake3", "chrono", - "datafusion-common 36.0.0", - "datafusion-execution 36.0.0", - "datafusion-expr 36.0.0", + "datafusion-common", + "datafusion-execution", + "datafusion-expr", "half", "hashbrown 0.14.3", "hex", "indexmap", "itertools", "log", - "md-5 0.10.6", + "md-5", "paste", "petgraph", "rand", "regex", - "sha2 0.10.8", + "sha2", "unicode-segmentation", "uuid", ] -[[package]] -name = "datafusion-physical-plan" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b546b8a02e9c2ab35ac6420d511f12a4701950c1eb2e568c122b4fefb0be3" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "arrow-buffer", - "arrow-schema", - "async-trait", - "chrono", - "datafusion-common 35.0.0", - "datafusion-execution 35.0.0", - "datafusion-expr 35.0.0", - "datafusion-physical-expr 35.0.0", - "futures", - "half", - "hashbrown 0.14.3", - "indexmap", - "itertools", - "log", - "once_cell", - "parking_lot", - "pin-project-lite", - "rand", - "tokio", - "uuid", -] - [[package]] name = "datafusion-physical-plan" version = "36.0.0" @@ -1499,10 +1300,10 @@ dependencies = [ "arrow-schema", "async-trait", "chrono", - "datafusion-common 36.0.0", - "datafusion-execution 36.0.0", - "datafusion-expr 36.0.0", - "datafusion-physical-expr 36.0.0", + "datafusion-common", + "datafusion-execution", + "datafusion-expr", + "datafusion-physical-expr", "futures", "half", "hashbrown 0.14.3", @@ -1519,33 +1320,19 @@ dependencies = [ [[package]] name = "datafusion-proto" -version = "35.0.0" +version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5742f993d1812d6bb3cdc4ce2a0aa99e10f6dc0daa11dd69b0ff57f2d8e7518c" +checksum = "2292251d5441d88d92a90d1511d5a8c88759a6562ff38ac1711b1587e6bf19c4" dependencies = [ "arrow", "chrono", - "datafusion 35.0.0", - "datafusion-common 35.0.0", - "datafusion-expr 35.0.0", + "datafusion", + "datafusion-common", + "datafusion-expr", "object_store", "prost", ] -[[package]] -name = "datafusion-sql" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d18d36f260bbbd63aafdb55339213a23d540d3419810575850ef0a798a6b768" -dependencies = [ - "arrow", - "arrow-schema", - "datafusion-common 35.0.0", - "datafusion-expr 35.0.0", - "log", - "sqlparser 0.41.0", -] - [[package]] name = "datafusion-sql" version = "36.0.0" @@ -1554,8 +1341,8 @@ checksum = "21474a95c3a62d113599d21b439fa15091b538bac06bd20be0bb2e7d22903c09" dependencies = [ "arrow", "arrow-schema", - "datafusion-common 36.0.0", - "datafusion-expr 36.0.0", + "datafusion-common", + "datafusion-expr", "log", "sqlparser 0.43.1", ] @@ -1563,8 +1350,6 @@ dependencies = [ [[package]] name = "deltalake" version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e5fa38c2d00cc8a96789eaf3e7a2b27f0bd4c4c7a23e1e59bd5b7b4ceb796fe" dependencies = [ "deltalake-aws", "deltalake-core", @@ -1573,10 +1358,13 @@ dependencies = [ [[package]] name = "deltalake-aws" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c27bed8839d53570bbaf9c4ae3a6b187b34f9e07cebd2f0abf2118774f466d9" dependencies = [ "async-trait", + "aws-config", + "aws-credential-types", + "aws-sdk-dynamodb", + "aws-sdk-sts", + "aws-smithy-runtime-api", "backoff", "bytes", "deltalake-core", @@ -1585,10 +1373,6 @@ dependencies = [ "maplit", "object_store", "regex", - "rusoto_core", - "rusoto_credential", - "rusoto_dynamodb", - "rusoto_sts", "thiserror", "tokio", "tracing", @@ -1599,8 +1383,6 @@ dependencies = [ [[package]] name = "deltalake-core" version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "607be097d9bf5998bfbde3c5e6364f775e5adde0be55843130e5e50f2a2a4387" dependencies = [ "arrow", "arrow-arith", @@ -1618,12 +1400,13 @@ dependencies = [ "cfg-if", "chrono", "dashmap", - "datafusion 35.0.0", - "datafusion-common 35.0.0", - "datafusion-expr 35.0.0", - "datafusion-physical-expr 35.0.0", + "datafusion", + "datafusion-common", + "datafusion-expr", + "datafusion-functions", + "datafusion-physical-expr", "datafusion-proto", - "datafusion-sql 35.0.0", + "datafusion-sql", "either", "errno", "fix-hidden-lifetime-bug", @@ -1648,7 +1431,7 @@ dependencies = [ "roaring", "serde", "serde_json", - "sqlparser 0.41.0", + "sqlparser 0.44.0", "thiserror", "tokio", "tracing", @@ -1666,47 +1449,17 @@ dependencies = [ "powerfmt", ] -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "crypto-common", "subtle", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "doc-comment" version = "0.3.3" @@ -2000,23 +1753,13 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hmac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -2117,23 +1860,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" -dependencies = [ - "ct-logs", - "futures-util", - "hyper", - "log", - "rustls 0.19.1", - "rustls-native-certs 0.5.0", - "tokio", - "tokio-rustls 0.22.0", - "webpki", -] - [[package]] name = "hyper-rustls" version = "0.24.2" @@ -2144,10 +1870,10 @@ dependencies = [ "http 0.2.12", "hyper", "log", - "rustls 0.21.11", - "rustls-native-certs 0.6.3", + "rustls", + "rustls-native-certs", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", ] [[package]] @@ -2353,16 +2079,6 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.5.0", - "libc", -] - [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -2411,17 +2127,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" -[[package]] -name = "md-5" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "md-5" version = "0.10.6" @@ -2429,7 +2134,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ "cfg-if", - "digest 0.10.7", + "digest", ] [[package]] @@ -2567,24 +2272,25 @@ dependencies = [ [[package]] name = "object_store" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d139f545f64630e2e3688fd9f81c470888ab01edeb72d13b4e86c566f1130000" +checksum = "b8718f8b65fdf67a45108d1548347d4af7d71fb81ce727bbf9e3b2535e079db3" dependencies = [ "async-trait", - "base64 0.21.7", + "base64", "bytes", "chrono", "futures", "humantime", "hyper", "itertools", + "md-5", "parking_lot", "percent-encoding", "quick-xml", "rand", "reqwest", - "ring 0.17.8", + "ring", "serde", "serde_json", "snafu", @@ -2600,12 +2306,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - [[package]] name = "openssl-probe" version = "0.1.5" @@ -2664,7 +2364,7 @@ dependencies = [ "arrow-ipc", "arrow-schema", "arrow-select", - "base64 0.21.7", + "base64", "brotli", "bytes", "chrono", @@ -2748,7 +2448,7 @@ checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" dependencies = [ "once_cell", "pest", - "sha2 0.10.8", + "sha2", ] [[package]] @@ -2925,17 +2625,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_users" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" -dependencies = [ - "getrandom", - "libredox", - "thiserror", -] - [[package]] name = "regex" version = "1.10.4" @@ -2977,7 +2666,7 @@ version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64 0.21.7", + "base64", "bytes", "encoding_rs", "futures-core", @@ -2986,7 +2675,7 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "hyper", - "hyper-rustls 0.24.2", + "hyper-rustls", "ipnet", "js-sys", "log", @@ -2994,8 +2683,8 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.11", - "rustls-native-certs 0.6.3", + "rustls", + "rustls-native-certs", "rustls-pemfile", "serde", "serde_json", @@ -3003,7 +2692,7 @@ dependencies = [ "sync_wrapper", "system-configuration", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "tokio-util", "tower-service", "url", @@ -3014,21 +2703,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - [[package]] name = "ring" version = "0.17.8" @@ -3039,8 +2713,8 @@ dependencies = [ "cfg-if", "getrandom", "libc", - "spin 0.9.8", - "untrusted 0.9.0", + "spin", + "untrusted", "windows-sys 0.52.0", ] @@ -3060,104 +2734,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "rusoto_core" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b4f000e8934c1b4f70adde180056812e7ea6b1a247952db8ee98c94cd3116cc" -dependencies = [ - "async-trait", - "base64 0.13.1", - "bytes", - "crc32fast", - "futures", - "http 0.2.12", - "hyper", - "hyper-rustls 0.22.1", - "lazy_static", - "log", - "rusoto_credential", - "rusoto_signature", - "rustc_version", - "serde", - "serde_json", - "tokio", - "xml-rs", -] - -[[package]] -name = "rusoto_credential" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a46b67db7bb66f5541e44db22b0a02fed59c9603e146db3a9e633272d3bac2f" -dependencies = [ - "async-trait", - "chrono", - "dirs-next", - "futures", - "hyper", - "serde", - "serde_json", - "shlex", - "tokio", - "zeroize", -] - -[[package]] -name = "rusoto_dynamodb" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7935e1f9ca57c4ee92a4d823dcd698eb8c992f7e84ca21976ae72cd2b03016e7" -dependencies = [ - "async-trait", - "bytes", - "futures", - "rusoto_core", - "serde", - "serde_json", -] - -[[package]] -name = "rusoto_signature" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6264e93384b90a747758bcc82079711eacf2e755c3a8b5091687b5349d870bcc" -dependencies = [ - "base64 0.13.1", - "bytes", - "chrono", - "digest 0.9.0", - "futures", - "hex", - "hmac 0.11.0", - "http 0.2.12", - "hyper", - "log", - "md-5 0.9.1", - "percent-encoding", - "pin-project-lite", - "rusoto_credential", - "rustc_version", - "serde", - "sha2 0.9.9", - "tokio", -] - -[[package]] -name = "rusoto_sts" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7edd42473ac006fd54105f619e480b0a94136e7f53cf3fb73541363678fd92" -dependencies = [ - "async-trait", - "bytes", - "chrono", - "futures", - "rusoto_core", - "serde_urlencoded", - "xml-rs", -] - [[package]] name = "rustc-demangle" version = "0.1.23" @@ -3186,19 +2762,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.1", - "log", - "ring 0.16.20", - "sct 0.6.1", - "webpki", -] - [[package]] name = "rustls" version = "0.21.11" @@ -3206,21 +2769,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" dependencies = [ "log", - "ring 0.17.8", + "ring", "rustls-webpki", - "sct 0.7.1", -] - -[[package]] -name = "rustls-native-certs" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" -dependencies = [ - "openssl-probe", - "rustls 0.19.1", - "schannel", - "security-framework", + "sct", ] [[package]] @@ -3241,7 +2792,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.7", + "base64", ] [[package]] @@ -3250,8 +2801,8 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -3290,24 +2841,14 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "sct" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -3388,19 +2929,6 @@ dependencies = [ "serde", ] -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha2" version = "0.10.8" @@ -3409,15 +2937,9 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -3486,12 +3008,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" @@ -3500,9 +3016,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "sqlparser" -version = "0.41.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc2c25a6c66789625ef164b4c7d2e548d627902280c13710d33da8222169964" +checksum = "f95c4bae5aba7cd30bd506f7140026ade63cff5afd778af8854026f9606bf5d4" dependencies = [ "log", "sqlparser_derive", @@ -3510,12 +3026,11 @@ dependencies = [ [[package]] name = "sqlparser" -version = "0.43.1" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f95c4bae5aba7cd30bd506f7140026ade63cff5afd778af8854026f9606bf5d4" +checksum = "aaf9c7ff146298ffda83a200f8d5084f08dcee1edfc135fcc1d646a45d50ffd6" dependencies = [ "log", - "sqlparser_derive", ] [[package]] @@ -3540,9 +3055,6 @@ name = "strum" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" -dependencies = [ - "strum_macros 0.25.3", -] [[package]] name = "strum" @@ -3581,9 +3093,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" @@ -3761,24 +3273,13 @@ dependencies = [ "syn 2.0.60", ] -[[package]] -name = "tokio-rustls" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" -dependencies = [ - "rustls 0.19.1", - "tokio", - "webpki", -] - [[package]] name = "tokio-rustls" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.11", + "rustls", "tokio", ] @@ -3915,12 +3416,6 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -4080,16 +3575,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "winapi" version = "0.3.9" @@ -4279,12 +3764,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "xml-rs" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" - [[package]] name = "xmlparser" version = "0.13.6" diff --git a/Cargo.toml b/Cargo.toml index c0fef31..2794c18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,3 +33,6 @@ deltalake = {version = "0.17", optional=true, features=["datafusion", "deltalake default = ["deltalake"] deltalake = ["dep:deltalake"] +[patch.crates-io] +deltalake = {path = "../delta-rs/crates/deltalake"} + diff --git a/examples/demo.rs b/examples/demo.rs index fd2c151..2e2f66b 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -19,18 +19,16 @@ use aws_config::BehaviorVersion; use aws_sdk_glue::config::{Credentials, ProvideCredentials}; use aws_types::SdkConfig; use dashmap::DashMap; -use datafusion::arrow::array::StringArray; use datafusion::common::{DataFusionError, Result}; use datafusion::datasource::object_store::ObjectStoreRegistry; use datafusion::execution::runtime_env::{RuntimeConfig, RuntimeEnv}; use datafusion::prelude::*; -use datafusion_catalogprovider_glue::catalog_provider::glue::{ - GlueCatalogProvider, TableRegistrationOptions, -}; +use datafusion_catalogprovider_glue::catalog_provider::glue::{GlueCatalogProvider, TableRegistrationOptions}; use object_store::aws::AmazonS3Builder; use object_store::ObjectStore; use std::fmt::Debug; use std::sync::Arc; +use datafusion::arrow::array::StringArray; use url::Url; #[tokio::main] @@ -40,19 +38,19 @@ async fn main() -> Result<()> { // Register an object store provider which creates instances for each requested s3://bucket using the sdk_config credentials // As an alternative you can also manually register the required object_store(s) - let object_store_provider = DemoS3ObjectStoreProvider::new(&sdk_config).await?; + let object_store_provider = Arc::new(DemoS3ObjectStoreProvider::new(&sdk_config).await?); let runtime_config = - RuntimeConfig::default().with_object_store_registry(Arc::new(object_store_provider)); + RuntimeConfig::default().with_object_store_registry(object_store_provider.clone()); let config = SessionConfig::new().with_information_schema(true); let runtime = Arc::new(RuntimeEnv::new(runtime_config)?); let ctx = SessionContext::new_with_config_rt(config, runtime); - let mut glue_catalog_provider = GlueCatalogProvider::new(&sdk_config); + let mut glue_catalog_provider = GlueCatalogProvider::new(sdk_config, object_store_provider); let register_results = glue_catalog_provider - .register_tables("oidc_aggregates", &ctx.state()) - //.register_all_with_options(&TableRegistrationOptions::InferSchemaFromData, &ctx.state()) + .register_all_with_options(&TableRegistrationOptions::DeriveSchemaFromGlueTable, &ctx.state()) .await?; + for result in register_results { if result.is_err() { // only output tables which were not registered... @@ -67,12 +65,6 @@ async fn main() -> Result<()> { .show() .await?; - ctx.sql("select * from glue.oidc_aggregates.customer_frequency_v2 limit 1") - .await? - .show() - .await?; - - /* let tables = ctx .sql( r#" @@ -111,7 +103,7 @@ async fn main() -> Result<()> { } }; } - }*/ + } Ok(()) } @@ -129,11 +121,11 @@ async fn sample(ctx: SessionContext, schema: &str, table: &str, limit: usize) -> pub struct DemoS3ObjectStoreProvider { credentials: Credentials, region: String, - object_stores: tokio::sync::RwLock>>, + object_stores: DashMap>, } impl DemoS3ObjectStoreProvider { - pub async fn new(sdk_config: &SdkConfig) -> crate::Result { + pub async fn new(sdk_config: &SdkConfig) -> Result { let credentials_provider = sdk_config .credentials_provider() .expect("could not find credentials provider"); @@ -146,8 +138,7 @@ impl DemoS3ObjectStoreProvider { .map(|r| r.to_string()) .unwrap_or_else(|| "eu-central-1".to_string()); - let object_stores: tokio::sync::RwLock>> = - tokio::sync::RwLock::new(DashMap::new()); + let object_stores = DashMap::new(); Ok(DemoS3ObjectStoreProvider { credentials, @@ -156,7 +147,7 @@ impl DemoS3ObjectStoreProvider { }) } - fn build_s3_object_store(&self, url: &Url) -> crate::Result> { + fn build_s3_object_store(&self, url: &Url) -> Result> { let bucket_name = get_host_name(url)?; let s3_builder = AmazonS3Builder::new() @@ -182,14 +173,20 @@ impl ObjectStoreRegistry for DemoS3ObjectStoreProvider { store: Arc, ) -> Option> { { - let guard = self.object_stores.blocking_write(); - guard.insert(url.clone(), store.clone()); + self.object_stores.insert(url.clone(), store.clone()); } Some(store.clone()) } fn get_store(&self, url: &Url) -> Result> { - self.build_s3_object_store(url) + if let Some(refx)= self.object_stores.get(url) { + let store = refx.value().clone(); + Ok(store) + } else { + let store = self.build_s3_object_store(url)?; + let _ = self.register_store(url, store.clone()); + Ok(store) + } } } diff --git a/src/catalog_provider/glue.rs b/src/catalog_provider/glue.rs index 0a7404c..49fc203 100644 --- a/src/catalog_provider/glue.rs +++ b/src/catalog_provider/glue.rs @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 -use crate::error::*; +use crate::error::{GlueError, Result}; use crate::glue_data_type_parser::*; -use aws_config::BehaviorVersion; +use aws_sdk_glue::config::ProvideCredentials; use aws_sdk_glue::types::{Column, StorageDescriptor, Table}; use aws_sdk_glue::Client; use aws_types::SdkConfig; @@ -17,13 +17,13 @@ use datafusion::datasource::file_format::FileFormat; use datafusion::datasource::listing::{ ListingOptions, ListingTable, ListingTableConfig, ListingTableUrl, }; -use datafusion::datasource::object_store::ObjectStoreRegistry; use datafusion::datasource::TableProvider; use datafusion::execution::context::SessionState; use deltalake::DeltaTableBuilder; use std::any::Any; use std::collections::HashMap; use std::sync::Arc; +use datafusion::datasource::object_store::ObjectStoreRegistry; /// Options to register a table pub enum TableRegistrationOptions { @@ -37,23 +37,19 @@ pub enum TableRegistrationOptions { pub struct GlueCatalogProvider { client: Client, schema_provider_by_database: HashMap>, - object_store_registry: Option>, + object_store_registry: Arc, } impl GlueCatalogProvider { - /// Convenience wrapper for creating a new `GlueCatalogProvider` using default configuration options. Only works with AWS. - pub async fn default() -> Self { - let shared_config = aws_config::load_defaults(BehaviorVersion::latest()).await; - GlueCatalogProvider::new(&shared_config) - } /// Create a new Glue CatalogProvider - pub fn new(sdk_config: &SdkConfig) -> Self { - let client = Client::new(sdk_config); + pub fn new(sdk_config: SdkConfig, object_store_registry: Arc) -> Self { + let client = Client::new(&sdk_config); let schema_provider_by_database = HashMap::new(); GlueCatalogProvider { client, schema_provider_by_database, + object_store_registry, } } @@ -194,17 +190,12 @@ impl GlueCatalogProvider { None => HashMap::new(), }; - let table_type = table_parameters.get("table_type"); - if table_type.unwrap().to_lowercase() == "delta" { - self.register_delta_table( - glue_table, - ctx, - database_name, - table_name, - &sd, - storage_location_uri, - ) - .await?; + let table_type = table_parameters.get("table_type") + .map(|x| x.to_lowercase()) + .unwrap_or("".to_string()); + if table_type == "delta" { + self.register_delta_table(database_name, table_name, storage_location_uri) + .await?; } else { self.register_listing_table( glue_table, @@ -223,32 +214,56 @@ impl GlueCatalogProvider { async fn register_delta_table( &mut self, - glue_table: &Table, - ctx: &SessionState, database_name: &str, table_name: &String, - sd: &StorageDescriptor, storage_location_uri: &str, ) -> Result<()> { - let mut builder = DeltaTableBuilder::from_uri(&storage_location_uri); + let url = url::Url::parse(storage_location_uri).map_err(|e| GlueError::Other(format!("Failed to parse {storage_location_uri} as url")))?; + let object_store = self.object_store_registry.get_store(&url)?; - self. + deltalake::aws::register_handlers(None); + + let builder = DeltaTableBuilder::from_uri(storage_location_uri); + + /* + let cp = self.sdk_config.credentials_provider().unwrap(); + let creds = cp + .provide_credentials() + .await + .map_err(|e| GlueError::AWS(format!("Failed to get credentials: {e}")))?; + + let mut storage_options: HashMap = + HashMap::from_iter(std::env::vars().collect::>()); + storage_options.insert( + "aws_access_key_id".to_string(), + creds.access_key_id().to_string(), + ); + storage_options.insert( + "aws_secret_access_key".to_string(), + creds.secret_access_key().to_string(), + ); + if let Some(session_token) = creds.session_token() { + storage_options.insert("aws_session_token".to_string(), session_token.to_string()); + }*/ - if let Ok(object_store) = get_object_store(object_store_registry, &location) { - builder = builder.with_storage_backend(object_store, url); - } - builder - .with_storage_options(std::env::vars().collect()) + + let delta_table = builder + //.with_storage_options(storage_options) + .with_storage_backend(object_store, url) .load() .await .map(|t| Arc::new(t) as Arc) - .map_err(|e| GlueError::Deltalake(e)) + .map_err(GlueError::Deltalake)?; + + let schema_provider_for_database = self.ensure_schema_provider_for_database(database_name); + schema_provider_for_database.register_table(table_name.to_string(), delta_table)?; Ok(()) } + #[allow(clippy::too_many_arguments)] async fn register_listing_table( &mut self, glue_table: &Table, @@ -259,8 +274,7 @@ impl GlueCatalogProvider { sd: &StorageDescriptor, storage_location_uri: &str, ) -> Result<()> { - let listing_options = - Self::get_listing_options(database_name, table_name, &sd, glue_table)?; + let listing_options = Self::get_listing_options(database_name, table_name, sd, glue_table)?; let schema_provider_for_database = self.ensure_schema_provider_for_database(database_name); @@ -270,7 +284,7 @@ impl GlueCatalogProvider { let ltc_with_lo_and_schema = match table_registration_options { TableRegistrationOptions::DeriveSchemaFromGlueTable => { - let schema = Self::derive_schema(database_name, table_name, &sd)?; + let schema = Self::derive_schema(database_name, table_name, sd)?; ltc_with_lo.with_schema(SchemaRef::new(schema)) } TableRegistrationOptions::InferSchemaFromData => ltc_with_lo.infer_schema(ctx).await?, diff --git a/src/error.rs b/src/error.rs index 5d3cfed..c47fb08 100644 --- a/src/error.rs +++ b/src/error.rs @@ -20,6 +20,8 @@ pub enum GlueError { GlueDataTypeMapping(String), /// Error during loading of delta lake table Deltalake(deltalake::errors::DeltaTableError), + /// Other + Other(String), } impl Display for GlueError { @@ -32,6 +34,7 @@ impl Display for GlueError { write!(f, "Could not map glue data type: {}", desc) } GlueError::Deltalake(e) => e.fmt(f), + GlueError::Other(msg) => write!(f, "Other: {}", msg), } } } From 2a2d8f9a8420b3a134b1a4c537c3678807567859 Mon Sep 17 00:00:00 2001 From: Tim Van Wassenhove Date: Tue, 23 Apr 2024 15:09:33 +0200 Subject: [PATCH 3/5] style: clippy + fmt --- examples/demo.rs | 13 +++++--- src/catalog_provider/glue.rs | 57 ++++-------------------------------- 2 files changed, 15 insertions(+), 55 deletions(-) diff --git a/examples/demo.rs b/examples/demo.rs index 2e2f66b..3010cbf 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -19,16 +19,18 @@ use aws_config::BehaviorVersion; use aws_sdk_glue::config::{Credentials, ProvideCredentials}; use aws_types::SdkConfig; use dashmap::DashMap; +use datafusion::arrow::array::StringArray; use datafusion::common::{DataFusionError, Result}; use datafusion::datasource::object_store::ObjectStoreRegistry; use datafusion::execution::runtime_env::{RuntimeConfig, RuntimeEnv}; use datafusion::prelude::*; -use datafusion_catalogprovider_glue::catalog_provider::glue::{GlueCatalogProvider, TableRegistrationOptions}; +use datafusion_catalogprovider_glue::catalog_provider::glue::{ + GlueCatalogProvider, TableRegistrationOptions, +}; use object_store::aws::AmazonS3Builder; use object_store::ObjectStore; use std::fmt::Debug; use std::sync::Arc; -use datafusion::arrow::array::StringArray; use url::Url; #[tokio::main] @@ -48,7 +50,10 @@ async fn main() -> Result<()> { let mut glue_catalog_provider = GlueCatalogProvider::new(sdk_config, object_store_provider); let register_results = glue_catalog_provider - .register_all_with_options(&TableRegistrationOptions::DeriveSchemaFromGlueTable, &ctx.state()) + .register_all_with_options( + &TableRegistrationOptions::DeriveSchemaFromGlueTable, + &ctx.state(), + ) .await?; for result in register_results { @@ -179,7 +184,7 @@ impl ObjectStoreRegistry for DemoS3ObjectStoreProvider { } fn get_store(&self, url: &Url) -> Result> { - if let Some(refx)= self.object_stores.get(url) { + if let Some(refx) = self.object_stores.get(url) { let store = refx.value().clone(); Ok(store) } else { diff --git a/src/catalog_provider/glue.rs b/src/catalog_provider/glue.rs index 49fc203..344be6d 100644 --- a/src/catalog_provider/glue.rs +++ b/src/catalog_provider/glue.rs @@ -2,7 +2,6 @@ use crate::error::{GlueError, Result}; use crate::glue_data_type_parser::*; -use aws_sdk_glue::config::ProvideCredentials; use aws_sdk_glue::types::{Column, StorageDescriptor, Table}; use aws_sdk_glue::Client; use aws_types::SdkConfig; @@ -17,13 +16,13 @@ use datafusion::datasource::file_format::FileFormat; use datafusion::datasource::listing::{ ListingOptions, ListingTable, ListingTableConfig, ListingTableUrl, }; +use datafusion::datasource::object_store::ObjectStoreRegistry; use datafusion::datasource::TableProvider; use datafusion::execution::context::SessionState; use deltalake::DeltaTableBuilder; use std::any::Any; use std::collections::HashMap; use std::sync::Arc; -use datafusion::datasource::object_store::ObjectStoreRegistry; /// Options to register a table pub enum TableRegistrationOptions { @@ -41,7 +40,6 @@ pub struct GlueCatalogProvider { } impl GlueCatalogProvider { - /// Create a new Glue CatalogProvider pub fn new(sdk_config: SdkConfig, object_store_registry: Arc) -> Self { let client = Client::new(&sdk_config); @@ -190,7 +188,8 @@ impl GlueCatalogProvider { None => HashMap::new(), }; - let table_type = table_parameters.get("table_type") + let table_type = table_parameters + .get("table_type") .map(|x| x.to_lowercase()) .unwrap_or("".to_string()); if table_type == "delta" { @@ -218,39 +217,16 @@ impl GlueCatalogProvider { table_name: &String, storage_location_uri: &str, ) -> Result<()> { - - let url = url::Url::parse(storage_location_uri).map_err(|e| GlueError::Other(format!("Failed to parse {storage_location_uri} as url")))?; + let url = url::Url::parse(storage_location_uri).map_err(|_| { + GlueError::Other(format!("Failed to parse {storage_location_uri} as url")) + })?; let object_store = self.object_store_registry.get_store(&url)?; deltalake::aws::register_handlers(None); let builder = DeltaTableBuilder::from_uri(storage_location_uri); - /* - let cp = self.sdk_config.credentials_provider().unwrap(); - let creds = cp - .provide_credentials() - .await - .map_err(|e| GlueError::AWS(format!("Failed to get credentials: {e}")))?; - - let mut storage_options: HashMap = - HashMap::from_iter(std::env::vars().collect::>()); - storage_options.insert( - "aws_access_key_id".to_string(), - creds.access_key_id().to_string(), - ); - storage_options.insert( - "aws_secret_access_key".to_string(), - creds.secret_access_key().to_string(), - ); - if let Some(session_token) = creds.session_token() { - storage_options.insert("aws_session_token".to_string(), session_token.to_string()); - }*/ - - - let delta_table = builder - //.with_storage_options(storage_options) .with_storage_backend(object_store, url) .load() .await @@ -595,27 +571,6 @@ impl CatalogProvider for GlueCatalogProvider { } } -/* -async fn create_delta_table( - table: &Table, - object_store_registry: &Option>, -) -> Result> { - let location = table_location(table)?; - let url = url::Url::parse(&location)?; - let mut builder = DeltaTableBuilder::from_uri(&location); - - if let Ok(object_store) = get_object_store(object_store_registry, &location) { - builder = builder.with_storage_backend(object_store, url); - } - - builder - .with_storage_options(std::env::vars().collect()) - .load() - .await - .map(|t| Arc::new(t) as Arc) - .map_err(|e| GlueError::Deltalake(e)) -}*/ - #[cfg(test)] mod tests { use super::*; From 9776d81c01d97f4f6329db45056ee410ed593855 Mon Sep 17 00:00:00 2001 From: Tim Van Wassenhove Date: Thu, 2 May 2024 07:51:52 +0200 Subject: [PATCH 4/5] fix: update to latest delta-rs release --- Cargo.lock | 535 ++++++++++++++++++++++++++++------- Cargo.toml | 7 +- src/catalog_provider/glue.rs | 1 - 3 files changed, 427 insertions(+), 116 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6becaa5..df40fb3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,9 +130,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "arrow" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa285343fba4d829d49985bdc541e3789cf6000ed0e84be7c039438df4a4e78c" +checksum = "219d05930b81663fd3b32e3bde8ce5bff3c4d23052a99f11a8fa50a3b47b2658" dependencies = [ "arrow-arith", "arrow-array", @@ -151,9 +151,9 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "753abd0a5290c1bcade7c6623a556f7d1659c5f4148b140b5b63ce7bd1a45705" +checksum = "0272150200c07a86a390be651abdd320a2d12e84535f0837566ca87ecd8f95e0" dependencies = [ "arrow-array", "arrow-buffer", @@ -166,9 +166,9 @@ dependencies = [ [[package]] name = "arrow-array" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d390feeb7f21b78ec997a4081a025baef1e2e0d6069e181939b61864c9779609" +checksum = "8010572cf8c745e242d1b632bd97bd6d4f40fefed5ed1290a8f433abaa686fea" dependencies = [ "ahash", "arrow-buffer", @@ -183,9 +183,9 @@ dependencies = [ [[package]] name = "arrow-buffer" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69615b061701bcdffbc62756bc7e85c827d5290b472b580c972ebbbf690f5aa4" +checksum = "0d0a2432f0cba5692bf4cb757469c66791394bac9ec7ce63c1afe74744c37b27" dependencies = [ "bytes", "half", @@ -194,28 +194,30 @@ dependencies = [ [[package]] name = "arrow-cast" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e448e5dd2f4113bf5b74a1f26531708f5edcacc77335b7066f9398f4bcf4cdef" +checksum = "9abc10cd7995e83505cc290df9384d6e5412b207b79ce6bdff89a10505ed2cba" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", "arrow-select", - "base64", + "atoi", + "base64 0.22.1", "chrono", "comfy-table", "half", "lexical-core", "num", + "ryu", ] [[package]] name = "arrow-csv" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46af72211f0712612f5b18325530b9ad1bfbdc87290d5fbfd32a7da128983781" +checksum = "95cbcba196b862270bf2a5edb75927380a7f3a163622c61d40cbba416a6305f2" dependencies = [ "arrow-array", "arrow-buffer", @@ -232,9 +234,9 @@ dependencies = [ [[package]] name = "arrow-data" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67d644b91a162f3ad3135ce1184d0a31c28b816a581e08f29e8e9277a574c64e" +checksum = "2742ac1f6650696ab08c88f6dd3f0eb68ce10f8c253958a18c943a68cd04aec5" dependencies = [ "arrow-buffer", "arrow-schema", @@ -244,9 +246,9 @@ dependencies = [ [[package]] name = "arrow-ipc" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03dea5e79b48de6c2e04f03f62b0afea7105be7b77d134f6c5414868feefb80d" +checksum = "a42ea853130f7e78b9b9d178cb4cd01dee0f78e64d96c2949dc0a915d6d9e19d" dependencies = [ "arrow-array", "arrow-buffer", @@ -259,9 +261,9 @@ dependencies = [ [[package]] name = "arrow-json" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8950719280397a47d37ac01492e3506a8a724b3fb81001900b866637a829ee0f" +checksum = "eaafb5714d4e59feae964714d724f880511500e3569cc2a94d02456b403a2a49" dependencies = [ "arrow-array", "arrow-buffer", @@ -279,9 +281,9 @@ dependencies = [ [[package]] name = "arrow-ord" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed9630979034077982d8e74a942b7ac228f33dd93a93b615b4d02ad60c260be" +checksum = "e3e6b61e3dc468f503181dccc2fc705bdcc5f2f146755fa5b56d0a6c5943f412" dependencies = [ "arrow-array", "arrow-buffer", @@ -294,9 +296,9 @@ dependencies = [ [[package]] name = "arrow-row" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007035e17ae09c4e8993e4cb8b5b96edf0afb927cd38e2dff27189b274d83dcf" +checksum = "848ee52bb92eb459b811fb471175ea3afcf620157674c8794f539838920f9228" dependencies = [ "ahash", "arrow-array", @@ -309,18 +311,18 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ff3e9c01f7cd169379d269f926892d0e622a704960350d09d331be3ec9e0029" +checksum = "02d9483aaabe910c4781153ae1b6ae0393f72d9ef757d38d09d450070cf2e528" dependencies = [ "serde", ] [[package]] name = "arrow-select" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce20973c1912de6514348e064829e50947e35977bb9d7fb637dc99ea9ffd78c" +checksum = "849524fa70e0e3c5ab58394c770cb8f514d0122d20de08475f7b472ed8075830" dependencies = [ "ahash", "arrow-array", @@ -332,15 +334,16 @@ dependencies = [ [[package]] name = "arrow-string" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f3b37f2aeece31a2636d1b037dabb69ef590e03bdc7eb68519b51ec86932a7" +checksum = "9373cb5a021aee58863498c37eb484998ef13377f69989c6c5ccfbd258236cdb" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", "arrow-select", + "memchr", "num", "regex", "regex-syntax", @@ -375,6 +378,15 @@ dependencies = [ "syn 2.0.60", ] +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + [[package]] name = "autocfg" version = "1.2.0" @@ -403,7 +415,7 @@ dependencies = [ "fastrand", "hex", "http 0.2.12", - "hyper", + "hyper 0.14.28", "ring", "time", "tokio", @@ -644,16 +656,16 @@ dependencies = [ "aws-smithy-types", "bytes", "fastrand", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "http-body 1.0.0", - "hyper", - "hyper-rustls", + "hyper 0.14.28", + "hyper-rustls 0.24.2", "once_cell", "pin-project-lite", "pin-utils", - "rustls", + "rustls 0.21.11", "tokio", "tracing", ] @@ -760,6 +772,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64-simd" version = "0.8.0" @@ -1079,9 +1097,9 @@ dependencies = [ [[package]] name = "datafusion" -version = "36.0.0" +version = "37.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b360b692bf6c6d6e6b6dbaf41a3be0020daeceac0f406aed54c75331e50dbb" +checksum = "85069782056753459dc47e386219aa1fdac5b731f26c28abb8c0ffd4b7c5ab11" dependencies = [ "ahash", "apache-avro", @@ -1096,6 +1114,7 @@ dependencies = [ "chrono", "dashmap", "datafusion-common", + "datafusion-common-runtime", "datafusion-execution", "datafusion-expr", "datafusion-functions", @@ -1114,12 +1133,12 @@ dependencies = [ "log", "num-traits", "num_cpus", - "object_store", + "object_store 0.9.1", "parking_lot", "parquet", "pin-project-lite", "rand", - "sqlparser 0.43.1", + "sqlparser", "tempfile", "tokio", "tokio-util", @@ -1139,7 +1158,7 @@ dependencies = [ "dashmap", "datafusion", "deltalake", - "object_store", + "object_store 0.10.0", "pest", "pest_derive", "tokio", @@ -1148,9 +1167,9 @@ dependencies = [ [[package]] name = "datafusion-common" -version = "36.0.0" +version = "37.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37f343ccc298f440e25aa38ff82678291a7acc24061c7370ba6c0ff5cc811412" +checksum = "309d9040751f6dc9e33c85dce6abb55a46ef7ea3644577dd014611c379447ef3" dependencies = [ "ahash", "apache-avro", @@ -1160,18 +1179,28 @@ dependencies = [ "arrow-schema", "chrono", "half", + "instant", "libc", "num_cpus", - "object_store", + "object_store 0.9.1", "parquet", - "sqlparser 0.43.1", + "sqlparser", +] + +[[package]] +name = "datafusion-common-runtime" +version = "37.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e4a44d8ef1b1e85d32234e6012364c411c3787859bb3bba893b0332cb03dfd" +dependencies = [ + "tokio", ] [[package]] name = "datafusion-execution" -version = "36.0.0" +version = "37.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9c93043081487e335399a21ebf8295626367a647ac5cb87d41d18afad7d0f7" +checksum = "06a3a29ae36bcde07d179cc33b45656a8e7e4d023623e320e48dcf1200eeee95" dependencies = [ "arrow", "chrono", @@ -1181,7 +1210,7 @@ dependencies = [ "futures", "hashbrown 0.14.3", "log", - "object_store", + "object_store 0.9.1", "parking_lot", "rand", "tempfile", @@ -1190,54 +1219,71 @@ dependencies = [ [[package]] name = "datafusion-expr" -version = "36.0.0" +version = "37.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e204d89909e678846b6a95f156aafc1ee5b36cb6c9e37ec2e1449b078a38c818" +checksum = "2a3542aa322029c2121a671ce08000d4b274171070df13f697b14169ccf4f628" dependencies = [ "ahash", "arrow", "arrow-array", + "chrono", "datafusion-common", "paste", - "sqlparser 0.43.1", + "sqlparser", "strum 0.26.2", "strum_macros 0.26.2", ] [[package]] name = "datafusion-functions" -version = "36.0.0" +version = "37.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98f1c73f7801b2b8ba2297b3ad78ffcf6c1fc6b8171f502987eb9ad5cb244ee7" +checksum = "dd221792c666eac174ecc09e606312844772acc12cbec61a420c2fca1ee70959" dependencies = [ "arrow", - "base64", + "base64 0.22.1", + "blake2", + "blake3", + "chrono", "datafusion-common", "datafusion-execution", "datafusion-expr", + "datafusion-physical-expr", "hex", + "itertools", "log", + "md-5", + "regex", + "sha2", + "unicode-segmentation", + "uuid", ] [[package]] name = "datafusion-functions-array" -version = "36.0.0" +version = "37.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d16a0ddf2c991526f6ffe2f47a72c6da0b7354d6c32411dd20631fe2e38937" +checksum = "e501801e84d9c6ef54caaebcda1b18a6196a24176c12fb70e969bc0572e03c55" dependencies = [ "arrow", + "arrow-array", + "arrow-buffer", + "arrow-ord", + "arrow-schema", "datafusion-common", "datafusion-execution", "datafusion-expr", + "datafusion-functions", + "itertools", "log", "paste", ] [[package]] name = "datafusion-optimizer" -version = "36.0.0" +version = "37.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ae27e07bf1f04d327be5c2a293470879801ab5535204dc3b16b062fda195496" +checksum = "76bd7f5087817deb961764e8c973d243b54f8572db414a8f0a8f33a48f991e0a" dependencies = [ "arrow", "async-trait", @@ -1253,9 +1299,9 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" -version = "36.0.0" +version = "37.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dde620cd9ef76a3bca9c754fb68854bd2349c49f55baf97e08001f9e967f6d6b" +checksum = "5cabc0d9aaa0f5eb1b472112f16223c9ffd2fb04e58cbf65c0a331ee6e993f96" dependencies = [ "ahash", "arrow", @@ -1264,7 +1310,7 @@ dependencies = [ "arrow-ord", "arrow-schema", "arrow-string", - "base64", + "base64 0.22.1", "blake2", "blake3", "chrono", @@ -1284,14 +1330,13 @@ dependencies = [ "regex", "sha2", "unicode-segmentation", - "uuid", ] [[package]] name = "datafusion-physical-plan" -version = "36.0.0" +version = "37.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a4c75fba9ea99d64b2246cbd2fcae2e6fc973e6616b1015237a616036506dd4" +checksum = "17c0523e9c8880f2492a88bbd857dde02bed1ed23f3e9211a89d3d7ec3b44af9" dependencies = [ "ahash", "arrow", @@ -1301,6 +1346,7 @@ dependencies = [ "async-trait", "chrono", "datafusion-common", + "datafusion-common-runtime", "datafusion-execution", "datafusion-expr", "datafusion-physical-expr", @@ -1315,41 +1361,44 @@ dependencies = [ "pin-project-lite", "rand", "tokio", - "uuid", ] [[package]] name = "datafusion-proto" -version = "36.0.0" +version = "37.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2292251d5441d88d92a90d1511d5a8c88759a6562ff38ac1711b1587e6bf19c4" +checksum = "db73393e42f35e165d31399192fbf41691967d428ebed47875ad34239fbcfc16" dependencies = [ "arrow", "chrono", "datafusion", "datafusion-common", "datafusion-expr", - "object_store", + "object_store 0.9.1", "prost", ] [[package]] name = "datafusion-sql" -version = "36.0.0" +version = "37.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21474a95c3a62d113599d21b439fa15091b538bac06bd20be0bb2e7d22903c09" +checksum = "49eb54b42227136f6287573f2434b1de249fe1b8e6cd6cc73a634e4a3ec29356" dependencies = [ "arrow", + "arrow-array", "arrow-schema", "datafusion-common", "datafusion-expr", "log", - "sqlparser 0.43.1", + "sqlparser", + "strum 0.26.2", ] [[package]] name = "deltalake" -version = "0.17.1" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7e6d7dc62f957c02d899cd6a88be74c70594f7782b24c97392267b49ed5c9a5" dependencies = [ "deltalake-aws", "deltalake-core", @@ -1357,7 +1406,9 @@ dependencies = [ [[package]] name = "deltalake-aws" -version = "0.1.0" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c15dda219ed925c28e2387712f9a77ed7253a80b53fce59849067bc0918eb2" dependencies = [ "async-trait", "aws-config", @@ -1371,7 +1422,7 @@ dependencies = [ "futures", "lazy_static", "maplit", - "object_store", + "object_store 0.9.1", "regex", "thiserror", "tokio", @@ -1382,7 +1433,9 @@ dependencies = [ [[package]] name = "deltalake-core" -version = "0.17.1" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e8dc1bcd91be689ee7f6ce363798dc2e9b6954be9d597f884de11ba27b33add" dependencies = [ "arrow", "arrow-arith", @@ -1404,6 +1457,7 @@ dependencies = [ "datafusion-common", "datafusion-expr", "datafusion-functions", + "datafusion-functions-array", "datafusion-physical-expr", "datafusion-proto", "datafusion-sql", @@ -1420,7 +1474,7 @@ dependencies = [ "num-bigint", "num-traits", "num_cpus", - "object_store", + "object_store 0.9.1", "once_cell", "parking_lot", "parquet", @@ -1431,7 +1485,7 @@ dependencies = [ "roaring", "serde", "serde_json", - "sqlparser 0.44.0", + "sqlparser", "thiserror", "tokio", "tracing", @@ -1705,6 +1759,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "h2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 1.1.0", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "half" version = "2.4.1" @@ -1846,7 +1919,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -1860,6 +1933,26 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.4", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -1868,12 +1961,49 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper", + "hyper 0.14.28", "log", - "rustls", - "rustls-native-certs", + "rustls 0.21.11", + "rustls-native-certs 0.6.3", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.3.1", + "hyper-util", + "rustls 0.22.4", + "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.25.0", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.3.1", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -1926,6 +2056,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] @@ -2277,19 +2410,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8718f8b65fdf67a45108d1548347d4af7d71fb81ce727bbf9e3b2535e079db3" dependencies = [ "async-trait", - "base64", + "base64 0.21.7", + "bytes", + "chrono", + "futures", + "humantime", + "hyper 0.14.28", + "itertools", + "md-5", + "parking_lot", + "percent-encoding", + "quick-xml", + "rand", + "reqwest 0.11.27", + "ring", + "serde", + "serde_json", + "snafu", + "tokio", + "tracing", + "url", + "walkdir", +] + +[[package]] +name = "object_store" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cda97d37376c28c508b0abc56b855c5e700324e9b753226681e658c833675c5" +dependencies = [ + "async-trait", + "base64 0.22.1", "bytes", "chrono", "futures", "humantime", - "hyper", + "hyper 1.3.1", "itertools", "md-5", "parking_lot", "percent-encoding", "quick-xml", "rand", - "reqwest", + "reqwest 0.12.4", "ring", "serde", "serde_json", @@ -2352,9 +2515,9 @@ dependencies = [ [[package]] name = "parquet" -version = "50.0.0" +version = "51.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "547b92ebf0c1177e3892f44c8f79757ee62e678d564a9834189725f2c5b7a750" +checksum = "096795d4f47f65fd3ee1ec5a98b77ab26d602f2cc785b0e4be5443add17ecc32" dependencies = [ "ahash", "arrow-array", @@ -2364,7 +2527,7 @@ dependencies = [ "arrow-ipc", "arrow-schema", "arrow-select", - "base64", + "base64 0.22.1", "brotli", "bytes", "chrono", @@ -2375,7 +2538,7 @@ dependencies = [ "lz4_flex", "num", "num-bigint", - "object_store", + "object_store 0.9.1", "paste", "seq-macro", "snap", @@ -2499,6 +2662,26 @@ dependencies = [ "siphasher", ] +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "pin-project-lite" version = "0.2.14" @@ -2666,16 +2849,16 @@ version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper", - "hyper-rustls", + "hyper 0.14.28", + "hyper-rustls 0.24.2", "ipnet", "js-sys", "log", @@ -2683,16 +2866,16 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", - "rustls-native-certs", - "rustls-pemfile", + "rustls 0.21.11", + "rustls-native-certs 0.6.3", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "system-configuration", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "tower-service", "url", @@ -2700,7 +2883,51 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg", + "winreg 0.50.0", +] + +[[package]] +name = "reqwest" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "h2 0.4.4", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-rustls 0.26.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.22.4", + "rustls-native-certs 0.7.0", + "rustls-pemfile 2.1.2", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls 0.25.0", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "winreg 0.52.0", ] [[package]] @@ -2770,10 +2997,24 @@ checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.3", + "subtle", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -2781,7 +3022,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.4", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.1.2", + "rustls-pki-types", "schannel", "security-framework", ] @@ -2792,9 +3046,25 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64", + "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -2805,6 +3075,17 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustls-webpki" +version = "0.102.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.15" @@ -3014,16 +3295,6 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -[[package]] -name = "sqlparser" -version = "0.43.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f95c4bae5aba7cd30bd506f7140026ade63cff5afd778af8854026f9606bf5d4" -dependencies = [ - "log", - "sqlparser_derive", -] - [[package]] name = "sqlparser" version = "0.44.0" @@ -3031,6 +3302,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aaf9c7ff146298ffda83a200f8d5084f08dcee1edfc135fcc1d646a45d50ffd6" dependencies = [ "log", + "sqlparser_derive", ] [[package]] @@ -3279,7 +3551,18 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.11", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", "tokio", ] @@ -3297,6 +3580,28 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -3764,6 +4069,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "xmlparser" version = "0.13.6" diff --git a/Cargo.toml b/Cargo.toml index 2794c18..9aecc63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,8 +20,8 @@ path = "src/lib.rs" aws-config = "1" aws-sdk-glue = "1" aws-types = "1" -datafusion = { version = "36", features = ["avro"] } -object_store = { version = "0.9", features = ["aws"] } +datafusion = { version = "37", features = ["avro"] } +object_store = { version = "0.10", features = ["aws"] } pest = "2" pest_derive = "2" tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread", "sync", "fs"] } @@ -33,6 +33,3 @@ deltalake = {version = "0.17", optional=true, features=["datafusion", "deltalake default = ["deltalake"] deltalake = ["dep:deltalake"] -[patch.crates-io] -deltalake = {path = "../delta-rs/crates/deltalake"} - diff --git a/src/catalog_provider/glue.rs b/src/catalog_provider/glue.rs index 344be6d..df235df 100644 --- a/src/catalog_provider/glue.rs +++ b/src/catalog_provider/glue.rs @@ -448,7 +448,6 @@ impl GlueCatalogProvider { collect_stat: true, target_partitions: 1, file_sort_order: vec![], - file_type_write_options: None, }; Ok(listing_options) From b39540942c6a32ffb874adecfad94594108a008c Mon Sep 17 00:00:00 2001 From: Tim Van Wassenhove Date: Thu, 2 May 2024 08:00:12 +0200 Subject: [PATCH 5/5] fix: revert to object_store 0.9 as delta-rs is still on that --- Cargo.lock | 329 +++++------------------------------------------------ Cargo.toml | 2 +- 2 files changed, 32 insertions(+), 299 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index df40fb3..9d0c002 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -415,7 +415,7 @@ dependencies = [ "fastrand", "hex", "http 0.2.12", - "hyper 0.14.28", + "hyper", "ring", "time", "tokio", @@ -656,16 +656,16 @@ dependencies = [ "aws-smithy-types", "bytes", "fastrand", - "h2 0.3.26", + "h2", "http 0.2.12", "http-body 0.4.6", "http-body 1.0.0", - "hyper 0.14.28", - "hyper-rustls 0.24.2", + "hyper", + "hyper-rustls", "once_cell", "pin-project-lite", "pin-utils", - "rustls 0.21.11", + "rustls", "tokio", "tracing", ] @@ -1133,7 +1133,7 @@ dependencies = [ "log", "num-traits", "num_cpus", - "object_store 0.9.1", + "object_store", "parking_lot", "parquet", "pin-project-lite", @@ -1158,7 +1158,7 @@ dependencies = [ "dashmap", "datafusion", "deltalake", - "object_store 0.10.0", + "object_store", "pest", "pest_derive", "tokio", @@ -1182,7 +1182,7 @@ dependencies = [ "instant", "libc", "num_cpus", - "object_store 0.9.1", + "object_store", "parquet", "sqlparser", ] @@ -1210,7 +1210,7 @@ dependencies = [ "futures", "hashbrown 0.14.3", "log", - "object_store 0.9.1", + "object_store", "parking_lot", "rand", "tempfile", @@ -1374,7 +1374,7 @@ dependencies = [ "datafusion", "datafusion-common", "datafusion-expr", - "object_store 0.9.1", + "object_store", "prost", ] @@ -1422,7 +1422,7 @@ dependencies = [ "futures", "lazy_static", "maplit", - "object_store 0.9.1", + "object_store", "regex", "thiserror", "tokio", @@ -1474,7 +1474,7 @@ dependencies = [ "num-bigint", "num-traits", "num_cpus", - "object_store 0.9.1", + "object_store", "once_cell", "parking_lot", "parquet", @@ -1759,25 +1759,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "h2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 1.1.0", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "half" version = "2.4.1" @@ -1919,7 +1900,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.26", + "h2", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -1933,26 +1914,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2 0.4.4", - "http 1.1.0", - "http-body 1.0.0", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - [[package]] name = "hyper-rustls" version = "0.24.2" @@ -1961,49 +1922,12 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.28", + "hyper", "log", - "rustls 0.21.11", - "rustls-native-certs 0.6.3", - "tokio", - "tokio-rustls 0.24.1", -] - -[[package]] -name = "hyper-rustls" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" -dependencies = [ - "futures-util", - "http 1.1.0", - "hyper 1.3.1", - "hyper-util", - "rustls 0.22.4", - "rustls-pki-types", - "tokio", - "tokio-rustls 0.25.0", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "hyper 1.3.1", - "pin-project-lite", - "socket2", + "rustls", + "rustls-native-certs", "tokio", - "tower", - "tower-service", - "tracing", + "tokio-rustls", ] [[package]] @@ -2415,44 +2339,14 @@ dependencies = [ "chrono", "futures", "humantime", - "hyper 0.14.28", + "hyper", "itertools", "md-5", "parking_lot", "percent-encoding", "quick-xml", "rand", - "reqwest 0.11.27", - "ring", - "serde", - "serde_json", - "snafu", - "tokio", - "tracing", - "url", - "walkdir", -] - -[[package]] -name = "object_store" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cda97d37376c28c508b0abc56b855c5e700324e9b753226681e658c833675c5" -dependencies = [ - "async-trait", - "base64 0.22.1", - "bytes", - "chrono", - "futures", - "humantime", - "hyper 1.3.1", - "itertools", - "md-5", - "parking_lot", - "percent-encoding", - "quick-xml", - "rand", - "reqwest 0.12.4", + "reqwest", "ring", "serde", "serde_json", @@ -2538,7 +2432,7 @@ dependencies = [ "lz4_flex", "num", "num-bigint", - "object_store 0.9.1", + "object_store", "paste", "seq-macro", "snap", @@ -2662,26 +2556,6 @@ dependencies = [ "siphasher", ] -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] - [[package]] name = "pin-project-lite" version = "0.2.14" @@ -2854,11 +2728,11 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.26", + "h2", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", - "hyper-rustls 0.24.2", + "hyper", + "hyper-rustls", "ipnet", "js-sys", "log", @@ -2866,60 +2740,16 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.11", - "rustls-native-certs 0.6.3", - "rustls-pemfile 1.0.4", + "rustls", + "rustls-native-certs", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "system-configuration", "tokio", - "tokio-rustls 0.24.1", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "winreg 0.50.0", -] - -[[package]] -name = "reqwest" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" -dependencies = [ - "base64 0.22.1", - "bytes", - "futures-core", - "futures-util", - "h2 0.4.4", - "http 1.1.0", - "http-body 1.0.0", - "http-body-util", - "hyper 1.3.1", - "hyper-rustls 0.26.0", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.22.4", - "rustls-native-certs 0.7.0", - "rustls-pemfile 2.1.2", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls", "tokio-util", "tower-service", "url", @@ -2927,7 +2757,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg 0.52.0", + "winreg", ] [[package]] @@ -2997,24 +2827,10 @@ checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" dependencies = [ "log", "ring", - "rustls-webpki 0.101.7", + "rustls-webpki", "sct", ] -[[package]] -name = "rustls" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" -dependencies = [ - "log", - "ring", - "rustls-pki-types", - "rustls-webpki 0.102.3", - "subtle", - "zeroize", -] - [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -3022,20 +2838,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.4", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-native-certs" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" -dependencies = [ - "openssl-probe", - "rustls-pemfile 2.1.2", - "rustls-pki-types", + "rustls-pemfile", "schannel", "security-framework", ] @@ -3049,22 +2852,6 @@ dependencies = [ "base64 0.21.7", ] -[[package]] -name = "rustls-pemfile" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" -dependencies = [ - "base64 0.22.1", - "rustls-pki-types", -] - -[[package]] -name = "rustls-pki-types" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" - [[package]] name = "rustls-webpki" version = "0.101.7" @@ -3075,17 +2862,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "rustls-webpki" -version = "0.102.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - [[package]] name = "rustversion" version = "1.0.15" @@ -3551,18 +3327,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.11", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" -dependencies = [ - "rustls 0.22.4", - "rustls-pki-types", + "rustls", "tokio", ] @@ -3580,28 +3345,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - [[package]] name = "tower-service" version = "0.3.2" @@ -4069,16 +3812,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "xmlparser" version = "0.13.6" diff --git a/Cargo.toml b/Cargo.toml index 9aecc63..964aa1c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ aws-config = "1" aws-sdk-glue = "1" aws-types = "1" datafusion = { version = "37", features = ["avro"] } -object_store = { version = "0.10", features = ["aws"] } +object_store = { version = "0.9", features = ["aws"] } pest = "2" pest_derive = "2" tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread", "sync", "fs"] }