diff --git a/.gitignore b/.gitignore index 7aa3941b0..d65d96ddb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ **/target/ massif.* .idea/ +.zed/ .fleet/ +**/proptest-regressions/ # these are generated by flamegraph *.svg # this is for raphtory diff --git a/Cargo.lock b/Cargo.lock index 70473a724..a4ae268ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,7 +70,7 @@ checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "const-random", - "getrandom", + "getrandom 0.2.15", "once_cell", "serde", "version_check", @@ -186,9 +186,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "arbitrary" @@ -231,9 +231,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "arrow" -version = "53.3.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91839b07e474b3995035fd8ac33ee54f9c9ccbbb1ea33d9909c71bffdf1259d" +checksum = "4caf25cdc4a985f91df42ed9e9308e1adbcd341a31a72605c697033fcef163e3" dependencies = [ "arrow-arith", "arrow-array", @@ -252,9 +252,9 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "53.3.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "855c57c4efd26722b044dcd3e348252560e3e0333087fb9f6479dc0bf744054f" +checksum = "91f2dfd1a7ec0aca967dfaa616096aec49779adc8eccec005e2f5e4111b1192a" dependencies = [ "arrow-array", "arrow-buffer", @@ -267,26 +267,24 @@ dependencies = [ [[package]] name = "arrow-array" -version = "53.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd03279cea46569acf9295f6224fbc370c5df184b4d2ecfe97ccb131d5615a7f" +version = "53.2.0" +source = "git+https://github.com/apache/arrow-rs.git?tag=53.2.0#10c4059b40f838bb8f7bac5259cb499e6eceec88" dependencies = [ "ahash", "arrow-buffer", "arrow-data", "arrow-schema", "chrono", - "chrono-tz 0.10.0", + "chrono-tz 0.10.1", "half", - "hashbrown 0.15.2", + "hashbrown 0.14.5", "num", ] [[package]] name = "arrow-buffer" -version = "53.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e4a9b9b1d6d7117f6138e13bc4dd5daa7f94e671b70e8c9c4dc37b4f5ecfc16" +version = "53.2.0" +source = "git+https://github.com/apache/arrow-rs.git?tag=53.2.0#10c4059b40f838bb8f7bac5259cb499e6eceec88" dependencies = [ "bytes", "half", @@ -295,9 +293,9 @@ dependencies = [ [[package]] name = "arrow-cast" -version = "53.3.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc70e39916e60c5b7af7a8e2719e3ae589326039e1e863675a008bee5ffe90fd" +checksum = "d09aea56ec9fa267f3f3f6cdab67d8a9974cbba90b3aa38c8fe9d0bb071bd8c1" dependencies = [ "arrow-array", "arrow-buffer", @@ -316,9 +314,9 @@ dependencies = [ [[package]] name = "arrow-csv" -version = "53.3.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "789b2af43c1049b03a8d088ff6b2257cdcea1756cd76b174b1f2600356771b97" +checksum = "c07b5232be87d115fde73e32f2ca7f1b353bff1b44ac422d3c6fc6ae38f11f0d" dependencies = [ "arrow-array", "arrow-buffer", @@ -335,9 +333,8 @@ dependencies = [ [[package]] name = "arrow-data" -version = "53.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e75edf21ffd53744a9b8e3ed11101f610e7ceb1a29860432824f1834a1f623" +version = "53.2.0" +source = "git+https://github.com/apache/arrow-rs.git?tag=53.2.0#10c4059b40f838bb8f7bac5259cb499e6eceec88" dependencies = [ "arrow-buffer", "arrow-schema", @@ -347,9 +344,9 @@ dependencies = [ [[package]] name = "arrow-ipc" -version = "53.3.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d186a909dece9160bf8312f5124d797884f608ef5435a36d9d608e0b2a9bcbf8" +checksum = "0ed91bdeaff5a1c00d28d8f73466bcb64d32bbd7093b5a30156b4b9f4dba3eee" dependencies = [ "arrow-array", "arrow-buffer", @@ -362,9 +359,9 @@ dependencies = [ [[package]] name = "arrow-json" -version = "53.3.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66ff2fedc1222942d0bd2fd391cb14a85baa3857be95c9373179bd616753b85" +checksum = "0471f51260a5309307e5d409c9dc70aede1cd9cf1d4ff0f0a1e8e1a2dd0e0d3c" dependencies = [ "arrow-array", "arrow-buffer", @@ -373,7 +370,7 @@ dependencies = [ "arrow-schema", "chrono", "half", - "indexmap 2.7.0", + "indexmap 2.7.1", "lexical-core", "num", "serde", @@ -382,9 +379,9 @@ dependencies = [ [[package]] name = "arrow-ord" -version = "53.3.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece7b5bc1180e6d82d1a60e1688c199829e8842e38497563c3ab6ea813e527fd" +checksum = "2883d7035e0b600fb4c30ce1e50e66e53d8656aa729f2bfa4b51d359cf3ded52" dependencies = [ "arrow-array", "arrow-buffer", @@ -397,9 +394,9 @@ dependencies = [ [[package]] name = "arrow-row" -version = "53.3.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745c114c8f0e8ce211c83389270de6fbe96a9088a7b32c2a041258a443fe83ff" +checksum = "552907e8e587a6fde4f8843fd7a27a576a260f65dab6c065741ea79f633fc5be" dependencies = [ "ahash", "arrow-array", @@ -411,18 +408,17 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "53.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b95513080e728e4cec37f1ff5af4f12c9688d47795d17cda80b6ec2cf74d4678" +version = "53.2.0" +source = "git+https://github.com/apache/arrow-rs.git?tag=53.2.0#10c4059b40f838bb8f7bac5259cb499e6eceec88" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] name = "arrow-select" -version = "53.3.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e415279094ea70323c032c6e739c48ad8d80e78a09bef7117b8718ad5bf3722" +checksum = "6259e566b752da6dceab91766ed8b2e67bf6270eb9ad8a6e07a33c1bede2b125" dependencies = [ "ahash", "arrow-array", @@ -434,9 +430,9 @@ dependencies = [ [[package]] name = "arrow-string" -version = "53.3.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d956cae7002eb8d83a27dbd34daaea1cf5b75852f0b84deb4d93a276e92bbf" +checksum = "f3179ccbd18ebf04277a095ba7321b93fd1f774f18816bd5f6b3ce2f594edb6c" dependencies = [ "arrow-array", "arrow-buffer", @@ -484,9 +480,9 @@ dependencies = [ [[package]] name = "async-graphql" -version = "7.0.14" +version = "7.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a9916334e00a14428e03b9b1c73a0baf1c834ebe0ff1be146e1247390b31f1" +checksum = "bfff2b17d272a5e3e201feda444e2c24b011fa722951268d1bd8b9b5bc6dc449" dependencies = [ "async-graphql-derive", "async-graphql-parser", @@ -502,7 +498,7 @@ dependencies = [ "futures-util", "handlebars", "http 1.2.0", - "indexmap 2.7.0", + "indexmap 2.7.1", "mime", "multer", "num-traits", @@ -518,9 +514,9 @@ dependencies = [ [[package]] name = "async-graphql-derive" -version = "7.0.14" +version = "7.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6f3ad293f7b9974aef6297673ac3e9097824f84264a9548cbb87006c94044" +checksum = "d8e5d0c6697def2f79ccbd972fb106b633173a6066e430b480e1ff9376a7561a" dependencies = [ "Inflector", "async-graphql-parser", @@ -529,15 +525,15 @@ dependencies = [ "proc-macro2", "quote", "strum", - "syn 2.0.90", + "syn 2.0.98", "thiserror 1.0.69", ] [[package]] name = "async-graphql-parser" -version = "7.0.14" +version = "7.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca5697e57fcad289d26948e2ab2f11b9cfe7d645503a1f37fa86640c061c772" +checksum = "8531ee6d292c26df31c18c565ff22371e7bdfffe7f5e62b69537db0b8fd554dc" dependencies = [ "async-graphql-value", "pest", @@ -547,9 +543,9 @@ dependencies = [ [[package]] name = "async-graphql-poem" -version = "7.0.14" +version = "7.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6587867c160695e16e92cc6f97d853f9d707a3589773eb051dc6dd37e99bd93" +checksum = "3c4bed863fe7a23c2c3a3dab083da50e819d4b6786b5ab3eb5cbfda2b7faf688" dependencies = [ "async-graphql", "futures-util", @@ -564,12 +560,12 @@ dependencies = [ [[package]] name = "async-graphql-value" -version = "7.0.14" +version = "7.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6266ea7ab3ce41585e16caa0e1e8d97de37827227950820fdab6b69d9c09a63a" +checksum = "741110dda927420a28fbc1c310543d3416f789a6ba96859c2c265843a0a96887" dependencies = [ "bytes", - "indexmap 2.7.0", + "indexmap 2.7.1", "serde", "serde_json", ] @@ -588,7 +584,7 @@ dependencies = [ "eventsource-stream", "futures", "rand", - "reqwest 0.12.9", + "reqwest 0.12.12", "reqwest-eventsource", "secrecy", "serde", @@ -619,18 +615,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -714,7 +710,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ "futures-core", - "getrandom", + "getrandom 0.2.15", "instant", "pin-project-lite", "rand", @@ -763,6 +759,20 @@ dependencies = [ "byteorder", ] +[[package]] +name = "bigdecimal" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f31f3af01c5c65a07985c804d3366560e6fa7883d640a122819b14ec327482c" +dependencies = [ + "autocfg", + "libm", + "num-bigint", + "num-integer", + "num-traits", + "serde", +] + [[package]] name = "bincode" version = "1.3.3" @@ -795,9 +805,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" dependencies = [ "serde", ] @@ -844,9 +854,9 @@ dependencies = [ [[package]] name = "brotli" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19483b140a7ac7174d34b5a581b406c64f84da5409d3e09cf4fff604f9270e67" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -876,28 +886,28 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "bytemuck" -version = "1.20.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -908,9 +918,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" dependencies = [ "serde", ] @@ -927,9 +937,9 @@ dependencies = [ [[package]] name = "bzip2-sys" -version = "0.1.11+1.0.8" +version = "0.1.12+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "72ebc2f1a417f01e1da30ef264ee86ae31d2dcd2d603ea283d3c244a883ca2a9" dependencies = [ "cc", "libc", @@ -944,9 +954,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.4" +version = "1.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" +checksum = "c7777341816418c02e033934a09f20dc0ccaf65a5201ef8a450ae0105a573fda" dependencies = [ "jobserver", "libc", @@ -999,9 +1009,9 @@ dependencies = [ [[package]] name = "chrono-tz" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6dd8046d00723a59a2f8c5f295c515b9bb9a331ee4f8f3d4dd49e428acd3b6" +checksum = "9c6ac4f2c0bf0f44e9161aec9675e1050aa4a530663c4a9e37e108fa948bca9f" dependencies = [ "chrono", "chrono-tz-build 0.4.0", @@ -1068,9 +1078,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.27" +version = "4.5.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" +checksum = "8acebd8ad879283633b343856142139f2da2317c96b05b4dd6181c61e2480184" dependencies = [ "clap_builder", "clap_derive", @@ -1078,9 +1088,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.27" +version = "4.5.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" +checksum = "f6ba32cbda51c7e1dfd49acc1457ba1a7dec5b64fe360e828acb13ca8dc9c2f9" dependencies = [ "anstream", "anstyle", @@ -1090,14 +1100,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.24" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" +checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -1114,13 +1124,12 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "comfy-table" -version = "7.1.3" +version = "7.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f165e7b643266ea80cb858aed492ad9280e3e05ce24d4a99d7d7b889b6a4d9" +checksum = "4a65ebfec4fb190b6f90e944a817d60499ee0744e582530e2c9900a22e591d9a" dependencies = [ "crossterm", - "strum", - "strum_macros", + "unicode-segmentation", "unicode-width", ] @@ -1158,7 +1167,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom", + "getrandom 0.2.15", "once_cell", "tiny-keccak", ] @@ -1224,9 +1233,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -1331,7 +1340,7 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "crossterm_winapi", "parking_lot", "rustix", @@ -1349,9 +1358,9 @@ dependencies = [ [[package]] name = "crunchy" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" [[package]] name = "crypto-common" @@ -1415,7 +1424,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -1426,7 +1435,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -1447,9 +1456,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e60eed09d8c01d3cee5b7d30acb059b76614c918fa0f992e0dd6eeb10daad6f" +checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" [[package]] name = "datafusion" @@ -1488,7 +1497,7 @@ dependencies = [ "glob", "half", "hashbrown 0.14.5", - "indexmap 2.7.0", + "indexmap 2.7.1", "itertools 0.13.0", "log", "num_cpus", @@ -1537,7 +1546,7 @@ dependencies = [ "chrono", "half", "hashbrown 0.14.5", - "indexmap 2.7.0", + "indexmap 2.7.1", "instant", "libc", "num_cpus", @@ -1595,7 +1604,7 @@ dependencies = [ "datafusion-functions-aggregate-common", "datafusion-functions-window-common", "datafusion-physical-expr-common", - "indexmap 2.7.0", + "indexmap 2.7.1", "paste", "serde_json", "sqlparser", @@ -1658,7 +1667,7 @@ dependencies = [ "datafusion-physical-expr", "datafusion-physical-expr-common", "half", - "indexmap 2.7.0", + "indexmap 2.7.1", "log", "paste", ] @@ -1738,7 +1747,7 @@ dependencies = [ "datafusion-expr", "datafusion-physical-expr", "hashbrown 0.14.5", - "indexmap 2.7.0", + "indexmap 2.7.1", "itertools 0.13.0", "log", "paste", @@ -1766,11 +1775,11 @@ dependencies = [ "datafusion-physical-expr-common", "half", "hashbrown 0.14.5", - "indexmap 2.7.0", + "indexmap 2.7.1", "itertools 0.13.0", "log", "paste", - "petgraph", + "petgraph 0.6.5", ] [[package]] @@ -1828,7 +1837,7 @@ dependencies = [ "futures", "half", "hashbrown 0.14.5", - "indexmap 2.7.0", + "indexmap 2.7.1", "itertools 0.13.0", "log", "once_cell", @@ -1849,7 +1858,7 @@ dependencies = [ "arrow-schema", "datafusion-common", "datafusion-expr", - "indexmap 2.7.0", + "indexmap 2.7.1", "log", "regex", "sqlparser", @@ -1910,7 +1919,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -1931,7 +1940,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -1941,7 +1950,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -1975,7 +1984,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -2001,9 +2010,9 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dyn-clone" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +checksum = "feeef44e73baff3a26d371801df019877a9866a8c493d315ab00177843314f35" [[package]] name = "dynamic-graphql" @@ -2027,7 +2036,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", "thiserror 1.0.69", ] @@ -2055,7 +2064,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -2140,11 +2149,17 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "flatbuffers" -version = "24.3.25" +version = "24.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8add37afff2d4ffa83bc748a70b4b1370984f6980768554182424ef71447c35f" +checksum = "4f1baf0dbf96932ec9a3038d57900329c015b0bfb7b63d904f3bc27e2b02a096" dependencies = [ "bitflags 1.3.2", "rustc_version", @@ -2168,15 +2183,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" - -[[package]] -name = "foreign_vec" -version = "0.1.0" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee1b05cbd864bcaecbd3455d6d967862d446e4ebfc3c2e5e5b9841e53cba6673" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" [[package]] name = "form_urlencoded" @@ -2253,7 +2262,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -2324,10 +2333,22 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", +] + [[package]] name = "ghash" version = "0.5.1" @@ -2368,7 +2389,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.7.0", + "indexmap 2.7.1", "slab", "tokio", "tokio-util", @@ -2387,7 +2408,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.2.0", - "indexmap 2.7.0", + "indexmap 2.7.1", "slab", "tokio", "tokio-util", @@ -2602,9 +2623,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.5" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] name = "httpdate" @@ -2644,9 +2665,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", @@ -2679,21 +2700,21 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.3" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http 1.2.0", - "hyper 1.5.1", + "hyper 1.6.0", "hyper-util", - "rustls 0.23.20", + "rustls 0.23.23", "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", "tokio-rustls 0.26.1", "tower-service", - "webpki-roots 0.26.7", + "webpki-roots 0.26.8", ] [[package]] @@ -2702,7 +2723,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.5.1", + "hyper 1.6.0", "hyper-util", "pin-project-lite", "tokio", @@ -2720,7 +2741,7 @@ dependencies = [ "futures-util", "http 1.2.0", "http-body 1.0.1", - "hyper 1.5.1", + "hyper 1.6.0", "pin-project-lite", "socket2", "tokio", @@ -2866,7 +2887,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -2908,9 +2929,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -2953,15 +2974,18 @@ checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" [[package]] name = "inventory" -version = "0.3.15" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" +checksum = "54b12ebb6799019b044deaf431eadfe23245b259bba5a2c0796acec3943a3cdb" +dependencies = [ + "rustversion", +] [[package]] name = "ipnet" -version = "2.10.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "is-terminal" @@ -3016,6 +3040,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.14" @@ -3033,9 +3066,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ "once_cell", "wasm-bindgen", @@ -3054,11 +3087,11 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "9.3.0" +version = "9.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" +checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "js-sys", "pem", "ring", @@ -3156,9 +3189,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.168" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libm" @@ -3168,9 +3201,9 @@ checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "litemap" @@ -3197,9 +3230,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "loom" @@ -3225,9 +3258,9 @@ dependencies = [ [[package]] name = "lz4" -version = "1.28.0" +version = "1.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d1febb2b4a79ddd1980eede06a8f7902197960aa0383ffcfdd62fe723036725" +checksum = "a20b523e860d03443e98350ceaac5e71c6ba89aea7d960769ec3ce37f4de5af4" dependencies = [ "lz4-sys", ] @@ -3368,18 +3401,18 @@ dependencies = [ [[package]] name = "minijinja" -version = "2.5.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c37e1b517d1dcd0e51dc36c4567b9d5a29262b3ec8da6cb5d35e27a8fb529b5" +checksum = "cff7b8df5e85e30b87c2b0b3f58ba3a87b68e133738bf512a7713769326dbca9" dependencies = [ "serde", ] [[package]] name = "minijinja-contrib" -version = "2.5.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe51f1a6a8285f03fcd1544d834234fe8db285f29e1c2253600c93b3ae19242" +checksum = "7ac3e47a9006ed0500425a092c9f8b2e56d10f8aeec8ce870c5e8a7c6ef2d7c3" dependencies = [ "minijinja", "serde", @@ -3394,9 +3427,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "b3b1c9bd4fe1f0f8b387f6eb9eb3b4a1aa26185e5750efb9140301703f62cd1b" dependencies = [ "adler2", ] @@ -3408,7 +3441,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] @@ -3522,7 +3555,7 @@ dependencies = [ "tokio", "tokio-rustls 0.26.1", "url", - "webpki-roots 0.26.7", + "webpki-roots 0.26.8", ] [[package]] @@ -3532,7 +3565,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a0d57c55d2d1dc62a2b1d16a0a1079eb78d67c36bdf468d582ab4482ec7002" dependencies = [ "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -3541,7 +3574,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", "cfg_aliases", "libc", @@ -3670,7 +3703,7 @@ dependencies = [ "num-integer", "num-traits", "pyo3", - "rustc-hash 2.1.0", + "rustc-hash 2.1.1", ] [[package]] @@ -3681,7 +3714,7 @@ checksum = "c38841cdd844847e3e7c8d29cef9dcfed8877f8f56f9071f77843ecf3baf937f" dependencies = [ "base64 0.13.1", "chrono", - "getrandom", + "getrandom 0.2.15", "http 0.2.12", "rand", "reqwest 0.11.27", @@ -3695,9 +3728,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -3725,15 +3758,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" [[package]] name = "oneshot" -version = "0.1.8" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e296cf87e61c9cfc1a61c3c63a0f7f286ed4554e0e22be84e8a38e1d264a2a29" +checksum = "79d72a7c0f743d2ebb0a2ad1d219db75fdc799092ed3a884c9144c42a31225bd" [[package]] name = "oorandom" @@ -3749,9 +3782,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "opentelemetry" @@ -3830,9 +3863,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "4.5.0" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c65ee1f9701bf938026630b455d5315f490640234259037edb259798b3bcf85e" +checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" dependencies = [ "num-traits", ] @@ -3849,9 +3882,9 @@ dependencies = [ [[package]] name = "ouroboros" -version = "0.18.4" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "944fa20996a25aded6b4795c6d63f10014a7a83f8be9828a11860b08c5fc4a67" +checksum = "1e0f050db9c44b97a94723127e6be766ac5c340c48f2c4bb3ffa11713744be59" dependencies = [ "aliasable", "ouroboros_macro", @@ -3860,16 +3893,15 @@ dependencies = [ [[package]] name = "ouroboros_macro" -version = "0.18.4" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0deead1528fd0e5947a8546a9642a9777c25f6e1e26f34c97b204bbb465bd" +checksum = "3c7028bdd3d43083f6d8d4d5187680d0d3560d54df4cc9d752005268b41e64d0" dependencies = [ "heck 0.4.1", - "itertools 0.12.1", "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -3912,9 +3944,9 @@ dependencies = [ [[package]] name = "parquet" -version = "53.3.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b449890367085eb65d7d3321540abc3d7babbd179ce31df0016e90719114191" +checksum = "dea02606ba6f5e856561d8d507dba8bac060aefca2a6c0f1aa1d361fed91ff3e" dependencies = [ "ahash", "arrow-array", @@ -3931,7 +3963,7 @@ dependencies = [ "flate2", "futures", "half", - "hashbrown 0.15.2", + "hashbrown 0.14.5", "lz4_flex", "num", "num-bigint", @@ -4006,7 +4038,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.7", + "thiserror 2.0.11", "ucd-trie", ] @@ -4030,7 +4062,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -4050,24 +4082,34 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ - "fixedbitset", - "indexmap 2.7.0", + "fixedbitset 0.4.2", + "indexmap 2.7.1", +] + +[[package]] +name = "petgraph" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +dependencies = [ + "fixedbitset 0.5.7", + "indexmap 2.7.1", ] [[package]] name = "phf" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ "phf_shared", ] [[package]] name = "phf_codegen" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" +checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" dependencies = [ "phf_generator", "phf_shared", @@ -4075,9 +4117,9 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared", "rand", @@ -4085,38 +4127,38 @@ dependencies = [ [[package]] name = "phf_shared" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ "siphasher", ] [[package]] name = "pin-project" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" +checksum = "dfe2e71e1471fe07709406bf725f710b02927c9c54b2b5b2ec0e8087d97c327d" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" +checksum = "f6e859e6e5bd50440ab63c47e3ebabc90f26251f7c73c3d3e837b74a1cc3fa67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -4181,7 +4223,7 @@ dependencies = [ "headers", "http 1.2.0", "http-body-util", - "hyper 1.5.1", + "hyper 1.6.0", "hyper-util", "mime", "nix", @@ -4196,7 +4238,7 @@ dependencies = [ "serde_urlencoded", "smallvec", "sync_wrapper 1.0.2", - "thiserror 2.0.7", + "thiserror 2.0.11", "time", "tokio", "tokio-tungstenite", @@ -4214,14 +4256,14 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] name = "polars-arrow" -version = "0.40.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cb5e11cd0752ae022fa6ca3afa50a14b0301b7ce53c0135828fbb0f4fa8303e" +checksum = "32d19c6db79cb6a3c55af3b5a3976276edaab64cbf7f69b392617c2af30d7742" dependencies = [ "ahash", "arrow-array", @@ -4235,12 +4277,12 @@ dependencies = [ "either", "ethnum", "fast-float", - "foreign_vec", - "getrandom", + "getrandom 0.2.15", "hashbrown 0.14.5", "itoa", "multiversion", "num-traits", + "parking_lot", "polars-arrow-format", "polars-error", "polars-utils", @@ -4263,9 +4305,9 @@ dependencies = [ [[package]] name = "polars-compute" -version = "0.40.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89fc4578f826234cdecb782952aa9c479dc49373f81694a7b439c70b6f609ba0" +checksum = "30194a5ff325f61d6fcb62dc215c9210f308fc4fc85a493ef777dbcd938cba24" dependencies = [ "bytemuck", "either", @@ -4279,17 +4321,17 @@ dependencies = [ [[package]] name = "polars-core" -version = "0.40.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e490c6bace1366a558feea33d1846f749a8ca90bd72a6748752bc65bb4710b2a" +checksum = "2ba2a3b736d55b92a12889672d0197dc25ad321ab23eba4168a3b6316a6b6349" dependencies = [ "ahash", - "bitflags 2.6.0", + "bitflags 2.8.0", "bytemuck", "comfy-table", "either", "hashbrown 0.14.5", - "indexmap 2.7.0", + "indexmap 2.7.1", "num-traits", "once_cell", "polars-arrow", @@ -4306,9 +4348,9 @@ dependencies = [ [[package]] name = "polars-error" -version = "0.40.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08888f58e61599b00f5ea0c2ccdc796b54b9859559cc0d4582733509451fa01a" +checksum = "07101d1803ca2046cdb3a8adb1523ddcc879229860f0ac56a853034269dec1e1" dependencies = [ "polars-arrow-format", "simdutf8", @@ -4317,13 +4359,14 @@ dependencies = [ [[package]] name = "polars-io" -version = "0.40.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5842896aea46d975b425d63f156f412aed3cfde4c257b64fb1f43ceea288074e" +checksum = "a48ddf416ae185336c3d7880d2e05b7e55686e3e0da1014e5e7325eff9c7d722" dependencies = [ "ahash", "bytes", "flate2", + "glob", "home", "memchr", "memmap2 0.7.1", @@ -4343,22 +4386,23 @@ dependencies = [ [[package]] name = "polars-parquet" -version = "0.40.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c70670a9e51cac66d0e77fd20b5cc957dbcf9f2660d410633862bb72f846d5b8" +checksum = "bb2993265079ffa07dd16277189444424f8d787b00b01c6f6e001f58bab543ce" dependencies = [ "ahash", "base64 0.22.1", - "brotli 5.0.0", + "brotli 6.0.0", + "bytemuck", "ethnum", "flate2", "lz4", "num-traits", "parquet-format-safe", "polars-arrow", + "polars-compute", "polars-error", "polars-utils", - "seq-macro", "simdutf8", "snap", "streaming-decompression", @@ -4367,9 +4411,9 @@ dependencies = [ [[package]] name = "polars-row" -version = "0.40.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb285f2f3a65b00dd06bef16bb9f712dbb5478f941dab5cf74f9f016d382e40" +checksum = "6e11f43f48466c4b1caa6dc61c381dc10c2d67b87fcb74bc996e21c4f7b0a311" dependencies = [ "bytemuck", "polars-arrow", @@ -4379,14 +4423,16 @@ dependencies = [ [[package]] name = "polars-utils" -version = "0.40.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e1a907c63abf71e5f21467e2e4ff748896c28196746f631c6c25512ec6102c" +checksum = "19dd73207bd15efb0ae5c9c3ece3227927ed6a16ad63578acec342378e6bdcb4" dependencies = [ "ahash", "bytemuck", + "bytes", "hashbrown 0.14.5", - "indexmap 2.7.0", + "indexmap 2.7.1", + "memmap2 0.7.1", "num-traits", "once_cell", "polars-error", @@ -4455,12 +4501,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.25" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" dependencies = [ "proc-macro2", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -4479,14 +4525,14 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.22.22", + "toml_edit 0.22.24", ] [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -4499,7 +4545,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", "version_check", "yansi", ] @@ -4512,7 +4558,7 @@ checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.6.0", + "bitflags 2.8.0", "lazy_static", "num-traits", "rand", @@ -4526,9 +4572,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" dependencies = [ "bytes", "prost-derive", @@ -4536,42 +4582,42 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f3e5beed80eb580c68e2c600937ac2c4eedabdfd5ef1e5b7ea4f3fba84497b" +checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ "heck 0.5.0", - "itertools 0.13.0", + "itertools 0.14.0", "log", "multimap", "once_cell", - "petgraph", + "petgraph 0.7.1", "prettyplease", "prost", "prost-types", "regex", - "syn 2.0.90", + "syn 2.0.98", "tempfile", ] [[package]] name = "prost-derive" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.13.0", + "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] name = "prost-types" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2f1e56baa61e93533aebc21af4d2134b70f66275e0fcdf3cbe43d77ff7e8fc" +checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" dependencies = [ "prost", ] @@ -4593,7 +4639,7 @@ checksum = "e484fd2c8b4cb67ab05a318f1fd6fa8f199fcc30819f08f07d200809dba26c15" dependencies = [ "cfg-if", "chrono", - "indexmap 2.7.0", + "indexmap 2.7.1", "indoc", "inventory", "libc", @@ -4617,7 +4663,7 @@ dependencies = [ "arrow-buffer", "arrow-schema", "half", - "indexmap 2.7.0", + "indexmap 2.7.1", "numpy", "pyo3", "thiserror 1.0.69", @@ -4652,7 +4698,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -4665,7 +4711,7 @@ dependencies = [ "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -4712,10 +4758,10 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.1.0", - "rustls 0.23.20", + "rustc-hash 2.1.1", + "rustls 0.23.23", "socket2", - "thiserror 2.0.7", + "thiserror 2.0.11", "tokio", "tracing", ] @@ -4727,14 +4773,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", - "getrandom", + "getrandom 0.2.15", "rand", "ring", - "rustc-hash 2.1.0", - "rustls 0.23.20", + "rustc-hash 2.1.1", + "rustls 0.23.23", "rustls-pki-types", "slab", - "thiserror 2.0.7", + "thiserror 2.0.11", "tinyvec", "tracing", "web-time", @@ -4742,9 +4788,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52cd4b1eff68bf27940dd39811292c49e007f4d0b4c357358dc9b0197be6b527" +checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" dependencies = [ "cfg_aliases", "libc", @@ -4756,9 +4802,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -4790,7 +4836,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", ] [[package]] @@ -4825,6 +4871,7 @@ dependencies = [ "arrow-schema", "async-openai", "async-trait", + "bigdecimal", "bincode", "bytemuck", "bzip2", @@ -4839,7 +4886,7 @@ dependencies = [ "futures-util", "glam", "hashbrown 0.15.2", - "indexmap 2.7.0", + "indexmap 2.7.1", "indoc", "itertools 0.13.0", "kdam", @@ -4849,11 +4896,12 @@ dependencies = [ "minijinja-contrib", "neo4rs", "num", + "num-bigint", "num-integer", "num-traits", "numpy", "once_cell", - "ordered-float 4.5.0", + "ordered-float 4.6.0", "ouroboros", "parking_lot", "parquet", @@ -4877,15 +4925,15 @@ dependencies = [ "raphtory-api", "rayon", "regex", - "reqwest 0.12.9", + "reqwest 0.12.12", "roaring", - "rustc-hash 2.1.0", + "rustc-hash 2.1.1", "serde", "serde_json", "streaming-stats", "tantivy", "tempfile", - "thiserror 2.0.7", + "thiserror 2.0.11", "tokio", "tracing", "zip", @@ -4908,10 +4956,10 @@ dependencies = [ "quickcheck_macros", "rand", "rayon", - "rustc-hash 2.1.0", + "rustc-hash 2.1.1", "serde", "sorted_vector_map", - "thiserror 2.0.7", + "thiserror 2.0.11", "tracing", "tracing-subscriber", "twox-hash 2.1.0", @@ -4961,7 +5009,7 @@ dependencies = [ "serde_json", "sqlparser", "tempfile", - "thiserror 2.0.7", + "thiserror 2.0.11", "tokio", "tracing", "tracing-subscriber", @@ -4991,19 +5039,19 @@ dependencies = [ "opentelemetry", "opentelemetry-otlp", "opentelemetry_sdk", - "ordered-float 4.5.0", + "ordered-float 4.6.0", "parking_lot", "poem", "pretty_assertions", "pyo3", "raphtory", "raphtory-api", - "reqwest 0.12.9", - "rustc-hash 2.1.0", + "reqwest 0.12.12", + "rustc-hash 2.1.1", "serde", "serde_json", "tempfile", - "thiserror 2.0.7", + "thiserror 2.0.11", "tokio", "tracing", "tracing-opentelemetry", @@ -5042,7 +5090,7 @@ dependencies = [ "raphtory-graphql", "serde", "serde_json", - "thiserror 2.0.7", + "thiserror 2.0.11", "tokio", ] @@ -5058,11 +5106,11 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.2.0" +version = "11.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" +checksum = "c6928fa44c097620b706542d428957635951bade7143269085389d42c8a4927e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -5097,7 +5145,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -5187,9 +5235,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.9" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", "bytes", @@ -5199,8 +5247,8 @@ dependencies = [ "http 1.2.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.1", - "hyper-rustls 0.27.3", + "hyper 1.6.0", + "hyper-rustls 0.27.5", "hyper-util", "ipnet", "js-sys", @@ -5211,7 +5259,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.20", + "rustls 0.23.23", "rustls-native-certs 0.8.1", "rustls-pemfile 2.2.0", "rustls-pki-types", @@ -5222,13 +5270,14 @@ dependencies = [ "tokio", "tokio-rustls 0.26.1", "tokio-util", + "tower 0.5.2", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 0.26.7", + "webpki-roots 0.26.8", "windows-registry", ] @@ -5244,7 +5293,7 @@ dependencies = [ "mime", "nom", "pin-project-lite", - "reqwest 0.12.9", + "reqwest 0.12.12", "thiserror 1.0.69", ] @@ -5271,7 +5320,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin", "untrusted", @@ -5280,9 +5329,9 @@ dependencies = [ [[package]] name = "roaring" -version = "0.10.9" +version = "0.10.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41589aba99537475bf697f2118357cad1c31590c5a1b9f6d9fc4ad6d07503661" +checksum = "a652edd001c53df0b3f96a36a8dc93fce6866988efc16808235653c6bcac8bf2" dependencies = [ "bytemuck", "byteorder", @@ -5295,7 +5344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64 0.21.7", - "bitflags 2.6.0", + "bitflags 2.8.0", "serde", "serde_derive", ] @@ -5346,9 +5395,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hash" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustc_version" @@ -5361,11 +5410,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.42" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "errno", "libc", "linux-raw-sys", @@ -5386,9 +5435,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.20" +version = "0.23.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" dependencies = [ "once_cell", "ring", @@ -5420,7 +5469,7 @@ dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.0.1", + "security-framework 3.2.0", ] [[package]] @@ -5443,9 +5492,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" dependencies = [ "web-time", ] @@ -5473,9 +5522,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "rusty-fork" @@ -5491,9 +5540,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "same-file" @@ -5551,7 +5600,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -5560,11 +5609,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation 0.10.0", "core-foundation-sys", "libc", @@ -5573,9 +5622,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -5583,9 +5632,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" +checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" [[package]] name = "seq-macro" @@ -5595,29 +5644,29 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", "memchr", @@ -5722,15 +5771,15 @@ checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" dependencies = [ "num-bigint", "num-traits", - "thiserror 2.0.7", + "thiserror 2.0.11", "time", ] [[package]] name = "siphasher" -version = "0.3.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "sketches-ddsketch" @@ -5785,7 +5834,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -5838,7 +5887,7 @@ checksum = "01b2e185515564f15375f593fb966b5718bc624ba77fe49fa4616ad619690554" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -5849,9 +5898,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "stacker" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" +checksum = "1d08feb8f695b465baed819b03c128dc23f57a694510ab1f06c77f763975685e" dependencies = [ "cc", "cfg-if", @@ -5927,7 +5976,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -5949,9 +5998,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -5981,7 +6030,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -6166,12 +6215,13 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" dependencies = [ "cfg-if", "fastrand", + "getrandom 0.3.1", "once_cell", "rustix", "windows-sys 0.59.0", @@ -6198,11 +6248,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.7" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93605438cbd668185516ab499d589afb7ee1859ea3d5fc8f6b0755e1c7443767" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" dependencies = [ - "thiserror-impl 2.0.7", + "thiserror-impl 2.0.11", ] [[package]] @@ -6213,18 +6263,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] name = "thiserror-impl" -version = "2.0.7" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d8749b4531af2117677a5fcd12b1348a3fe2b81e36e61ffeac5c4aa3273e36" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -6310,9 +6360,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -6325,9 +6375,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.42.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -6343,13 +6393,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -6368,7 +6418,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.23.20", + "rustls 0.23.23", "tokio", ] @@ -6411,14 +6461,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.22", + "toml_edit 0.22.24", ] [[package]] @@ -6436,22 +6486,22 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.7.0", + "indexmap 2.7.1", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ - "indexmap 2.7.0", + "indexmap 2.7.1", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.24", + "winnow 0.7.2", ] [[package]] @@ -6469,7 +6519,7 @@ dependencies = [ "http 1.2.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.1", + "hyper 1.6.0", "hyper-timeout", "hyper-util", "percent-encoding", @@ -6514,6 +6564,7 @@ dependencies = [ "futures-util", "pin-project-lite", "sync_wrapper 1.0.2", + "tokio", "tower-layer", "tower-service", ] @@ -6549,7 +6600,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -6629,7 +6680,7 @@ dependencies = [ "log", "rand", "sha1", - "thiserror 2.0.7", + "thiserror 2.0.11", "utf-8", ] @@ -6681,15 +6732,15 @@ dependencies = [ [[package]] name = "unicase" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] name = "unicode-segmentation" @@ -6769,19 +6820,19 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.11.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0" dependencies = [ - "getrandom", + "getrandom 0.3.1", "serde", ] [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "version_check" @@ -6791,9 +6842,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wait-timeout" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" dependencies = [ "libc", ] @@ -6823,36 +6874,46 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.49" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", @@ -6863,9 +6924,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6873,22 +6934,25 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-streams" @@ -6905,9 +6969,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -6931,9 +6995,9 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.7" +version = "0.26.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" dependencies = [ "rustls-pki-types", ] @@ -7015,7 +7079,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -7026,7 +7090,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -7218,9 +7282,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.24" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" +checksum = "59690dea168f2198d1a3b0cac23b8063efcd11012f10ae4698f284808c8ef603" dependencies = [ "memchr", ] @@ -7235,6 +7299,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.8.0", +] + [[package]] name = "write16" version = "1.0.0" @@ -7249,9 +7322,9 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "xxhash-rust" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" +checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" [[package]] name = "xz2" @@ -7299,7 +7372,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", "synstructure", ] @@ -7321,7 +7394,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -7341,7 +7414,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", "synstructure", ] @@ -7362,7 +7435,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] @@ -7384,14 +7457,14 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.98", ] [[package]] name = "zip" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d52293fc86ea7cf13971b3bb81eb21683636e7ae24c729cdaf1b7c4157a352" +checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" dependencies = [ "aes", "arbitrary", @@ -7403,13 +7476,13 @@ dependencies = [ "displaydoc", "flate2", "hmac", - "indexmap 2.7.0", + "indexmap 2.7.1", "lzma-rs", "memchr", "pbkdf2", "rand", "sha1", - "thiserror 2.0.7", + "thiserror 2.0.11", "time", "zeroize", "zopfli", diff --git a/Cargo.toml b/Cargo.toml index 2d96814aa..ee43d2478 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,8 +55,8 @@ reqwest = { version = "0.12.8", default-features = false, features = [ ] } serde = { version = "1.0.197", features = ["derive", "rc"] } serde_json = "1.0.114" -pyo3 = { version = "0.23.3", features = ["multiple-pymethods", "chrono"] } -pyo3-build-config = "0.23.3" +pyo3 = { version = "=0.23.3", features = ["multiple-pymethods", "chrono"] } +pyo3-build-config = "=0.23.3" pyo3-arrow = "0.6" numpy = "0.23.0" itertools = "0.13.0" @@ -82,6 +82,7 @@ flate2 = "1.0.28" regex = "1.10.3" num-traits = "0.2.18" num-integer = "0.1" +num-bigint = "0.4.6" rand_distr = "0.4.3" rustc-hash = "2.0.0" twox-hash = "2.1.0" @@ -100,10 +101,11 @@ oauth2 = "4.0" jsonwebtoken = "9.3.0" num = "0.4.1" display-error-chain = "0.2.0" -polars-arrow = "0.40.0" -polars-parquet = "0.40.0" -polars-core = "0.40.0" -polars-io = "0.40.0" +polars-arrow = "0.42.0" +polars-parquet = "0.42.0" +polars-core = "0.42.0" +polars-io = "0.42.0" +bigdecimal = { version = "0.4.7", features = ["serde"] } kdam = "0.6.2" hashbrown = "0.15.1" pretty_assertions = "1.4.0" @@ -147,13 +149,20 @@ minijinja-contrib = { version = "2.2.0", features = ["datetime"] } datafusion = { version = "43.0.0" } sqlparser = "0.51.0" futures = "0.3" -arrow = { version = "53.2.0" } -parquet = { version = "53.2.0" } -arrow-json = { version = "53.2.0" } -arrow-buffer = { version = "53.2.0" } -arrow-schema = { version = "53.2.0" } -arrow-array = { version = "53.2.0" } -arrow-data = { version = "53.2.0" } -arrow-ipc = { version = "53.2.0" } +arrow = { version = "=53.2.0" } +parquet = { version = "=53.2.0" } +arrow-json = { version = "=53.2.0" } +arrow-buffer = { version = "=53.2.0" } +arrow-schema = { version = "=53.2.0" } +arrow-array = { version = "=53.2.0" } +arrow-data = { version = "=53.2.0" } +arrow-ipc = { version = "=53.2.0" } moka = { version = "0.12.7", features = ["sync"] } indexmap = { version = "2.7.0", features = ["rayon"] } + +# Make sure that transitive dependencies stick to disk_graph 50 +[patch.crates-io] +arrow-buffer = { git = "https://github.com/apache/arrow-rs.git", tag = "53.2.0" } +arrow-schema = { git = "https://github.com/apache/arrow-rs.git", tag = "53.2.0" } +arrow-data = { git = "https://github.com/apache/arrow-rs.git", tag = "53.2.0" } +arrow-array = { git = "https://github.com/apache/arrow-rs.git", tag = "53.2.0" } diff --git a/pometry-storage-private b/pometry-storage-private index f0364baaa..23ed117e4 160000 --- a/pometry-storage-private +++ b/pometry-storage-private @@ -1 +1 @@ -Subproject commit f0364baaaa11b3698644c73aaf85379c36a738c9 +Subproject commit 23ed117e42364ffcad37d9d8a23d4e5a2ffdbf72 diff --git a/python/tests/test_graphdb/test_graphdb.py b/python/tests/test_graphdb/test_graphdb.py index 5536a5129..2117fd1ed 100644 --- a/python/tests/test_graphdb/test_graphdb.py +++ b/python/tests/test_graphdb/test_graphdb.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals +from decimal import Decimal import math import sys import random @@ -889,6 +890,48 @@ def no_static_property_test(key, value): check(g) +def test_decimal_property(): + g = Graph() + decimal_properties = { + "d_max": Decimal("9999999999999999999999999999.999999999"), + "d_min": Decimal("-9999999999999999999999999999.999999999"), + "d_int": Decimal("9999999999999999999999999999"), + "d_small_neg": Decimal("-0.1"), + "d_small_pos": Decimal("0.1"), + "d_medium": Decimal("104447267751554560119.000000000"), + } + g.add_edge(0, 1, 1, decimal_properties) + g.add_node(2, 2, decimal_properties) + n = g.node(2) + n.add_updates(3, decimal_properties) + e = g.edge(1, 1) + e.add_updates(3, decimal_properties) + + with pytest.raises(Exception): + g.add_edge(0, 1, 1, {"d_extra_max_super_ultra_x_x": Decimal("9999999999999999999999999999999999999999999999999999.999999999")}) + + @with_disk_graph + def check(g): + assert g.node(2).properties.temporal.get("d_max").items() == [(2, Decimal("9999999999999999999999999999.999999999")), (3, Decimal("9999999999999999999999999999.999999999"))] + + assert g.edge(1, 1).properties.temporal.get("d_min").items() == [(0, Decimal("-9999999999999999999999999999.999999999")), (3, Decimal("-9999999999999999999999999999.999999999"))] + + assert g.node(2).properties.temporal == { + "d_max": [(2, Decimal("9999999999999999999999999999.999999999")), (3, Decimal("9999999999999999999999999999.999999999"))], + "d_min": [(2, Decimal("-9999999999999999999999999999.999999999")), (3, Decimal("-9999999999999999999999999999.999999999"))], + "d_int": [(2, Decimal("9999999999999999999999999999")), (3, Decimal("9999999999999999999999999999"))], + "d_small_neg": [(2, Decimal("-0.1")), (3, Decimal("-0.1"))], + "d_small_pos": [(2, Decimal("0.1")), (3, Decimal("0.1"))], + "d_medium": [(2, Decimal("104447267751554560119.000000000")), (3, Decimal("104447267751554560119.000000000"))], + } + + assert g.node(2).properties.temporal.get("d_small_pos").sum() == Decimal("0.2") + assert g.node(2).properties.temporal.get("d_small_neg").sum() == Decimal("-0.2") + assert g.node(2).properties.temporal.get("d_medium").sum() == Decimal("208894535503109120238.000000000") + + check(g) + + def test_edge_properties(): g = create_graph_edge_properties() diff --git a/raphtory-api/src/core/entities/mod.rs b/raphtory-api/src/core/entities/mod.rs index 75d3b10fd..e8fe0e749 100644 --- a/raphtory-api/src/core/entities/mod.rs +++ b/raphtory-api/src/core/entities/mod.rs @@ -265,6 +265,12 @@ impl<'a> From<&'a GID> for GidRef<'a> { } } +impl<'a> From<&'a str> for GidRef<'a> { + fn from(value: &'a str) -> Self { + GidRef::Str(value) + } +} + impl<'a> GidRef<'a> { pub fn dtype(self) -> GidType { match self { diff --git a/raphtory-api/src/core/mod.rs b/raphtory-api/src/core/mod.rs index 7ec079af5..43012703f 100644 --- a/raphtory-api/src/core/mod.rs +++ b/raphtory-api/src/core/mod.rs @@ -38,6 +38,9 @@ pub enum PropType { NDTime, DTime, Array(Box), + Decimal { + scale: i64, + }, } impl Display for PropType { @@ -66,6 +69,7 @@ impl Display for PropType { PropType::NDTime => "NDTime", PropType::DTime => "DTime", PropType::Array(p_type) => return write!(f, "Array<{}>", p_type), + PropType::Decimal { scale } => return write!(f, "Decimal({})", scale), }; write!(f, "{}", type_str) @@ -92,6 +96,7 @@ impl PropType { | PropType::I64 | PropType::F32 | PropType::F64 + | PropType::Decimal { .. } ) } @@ -197,6 +202,14 @@ pub fn unify_types(l: &PropType, r: &PropType, unified: &mut bool) -> Result { + if l_scale != r_scale { + *unified = true; + } + Ok(PropType::Decimal { + scale: *l_scale.max(r_scale), + }) + } (_, _) => Err(PropError::PropertyTypeError { name: "unknown".to_string(), expected: l.clone(), diff --git a/raphtory-cypher/src/lib.rs b/raphtory-cypher/src/lib.rs index a3e7222e7..721559a07 100644 --- a/raphtory-cypher/src/lib.rs +++ b/raphtory-cypher/src/lib.rs @@ -316,6 +316,7 @@ mod cypher { } #[tokio::test] + #[ignore = "polars-arrow can't transfom Utf8View arrays to arrow-rs arrays"] async fn select_table_parquet_column_different_name() { let graph_dir = tempdir().unwrap(); // relative to current dir back to parent dir then ./resource/netflowsorted diff --git a/raphtory-graphql/src/model/graph/property.rs b/raphtory-graphql/src/model/graph/property.rs index 3e845dd39..58fd31541 100644 --- a/raphtory-graphql/src/model/graph/property.rs +++ b/raphtory-graphql/src/model/graph/property.rs @@ -77,6 +77,7 @@ fn prop_to_gql(prop: &Prop) -> GqlValue { Prop::DTime(t) => GqlValue::Number(t.timestamp_millis().into()), Prop::NDTime(t) => GqlValue::Number(t.and_utc().timestamp_millis().into()), Prop::Array(a) => GqlValue::List(a.iter_prop().map(|p| prop_to_gql(&p)).collect()), + Prop::Decimal(d) => GqlValue::String(d.to_string()), } } diff --git a/raphtory-graphql/src/model/schema/node_schema.rs b/raphtory-graphql/src/model/schema/node_schema.rs index e214a41be..2851fc99d 100644 --- a/raphtory-graphql/src/model/schema/node_schema.rs +++ b/raphtory-graphql/src/model/schema/node_schema.rs @@ -101,7 +101,6 @@ fn collect_node_schema(node: NodeView) -> SchemaAggregate { #[cfg(test)] mod test { - use itertools::Itertools; use raphtory::{core::utils::errors::GraphError, db::api::view::IntoDynamic, prelude::*}; @@ -156,34 +155,40 @@ mod test { fn check_schema(g: &Graph) { let gs = GraphSchema::new(&g.clone().into_dynamic()); - let actual: Vec<(String, Vec)> = gs + let mut actual: Vec<(String, Vec)> = gs .nodes .iter() .map(|ns| ((&ns.type_name).to_string(), ns.properties_inner())) .collect_vec(); + actual.sort_by(|(k1, _), (k2, _)| k1.cmp(k2)); + + actual.iter_mut().for_each(|(_, v)| v.sort()); + + println!("{:?}", actual); + let expected = vec![ + ("None".to_string(), vec![(("t", "Str"), ["person"]).into()]), ( "a".to_string(), vec![ - (("t", "Str"), ["wallet"]).into(), - (("lol", "Str"), ["smile"]).into(), (("cost", "F64"), ["99.5"]).into(), + (("lol", "Str"), ["smile"]).into(), + (("t", "Str"), ["wallet"]).into(), ], ), - ("None".to_string(), vec![(("t", "Str"), ["person"]).into()]), ( "b".to_string(), vec![ - (("list_prop", "List"), ["[1.1, 2.2, 3.3]"]).into(), - (("cost_b", "F64"), ["76"]).into(), - (("str_prop", "Str"), ["hello"]).into(), (("bool_prop", "Bool"), ["true"]).into(), + (("cost_b", "F64"), ["76"]).into(), + (("list_prop", "List"), ["[1.1, 2.2, 3.3]"]).into(), ( ("map_prop", "Map{ a: F64, b: F64 }"), ["{\"a\": 1, \"b\": 2}"], ) .into(), + (("str_prop", "Str"), ["hello"]).into(), ], ), ]; diff --git a/raphtory-graphql/src/model/schema/property_schema.rs b/raphtory-graphql/src/model/schema/property_schema.rs index 6b3e5a1ea..fca164bde 100644 --- a/raphtory-graphql/src/model/schema/property_schema.rs +++ b/raphtory-graphql/src/model/schema/property_schema.rs @@ -1,6 +1,6 @@ use dynamic_graphql::SimpleObject; -#[derive(SimpleObject, Debug, PartialEq)] +#[derive(SimpleObject, Debug, PartialEq, PartialOrd, Ord, Eq)] pub(crate) struct PropertySchema { key: String, property_type: String, diff --git a/raphtory-graphql/src/python/client/mod.rs b/raphtory-graphql/src/python/client/mod.rs index e863d8caf..1053707f4 100644 --- a/raphtory-graphql/src/python/client/mod.rs +++ b/raphtory-graphql/src/python/client/mod.rs @@ -257,6 +257,7 @@ fn inner_collection(value: &Prop) -> String { } Prop::DTime(value) => format!("\"{}\"", value.to_string()), Prop::NDTime(value) => format!("\"{}\"", value.to_string()), + Prop::Decimal(value) => value.to_string(), } } @@ -297,6 +298,7 @@ fn to_graphql_valid(key: &String, value: &Prop) -> String { } Prop::DTime(value) => format!("{{ key: \"{}\", value: \"{}\" }}", key, value.to_string()), Prop::NDTime(value) => format!("{{ key: \"{}\", value: \"{}\" }}", key, value.to_string()), + Prop::Decimal(value) => format!("{{ key: \"{}\", value: {} }}", key, value), } } diff --git a/raphtory/Cargo.toml b/raphtory/Cargo.toml index f26b921c3..cb2a3682b 100644 --- a/raphtory/Cargo.toml +++ b/raphtory/Cargo.toml @@ -26,6 +26,7 @@ chrono = { workspace = true } itertools = { workspace = true } num-traits = { workspace = true } num-integer = { workspace = true } +num-bigint = { workspace = true } parking_lot = { workspace = true } once_cell = { workspace = true } rand = { workspace = true } @@ -33,6 +34,7 @@ rand_distr = { workspace = true } rayon = { workspace = true } regex = { workspace = true } rustc-hash = { workspace = true } +bigdecimal = { workspace = true } indexmap = { workspace = true } serde = { workspace = true } thiserror = { workspace = true } diff --git a/raphtory/resources/test/data_0.parquet b/raphtory/resources/test/data_0.parquet new file mode 100644 index 000000000..7dfdb37c8 Binary files /dev/null and b/raphtory/resources/test/data_0.parquet differ diff --git a/raphtory/src/core/entities/properties/props.rs b/raphtory/src/core/entities/properties/props.rs index 45a785463..8f3e77901 100644 --- a/raphtory/src/core/entities/properties/props.rs +++ b/raphtory/src/core/entities/properties/props.rs @@ -6,10 +6,11 @@ use crate::{ timeindex::TimeIndexEntry, }, utils::errors::GraphError, - Prop, + Prop, DECIMAL_MAX, }, db::api::storage::graph::tprop_storage_ops::TPropOps, }; +use num_bigint::BigInt; use serde::{Deserialize, Serialize}; use std::{fmt::Debug, hash::Hash}; @@ -101,6 +102,20 @@ impl Props { } } +pub(crate) fn validate_prop(prop_id: usize, prop: Prop) -> Result>> { + match prop { + Prop::Decimal(ref bd) => { + let (bint, scale) = bd.as_bigint_and_exponent(); + if bint <= BigInt::from(DECIMAL_MAX) && scale <= 38 { + Ok(prop) + } else { + Err(IllegalSet::new(prop_id, None, Some(prop))) + } + } + _ => Ok(prop), + } +} + #[cfg(test)] mod test { use super::*; diff --git a/raphtory/src/core/entities/properties/tprop.rs b/raphtory/src/core/entities/properties/tprop.rs index 031a30abe..8e3eb9d74 100644 --- a/raphtory/src/core/entities/properties/tprop.rs +++ b/raphtory/src/core/entities/properties/tprop.rs @@ -7,6 +7,7 @@ use crate::{ }, db::api::storage::graph::tprop_storage_ops::TPropOps, }; +use bigdecimal::BigDecimal; use chrono::{DateTime, NaiveDateTime, Utc}; use raphtory_api::{core::storage::arc_str::ArcStr, iter::BoxedLIter}; use rustc_hash::FxHashMap; @@ -32,6 +33,7 @@ pub enum TProp { NDTime(TCell), List(TCell>>), Map(TCell>>), + Decimal(TCell), } #[derive(Copy, Clone, Debug)] @@ -103,6 +105,7 @@ impl TProp { Prop::Array(value) => TProp::Array(TCell::new(t, value)), Prop::List(value) => TProp::List(TCell::new(t, value)), Prop::Map(value) => TProp::Map(TCell::new(t, value)), + Prop::Decimal(value) => TProp::Decimal(TCell::new(t, value)), } } @@ -158,6 +161,9 @@ impl TProp { (TProp::Map(cell), Prop::Map(a)) => { cell.set(t, a); } + (TProp::Decimal(cell), Prop::Decimal(a)) => { + cell.set(t, a); + } _ => return Err(GraphError::IncorrectPropertyType), }; } @@ -194,6 +200,10 @@ impl TProp { TProp::Map(cell) => { Box::new(cell.iter().map(|(t, value)| (*t, Prop::Map(value.clone())))) } + TProp::Decimal(cell) => Box::new( + cell.iter() + .map(|(t, value)| (*t, Prop::Decimal(value.clone()))), + ), } } @@ -231,6 +241,10 @@ impl TProp { cell.iter_t() .map(|(t, value)| (t, Prop::Map(value.clone()))), ), + TProp::Decimal(cell) => Box::new( + cell.iter_t() + .map(|(t, value)| (t, Prop::Decimal(value.clone()))), + ), } } @@ -299,6 +313,10 @@ impl TProp { cell.iter_window(r) .map(|(t, value)| (*t, Prop::Map(value.clone()))), ), + TProp::Decimal(cell) => Box::new( + cell.iter_window(r) + .map(|(t, value)| (*t, Prop::Decimal(value.clone()))), + ), } } } @@ -324,6 +342,9 @@ impl<'a> TPropOps<'a> for &'a TProp { .map(|(t, v)| (t, Prop::Array(v.clone()))), TProp::List(cell) => cell.last_before(t).map(|(t, v)| (t, Prop::List(v.clone()))), TProp::Map(cell) => cell.last_before(t).map(|(t, v)| (t, Prop::Map(v.clone()))), + TProp::Decimal(cell) => cell + .last_before(t) + .map(|(t, v)| (t, Prop::Decimal(v.clone()))), } } @@ -356,6 +377,7 @@ impl<'a> TPropOps<'a> for &'a TProp { TProp::Array(cell) => cell.at(ti).map(|v| Prop::Array(v.clone())), TProp::List(cell) => cell.at(ti).map(|v| Prop::List(v.clone())), TProp::Map(cell) => cell.at(ti).map(|v| Prop::Map(v.clone())), + TProp::Decimal(cell) => cell.at(ti).map(|v| Prop::Decimal(v.clone())), } } } diff --git a/raphtory/src/core/mod.rs b/raphtory/src/core/mod.rs index 04a327a06..6b1d34edb 100644 --- a/raphtory/src/core/mod.rs +++ b/raphtory/src/core/mod.rs @@ -25,7 +25,9 @@ //! use arrow_array::{ArrayRef, ArrowPrimitiveType}; +use bigdecimal::BigDecimal; use chrono::{DateTime, NaiveDateTime, Utc}; +use entities::properties::props::validate_prop; use itertools::Itertools; use raphtory_api::core::storage::arc_str::ArcStr; use serde::{Deserialize, Serialize}; @@ -37,6 +39,7 @@ use std::{ hash::{Hash, Hasher}, sync::Arc, }; +use storage::lazy_vec::IllegalSet; use utils::errors::GraphError; use arrow_schema::{DataType, Field}; @@ -99,8 +102,11 @@ pub enum Prop { NDTime(NaiveDateTime), DTime(DateTime), Array(PropArray), + Decimal(BigDecimal), } +pub const DECIMAL_MAX: i128 = 99999999999999999999999999999999999999i128; // equivalent to parquet decimal(38, 0) + impl Hash for Prop { fn hash(&self, state: &mut H) { match self { @@ -134,6 +140,7 @@ impl Hash for Prop { prop.hash(state); } } + Prop::Decimal(d) => d.hash(state), } } } @@ -156,12 +163,18 @@ impl PartialOrd for Prop { (Prop::NDTime(a), Prop::NDTime(b)) => a.partial_cmp(b), (Prop::DTime(a), Prop::DTime(b)) => a.partial_cmp(b), (Prop::List(a), Prop::List(b)) => a.partial_cmp(b), + (Prop::Decimal(a), Prop::Decimal(b)) => a.partial_cmp(b), _ => None, } } } impl Prop { + pub fn try_from_bd(bd: BigDecimal) -> Result>> { + let prop = Prop::Decimal(bd); + validate_prop(0, prop) + } + pub fn map(vals: impl IntoIterator, impl Into)>) -> Self { let h_map: FxHashMap<_, _> = vals .into_iter() @@ -215,6 +228,9 @@ impl Prop { PropType::Array(Box::new(prop_type_from_arrow_dtype(arrow_dtype))) } Prop::DTime(_) => PropType::DTime, + Prop::Decimal(d) => PropType::Decimal { + scale: d.as_bigint_and_scale().1, + }, } } @@ -233,6 +249,7 @@ impl Prop { (Prop::F32(a), Prop::F32(b)) => Some(Prop::F32(a + b)), (Prop::F64(a), Prop::F64(b)) => Some(Prop::F64(a + b)), (Prop::Str(a), Prop::Str(b)) => Some(Prop::Str((a.to_string() + b.as_ref()).into())), + (Prop::Decimal(a), Prop::Decimal(b)) => Some(Prop::Decimal(a + b)), _ => None, } } @@ -261,8 +278,11 @@ impl Prop { (Prop::I64(a), Prop::I64(b)) if b != 0 => Some(Prop::I64(a / b)), (Prop::U32(a), Prop::U32(b)) if b != 0 => Some(Prop::U32(a / b)), (Prop::U64(a), Prop::U64(b)) if b != 0 => Some(Prop::U64(a / b)), - (Prop::F32(a), Prop::F32(b)) if b != 0.0 => Some(Prop::F32(a / b)), - (Prop::F64(a), Prop::F64(b)) if b != 0.0 => Some(Prop::F64(a / b)), + (Prop::F32(a), Prop::F32(b)) => Some(Prop::F32(a / b)), + (Prop::F64(a), Prop::F64(b)) => Some(Prop::F64(a / b)), + (Prop::Decimal(a), Prop::Decimal(b)) if b != BigDecimal::from(0) => { + Some(Prop::Decimal(a / b)) + } _ => None, } } @@ -308,6 +328,8 @@ pub fn arrow_dtype_from_prop_type(prop_type: &PropType) -> Result, _>>()?; Ok(DataType::Struct(fields.into())) } + // 38 comes from herehttps://arrow.apache.org/docs/python/generated/pyarrow.decimal128.html + PropType::Decimal { scale } => Ok(DataType::Decimal128(38, (*scale).try_into().unwrap())), PropType::Empty => { // this is odd, we'll just pick one and hope for the best Ok(DataType::Null) @@ -327,6 +349,9 @@ pub fn prop_type_from_arrow_dtype(arrow_dtype: &DataType) -> PropType { DataType::Float32 => PropType::F32, DataType::Float64 => PropType::F64, DataType::Boolean => PropType::Bool, + DataType::Decimal128(_, scale) => PropType::Decimal { + scale: *scale as i64, + }, DataType::List(field) => { let d_type = field.data_type(); PropType::Array(Box::new(prop_type_from_arrow_dtype(&d_type))) @@ -407,6 +432,8 @@ pub trait PropUnwrap: Sized { } fn as_f64(&self) -> Option; + + fn into_decimal(self) -> Option; } impl PropUnwrap for Option

