├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── src └── main.rs └── yellow_tripdata_2022-01.parquet /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "ahash" 7 | version = "0.7.6" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 10 | dependencies = [ 11 | "getrandom", 12 | "once_cell", 13 | "version_check", 14 | ] 15 | 16 | [[package]] 17 | name = "ahash" 18 | version = "0.8.2" 19 | source = "registry+https://github.com/rust-lang/crates.io-index" 20 | checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107" 21 | dependencies = [ 22 | "cfg-if", 23 | "getrandom", 24 | "once_cell", 25 | "version_check", 26 | ] 27 | 28 | [[package]] 29 | name = "aho-corasick" 30 | version = "0.7.20" 31 | source = "registry+https://github.com/rust-lang/crates.io-index" 32 | checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" 33 | dependencies = [ 34 | "memchr", 35 | ] 36 | 37 | [[package]] 38 | name = "android_system_properties" 39 | version = "0.1.5" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 42 | dependencies = [ 43 | "libc", 44 | ] 45 | 46 | [[package]] 47 | name = "anyhow" 48 | version = "1.0.66" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" 51 | 52 | [[package]] 53 | name = "arrow2" 54 | version = "0.14.2" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "ee6f62e41078c967a4c063fcbdfd3801a2a9632276402c045311c4d73d0845f3" 57 | dependencies = [ 58 | "ahash 0.7.6", 59 | "bytemuck", 60 | "chrono", 61 | "dyn-clone", 62 | "either", 63 | "ethnum", 64 | "foreign_vec", 65 | "hash_hasher", 66 | "lexical-core", 67 | "multiversion", 68 | "num-traits", 69 | "simdutf8", 70 | "strength_reduce", 71 | ] 72 | 73 | [[package]] 74 | name = "autocfg" 75 | version = "1.1.0" 76 | source = "registry+https://github.com/rust-lang/crates.io-index" 77 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 78 | 79 | [[package]] 80 | name = "bindgen" 81 | version = "0.61.0" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "8a022e58a142a46fea340d68012b9201c094e93ec3d033a944a24f8fd4a4f09a" 84 | dependencies = [ 85 | "bitflags", 86 | "cexpr", 87 | "clang-sys", 88 | "lazy_static", 89 | "lazycell", 90 | "peeking_take_while", 91 | "proc-macro2", 92 | "quote", 93 | "regex", 94 | "rustc-hash", 95 | "shlex", 96 | "syn", 97 | ] 98 | 99 | [[package]] 100 | name = "bitflags" 101 | version = "1.3.2" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 104 | 105 | [[package]] 106 | name = "bumpalo" 107 | version = "3.11.1" 108 | source = "registry+https://github.com/rust-lang/crates.io-index" 109 | checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" 110 | 111 | [[package]] 112 | name = "bytemuck" 113 | version = "1.12.3" 114 | source = "registry+https://github.com/rust-lang/crates.io-index" 115 | checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" 116 | dependencies = [ 117 | "bytemuck_derive", 118 | ] 119 | 120 | [[package]] 121 | name = "bytemuck_derive" 122 | version = "1.3.0" 123 | source = "registry+https://github.com/rust-lang/crates.io-index" 124 | checksum = "5fe233b960f12f8007e3db2d136e3cb1c291bfd7396e384ee76025fc1a3932b4" 125 | dependencies = [ 126 | "proc-macro2", 127 | "quote", 128 | "syn", 129 | ] 130 | 131 | [[package]] 132 | name = "cc" 133 | version = "1.0.77" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" 136 | dependencies = [ 137 | "jobserver", 138 | ] 139 | 140 | [[package]] 141 | name = "cexpr" 142 | version = "0.6.0" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 145 | dependencies = [ 146 | "nom", 147 | ] 148 | 149 | [[package]] 150 | name = "cfg-if" 151 | version = "1.0.0" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 154 | 155 | [[package]] 156 | name = "chrono" 157 | version = "0.4.23" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" 160 | dependencies = [ 161 | "iana-time-zone", 162 | "js-sys", 163 | "num-integer", 164 | "num-traits", 165 | "time", 166 | "wasm-bindgen", 167 | "winapi", 168 | ] 169 | 170 | [[package]] 171 | name = "clang-sys" 172 | version = "1.4.0" 173 | source = "registry+https://github.com/rust-lang/crates.io-index" 174 | checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" 175 | dependencies = [ 176 | "glob", 177 | "libc", 178 | "libloading", 179 | ] 180 | 181 | [[package]] 182 | name = "codespan-reporting" 183 | version = "0.11.1" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 186 | dependencies = [ 187 | "termcolor", 188 | "unicode-width", 189 | ] 190 | 191 | [[package]] 192 | name = "comfy-table" 193 | version = "6.1.3" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "e621e7e86c46fd8a14c32c6ae3cb95656621b4743a27d0cffedb831d46e7ad21" 196 | dependencies = [ 197 | "crossterm", 198 | "strum", 199 | "strum_macros", 200 | "unicode-width", 201 | ] 202 | 203 | [[package]] 204 | name = "core-foundation-sys" 205 | version = "0.8.3" 206 | source = "registry+https://github.com/rust-lang/crates.io-index" 207 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 208 | 209 | [[package]] 210 | name = "crossbeam-channel" 211 | version = "0.5.6" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" 214 | dependencies = [ 215 | "cfg-if", 216 | "crossbeam-utils", 217 | ] 218 | 219 | [[package]] 220 | name = "crossbeam-deque" 221 | version = "0.8.2" 222 | source = "registry+https://github.com/rust-lang/crates.io-index" 223 | checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" 224 | dependencies = [ 225 | "cfg-if", 226 | "crossbeam-epoch", 227 | "crossbeam-utils", 228 | ] 229 | 230 | [[package]] 231 | name = "crossbeam-epoch" 232 | version = "0.9.13" 233 | source = "registry+https://github.com/rust-lang/crates.io-index" 234 | checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" 235 | dependencies = [ 236 | "autocfg", 237 | "cfg-if", 238 | "crossbeam-utils", 239 | "memoffset", 240 | "scopeguard", 241 | ] 242 | 243 | [[package]] 244 | name = "crossbeam-utils" 245 | version = "0.8.14" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" 248 | dependencies = [ 249 | "cfg-if", 250 | ] 251 | 252 | [[package]] 253 | name = "crossterm" 254 | version = "0.25.0" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" 257 | dependencies = [ 258 | "bitflags", 259 | "crossterm_winapi", 260 | "libc", 261 | "mio", 262 | "parking_lot", 263 | "signal-hook", 264 | "signal-hook-mio", 265 | "winapi", 266 | ] 267 | 268 | [[package]] 269 | name = "crossterm_winapi" 270 | version = "0.9.0" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" 273 | dependencies = [ 274 | "winapi", 275 | ] 276 | 277 | [[package]] 278 | name = "csv-core" 279 | version = "0.1.10" 280 | source = "registry+https://github.com/rust-lang/crates.io-index" 281 | checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" 282 | dependencies = [ 283 | "memchr", 284 | ] 285 | 286 | [[package]] 287 | name = "cxx" 288 | version = "1.0.82" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "d4a41a86530d0fe7f5d9ea779916b7cadd2d4f9add748b99c2c029cbbdfaf453" 291 | dependencies = [ 292 | "cc", 293 | "cxxbridge-flags", 294 | "cxxbridge-macro", 295 | "link-cplusplus", 296 | ] 297 | 298 | [[package]] 299 | name = "cxx-build" 300 | version = "1.0.82" 301 | source = "registry+https://github.com/rust-lang/crates.io-index" 302 | checksum = "06416d667ff3e3ad2df1cd8cd8afae5da26cf9cec4d0825040f88b5ca659a2f0" 303 | dependencies = [ 304 | "cc", 305 | "codespan-reporting", 306 | "once_cell", 307 | "proc-macro2", 308 | "quote", 309 | "scratch", 310 | "syn", 311 | ] 312 | 313 | [[package]] 314 | name = "cxxbridge-flags" 315 | version = "1.0.82" 316 | source = "registry+https://github.com/rust-lang/crates.io-index" 317 | checksum = "820a9a2af1669deeef27cb271f476ffd196a2c4b6731336011e0ba63e2c7cf71" 318 | 319 | [[package]] 320 | name = "cxxbridge-macro" 321 | version = "1.0.82" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "a08a6e2fcc370a089ad3b4aaf54db3b1b4cee38ddabce5896b33eb693275f470" 324 | dependencies = [ 325 | "proc-macro2", 326 | "quote", 327 | "syn", 328 | ] 329 | 330 | [[package]] 331 | name = "dirs" 332 | version = "4.0.0" 333 | source = "registry+https://github.com/rust-lang/crates.io-index" 334 | checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" 335 | dependencies = [ 336 | "dirs-sys", 337 | ] 338 | 339 | [[package]] 340 | name = "dirs-sys" 341 | version = "0.3.7" 342 | source = "registry+https://github.com/rust-lang/crates.io-index" 343 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 344 | dependencies = [ 345 | "libc", 346 | "redox_users", 347 | "winapi", 348 | ] 349 | 350 | [[package]] 351 | name = "duckdb-polars-rust" 352 | version = "0.1.0" 353 | dependencies = [ 354 | "arrow2", 355 | "libduckdb-sys", 356 | "polars", 357 | ] 358 | 359 | [[package]] 360 | name = "dyn-clone" 361 | version = "1.0.9" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" 364 | 365 | [[package]] 366 | name = "either" 367 | version = "1.8.0" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" 370 | 371 | [[package]] 372 | name = "enum_dispatch" 373 | version = "0.3.8" 374 | source = "registry+https://github.com/rust-lang/crates.io-index" 375 | checksum = "0eb359f1476bf611266ac1f5355bc14aeca37b299d0ebccc038ee7058891c9cb" 376 | dependencies = [ 377 | "once_cell", 378 | "proc-macro2", 379 | "quote", 380 | "syn", 381 | ] 382 | 383 | [[package]] 384 | name = "ethnum" 385 | version = "1.3.2" 386 | source = "registry+https://github.com/rust-lang/crates.io-index" 387 | checksum = "0198b9d0078e0f30dedc7acbb21c974e838fc8fae3ee170128658a98cb2c1c04" 388 | 389 | [[package]] 390 | name = "foreign_vec" 391 | version = "0.1.0" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "ee1b05cbd864bcaecbd3455d6d967862d446e4ebfc3c2e5e5b9841e53cba6673" 394 | 395 | [[package]] 396 | name = "getrandom" 397 | version = "0.2.8" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" 400 | dependencies = [ 401 | "cfg-if", 402 | "libc", 403 | "wasi 0.11.0+wasi-snapshot-preview1", 404 | ] 405 | 406 | [[package]] 407 | name = "glob" 408 | version = "0.3.0" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" 411 | 412 | [[package]] 413 | name = "hash_hasher" 414 | version = "2.0.3" 415 | source = "registry+https://github.com/rust-lang/crates.io-index" 416 | checksum = "74721d007512d0cb3338cd20f0654ac913920061a4c4d0d8708edb3f2a698c0c" 417 | 418 | [[package]] 419 | name = "hashbrown" 420 | version = "0.12.3" 421 | source = "registry+https://github.com/rust-lang/crates.io-index" 422 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 423 | dependencies = [ 424 | "ahash 0.7.6", 425 | "rayon", 426 | ] 427 | 428 | [[package]] 429 | name = "heck" 430 | version = "0.4.0" 431 | source = "registry+https://github.com/rust-lang/crates.io-index" 432 | checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" 433 | 434 | [[package]] 435 | name = "hermit-abi" 436 | version = "0.1.19" 437 | source = "registry+https://github.com/rust-lang/crates.io-index" 438 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 439 | dependencies = [ 440 | "libc", 441 | ] 442 | 443 | [[package]] 444 | name = "iana-time-zone" 445 | version = "0.1.53" 446 | source = "registry+https://github.com/rust-lang/crates.io-index" 447 | checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" 448 | dependencies = [ 449 | "android_system_properties", 450 | "core-foundation-sys", 451 | "iana-time-zone-haiku", 452 | "js-sys", 453 | "wasm-bindgen", 454 | "winapi", 455 | ] 456 | 457 | [[package]] 458 | name = "iana-time-zone-haiku" 459 | version = "0.1.1" 460 | source = "registry+https://github.com/rust-lang/crates.io-index" 461 | checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" 462 | dependencies = [ 463 | "cxx", 464 | "cxx-build", 465 | ] 466 | 467 | [[package]] 468 | name = "indexmap" 469 | version = "1.9.2" 470 | source = "registry+https://github.com/rust-lang/crates.io-index" 471 | checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" 472 | dependencies = [ 473 | "autocfg", 474 | "hashbrown", 475 | ] 476 | 477 | [[package]] 478 | name = "jobserver" 479 | version = "0.1.25" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" 482 | dependencies = [ 483 | "libc", 484 | ] 485 | 486 | [[package]] 487 | name = "js-sys" 488 | version = "0.3.60" 489 | source = "registry+https://github.com/rust-lang/crates.io-index" 490 | checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" 491 | dependencies = [ 492 | "wasm-bindgen", 493 | ] 494 | 495 | [[package]] 496 | name = "lazy_static" 497 | version = "1.4.0" 498 | source = "registry+https://github.com/rust-lang/crates.io-index" 499 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 500 | 501 | [[package]] 502 | name = "lazycell" 503 | version = "1.3.0" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" 506 | 507 | [[package]] 508 | name = "lexical" 509 | version = "6.1.1" 510 | source = "registry+https://github.com/rust-lang/crates.io-index" 511 | checksum = "c7aefb36fd43fef7003334742cbf77b243fcd36418a1d1bdd480d613a67968f6" 512 | dependencies = [ 513 | "lexical-core", 514 | ] 515 | 516 | [[package]] 517 | name = "lexical-core" 518 | version = "0.8.5" 519 | source = "registry+https://github.com/rust-lang/crates.io-index" 520 | checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" 521 | dependencies = [ 522 | "lexical-parse-float", 523 | "lexical-parse-integer", 524 | "lexical-util", 525 | "lexical-write-float", 526 | "lexical-write-integer", 527 | ] 528 | 529 | [[package]] 530 | name = "lexical-parse-float" 531 | version = "0.8.5" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" 534 | dependencies = [ 535 | "lexical-parse-integer", 536 | "lexical-util", 537 | "static_assertions", 538 | ] 539 | 540 | [[package]] 541 | name = "lexical-parse-integer" 542 | version = "0.8.6" 543 | source = "registry+https://github.com/rust-lang/crates.io-index" 544 | checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" 545 | dependencies = [ 546 | "lexical-util", 547 | "static_assertions", 548 | ] 549 | 550 | [[package]] 551 | name = "lexical-util" 552 | version = "0.8.5" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" 555 | dependencies = [ 556 | "static_assertions", 557 | ] 558 | 559 | [[package]] 560 | name = "lexical-write-float" 561 | version = "0.8.5" 562 | source = "registry+https://github.com/rust-lang/crates.io-index" 563 | checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" 564 | dependencies = [ 565 | "lexical-util", 566 | "lexical-write-integer", 567 | "static_assertions", 568 | ] 569 | 570 | [[package]] 571 | name = "lexical-write-integer" 572 | version = "0.8.5" 573 | source = "registry+https://github.com/rust-lang/crates.io-index" 574 | checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" 575 | dependencies = [ 576 | "lexical-util", 577 | "static_assertions", 578 | ] 579 | 580 | [[package]] 581 | name = "libc" 582 | version = "0.2.137" 583 | source = "registry+https://github.com/rust-lang/crates.io-index" 584 | checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" 585 | 586 | [[package]] 587 | name = "libduckdb-sys" 588 | version = "0.6.0" 589 | source = "registry+https://github.com/rust-lang/crates.io-index" 590 | checksum = "b1cc21fd0507309358905dc9042813131370daf8f65e8a0bcf0d01571bdc5f54" 591 | dependencies = [ 592 | "bindgen", 593 | "cc", 594 | "pkg-config", 595 | "vcpkg", 596 | ] 597 | 598 | [[package]] 599 | name = "libloading" 600 | version = "0.7.4" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" 603 | dependencies = [ 604 | "cfg-if", 605 | "winapi", 606 | ] 607 | 608 | [[package]] 609 | name = "libm" 610 | version = "0.2.6" 611 | source = "registry+https://github.com/rust-lang/crates.io-index" 612 | checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" 613 | 614 | [[package]] 615 | name = "link-cplusplus" 616 | version = "1.0.7" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" 619 | dependencies = [ 620 | "cc", 621 | ] 622 | 623 | [[package]] 624 | name = "lock_api" 625 | version = "0.4.9" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 628 | dependencies = [ 629 | "autocfg", 630 | "scopeguard", 631 | ] 632 | 633 | [[package]] 634 | name = "log" 635 | version = "0.4.17" 636 | source = "registry+https://github.com/rust-lang/crates.io-index" 637 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 638 | dependencies = [ 639 | "cfg-if", 640 | ] 641 | 642 | [[package]] 643 | name = "memchr" 644 | version = "2.5.0" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 647 | 648 | [[package]] 649 | name = "memmap2" 650 | version = "0.5.8" 651 | source = "registry+https://github.com/rust-lang/crates.io-index" 652 | checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" 653 | dependencies = [ 654 | "libc", 655 | ] 656 | 657 | [[package]] 658 | name = "memoffset" 659 | version = "0.7.1" 660 | source = "registry+https://github.com/rust-lang/crates.io-index" 661 | checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" 662 | dependencies = [ 663 | "autocfg", 664 | ] 665 | 666 | [[package]] 667 | name = "minimal-lexical" 668 | version = "0.2.1" 669 | source = "registry+https://github.com/rust-lang/crates.io-index" 670 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 671 | 672 | [[package]] 673 | name = "mio" 674 | version = "0.8.5" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" 677 | dependencies = [ 678 | "libc", 679 | "log", 680 | "wasi 0.11.0+wasi-snapshot-preview1", 681 | "windows-sys", 682 | ] 683 | 684 | [[package]] 685 | name = "multiversion" 686 | version = "0.6.1" 687 | source = "registry+https://github.com/rust-lang/crates.io-index" 688 | checksum = "025c962a3dd3cc5e0e520aa9c612201d127dcdf28616974961a649dca64f5373" 689 | dependencies = [ 690 | "multiversion-macros", 691 | ] 692 | 693 | [[package]] 694 | name = "multiversion-macros" 695 | version = "0.6.1" 696 | source = "registry+https://github.com/rust-lang/crates.io-index" 697 | checksum = "a8a3e2bde382ebf960c1f3e79689fa5941625fe9bf694a1cb64af3e85faff3af" 698 | dependencies = [ 699 | "proc-macro2", 700 | "quote", 701 | "syn", 702 | ] 703 | 704 | [[package]] 705 | name = "nom" 706 | version = "7.1.1" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" 709 | dependencies = [ 710 | "memchr", 711 | "minimal-lexical", 712 | ] 713 | 714 | [[package]] 715 | name = "num" 716 | version = "0.4.0" 717 | source = "registry+https://github.com/rust-lang/crates.io-index" 718 | checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" 719 | dependencies = [ 720 | "num-bigint", 721 | "num-complex", 722 | "num-integer", 723 | "num-iter", 724 | "num-rational", 725 | "num-traits", 726 | ] 727 | 728 | [[package]] 729 | name = "num-bigint" 730 | version = "0.4.3" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" 733 | dependencies = [ 734 | "autocfg", 735 | "num-integer", 736 | "num-traits", 737 | ] 738 | 739 | [[package]] 740 | name = "num-complex" 741 | version = "0.4.2" 742 | source = "registry+https://github.com/rust-lang/crates.io-index" 743 | checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" 744 | dependencies = [ 745 | "num-traits", 746 | ] 747 | 748 | [[package]] 749 | name = "num-integer" 750 | version = "0.1.45" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 753 | dependencies = [ 754 | "autocfg", 755 | "num-traits", 756 | ] 757 | 758 | [[package]] 759 | name = "num-iter" 760 | version = "0.1.43" 761 | source = "registry+https://github.com/rust-lang/crates.io-index" 762 | checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" 763 | dependencies = [ 764 | "autocfg", 765 | "num-integer", 766 | "num-traits", 767 | ] 768 | 769 | [[package]] 770 | name = "num-rational" 771 | version = "0.4.1" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" 774 | dependencies = [ 775 | "autocfg", 776 | "num-bigint", 777 | "num-integer", 778 | "num-traits", 779 | ] 780 | 781 | [[package]] 782 | name = "num-traits" 783 | version = "0.2.15" 784 | source = "registry+https://github.com/rust-lang/crates.io-index" 785 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 786 | dependencies = [ 787 | "autocfg", 788 | "libm", 789 | ] 790 | 791 | [[package]] 792 | name = "num_cpus" 793 | version = "1.14.0" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" 796 | dependencies = [ 797 | "hermit-abi", 798 | "libc", 799 | ] 800 | 801 | [[package]] 802 | name = "once_cell" 803 | version = "1.16.0" 804 | source = "registry+https://github.com/rust-lang/crates.io-index" 805 | checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" 806 | 807 | [[package]] 808 | name = "parking_lot" 809 | version = "0.12.1" 810 | source = "registry+https://github.com/rust-lang/crates.io-index" 811 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 812 | dependencies = [ 813 | "lock_api", 814 | "parking_lot_core", 815 | ] 816 | 817 | [[package]] 818 | name = "parking_lot_core" 819 | version = "0.9.5" 820 | source = "registry+https://github.com/rust-lang/crates.io-index" 821 | checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" 822 | dependencies = [ 823 | "cfg-if", 824 | "libc", 825 | "redox_syscall", 826 | "smallvec", 827 | "windows-sys", 828 | ] 829 | 830 | [[package]] 831 | name = "peeking_take_while" 832 | version = "0.1.2" 833 | source = "registry+https://github.com/rust-lang/crates.io-index" 834 | checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" 835 | 836 | [[package]] 837 | name = "pkg-config" 838 | version = "0.3.26" 839 | source = "registry+https://github.com/rust-lang/crates.io-index" 840 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" 841 | 842 | [[package]] 843 | name = "polars" 844 | version = "0.25.1" 845 | source = "registry+https://github.com/rust-lang/crates.io-index" 846 | checksum = "112b33c016ec5949e414016b24d329a2188051e4f65d59a555986ecd7c7387ae" 847 | dependencies = [ 848 | "polars-core", 849 | "polars-io", 850 | "polars-lazy", 851 | "polars-ops", 852 | "polars-time", 853 | ] 854 | 855 | [[package]] 856 | name = "polars-arrow" 857 | version = "0.25.1" 858 | source = "registry+https://github.com/rust-lang/crates.io-index" 859 | checksum = "7aac9a1d70c683cda8dd4958bd489d8c0206c5ab1435a656a14563c6415f5a64" 860 | dependencies = [ 861 | "arrow2", 862 | "hashbrown", 863 | "num", 864 | "thiserror", 865 | ] 866 | 867 | [[package]] 868 | name = "polars-core" 869 | version = "0.25.1" 870 | source = "registry+https://github.com/rust-lang/crates.io-index" 871 | checksum = "fda4c06062d5e22036e686762bd2da2cf2fc003728e123a99f9c2df7335afc10" 872 | dependencies = [ 873 | "ahash 0.8.2", 874 | "anyhow", 875 | "arrow2", 876 | "bitflags", 877 | "chrono", 878 | "comfy-table", 879 | "hashbrown", 880 | "indexmap", 881 | "num", 882 | "once_cell", 883 | "polars-arrow", 884 | "polars-utils", 885 | "rand", 886 | "rand_distr", 887 | "rayon", 888 | "regex", 889 | "smartstring", 890 | "thiserror", 891 | ] 892 | 893 | [[package]] 894 | name = "polars-io" 895 | version = "0.25.1" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | checksum = "125fd8302050f3b6be46f7a9a92a4ac62dcab738c4e32cd2af7b9be5f4cdf709" 898 | dependencies = [ 899 | "ahash 0.8.2", 900 | "anyhow", 901 | "arrow2", 902 | "csv-core", 903 | "dirs", 904 | "lexical", 905 | "lexical-core", 906 | "memchr", 907 | "memmap2", 908 | "num", 909 | "once_cell", 910 | "polars-arrow", 911 | "polars-core", 912 | "polars-time", 913 | "polars-utils", 914 | "rayon", 915 | "regex", 916 | "simdutf8", 917 | ] 918 | 919 | [[package]] 920 | name = "polars-lazy" 921 | version = "0.25.1" 922 | source = "registry+https://github.com/rust-lang/crates.io-index" 923 | checksum = "55376a76c7bd050bb42fd124c290e1908e7ebf8f4c6cce6c4c41e56402f10a33" 924 | dependencies = [ 925 | "ahash 0.8.2", 926 | "bitflags", 927 | "glob", 928 | "polars-arrow", 929 | "polars-core", 930 | "polars-io", 931 | "polars-ops", 932 | "polars-pipe", 933 | "polars-plan", 934 | "polars-time", 935 | "polars-utils", 936 | "rayon", 937 | ] 938 | 939 | [[package]] 940 | name = "polars-ops" 941 | version = "0.25.1" 942 | source = "registry+https://github.com/rust-lang/crates.io-index" 943 | checksum = "bfd3f6552b3e9539634c35047f372db331b6227f75c36fcbe4670ab58bbcbeb3" 944 | dependencies = [ 945 | "arrow2", 946 | "polars-arrow", 947 | "polars-core", 948 | "polars-utils", 949 | ] 950 | 951 | [[package]] 952 | name = "polars-pipe" 953 | version = "0.25.1" 954 | source = "registry+https://github.com/rust-lang/crates.io-index" 955 | checksum = "fa865a4fc6dcfb9967505c4714c29277898e21dd29ea7633a3f9d1abbe879a7d" 956 | dependencies = [ 957 | "enum_dispatch", 958 | "hashbrown", 959 | "num", 960 | "polars-core", 961 | "polars-io", 962 | "polars-plan", 963 | "polars-utils", 964 | "rayon", 965 | ] 966 | 967 | [[package]] 968 | name = "polars-plan" 969 | version = "0.25.1" 970 | source = "registry+https://github.com/rust-lang/crates.io-index" 971 | checksum = "673480b0ee55b0abb5be247862bfe1f3b623897f504006a10adbc25c878bf531" 972 | dependencies = [ 973 | "ahash 0.8.2", 974 | "polars-arrow", 975 | "polars-core", 976 | "polars-io", 977 | "polars-ops", 978 | "polars-time", 979 | "polars-utils", 980 | "rayon", 981 | ] 982 | 983 | [[package]] 984 | name = "polars-time" 985 | version = "0.25.1" 986 | source = "registry+https://github.com/rust-lang/crates.io-index" 987 | checksum = "783e53abda73c226807e850d91de67ab376d91866f378306d3e7f6b9844c17de" 988 | dependencies = [ 989 | "chrono", 990 | "lexical", 991 | "polars-arrow", 992 | "polars-core", 993 | "polars-utils", 994 | ] 995 | 996 | [[package]] 997 | name = "polars-utils" 998 | version = "0.25.1" 999 | source = "registry+https://github.com/rust-lang/crates.io-index" 1000 | checksum = "f2d5b6ec3c45989c1fbaf0e13a3832f4b5e418e776518d7a24d62672e5366364" 1001 | dependencies = [ 1002 | "rayon", 1003 | ] 1004 | 1005 | [[package]] 1006 | name = "ppv-lite86" 1007 | version = "0.2.17" 1008 | source = "registry+https://github.com/rust-lang/crates.io-index" 1009 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 1010 | 1011 | [[package]] 1012 | name = "proc-macro2" 1013 | version = "1.0.47" 1014 | source = "registry+https://github.com/rust-lang/crates.io-index" 1015 | checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" 1016 | dependencies = [ 1017 | "unicode-ident", 1018 | ] 1019 | 1020 | [[package]] 1021 | name = "quote" 1022 | version = "1.0.21" 1023 | source = "registry+https://github.com/rust-lang/crates.io-index" 1024 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 1025 | dependencies = [ 1026 | "proc-macro2", 1027 | ] 1028 | 1029 | [[package]] 1030 | name = "rand" 1031 | version = "0.8.5" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1034 | dependencies = [ 1035 | "libc", 1036 | "rand_chacha", 1037 | "rand_core", 1038 | ] 1039 | 1040 | [[package]] 1041 | name = "rand_chacha" 1042 | version = "0.3.1" 1043 | source = "registry+https://github.com/rust-lang/crates.io-index" 1044 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1045 | dependencies = [ 1046 | "ppv-lite86", 1047 | "rand_core", 1048 | ] 1049 | 1050 | [[package]] 1051 | name = "rand_core" 1052 | version = "0.6.4" 1053 | source = "registry+https://github.com/rust-lang/crates.io-index" 1054 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1055 | dependencies = [ 1056 | "getrandom", 1057 | ] 1058 | 1059 | [[package]] 1060 | name = "rand_distr" 1061 | version = "0.4.3" 1062 | source = "registry+https://github.com/rust-lang/crates.io-index" 1063 | checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" 1064 | dependencies = [ 1065 | "num-traits", 1066 | "rand", 1067 | ] 1068 | 1069 | [[package]] 1070 | name = "rayon" 1071 | version = "1.6.0" 1072 | source = "registry+https://github.com/rust-lang/crates.io-index" 1073 | checksum = "1e060280438193c554f654141c9ea9417886713b7acd75974c85b18a69a88e0b" 1074 | dependencies = [ 1075 | "crossbeam-deque", 1076 | "either", 1077 | "rayon-core", 1078 | ] 1079 | 1080 | [[package]] 1081 | name = "rayon-core" 1082 | version = "1.10.1" 1083 | source = "registry+https://github.com/rust-lang/crates.io-index" 1084 | checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" 1085 | dependencies = [ 1086 | "crossbeam-channel", 1087 | "crossbeam-deque", 1088 | "crossbeam-utils", 1089 | "num_cpus", 1090 | ] 1091 | 1092 | [[package]] 1093 | name = "redox_syscall" 1094 | version = "0.2.16" 1095 | source = "registry+https://github.com/rust-lang/crates.io-index" 1096 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1097 | dependencies = [ 1098 | "bitflags", 1099 | ] 1100 | 1101 | [[package]] 1102 | name = "redox_users" 1103 | version = "0.4.3" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 1106 | dependencies = [ 1107 | "getrandom", 1108 | "redox_syscall", 1109 | "thiserror", 1110 | ] 1111 | 1112 | [[package]] 1113 | name = "regex" 1114 | version = "1.7.0" 1115 | source = "registry+https://github.com/rust-lang/crates.io-index" 1116 | checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" 1117 | dependencies = [ 1118 | "aho-corasick", 1119 | "memchr", 1120 | "regex-syntax", 1121 | ] 1122 | 1123 | [[package]] 1124 | name = "regex-syntax" 1125 | version = "0.6.28" 1126 | source = "registry+https://github.com/rust-lang/crates.io-index" 1127 | checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" 1128 | 1129 | [[package]] 1130 | name = "rustc-hash" 1131 | version = "1.1.0" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1134 | 1135 | [[package]] 1136 | name = "rustversion" 1137 | version = "1.0.9" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" 1140 | 1141 | [[package]] 1142 | name = "scopeguard" 1143 | version = "1.1.0" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1146 | 1147 | [[package]] 1148 | name = "scratch" 1149 | version = "1.0.2" 1150 | source = "registry+https://github.com/rust-lang/crates.io-index" 1151 | checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" 1152 | 1153 | [[package]] 1154 | name = "shlex" 1155 | version = "1.1.0" 1156 | source = "registry+https://github.com/rust-lang/crates.io-index" 1157 | checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" 1158 | 1159 | [[package]] 1160 | name = "signal-hook" 1161 | version = "0.3.14" 1162 | source = "registry+https://github.com/rust-lang/crates.io-index" 1163 | checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" 1164 | dependencies = [ 1165 | "libc", 1166 | "signal-hook-registry", 1167 | ] 1168 | 1169 | [[package]] 1170 | name = "signal-hook-mio" 1171 | version = "0.2.3" 1172 | source = "registry+https://github.com/rust-lang/crates.io-index" 1173 | checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" 1174 | dependencies = [ 1175 | "libc", 1176 | "mio", 1177 | "signal-hook", 1178 | ] 1179 | 1180 | [[package]] 1181 | name = "signal-hook-registry" 1182 | version = "1.4.0" 1183 | source = "registry+https://github.com/rust-lang/crates.io-index" 1184 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" 1185 | dependencies = [ 1186 | "libc", 1187 | ] 1188 | 1189 | [[package]] 1190 | name = "simdutf8" 1191 | version = "0.1.4" 1192 | source = "registry+https://github.com/rust-lang/crates.io-index" 1193 | checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" 1194 | 1195 | [[package]] 1196 | name = "smallvec" 1197 | version = "1.10.0" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1200 | 1201 | [[package]] 1202 | name = "smartstring" 1203 | version = "1.0.1" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" 1206 | dependencies = [ 1207 | "autocfg", 1208 | "static_assertions", 1209 | "version_check", 1210 | ] 1211 | 1212 | [[package]] 1213 | name = "static_assertions" 1214 | version = "1.1.0" 1215 | source = "registry+https://github.com/rust-lang/crates.io-index" 1216 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 1217 | 1218 | [[package]] 1219 | name = "strength_reduce" 1220 | version = "0.2.4" 1221 | source = "registry+https://github.com/rust-lang/crates.io-index" 1222 | checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" 1223 | 1224 | [[package]] 1225 | name = "strum" 1226 | version = "0.24.1" 1227 | source = "registry+https://github.com/rust-lang/crates.io-index" 1228 | checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" 1229 | 1230 | [[package]] 1231 | name = "strum_macros" 1232 | version = "0.24.3" 1233 | source = "registry+https://github.com/rust-lang/crates.io-index" 1234 | checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" 1235 | dependencies = [ 1236 | "heck", 1237 | "proc-macro2", 1238 | "quote", 1239 | "rustversion", 1240 | "syn", 1241 | ] 1242 | 1243 | [[package]] 1244 | name = "syn" 1245 | version = "1.0.105" 1246 | source = "registry+https://github.com/rust-lang/crates.io-index" 1247 | checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" 1248 | dependencies = [ 1249 | "proc-macro2", 1250 | "quote", 1251 | "unicode-ident", 1252 | ] 1253 | 1254 | [[package]] 1255 | name = "termcolor" 1256 | version = "1.1.3" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 1259 | dependencies = [ 1260 | "winapi-util", 1261 | ] 1262 | 1263 | [[package]] 1264 | name = "thiserror" 1265 | version = "1.0.37" 1266 | source = "registry+https://github.com/rust-lang/crates.io-index" 1267 | checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" 1268 | dependencies = [ 1269 | "thiserror-impl", 1270 | ] 1271 | 1272 | [[package]] 1273 | name = "thiserror-impl" 1274 | version = "1.0.37" 1275 | source = "registry+https://github.com/rust-lang/crates.io-index" 1276 | checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" 1277 | dependencies = [ 1278 | "proc-macro2", 1279 | "quote", 1280 | "syn", 1281 | ] 1282 | 1283 | [[package]] 1284 | name = "time" 1285 | version = "0.1.45" 1286 | source = "registry+https://github.com/rust-lang/crates.io-index" 1287 | checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" 1288 | dependencies = [ 1289 | "libc", 1290 | "wasi 0.10.0+wasi-snapshot-preview1", 1291 | "winapi", 1292 | ] 1293 | 1294 | [[package]] 1295 | name = "unicode-ident" 1296 | version = "1.0.5" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" 1299 | 1300 | [[package]] 1301 | name = "unicode-width" 1302 | version = "0.1.10" 1303 | source = "registry+https://github.com/rust-lang/crates.io-index" 1304 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 1305 | 1306 | [[package]] 1307 | name = "vcpkg" 1308 | version = "0.2.15" 1309 | source = "registry+https://github.com/rust-lang/crates.io-index" 1310 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1311 | 1312 | [[package]] 1313 | name = "version_check" 1314 | version = "0.9.4" 1315 | source = "registry+https://github.com/rust-lang/crates.io-index" 1316 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1317 | 1318 | [[package]] 1319 | name = "wasi" 1320 | version = "0.10.0+wasi-snapshot-preview1" 1321 | source = "registry+https://github.com/rust-lang/crates.io-index" 1322 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" 1323 | 1324 | [[package]] 1325 | name = "wasi" 1326 | version = "0.11.0+wasi-snapshot-preview1" 1327 | source = "registry+https://github.com/rust-lang/crates.io-index" 1328 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1329 | 1330 | [[package]] 1331 | name = "wasm-bindgen" 1332 | version = "0.2.83" 1333 | source = "registry+https://github.com/rust-lang/crates.io-index" 1334 | checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" 1335 | dependencies = [ 1336 | "cfg-if", 1337 | "wasm-bindgen-macro", 1338 | ] 1339 | 1340 | [[package]] 1341 | name = "wasm-bindgen-backend" 1342 | version = "0.2.83" 1343 | source = "registry+https://github.com/rust-lang/crates.io-index" 1344 | checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" 1345 | dependencies = [ 1346 | "bumpalo", 1347 | "log", 1348 | "once_cell", 1349 | "proc-macro2", 1350 | "quote", 1351 | "syn", 1352 | "wasm-bindgen-shared", 1353 | ] 1354 | 1355 | [[package]] 1356 | name = "wasm-bindgen-macro" 1357 | version = "0.2.83" 1358 | source = "registry+https://github.com/rust-lang/crates.io-index" 1359 | checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" 1360 | dependencies = [ 1361 | "quote", 1362 | "wasm-bindgen-macro-support", 1363 | ] 1364 | 1365 | [[package]] 1366 | name = "wasm-bindgen-macro-support" 1367 | version = "0.2.83" 1368 | source = "registry+https://github.com/rust-lang/crates.io-index" 1369 | checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" 1370 | dependencies = [ 1371 | "proc-macro2", 1372 | "quote", 1373 | "syn", 1374 | "wasm-bindgen-backend", 1375 | "wasm-bindgen-shared", 1376 | ] 1377 | 1378 | [[package]] 1379 | name = "wasm-bindgen-shared" 1380 | version = "0.2.83" 1381 | source = "registry+https://github.com/rust-lang/crates.io-index" 1382 | checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" 1383 | 1384 | [[package]] 1385 | name = "winapi" 1386 | version = "0.3.9" 1387 | source = "registry+https://github.com/rust-lang/crates.io-index" 1388 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1389 | dependencies = [ 1390 | "winapi-i686-pc-windows-gnu", 1391 | "winapi-x86_64-pc-windows-gnu", 1392 | ] 1393 | 1394 | [[package]] 1395 | name = "winapi-i686-pc-windows-gnu" 1396 | version = "0.4.0" 1397 | source = "registry+https://github.com/rust-lang/crates.io-index" 1398 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1399 | 1400 | [[package]] 1401 | name = "winapi-util" 1402 | version = "0.1.5" 1403 | source = "registry+https://github.com/rust-lang/crates.io-index" 1404 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1405 | dependencies = [ 1406 | "winapi", 1407 | ] 1408 | 1409 | [[package]] 1410 | name = "winapi-x86_64-pc-windows-gnu" 1411 | version = "0.4.0" 1412 | source = "registry+https://github.com/rust-lang/crates.io-index" 1413 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1414 | 1415 | [[package]] 1416 | name = "windows-sys" 1417 | version = "0.42.0" 1418 | source = "registry+https://github.com/rust-lang/crates.io-index" 1419 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 1420 | dependencies = [ 1421 | "windows_aarch64_gnullvm", 1422 | "windows_aarch64_msvc", 1423 | "windows_i686_gnu", 1424 | "windows_i686_msvc", 1425 | "windows_x86_64_gnu", 1426 | "windows_x86_64_gnullvm", 1427 | "windows_x86_64_msvc", 1428 | ] 1429 | 1430 | [[package]] 1431 | name = "windows_aarch64_gnullvm" 1432 | version = "0.42.0" 1433 | source = "registry+https://github.com/rust-lang/crates.io-index" 1434 | checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" 1435 | 1436 | [[package]] 1437 | name = "windows_aarch64_msvc" 1438 | version = "0.42.0" 1439 | source = "registry+https://github.com/rust-lang/crates.io-index" 1440 | checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" 1441 | 1442 | [[package]] 1443 | name = "windows_i686_gnu" 1444 | version = "0.42.0" 1445 | source = "registry+https://github.com/rust-lang/crates.io-index" 1446 | checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" 1447 | 1448 | [[package]] 1449 | name = "windows_i686_msvc" 1450 | version = "0.42.0" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" 1453 | 1454 | [[package]] 1455 | name = "windows_x86_64_gnu" 1456 | version = "0.42.0" 1457 | source = "registry+https://github.com/rust-lang/crates.io-index" 1458 | checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" 1459 | 1460 | [[package]] 1461 | name = "windows_x86_64_gnullvm" 1462 | version = "0.42.0" 1463 | source = "registry+https://github.com/rust-lang/crates.io-index" 1464 | checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" 1465 | 1466 | [[package]] 1467 | name = "windows_x86_64_msvc" 1468 | version = "0.42.0" 1469 | source = "registry+https://github.com/rust-lang/crates.io-index" 1470 | checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" 1471 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "duckdb-polars-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | arrow2 = "0.14.2" 10 | libduckdb-sys = { version = "0.6.0", features = ["bundled"] } 11 | polars = "0.25.1" 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # duckdb-polars-rust 2 | 3 | This repo shows an end-to-end example of how to go from a DuckDB query 4 | to a Polars dataframe in Rust using DuckDB's Arrow query interface. 5 | 6 | It's best paired with this blog post: [https://vikramoberoi.com/using-polars-on-results-from-duckdbs-arrow-interface-in-rust/](https://vikramoberoi.com/using-polars-on-results-from-duckdbs-arrow-interface-in-rust/) 7 | 8 | ## Note 9 | 10 | The example here uses Rust's bindings for DuckDB's C API, [libduckdb-sys](https://lib.rs/crates/libduckdb-sys). A friendlier API exists in [duckdb-rs](https://crates.io/crates/duckdb), 11 | but as of publishing this code it does does not support DuckDB's nested types (lists, structs, maps). 12 | 13 | If you don't need those, you may be better off simply using [duckdb-rs](https://crates.io/crates/duckdb). The code to use Polars with results from that API will be different. 14 | 15 | Credit to `kylebarron` on the Polars Discord for the following info if you use `duckdb-rs` instead: 16 | 17 | > ... there are two different arrow implementations in rust, arrow and arrow2. The duckdb crate uses arrow while polars uses arrow2, so you can't automatically pass a polars chunk (i.e. an arrow2 record batch) to the duckdb crate. But you should be able to use the Arrow C data interface to pass data from arrow2 to arrow without a copy. So (I think) you should be able to do polars dataframe -> arrow2 chunks -> arrow ffi -> arrow record batches -> duckdb crate. And then not need to do any manual pointer work or any of your own unsafe code 18 | 19 | ## Contributing 20 | 21 | Did you find an error? Is this example not up-to-date? Want to improve this code? Feel free to open a PR. 22 | 23 | * The code uses a large unsafe block that can be reduced in size. 24 | * A good next step might be to create an easier-to-use iterator over these query results. 25 | 26 | ## Questions? 27 | 28 | Open an issue or say hi on [Twitter](https//www.twitter.com). 29 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use arrow2::array::{Array, Float64Array, Int32Array, StructArray}; 2 | 3 | use libduckdb_sys::*; 4 | use polars::prelude::*; 5 | use std::ffi::{CStr, CString}; 6 | use std::os::raw::{c_char, c_void}; 7 | use std::{mem, ptr}; 8 | 9 | fn main() { 10 | let mut db: duckdb_database = ptr::null_mut(); 11 | let mut conn: duckdb_connection = ptr::null_mut(); 12 | 13 | unsafe { 14 | // Open a DuckDB connection in memory. 15 | if duckdb_open(ptr::null_mut(), &mut db) != duckdb_state_DuckDBSuccess { 16 | panic!("duckdb_open error"); 17 | } 18 | if duckdb_connect(db, &mut conn) != duckdb_state_DuckDBSuccess { 19 | panic!("duckdb_connect error"); 20 | } 21 | 22 | // Querying parquet files requires loading the parquet extension. 23 | execute_statement(conn, "INSTALL parquet"); 24 | execute_statement(conn, "LOAD parquet"); 25 | 26 | let sql = " 27 | SELECT date_trunc('day', tpep_pickup_datetime) AS pickup_date, \ 28 | SUM(passenger_count) AS total_passenger_count, \ 29 | SUM(trip_distance) AS total_trip_distance, \ 30 | SUM(tip_amount) AS total_tip_amount, \ 31 | SUM(tolls_amount) AS total_tolls_amount, \ 32 | SUM(improvement_surcharge) AS total_improvement_surcharge, \ 33 | SUM(total_amount) AS total_amount \ 34 | FROM 'yellow_tripdata_2022-01.parquet' \ 35 | GROUP BY 1"; 36 | 37 | let sql = CString::new(sql).unwrap(); 38 | 39 | // This executes the query and prepares a data structure we use to fetch 40 | // batches of results in Arrow arrays. `duckdb_arrow` is an alias for 41 | // `void *` in DuckDB's C API. I don't know what is stored at this 42 | // address once we execute `duckdb_query_arrow`, but we use it to 43 | // consume results in the loop below. 44 | let mut result: duckdb_arrow = ptr::null_mut(); 45 | let state = duckdb_query_arrow(conn, sql.as_ptr(), &mut result); 46 | if state == duckdb_state_DuckDBError { 47 | let error_message: *const c_char = duckdb_query_arrow_error(result); 48 | let error_message = CStr::from_ptr(error_message).to_str().unwrap(); 49 | panic!("{}", error_message); 50 | } 51 | 52 | // Time to consume the results of the query and do something with it 53 | // using polars. Here we're going to: 54 | // 55 | // 1. Fetch a batch of results into an Arrow array. This is a C struct. 56 | // 2. Convert that Arrow array into a safer and easier-to-use Rust arrow2::Array. 57 | // 3. Construct a Polars dataframe from that arrow2::Array. 58 | // 4. Do some computation over the batch of results. 59 | // 60 | // We need to keep track of the result count so we break when all results 61 | // have been consumed. 62 | 63 | let mut record_count = 0; 64 | loop { 65 | if record_count == duckdb_arrow_row_count(result).try_into().unwrap() { 66 | break; 67 | } 68 | 69 | /////////////////////////////////////////////////////////////////// 70 | // 1. Fetch a batch of arrow results. // 71 | /////////////////////////////////////////////////////////////////// 72 | 73 | // arrow2::ffi::{ArrowArray, ArrowSchema} are representations of 74 | // these structs: 75 | // 76 | // https://arrow.apache.org/docs/format/CDataInterface.html#structure-definitions 77 | let mut ffi_arrow_array: arrow2::ffi::ArrowArray = arrow2::ffi::ArrowArray::empty(); 78 | let state = duckdb_query_arrow_array( 79 | result, 80 | &mut &mut ffi_arrow_array as *mut _ as *mut *mut c_void, // Help me understand this!! I got it from duckdb-rs. 81 | ); 82 | 83 | if state != duckdb_state_DuckDBSuccess { 84 | panic!("duckdb_query_arrow_array error"); 85 | } 86 | 87 | let mut schema = &arrow2::ffi::ArrowSchema::empty(); 88 | let schema = &mut schema; 89 | let state = duckdb_query_arrow_schema(result, schema as *mut _ as *mut *mut c_void); 90 | if state != duckdb_state_DuckDBSuccess { 91 | panic!("duckdb_query_arrow_schema error"); 92 | } 93 | 94 | /////////////////////////////////////////////////////////////////// 95 | // 2. Convert the C Arrow array into an arrow2::Array. // 96 | /////////////////////////////////////////////////////////////////// 97 | 98 | let field = arrow2::ffi::import_field_from_c(schema).unwrap(); 99 | let arrow_array = 100 | arrow2::ffi::import_array_from_c(ffi_arrow_array, field.data_type).expect("ok"); 101 | 102 | /////////////////////////////////////////////////////////////////// 103 | // 3. Construct a polars dataframe from an arrow::Array. // 104 | /////////////////////////////////////////////////////////////////// 105 | 106 | // We know our query is going to return a timestamp followed by 6 107 | // floats. Each of these columns will be a series in our dataframe. 108 | // 109 | // DuckDB materializes its results in a StructArray: 110 | // https://docs.rs/arrow2/latest/arrow2/array/struct.StructArray.html 111 | // 112 | // StructArrays just represent multiple arrays with the same number 113 | // of rows. We need to take each array in the StructArray and turn 114 | // it into a polars Series. 115 | 116 | let struct_array = arrow_array 117 | .as_any() 118 | .downcast_ref::() 119 | .expect("This Arrow Array should be a StructArray."); 120 | 121 | /* 122 | * If you want to find out what Arrow data types are being returned 123 | * from your query it's helpful to print out the StructArray's fields. 124 | * 125 | * println!("{:?}", struct_array.fields()); 126 | * 127 | * Each array in the StructArray will need to be downcast to the 128 | * proper type. 129 | * 130 | * All Arrow datatypes are here: 131 | * https://docs.rs/arrow2/latest/arrow2/datatypes/enum.DataType.html 132 | * 133 | * You can use all this info to do this dynamically. The example below 134 | * is specific to the query we run above. 135 | */ 136 | 137 | // A DataFrame is a vector of Series. 138 | let mut df_series: Vec = vec![]; 139 | 140 | // The Arrow DataType for dates is Date32, which are are signed 141 | // 32-bit integers. 142 | let pickup_date_series = Series::try_from(( 143 | "pickup_date", 144 | struct_array.values()[0] 145 | .as_any() 146 | .downcast_ref::() 147 | .unwrap() 148 | .to_boxed(), 149 | )) 150 | .unwrap(); 151 | 152 | df_series.push(pickup_date_series); 153 | 154 | let series_names = vec![ 155 | (1, "daily_passenger_count"), 156 | (2, "daily_trip_distance"), 157 | (3, "daily_tip_amount"), 158 | (4, "daily_tolls_amount"), 159 | (5, "daily_improvement_surcharge"), 160 | (6, "daily_total"), 161 | ]; 162 | 163 | for (idx, name) in series_names { 164 | let series = Series::try_from(( 165 | name, 166 | struct_array.values()[idx] 167 | .as_any() 168 | .downcast_ref::() 169 | .unwrap() 170 | .to_boxed(), 171 | )) 172 | .unwrap(); 173 | df_series.push(series); 174 | } 175 | 176 | let df = DataFrame::new(df_series).unwrap(); 177 | 178 | /////////////////////////////////////////////////////////////////// 179 | // 4. Do some computation over the dataframe. // 180 | /////////////////////////////////////////////////////////////////// 181 | 182 | let out = df.sum(); 183 | println!("{}", out); 184 | 185 | record_count += arrow_array.len(); 186 | } 187 | 188 | // I think we have actually have to call duckdb_query_arrow one more time. 189 | // We don't care about the result -- it cleans up/frees the previous results 190 | // it returns. 191 | // 192 | // See: https://duckdb.org/docs/api/c/api#duckdb_query_arrow_array 193 | // 194 | // The docs don't state this situation specifically, but if that call frees 195 | // the previous `out_array`, then presumably we'd have a memory leak if 196 | // we didn't do this. 197 | // 198 | // I might be wrong about this. This program doesn't crash, though -- I 199 | // think that is a good sign. 200 | let mut ffi_arrow_array: arrow2::ffi::ArrowArray = arrow2::ffi::ArrowArray::empty(); 201 | let state = duckdb_query_arrow_array( 202 | result, 203 | &mut &mut ffi_arrow_array as *mut _ as *mut *mut c_void, // Help me understand this!! I got it from duckdb-rs. 204 | ); 205 | if state == duckdb_state_DuckDBError { 206 | let error_message: *const c_char = duckdb_query_arrow_error(result); 207 | let error_message = CStr::from_ptr(error_message).to_str().unwrap(); 208 | panic!("{}", error_message); 209 | } 210 | 211 | // Destroy the result struct. We're done with it. 212 | duckdb_destroy_arrow(&mut result); 213 | } 214 | } 215 | 216 | /* 217 | * Executes a statement without fetching any results. 218 | */ 219 | unsafe fn execute_statement(conn: duckdb_connection, statement: &str) { 220 | let statement = CString::new(statement).unwrap(); 221 | 222 | // DuckDB's C API has two query functions: 223 | // 224 | // 1. duckdb_query (demonstrated below) 225 | // 2. duckdb_query_arrow (demonstrated in main()) 226 | // 227 | // This is an example of using duckdb_query to execute a statement. 228 | let mut result: duckdb_result = mem::zeroed(); 229 | let state = duckdb_query(conn, statement.as_ptr(), &mut result); 230 | 231 | if state == duckdb_state_DuckDBError { 232 | let error_message: *const c_char = duckdb_result_error(&mut result); 233 | let error_message = CStr::from_ptr(error_message).to_str().unwrap(); 234 | panic!("{}", error_message); 235 | } 236 | 237 | duckdb_destroy_result(&mut result); 238 | } 239 | -------------------------------------------------------------------------------- /yellow_tripdata_2022-01.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voberoi/duckdb-polars-rust/0701033fd50c8ef57bbaceb6aa2afd3c6983ac82/yellow_tripdata_2022-01.parquet --------------------------------------------------------------------------------