{ @@ -469,6 +496,10 @@ impl PropUnwrap for Option

{ fn as_f64(&self) -> Option { self.as_ref().and_then(|p| p.as_f64()) } + + fn into_decimal(self) -> Option { + self.and_then(|p| p.into_decimal()) + } } impl PropUnwrap for Prop { @@ -597,6 +628,14 @@ impl PropUnwrap for Prop { _ => None, } } + + fn into_decimal(self) -> Option { + if let Prop::Decimal(d) = self { + Some(d) + } else { + None + } + } } impl Display for Prop { @@ -653,6 +692,7 @@ impl Display for Prop { .join(", ") ) } + Prop::Decimal(d) => write!(f, "Decimal({})", d.as_bigint_and_scale().1), } } } @@ -722,6 +762,12 @@ impl From for Prop { } } +impl From for Prop { + fn from(d: BigDecimal) -> Self { + Prop::Decimal(d) + } +} + impl From for Prop { fn from(u: u32) -> Self { Prop::U32(u) diff --git a/raphtory/src/core/storage/lazy_vec.rs b/raphtory/src/core/storage/lazy_vec.rs index cb39cd82a..9f61a1ce2 100644 --- a/raphtory/src/core/storage/lazy_vec.rs +++ b/raphtory/src/core/storage/lazy_vec.rs @@ -12,7 +12,7 @@ pub struct IllegalSet { } impl IllegalSet { - fn new(index: usize, previous_value: A, new_value: A) -> IllegalSet { + pub fn new(index: usize, previous_value: A, new_value: A) -> IllegalSet { IllegalSet { index, previous_value, diff --git a/raphtory/src/core/storage/mod.rs b/raphtory/src/core/storage/mod.rs index 509042a65..13aa3b7dc 100644 --- a/raphtory/src/core/storage/mod.rs +++ b/raphtory/src/core/storage/mod.rs @@ -1,5 +1,6 @@ use super::{utils::errors::GraphError, Prop, PropArray}; use crate::core::entities::nodes::node_store::NodeStore; +use bigdecimal::BigDecimal; use lazy_vec::LazyVec; use lock_api; use node_entry::NodePtr; @@ -134,6 +135,7 @@ pub(crate) enum TPropColumn { Map(LazyVec>>), NDTime(LazyVec), DTime(LazyVec>), + Decimal(LazyVec), } impl Default for TPropColumn { @@ -173,6 +175,7 @@ impl TPropColumn { (TPropColumn::Map(col), Prop::Map(v)) => col.set(index, v)?, (TPropColumn::NDTime(col), Prop::NDTime(v)) => col.set(index, v)?, (TPropColumn::DTime(col), Prop::DTime(v)) => col.set(index, v)?, + (TPropColumn::Decimal(col), Prop::Decimal(v)) => col.set(index, v)?, _ => return Err(GraphError::IncorrectPropertyType), } Ok(()) @@ -196,6 +199,7 @@ impl TPropColumn { (TPropColumn::Map(col), Prop::Map(v)) => col.push(Some(v)), (TPropColumn::NDTime(col), Prop::NDTime(v)) => col.push(Some(v)), (TPropColumn::DTime(col), Prop::DTime(v)) => col.push(Some(v)), + (TPropColumn::Decimal(col), Prop::Decimal(v)) => col.push(Some(v)), _ => return Err(GraphError::IncorrectPropertyType), } Ok(()) @@ -219,6 +223,7 @@ impl TPropColumn { Prop::Map(_) => *self = TPropColumn::Map(LazyVec::with_len(*len)), Prop::NDTime(_) => *self = TPropColumn::NDTime(LazyVec::with_len(*len)), Prop::DTime(_) => *self = TPropColumn::DTime(LazyVec::with_len(*len)), + Prop::Decimal(_) => *self = TPropColumn::Decimal(LazyVec::with_len(*len)), }, _ => {} } @@ -246,6 +251,7 @@ impl TPropColumn { TPropColumn::Map(col) => col.push(None), TPropColumn::NDTime(col) => col.push(None), TPropColumn::DTime(col) => col.push(None), + TPropColumn::Decimal(col) => col.push(None), TPropColumn::Empty(count) => { *count += 1; } @@ -269,6 +275,7 @@ impl TPropColumn { TPropColumn::Map(col) => col.get_opt(index).map(|prop| Prop::Map(prop.clone())), TPropColumn::NDTime(col) => col.get_opt(index).map(|prop| Prop::NDTime(prop.clone())), TPropColumn::DTime(col) => col.get_opt(index).map(|prop| Prop::DTime(prop.clone())), + TPropColumn::Decimal(col) => col.get_opt(index).map(|prop| Prop::Decimal(prop.clone())), TPropColumn::Empty(_) => None, } } @@ -290,6 +297,7 @@ impl TPropColumn { TPropColumn::Map(col) => col.len(), TPropColumn::NDTime(col) => col.len(), TPropColumn::DTime(col) => col.len(), + TPropColumn::Decimal(col) => col.len(), TPropColumn::Empty(count) => *count, } } diff --git a/raphtory/src/db/api/properties/temporal_props.rs b/raphtory/src/db/api/properties/temporal_props.rs index 85f8193a5..26b3b2cb8 100644 --- a/raphtory/src/db/api/properties/temporal_props.rs +++ b/raphtory/src/db/api/properties/temporal_props.rs @@ -3,6 +3,7 @@ use crate::{ db::api::{properties::internal::PropertiesOps, view::BoxedLIter}, }; use arrow_array::ArrayRef; +use bigdecimal::BigDecimal; use chrono::{DateTime, NaiveDateTime, Utc}; use raphtory_api::core::storage::arc_str::ArcStr; use rustc_hash::FxHashMap; @@ -245,4 +246,8 @@ impl PropUnwrap for TemporalPropertyView

{ fn as_f64(&self) -> Option { self.latest().as_f64() } + + fn into_decimal(self) -> Option { + self.latest().into_decimal() + } } diff --git a/raphtory/src/db/api/storage/graph/nodes/row.rs b/raphtory/src/db/api/storage/graph/nodes/row.rs index efc989430..6cc555cd2 100644 --- a/raphtory/src/db/api/storage/graph/nodes/row.rs +++ b/raphtory/src/db/api/storage/graph/nodes/row.rs @@ -110,13 +110,20 @@ impl<'a> IntoIterator for DiskRow<'a> { } } +#[cfg(feature = "storage")] +use polars_arrow::datatypes::ArrowDataType; + #[cfg(feature = "storage")] fn get<'a>(disk_col: &DiskTProp<'a, TimeIndexEntry>, row: usize) -> Option { + use bigdecimal::BigDecimal; + use num_traits::FromPrimitive; + match disk_col { DiskTProp::Empty(_) => None, DiskTProp::Bool(tprop_column) => tprop_column.get(row).map(|p| p.into()), DiskTProp::Str64(tprop_column) => tprop_column.get(row).map(|p| p.into()), DiskTProp::Str32(tprop_column) => tprop_column.get(row).map(|p| p.into()), + DiskTProp::Str(tprop_column) => tprop_column.get(row).map(|p| p.into()), DiskTProp::I32(tprop_column) => tprop_column.get(row).map(|p| p.into()), DiskTProp::I64(tprop_column) => tprop_column.get(row).map(|p| p.into()), DiskTProp::U8(tprop_column) => tprop_column.get(row).map(|p| p.into()), @@ -125,5 +132,17 @@ fn get<'a>(disk_col: &DiskTProp<'a, TimeIndexEntry>, row: usize) -> Option DiskTProp::U64(tprop_column) => tprop_column.get(row).map(|p| p.into()), DiskTProp::F32(tprop_column) => tprop_column.get(row).map(|p| p.into()), DiskTProp::F64(tprop_column) => tprop_column.get(row).map(|p| p.into()), + DiskTProp::I128(tprop_column) => { + let d_type = tprop_column.data_type()?; + match d_type { + ArrowDataType::Decimal(_, scale) => tprop_column.get(row).map(|p| { + BigDecimal::from_i128(p) + .unwrap() + .with_scale(*scale as i64) + .into() + }), + _ => unimplemented!("{d_type:?} not supported as disk_graph property"), + } + } } } diff --git a/raphtory/src/db/api/storage/graph/storage_ops/prop_add.rs b/raphtory/src/db/api/storage/graph/storage_ops/prop_add.rs index 57a7321af..c18e40906 100644 --- a/raphtory/src/db/api/storage/graph/storage_ops/prop_add.rs +++ b/raphtory/src/db/api/storage/graph/storage_ops/prop_add.rs @@ -5,7 +5,10 @@ use raphtory_api::core::{ use super::GraphStorage; use crate::{ - core::{entities::graph::tgraph::TemporalGraph, utils::errors::GraphError}, + core::{ + entities::{graph::tgraph::TemporalGraph, properties::props::validate_prop}, + utils::errors::GraphError, + }, db::api::{ mutation::internal::InternalPropertyAdditionOps, storage::graph::edges::edge_storage_ops::{EdgeStorageOps, MemEdge}, @@ -42,6 +45,7 @@ impl InternalPropertyAdditionOps for TemporalGraph { ) -> Result<(), GraphError> { for (prop_id, prop) in props { let prop = self.process_prop_value(prop); + let prop = validate_prop(*prop_id, prop)?; self.graph_meta.add_prop(t, *prop_id, prop)?; } self.update_time(t); @@ -51,6 +55,7 @@ impl InternalPropertyAdditionOps for TemporalGraph { fn internal_add_constant_properties(&self, props: &[(usize, Prop)]) -> Result<(), GraphError> { for (id, prop) in props { let prop = self.process_prop_value(prop); + let prop = validate_prop(*id, prop)?; self.graph_meta.add_constant_prop(*id, prop)?; } Ok(()) @@ -62,6 +67,7 @@ impl InternalPropertyAdditionOps for TemporalGraph { ) -> Result<(), GraphError> { for (id, prop) in props { let prop = self.process_prop_value(prop); + let prop = validate_prop(*id, prop)?; self.graph_meta.update_constant_prop(*id, prop)?; } Ok(()) @@ -75,6 +81,7 @@ impl InternalPropertyAdditionOps for TemporalGraph { let mut node = self.storage.get_node_mut(vid); for (prop_id, prop) in props { let prop = self.process_prop_value(prop); + let prop = validate_prop(*prop_id, prop)?; node.as_mut() .add_constant_prop(*prop_id, prop) .map_err(|err| { @@ -99,6 +106,7 @@ impl InternalPropertyAdditionOps for TemporalGraph { let mut node = self.storage.get_node_mut(vid); for (prop_id, prop) in props { let prop = self.process_prop_value(prop); + let prop = validate_prop(*prop_id, prop)?; node.as_mut().update_constant_prop(*prop_id, prop)?; } Ok(()) @@ -115,6 +123,7 @@ impl InternalPropertyAdditionOps for TemporalGraph { if let Some(edge_layer) = edge_mut.get_layer_mut(layer) { for (prop_id, prop) in props { let prop = self.process_prop_value(prop); + let prop = validate_prop(*prop_id, prop)?; edge_layer .add_constant_prop(*prop_id, prop) .map_err(|err| { @@ -145,6 +154,7 @@ impl InternalPropertyAdditionOps for TemporalGraph { if let Some(edge_layer) = edge_mut.get_layer_mut(layer) { for (prop_id, prop) in props { let prop = self.process_prop_value(prop); + let prop = validate_prop(*prop_id, prop)?; edge_layer.update_constant_prop(*prop_id, prop)?; } Ok(()) diff --git a/raphtory/src/disk_graph/graph_impl/prop_conversion.rs b/raphtory/src/disk_graph/graph_impl/prop_conversion.rs index aff993f97..9cdb59b6b 100644 --- a/raphtory/src/disk_graph/graph_impl/prop_conversion.rs +++ b/raphtory/src/disk_graph/graph_impl/prop_conversion.rs @@ -15,6 +15,7 @@ use crate::{ prelude::{Graph, Prop, PropUnwrap}, }; use itertools::Itertools; +use num_traits::ToPrimitive; use pometry_storage::{ properties::{node_ts, NodePropsBuilder, Properties}, RAError, @@ -100,43 +101,50 @@ pub fn arrow_array_from_props( match prop_type { PropType::Str => { let array: Utf8Array = props.map(|prop| prop.into_str()).collect(); - array.iter().any(|v| v.is_some()).then_some(array.boxed()) + (array.null_count() != array.len()).then_some(array.boxed()) } PropType::U8 => { let array: PrimitiveArray = props.map(|prop| prop.into_u8()).collect(); - array.iter().any(|v| v.is_some()).then_some(array.boxed()) + (array.null_count() != array.len()).then_some(array.boxed()) } PropType::U16 => { let array: PrimitiveArray = props.map(|prop| prop.into_u16()).collect(); - array.iter().any(|v| v.is_some()).then_some(array.boxed()) + (array.null_count() != array.len()).then_some(array.boxed()) } PropType::I32 => { let array: PrimitiveArray = props.map(|prop| prop.into_i32()).collect(); - array.iter().any(|v| v.is_some()).then_some(array.boxed()) + (array.null_count() != array.len()).then_some(array.boxed()) } PropType::I64 => { let array: PrimitiveArray = props.map(|prop| prop.into_i64()).collect(); - array.iter().any(|v| v.is_some()).then_some(array.boxed()) + (array.null_count() != array.len()).then_some(array.boxed()) } PropType::U32 => { let array: PrimitiveArray = props.map(|prop| prop.into_u32()).collect(); - array.iter().any(|v| v.is_some()).then_some(array.boxed()) + (array.null_count() != array.len()).then_some(array.boxed()) } PropType::U64 => { let array: PrimitiveArray = props.map(|prop| prop.into_u64()).collect(); - array.iter().any(|v| v.is_some()).then_some(array.boxed()) + (array.null_count() != array.len()).then_some(array.boxed()) } PropType::F32 => { let array: PrimitiveArray = props.map(|prop| prop.into_f32()).collect(); - array.iter().any(|v| v.is_some()).then_some(array.boxed()) + (array.null_count() != array.len()).then_some(array.boxed()) } PropType::F64 => { let array: PrimitiveArray = props.map(|prop| prop.into_f64()).collect(); - array.iter().any(|v| v.is_some()).then_some(array.boxed()) + (array.null_count() != array.len()).then_some(array.boxed()) } PropType::Bool => { let array: BooleanArray = props.map(|prop| prop.into_bool()).collect(); - array.iter().any(|v| v.is_some()).then_some(array.boxed()) + (array.null_count() != array.len()).then_some(array.boxed()) + } + PropType::Decimal { scale } => { + let array: PrimitiveArray = props + .map(|prop| prop.into_decimal().and_then(|d| d.to_ref().to_i128())) + .collect(); + (array.null_count() != array.len()) + .then_some(array.to(DataType::Decimal(38, scale as usize)).boxed()) } PropType::Empty | PropType::List(_) @@ -183,6 +191,9 @@ pub fn schema_from_prop_meta(prop_map: &PropMapper) -> Schema { PropType::Bool => { schema.push(Field::new(key, DataType::Boolean, true)); } + PropType::Decimal { scale } => { + schema.push(Field::new(key, DataType::Decimal(38, scale as usize), true)); + } prop_type @ (PropType::Empty | PropType::List(_) | PropType::Map(_) diff --git a/raphtory/src/disk_graph/graph_impl/tprops.rs b/raphtory/src/disk_graph/graph_impl/tprops.rs index 5a2e1a10f..c0eef3e65 100644 --- a/raphtory/src/disk_graph/graph_impl/tprops.rs +++ b/raphtory/src/disk_graph/graph_impl/tprops.rs @@ -3,8 +3,13 @@ use crate::{ db::api::{storage::graph::tprop_storage_ops::TPropOps, view::IntoDynBoxed}, prelude::Prop, }; +use bigdecimal::{num_bigint::BigInt, BigDecimal}; +use polars_arrow::datatypes::ArrowDataType; use pometry_storage::{ - chunked_array::{bool_col::ChunkedBoolCol, col::ChunkedPrimitiveCol, utf8_col::StringCol}, + chunked_array::{ + bool_col::ChunkedBoolCol, col::ChunkedPrimitiveCol, utf8_col::StringCol, + utf8_view_col::StringViewCol, + }, prelude::ArrayOps, tprops::{DiskTProp, EmptyTProp, TPropColumn}, }; @@ -49,6 +54,59 @@ impl<'a> TPropOps<'a> for TPropColumn<'a, ChunkedBoolCol<'a>, TimeIndexEntry> { } } +fn scale(dt: Option<&ArrowDataType>) -> Option { + if let ArrowDataType::Decimal(_, scale) = dt? { + Some((*scale).try_into().unwrap()) + } else { + panic!("Expected decimal type") + } +} + +impl<'a> TPropOps<'a> for TPropColumn<'a, ChunkedPrimitiveCol<'a, i128>, TimeIndexEntry> { + fn last_before(&self, t: TimeIndexEntry) -> Option<(TimeIndexEntry, Prop)> { + let scale = scale(self.data_type())?; + self.iter_window_inner(TimeIndexEntry::MIN..t) + .filter_map(|(t, v)| v.map(|v| (t, v))) + .next_back() + .map(move |(t, v)| (t, BigDecimal::new(BigInt::from(v), scale.into()).into())) + } + + fn iter(self) -> impl Iterator + Send + 'a { + let scale = scale(self.data_type()); + let (props, timestamps) = self.into_inner(); + timestamps.into_iter().zip(props).filter_map(move |(t, v)| { + v.zip(scale) + .map(|(v, scale)| (t, BigDecimal::new(BigInt::from(v), scale.into()).into())) + }) + } + + fn iter_window( + self, + r: Range, + ) -> impl Iterator + Send + 'a { + let scale = scale(self.data_type()); + self.iter_window_inner(r).filter_map(move |(t, v)| { + v.zip(scale) + .map(|(v, scale)| (t, BigDecimal::new(BigInt::from(v), scale.into()).into())) + }) + } + + fn at(self, ti: &TimeIndexEntry) -> Option { + let scale = scale(self.data_type())?; + let (props, timestamps) = self.into_inner(); + let t_index = timestamps.position(ti); + if t_index < timestamps.len() { + timestamps.get(t_index).eq(ti).then(|| { + props + .get(t_index) + .map(|v| BigDecimal::new(BigInt::from(v), scale.into()).into()) + })? + } else { + None + } + } +} + impl<'a, T: NativeType + Into> TPropOps<'a> for TPropColumn<'a, ChunkedPrimitiveCol<'a, T>, TimeIndexEntry> { @@ -127,6 +185,44 @@ impl<'a, I: Offset> TPropOps<'a> for TPropColumn<'a, StringCol<'a, I>, TimeIndex } } +impl<'a> TPropOps<'a> for TPropColumn<'a, StringViewCol<'a>, TimeIndexEntry> { + fn last_before(&self, t: TimeIndexEntry) -> Option<(TimeIndexEntry, Prop)> { + self.iter_window_inner(TimeIndexEntry::MIN..t) + .filter_map(|(t, v)| v.map(|v| (t, v))) + .next_back() + .map(|(t, v)| (t, v.into())) + } + + fn iter(self) -> impl Iterator + Send + 'a { + let (props, timestamps) = self.into_inner(); + timestamps + .into_iter() + .zip(props) + .filter_map(|(t, v)| v.map(|v| (t, v.into()))) + } + + fn iter_window( + self, + r: Range, + ) -> impl Iterator + Send + 'a { + self.iter_window_inner(r) + .filter_map(|(t, v)| v.map(|v| (t, v.into()))) + } + + fn at(self, ti: &TimeIndexEntry) -> Option { + let (props, timestamps) = self.into_inner(); + let t_index = timestamps.position(ti); + if t_index < timestamps.len() { + timestamps + .get(t_index) + .eq(ti) + .then(|| props.get(t_index).map(|v| v.into()))? + } else { + None + } + } +} + impl<'a> TPropOps<'a> for EmptyTProp { fn last_before(&self, _t: TimeIndexEntry) -> Option<(TimeIndexEntry, Prop)> { None @@ -162,8 +258,10 @@ macro_rules! for_all { DiskTProp::Bool($pattern) => $result, DiskTProp::Str64($pattern) => $result, DiskTProp::Str32($pattern) => $result, + DiskTProp::Str($pattern) => $result, DiskTProp::I32($pattern) => $result, DiskTProp::I64($pattern) => $result, + DiskTProp::I128($pattern) => $result, DiskTProp::U8($pattern) => $result, DiskTProp::U16($pattern) => $result, DiskTProp::U32($pattern) => $result, diff --git a/raphtory/src/disk_graph/mod.rs b/raphtory/src/disk_graph/mod.rs index 74b86266b..cb386796d 100644 --- a/raphtory/src/disk_graph/mod.rs +++ b/raphtory/src/disk_graph/mod.rs @@ -360,7 +360,7 @@ impl DiskGraphStorage { #[cfg(test)] mod test { - use std::path::Path; + use std::path::{Path, PathBuf}; use itertools::Itertools; use polars_arrow::{ @@ -379,6 +379,8 @@ mod test { prelude::*, }; + use super::{graph_impl::ParquetLayerCols, DiskGraphStorage}; + fn edges_sanity_node_list(edges: &[(u64, u64, i64)]) -> Vec { edges .iter() @@ -570,6 +572,46 @@ mod test { edges_sanity_check_inner(edges, 4, 4, 4) } + #[test] + fn load_decimal_column() { + let parquet_file_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("resources/test/data_0.parquet") + .to_string_lossy() + .to_string(); + + let graph_dir = tempfile::tempdir().unwrap(); + + let layer_parquet_cols = vec![ParquetLayerCols { + parquet_dir: parquet_file_path.as_ref(), + layer: "large", + src_col: "from_address", + dst_col: "to_address", + time_col: "block_timestamp", + exclude_edge_props: vec![], + }]; + let dgs = DiskGraphStorage::load_from_parquets( + graph_dir.path(), + layer_parquet_cols, + None, + 100, + 100, + 1, + None, + None, + ) + .unwrap(); + + let g = dgs.into_graph(); + let actual = g + .edges() + .properties() + .into_iter() + .flat_map(|props| props.temporal().into_iter()) + .flat_map(|(_, view)| view.into_iter()) + .collect::>(); + assert!(!actual.is_empty()); + } + #[test] fn edge_sanity_bad() { let edges = vec![ diff --git a/raphtory/src/io/arrow/dataframe.rs b/raphtory/src/io/arrow/dataframe.rs index d43de1704..5fe6bd05a 100644 --- a/raphtory/src/io/arrow/dataframe.rs +++ b/raphtory/src/io/arrow/dataframe.rs @@ -5,7 +5,7 @@ use crate::{ use itertools::Itertools; use polars_arrow::{ array::{Array, PrimitiveArray, StaticArray}, - compute::cast::{self, CastOptions}, + compute::cast::{self, CastOptionsImpl}, datatypes::{ArrowDataType as DataType, TimeUnit}, }; use rayon::prelude::*; @@ -65,7 +65,7 @@ impl TimeCol { let array = cast::cast( arr, &DataType::Timestamp(TimeUnit::Millisecond, Some("UTC".to_string())), - CastOptions::default(), + CastOptionsImpl::default(), ) .unwrap(); array diff --git a/raphtory/src/io/arrow/prop_handler.rs b/raphtory/src/io/arrow/prop_handler.rs index f3ad58a21..e7b211e8d 100644 --- a/raphtory/src/io/arrow/prop_handler.rs +++ b/raphtory/src/io/arrow/prop_handler.rs @@ -6,6 +6,7 @@ use crate::{ io::arrow::dataframe::DFChunk, prelude::Prop, }; +use bigdecimal::BigDecimal; use chrono::{DateTime, Utc}; use polars_arrow::{ array::{ @@ -193,6 +194,13 @@ fn arr_as_prop(arr: Box) -> Prop { props.into_prop_list() } + DataType::Decimal(precision, scale) if *precision <= 38 => { + let arr = arr.as_any().downcast_ref::>().unwrap(); + arr.iter() + .flatten() + .map(|elem| Prop::Decimal(BigDecimal::new((*elem).into(), *scale as i64))) + .into_prop_list() + } DataType::Null => Prop::List(vec![].into()), dt => panic!("Data type not recognized {dt:?}"), } @@ -230,6 +238,9 @@ fn data_type_as_prop_type(dt: &DataType) -> Result { None => Ok(PropType::NDTime), Some(_) => Ok(PropType::DTime), }, + DataType::Decimal(precision, scale) if *precision <= 38 => Ok(PropType::Decimal { + scale: *scale as i64, + }), DataType::Null => Ok(PropType::Empty), _ => Err(LoadError::InvalidPropertyType(dt.clone()).into()), } @@ -309,6 +320,17 @@ impl PropCol for DTimeCol { StaticArray::get(&self.arr, i).map(self.map) } } + +struct DecimalTimeCol { + arr: PrimitiveArray, + scale: i64, +} + +impl PropCol for DecimalTimeCol { + fn get(&self, i: usize) -> Option { + StaticArray::get(&self.arr, i).map(|v| Prop::Decimal(BigDecimal::new(v.into(), self.scale))) + } +} fn lift_property_col(arr: &dyn Array) -> Box { match arr.data_type() { DataType::Boolean => { @@ -453,6 +475,13 @@ fn lift_property_col(arr: &dyn Array) -> Box { }, } } + DataType::Decimal(precision, scale) if *precision <= 38 => { + let arr = arr.as_any().downcast_ref::>().unwrap(); + Box::new(DecimalTimeCol { + arr: arr.clone(), + scale: *scale as i64, + }) + } unsupported => panic!("Data type not supported: {:?}", unsupported), } } diff --git a/raphtory/src/io/parquet_loaders.rs b/raphtory/src/io/parquet_loaders.rs index 78e4d5f35..94b3f9c8e 100644 --- a/raphtory/src/io/parquet_loaders.rs +++ b/raphtory/src/io/parquet_loaders.rs @@ -308,7 +308,7 @@ pub fn read_parquet_file( // in the schema to create PretendDF let names = schema.fields.iter().map(|f| f.name.clone()).collect_vec(); - let reader = FileReader::new(file, row_groups, schema, None, None, None); + let reader = FileReader::new(file, row_groups, schema, None); Ok((names, reader, num_rows)) } diff --git a/raphtory/src/lib.rs b/raphtory/src/lib.rs index 33c44f1dc..10d4479e1 100644 --- a/raphtory/src/lib.rs +++ b/raphtory/src/lib.rs @@ -145,7 +145,8 @@ pub use raphtory_api::{atomic_extra, core::utils::logging}; #[cfg(test)] mod test_utils { - use crate::prelude::*; + use crate::{core::DECIMAL_MAX, prelude::*}; + use bigdecimal::BigDecimal; use chrono::{DateTime, NaiveDateTime, Utc}; use itertools::Itertools; use proptest::{arbitrary::any, prelude::*}; @@ -245,12 +246,19 @@ mod test_utils { .prop_map(|props| Prop::map(props)) .boxed() } + PropType::Decimal { scale } => { + let scale = *scale; + let dec_max = DECIMAL_MAX; + ((scale as i128)..dec_max) + .prop_map(move |int| Prop::Decimal(BigDecimal::new(int.into(), scale))) + .boxed() + } _ => todo!(), } } pub(crate) fn prop_type() -> impl Strategy { - let leaf = proptest::sample::select(&[ + let leaf = proptest::sample::select(vec![ PropType::Str, PropType::I64, PropType::F64, @@ -258,6 +266,7 @@ mod test_utils { PropType::Bool, PropType::DTime, PropType::NDTime, + // PropType::Decimal { scale }, decimal breaks the tests because of polars-parquet ]); leaf.prop_recursive(3, 10, 10, |inner| { @@ -382,7 +391,7 @@ mod test_utils { nodes: Vec, len: usize, ) -> impl Strategy { - proptest::collection::hash_map(r"\w{1,10}", prop_type(), 2..10).prop_flat_map( + proptest::collection::hash_map(r"\w{1,10}", prop_type(), 2..3).prop_flat_map( move |schema| { let (t_props, c_props) = make_props(schema); @@ -390,8 +399,8 @@ mod test_utils { ( proptest::sample::select(nodes.clone()), i64::MIN..i64::MAX, - proptest::collection::vec(t_props, 1..7), - proptest::collection::vec(c_props, 1..3), + proptest::collection::vec(t_props, 1..2), + proptest::collection::vec(c_props, 1..2), ), 0..=len, ) diff --git a/raphtory/src/python/types/repr.rs b/raphtory/src/python/types/repr.rs index c3da9edd3..8ba84f353 100644 --- a/raphtory/src/python/types/repr.rs +++ b/raphtory/src/python/types/repr.rs @@ -3,6 +3,7 @@ use crate::{ db::api::state::{LazyNodeState, NodeOp, NodeState}, prelude::{GraphViewOps, NodeStateOps, NodeViewOps}, }; +use bigdecimal::BigDecimal; use chrono::{DateTime, NaiveDateTime, TimeZone}; use itertools::Itertools; use pyo3::{prelude::PyAnyMethods, Bound, PyAny, PyObject, Python}; @@ -194,6 +195,12 @@ impl Repr for NaiveDateTime { } } +impl Repr for BigDecimal { + fn repr(&self) -> String { + self.to_string() + } +} + impl Repr for DateTime { fn repr(&self) -> String { self.to_rfc2822() diff --git a/raphtory/src/python/types/wrappers/prop.rs b/raphtory/src/python/types/wrappers/prop.rs index bada687db..8a06b1aa3 100644 --- a/raphtory/src/python/types/wrappers/prop.rs +++ b/raphtory/src/python/types/wrappers/prop.rs @@ -6,9 +6,22 @@ use crate::{ prelude::{GraphViewOps, PropertyFilter}, python::types::repr::Repr, }; -use pyo3::{exceptions::PyTypeError, prelude::*, types::PyBool, IntoPyObjectExt}; +use bigdecimal::BigDecimal; +use pyo3::{ + exceptions::PyTypeError, + prelude::*, + sync::GILOnceCell, + types::{PyBool, PyType}, + IntoPyObjectExt, +}; use pyo3_arrow::PyArray; -use std::{collections::HashSet, ops::Deref, sync::Arc}; +use std::{collections::HashSet, ops::Deref, str::FromStr, sync::Arc}; + +static DECIMAL_CLS: GILOnceCell> = GILOnceCell::new(); + +fn get_decimal_cls(py: Python<'_>) -> PyResult<&Bound<'_, PyType>> { + DECIMAL_CLS.import(py, "decimal", "Decimal") +} impl<'py> IntoPyObject<'py> for Prop { type Target = PyAny; @@ -40,6 +53,10 @@ impl<'py> IntoPyObject<'py> for Prop { Prop::F32(v) => v.into_pyobject(py)?.into_any(), Prop::List(v) => v.deref().clone().into_pyobject(py)?.into_any(), // Fixme: optimise the clone here? Prop::Map(v) => v.deref().clone().into_pyobject(py)?.into_any(), + Prop::Decimal(d) => { + let decl_cls = get_decimal_cls(py)?; + decl_cls.call1((d.to_string(),))? + } }) } } @@ -53,6 +70,20 @@ impl<'source> FromPyObject<'source> for Prop { if let Ok(v) = ob.extract() { return Ok(Prop::I64(v)); } + if ob.get_type().name()?.contains("Decimal")? { + // this sits before f64, otherwise it will be picked up as f64 + let py_str = &ob.str()?; + let rs_str = &py_str.to_cow()?; + + return Ok(BigDecimal::from_str(&rs_str) + .map_err(|_| { + PyTypeError::new_err(format!("Could not convert {} to Decimal", rs_str)) + }) + .and_then(|bd| { + Prop::try_from_bd(bd) + .map_err(|_| PyTypeError::new_err(format!("Decimal too large {}", rs_str))) + })?); + } if let Ok(v) = ob.extract() { return Ok(Prop::F64(v)); } @@ -100,6 +131,7 @@ impl Repr for Prop { Prop::F32(v) => v.repr(), Prop::List(v) => v.repr(), Prop::Map(v) => v.repr(), + Prop::Decimal(v) => v.repr(), } } } diff --git a/raphtory/src/serialise/parquet/mod.rs b/raphtory/src/serialise/parquet/mod.rs index 96db1159d..414ae2ba3 100644 --- a/raphtory/src/serialise/parquet/mod.rs +++ b/raphtory/src/serialise/parquet/mod.rs @@ -412,9 +412,10 @@ mod test { NodeFixture, }, }; + use bigdecimal::BigDecimal; use chrono::{DateTime, Utc}; use proptest::prelude::*; - use std::collections::HashMap; + use std::{collections::HashMap, str::FromStr}; #[test] fn node_temp_props() { @@ -422,6 +423,117 @@ mod test { check_parquet_encoding(nodes.into()); } + #[test] + #[ignore = "This is broken because of polars-parquet"] + fn node_temp_props_decimal() { + let nodes = NodeFixture { + nodes: vec![( + 0, + 0, + vec![( + "Y".to_string(), + Prop::List( + vec![ + Prop::List( + vec![ + Prop::Decimal(BigDecimal::from_str("13e-13").unwrap()), + Prop::Decimal(BigDecimal::from_str("13e-13").unwrap()), + Prop::Decimal(BigDecimal::from_str("13e-13").unwrap()), + Prop::Decimal(BigDecimal::from_str("13e-13").unwrap()), + Prop::Decimal(BigDecimal::from_str("13e-13").unwrap()), + Prop::Decimal(BigDecimal::from_str("13e-13").unwrap()), + ] + .into(), + ), + Prop::List( + vec![ + Prop::Decimal(BigDecimal::from_str("13e-13").unwrap()), + Prop::Decimal( + BigDecimal::from_str("191558628130262966499e-13").unwrap(), + ), + ] + .into(), + ), + Prop::List( + vec![ + Prop::Decimal( + BigDecimal::from_str( + "87897464368906578673545214461637064026e-13", + ) + .unwrap(), + ), + Prop::Decimal( + BigDecimal::from_str( + "94016349560001117444902279806303521844e-13", + ) + .unwrap(), + ), + Prop::Decimal( + BigDecimal::from_str( + "84910690243002010022611521070762324633e-13", + ) + .unwrap(), + ), + Prop::Decimal( + BigDecimal::from_str( + "31555839249842363263204026650232450040e-13", + ) + .unwrap(), + ), + Prop::Decimal( + BigDecimal::from_str( + "86230621933535017744166139882102600331e-13", + ) + .unwrap(), + ), + Prop::Decimal( + BigDecimal::from_str( + "8814065867434113836260276824023976656e-13", + ) + .unwrap(), + ), + Prop::Decimal( + BigDecimal::from_str( + "5911907249021330427648764706320440531e-13", + ) + .unwrap(), + ), + Prop::Decimal( + BigDecimal::from_str( + "86835517758183724431483793853154818250e-13", + ) + .unwrap(), + ), + Prop::Decimal( + BigDecimal::from_str( + "89347387369804528029924787786630755616e-13", + ) + .unwrap(), + ), + ] + .into(), + ), + ] + .into(), + ), + )], + )], + node_const_props: [( + 0u64, + vec![( + "x".to_string(), + Prop::Decimal( + BigDecimal::from_str("47852687012008324212654110188753175619e-22").unwrap(), + ), + )], + )] + .into_iter() + .collect(), + }; + + check_parquet_encoding(nodes.into()); + } + #[test] fn edge_const_props_maps() { let g_fixture = GraphFixture { @@ -713,7 +825,7 @@ mod test { #[test] fn write_nodes_any_props_to_parquet() { - proptest!(|(nodes in build_nodes_dyn(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 10))| { + proptest!(|(nodes in build_nodes_dyn(vec![0, 1, 2, 3, 4, 5, 6, 7 ,8, 9], 10))| { check_parquet_encoding(nodes.into()); }); } diff --git a/raphtory/src/serialise/parquet/model.rs b/raphtory/src/serialise/parquet/model.rs index b07bbb0df..57bebacad 100644 --- a/raphtory/src/serialise/parquet/model.rs +++ b/raphtory/src/serialise/parquet/model.rs @@ -50,6 +50,8 @@ impl<'a> Serialize for ParquetProp<'a> { } state.end() } + + Prop::Decimal(dec) => serializer.serialize_str(&dec.to_string()), _ => todo!(), } } diff --git a/raphtory/src/serialise/proto_ext.rs b/raphtory/src/serialise/proto_ext.rs index eb83a2c1d..34d42aded 100644 --- a/raphtory/src/serialise/proto_ext.rs +++ b/raphtory/src/serialise/proto_ext.rs @@ -687,27 +687,27 @@ pub fn collect_props<'a>( } fn as_proto_prop(prop: &Prop) -> proto::Prop { - let value: prop::Value = match prop { - Prop::Bool(b) => prop::Value::BoolValue(*b), - Prop::U8(u) => prop::Value::U8((*u).into()), - Prop::U16(u) => prop::Value::U16((*u).into()), - Prop::U32(u) => prop::Value::U32(*u), - Prop::I32(i) => prop::Value::I32(*i), - Prop::I64(i) => prop::Value::I64(*i), - Prop::U64(u) => prop::Value::U64(*u), - Prop::F32(f) => prop::Value::F32(*f), - Prop::F64(f) => prop::Value::F64(*f), - Prop::Str(s) => prop::Value::Str(s.to_string()), + let value: Option = match prop { + Prop::Bool(b) => Some(prop::Value::BoolValue(*b)), + Prop::U8(u) => Some(prop::Value::U8((*u).into())), + Prop::U16(u) => Some(prop::Value::U16((*u).into())), + Prop::U32(u) => Some(prop::Value::U32(*u)), + Prop::I32(i) => Some(prop::Value::I32(*i)), + Prop::I64(i) => Some(prop::Value::I64(*i)), + Prop::U64(u) => Some(prop::Value::U64(*u)), + Prop::F32(f) => Some(prop::Value::F32(*f)), + Prop::F64(f) => Some(prop::Value::F64(*f)), + Prop::Str(s) => Some(prop::Value::Str(s.to_string())), Prop::List(list) => { let properties = list.iter().map(as_proto_prop).collect(); - prop::Value::Prop(prop::Props { properties }) + Some(prop::Value::Prop(prop::Props { properties })) } Prop::Map(map) => { let map = map .iter() .map(|(k, v)| (k.to_string(), as_proto_prop(v))) .collect(); - prop::Value::Map(prop::Dict { map }) + Some(prop::Value::Map(prop::Dict { map })) } Prop::NDTime(ndt) => { let (year, month, day) = (ndt.date().year(), ndt.date().month(), ndt.date().day()); @@ -727,15 +727,16 @@ fn as_proto_prop(prop: &Prop) -> proto::Prop { second: second as u32, nanos: nanos as u32, }; - prop::Value::NdTime(proto_ndt) + Some(prop::Value::NdTime(proto_ndt)) } - Prop::DTime(dt) => { - prop::Value::DTime(dt.to_rfc3339_opts(chrono::SecondsFormat::AutoSi, true)) - } - Prop::Array(blob) => prop::Value::Array(Array { + Prop::DTime(dt) => Some(prop::Value::DTime( + dt.to_rfc3339_opts(chrono::SecondsFormat::AutoSi, true), + )), + Prop::Array(blob) => Some(prop::Value::Array(Array { data: blob.to_vec_u8(), - }), + })), + Prop::Decimal(_) => None, }; - proto::Prop { value: Some(value) } + proto::Prop { value } } diff --git a/raphtory/src/vectors/template.rs b/raphtory/src/vectors/template.rs index 24ac22bec..4abb4e550 100644 --- a/raphtory/src/vectors/template.rs +++ b/raphtory/src/vectors/template.rs @@ -152,6 +152,7 @@ impl From for Value { .iter() .map(|(key, value)| (key.to_string(), value.clone())) .collect(), + Prop::Decimal(value) => Value::from(value.to_string()), } } } @@ -288,7 +289,7 @@ impl<'graph, G: GraphViewOps<'graph>> From> for EdgeTemplateContext } } -pub const DEFAULT_NODE_TEMPLATE: &str = "Node {{ name }} {% if node_type is none %} has the following properties:{% else %} is a {{ node_type }} with the following properties:{% endif %} +pub const DEFAULT_NODE_TEMPLATE: &str = "Node {{ name }}{% if node_type is none %} has the following properties:{% else %} is a {{ node_type }} with the following properties:{% endif %} {% for (key, value) in constant_properties|items %} {{ key }}: {{ value }} @@ -445,7 +446,7 @@ mod template_tests { let rendered = docs.next().unwrap().content; let expected = indoc! {" node node2 is a person with the following properties: - const_test: const_test_value"}; + const_test: const_test_value "}; assert_eq!(&rendered, expected); }