diff --git a/Cargo.lock b/Cargo.lock index b08d561..9b4c7c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,16 +1,44 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ "memchr", ] @@ -31,42 +59,49 @@ dependencies = [ ] [[package]] -name = "ansi_term" -version = "0.12.1" +name = "arrayvec" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" dependencies = [ - "winapi", + "nodrop", ] -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrow" -version = "3.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d74faf1b951f686da25c0cf575c6f654beb3fd461fa3caabd2dbd68fe715513" +checksum = "a5f89d2bc04fa746ee395d20c4cbfa508e4cce5c00bae816f0fae434fcfb9853" dependencies = [ - "cfg_aliases", + "ahash", + "bitflags", "chrono", - "csv", "flatbuffers", + "half", + "hashbrown", "hex", "indexmap", "lazy_static", "lexical-core", + "multiversion", "num", - "rand 0.7.3", "regex", "serde", "serde_derive", "serde_json", ] +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + [[package]] name = "autocfg" version = "1.0.1" @@ -74,22 +109,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] -name = "base64" -version = "0.12.3" +name = "backtrace" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide 0.5.3", + "object", + "rustc-demangle", +] [[package]] -name = "bigdecimal" -version = "0.2.0" +name = "base64" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc403c26e6b03005522e6e8053384c4e881dfe5b2bf041c0c2c49be33d64a539" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", - "serde", -] +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bitflags" @@ -119,16 +157,10 @@ dependencies = [ ] [[package]] -name = "bstr" -version = "0.2.15" +name = "bumpalo" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d" -dependencies = [ - "lazy_static", - "memchr", - "regex-automata", - "serde", -] +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "byte-unit" @@ -145,11 +177,23 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" +[[package]] +name = "bytes" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" + +[[package]] +name = "capnp" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94e1364fccd72a72985acce20e240d419935e2debf0b004fd8821ce3720e2f4" + [[package]] name = "cc" -version = "1.0.66" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" dependencies = [ "jobserver", ] @@ -160,12 +204,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "chrono" version = "0.4.19" @@ -181,16 +219,20 @@ dependencies = [ ] [[package]] -name = "codespan-reporting" -version = "0.11.0" +name = "chrono-humanize" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6ce42b8998a383572e0a802d859b1f00c79b7b7474e62fff88ee5c2845d9c13" +checksum = "2eddc119501d583fd930cb92144e605f44e0252c38dd89d9247fffa1993375cb" dependencies = [ - "serde", - "termcolor", - "unicode-width", + "chrono", ] +[[package]] +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + [[package]] name = "crc32fast" version = "1.2.1" @@ -201,43 +243,105 @@ dependencies = [ ] [[package]] -name = "csv" -version = "1.1.5" +name = "crossbeam-channel" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d58633299b24b515ac72a3f869f8b91306a3cec616a602843a383acd6f9e97" +checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" dependencies = [ - "bstr", - "csv-core", - "itoa", - "ryu", - "serde", + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] -name = "csv-core" -version = "0.1.10" +name = "crossbeam-epoch" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07db9d94cbd326813772c968ccd25999e5f8ae22f4f8d1b11effa37ef6ce281d" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", + "once_cell", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d82ee10ce34d7bc12c2122495e7593a9c41347ecdd64185af4ecf72cb1a7f83" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" +dependencies = [ + "winapi", +] + +[[package]] +name = "cstr_core" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +checksum = "644828c273c063ab0d39486ba42a5d1f3a499d35529c759e763a9c6cb8a0fb08" dependencies = [ + "cty", "memchr", ] [[package]] -name = "derive-new" -version = "0.5.9" +name = "ctor" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" +checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" dependencies = [ - "proc-macro2", "quote", "syn", ] [[package]] -name = "dtoa" -version = "0.4.7" +name = "cty" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d7ed2934d741c6b37e33e3832298e8850b53fd2d2bea03873375596c7cea4e" +checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] [[package]] name = "dunce" @@ -251,11 +355,42 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +[[package]] +name = "erased-serde" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81d013529d5574a60caeda29e179e695125448e5de52e3874f7b4c1d7360e18e" +dependencies = [ + "serde", +] + +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "flatbuffers" -version = "0.8.3" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b5b0f949bdb25c077c83184ac689ae38ae392683d4c71e98be9736db66e94c" +checksum = "86b428b715fdbdd1c364b84573b5fdc0f84f8e423661b9f398735278bc7f2b6a" dependencies = [ "bitflags", "smallvec", @@ -271,54 +406,48 @@ dependencies = [ "cfg-if", "crc32fast", "libc", - "miniz_oxide", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "miniz_oxide 0.4.3", ] [[package]] name = "getrandom" -version = "0.2.2" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ "cfg-if", "libc", - "wasi 0.10.0+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] -name = "getset" -version = "0.1.1" +name = "ghost" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b328c01a4d71d2d8173daa93562a73ab0fe85616876f02500f53d82948c504" +checksum = "b93490550b1782c589a350f2211fff2e34682e25fed17ef53fc4fa8fe184975e" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", "syn", ] [[package]] -name = "glob" -version = "0.3.0" +name = "gimli" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" + +[[package]] +name = "half" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "c207b0ee023c7fce79daf01828163aaf53a1ddd0be8b1ef9541da7d41f6fa63a" [[package]] name = "hashbrown" -version = "0.9.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +checksum = "607c8a29735385251a339424dd462993c0fed8fa09d378f259377df08c126022" [[package]] name = "hermit-abi" @@ -337,9 +466,9 @@ checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" [[package]] name = "indexmap" -version = "1.6.1" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", "hashbrown", @@ -353,22 +482,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6104619c35f8835695e517cfb80fb7142139ee4b53f4d0fa4c8dca6e98fbc66" [[package]] -name = "itertools" -version = "0.9.0" +name = "inventory" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +checksum = "84344c6e0b90a9e2b6f3f9abe5cc74402684e348df7b32adca28747e0cef091a" dependencies = [ - "either", + "ctor", + "ghost", ] [[package]] -name = "itertools" -version = "0.10.0" +name = "is_ci" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319" -dependencies = [ - "either", -] +checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb" [[package]] name = "itoa" @@ -385,6 +512,15 @@ dependencies = [ "libc", ] +[[package]] +name = "js-sys" +version = "0.3.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3fac17f7123a73ca62df411b1bf727ccc805daa070338fda671c86dac1bdc27" +dependencies = [ + "wasm-bindgen", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -393,28 +529,83 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lexical-core" -version = "0.7.5" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21f866863575d0e1d654fbeeabdc927292fdf862873dc3c96c6f753357e13374" +checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" +dependencies = [ + "lexical-parse-float", + "lexical-parse-integer", + "lexical-util", + "lexical-write-float", + "lexical-write-integer", +] + +[[package]] +name = "lexical-parse-float" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +dependencies = [ + "lexical-parse-integer", + "lexical-util", + "static_assertions", +] + +[[package]] +name = "lexical-parse-integer" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +dependencies = [ + "lexical-util", + "static_assertions", +] + +[[package]] +name = "lexical-util" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" dependencies = [ - "arrayvec", - "bitflags", - "cfg-if", - "ryu", + "static_assertions", +] + +[[package]] +name = "lexical-write-float" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +dependencies = [ + "lexical-util", + "lexical-write-integer", + "static_assertions", +] + +[[package]] +name = "lexical-write-integer" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +dependencies = [ + "lexical-util", "static_assertions", ] [[package]] name = "libc" -version = "0.2.86" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "linked-hash-map" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +dependencies = [ + "serde", + "serde_test", +] [[package]] name = "log" @@ -447,9 +638,49 @@ dependencies = [ [[package]] name = "memchr" -version = "2.3.4" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miette" +version = "5.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89d67f6972a70e33dbb5551875c6a3e46ae0a7cddd4661a2811ee48be51054e9" +dependencies = [ + "atty", + "backtrace", + "miette-derive", + "once_cell", + "owo-colors", + "supports-color", + "supports-hyperlinks", + "supports-unicode", + "terminal_size", + "textwrap", + "thiserror", + "unicode-width", +] + +[[package]] +name = "miette-derive" +version = "5.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "426594bc7266dedee4d687cdaebc121c74c52a667e4ce933c83694ad035990a6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "miniz_oxide" @@ -457,141 +688,158 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" dependencies = [ - "adler", + "adler 0.2.3", "autocfg", ] [[package]] -name = "nu-errors" -version = "0.26.0" +name = "miniz_oxide" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "548fcf197931cfa931c7838d2aa4582afd480292df317798dc8ea52ac05acc60" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" dependencies = [ - "ansi_term", - "bigdecimal", - "codespan-reporting", - "derive-new", - "getset", - "glob", - "nu-source", - "num-bigint", + "adler 1.0.2", +] + +[[package]] +name = "multiversion" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "025c962a3dd3cc5e0e520aa9c612201d127dcdf28616974961a649dca64f5373" +dependencies = [ + "multiversion-macros", +] + +[[package]] +name = "multiversion-macros" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a3e2bde382ebf960c1f3e79689fa5941625fe9bf694a1cb64af3e85faff3af" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "ntapi" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" +dependencies = [ + "winapi", +] + +[[package]] +name = "nu-engine" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35c93a5f7e6ccf3b467261fa8d62b617c7a338cf4d07cc1843e7dae9f00ec4e9" +dependencies = [ + "chrono", + "nu-glob", + "nu-path", + "nu-protocol", + "nu-utils", + "sysinfo", +] + +[[package]] +name = "nu-glob" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfa4da550ca3706ddb9a070329ee83d36f20d375d9aa504d2d0c308381c5ed5e" + +[[package]] +name = "nu-json" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9e1b8aad78a6bd1493b8de21941dfbb96ee9688403fcb26d562211f1435885" +dependencies = [ + "lazy_static", + "linked-hash-map", "num-traits", + "regex", "serde", - "serde_json", - "serde_yaml", - "toml", +] + +[[package]] +name = "nu-path" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e16fbf0c6ade5cd05db26fba806a305bf7adf7e12ecbfb30cca7b8847268f47" +dependencies = [ + "dirs-next", + "dunce", + "pwd", ] [[package]] name = "nu-plugin" -version = "0.26.0" +version = "0.65.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662f948eef67da06844fce9044fdc0ea902fc4cf5f03b379b54dce065a72f4d8" +checksum = "3765cf8a0721dca8e509544bf50ad2fe981f4c4b033f6a15e8528af42d8eee3c" dependencies = [ - "bigdecimal", - "indexmap", - "nu-errors", + "capnp", + "nu-engine", "nu-protocol", - "nu-source", - "nu-test-support", - "nu-value-ext", - "num-bigint", "serde", "serde_json", ] [[package]] name = "nu-protocol" -version = "0.26.0" +version = "0.65.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60cbef27e1b49dca0aa2ef3a70763cb39458d44af1429920889cbde655aa54e8" +checksum = "5caaba3eba17a290ac6cdec00249b4d1d68ee3b9ca687bd934dd4aedfc914091" dependencies = [ - "bigdecimal", "byte-unit", "chrono", - "derive-new", - "getset", + "chrono-humanize", "indexmap", - "log", - "nu-errors", - "nu-source", - "num-bigint", - "num-integer", - "num-traits", + "miette", + "nu-json", + "nu-utils", + "num-format", + "regex", "serde", - "serde_bytes", "serde_json", - "serde_yaml", - "toml", -] - -[[package]] -name = "nu-source" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71ac7de5efebc6f77e5a148972174109d480d8bdcce22b1dba0ce3419556b5e9" -dependencies = [ - "derive-new", - "getset", - "pretty", - "serde", - "termcolor", -] - -[[package]] -name = "nu-test-support" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a8fbf80f8a312baa814ed3f0fbecce9861ec418c99d34be071f328b14e995a" -dependencies = [ - "bigdecimal", - "chrono", - "dunce", - "getset", - "glob", - "indexmap", - "nu-errors", - "nu-protocol", - "nu-source", - "nu-value-ext", - "num-bigint", - "tempfile", + "sys-locale", + "thiserror", + "typetag", ] [[package]] -name = "nu-value-ext" -version = "0.26.0" +name = "nu-utils" +version = "0.65.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65c33554e68f210d3c5d778eb240095ed32382210feb350d3e4ff7d627ec1c8b" +checksum = "3c9b45c62025e01794ba719f5b9e59a87e743156a325d3dd3facb65dfd54b186" dependencies = [ - "indexmap", - "itertools 0.10.0", - "nu-errors", - "nu-protocol", - "nu-source", - "num-traits", + "crossterm_winapi", ] [[package]] name = "nu_plugin_from_parquet" version = "0.0.0" dependencies = [ - "bigdecimal", + "bytes", "chrono", - "indexmap", - "nu-errors", "nu-plugin", "nu-protocol", - "nu-source", - "nu-value-ext", "parquet", ] [[package]] name = "num" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7a8e9be5e039e2ff869df49155f1c06bd01ade2117ec783e56ab0932b67a8f" +checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" dependencies = [ "num-bigint", "num-complex", @@ -603,25 +851,34 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.3.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a41747ae4633fce5adffb4d2e81ffc5e89593cb19917f8fb2cc5ff76507bf" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ "autocfg", "num-integer", "num-traits", - "serde", ] [[package]] name = "num-complex" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" +checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" dependencies = [ "num-traits", ] +[[package]] +name = "num-format" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" +dependencies = [ + "arrayvec", + "itoa", +] + [[package]] name = "num-integer" version = "0.1.44" @@ -645,9 +902,9 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.3.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", "num-bigint", @@ -674,11 +931,20 @@ dependencies = [ "libc", ] +[[package]] +name = "object" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" -version = "1.5.2" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "ordered-float" @@ -689,21 +955,30 @@ dependencies = [ "num-traits", ] +[[package]] +name = "owo-colors" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "decf7381921fea4dcb2549c5667eda59b3ec297ab7e2b5fc33eac69d2e7da87b" + [[package]] name = "parquet" -version = "3.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7af8b51dcae8625a26d55387b17ff922436a78cdf57eed630d546e9924b36f" +checksum = "65f61759af307fad711e7656c705218402a8a79b776c893c20fef96e8ffd2a7d" dependencies = [ "arrow", "base64", "brotli", "byteorder", + "bytes", "chrono", "flate2", "lz4", + "num", "num-bigint", "parquet-format", + "rand", "snap", "thrift", "zstd", @@ -711,9 +986,9 @@ dependencies = [ [[package]] name = "parquet-format" -version = "2.6.1" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5bc6b23543b5dedc8f6cce50758a35e5582e148e0cfa26bd0cacd569cda5b71" +checksum = "1f0c06cdcd5460967c485f9c40a821746f5955ad81990533c7fae95dbd9bc0b5" dependencies = [ "thrift", ] @@ -725,45 +1000,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] -name = "pretty" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60c0d9f6fc88ecdd245d90c1920ff76a430ab34303fc778d33b1d0a4c3bf6d3" -dependencies = [ - "typed-arena", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro2" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" dependencies = [ - "proc-macro2", - "quote", - "version_check", + "unicode-ident", ] [[package]] -name = "proc-macro2" -version = "1.0.24" +name = "pwd" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "f9ca0304857594109dca88140120427c7a65027be6b77d86a5938588e79cb07b" dependencies = [ - "unicode-xid", + "failure", + "libc", ] [[package]] @@ -777,129 +1029,100 @@ dependencies = [ [[package]] name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", -] - -[[package]] -name = "rand" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.0", - "rand_core 0.6.2", - "rand_hc 0.3.0", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] name = "rand_chacha" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.2", + "rand_core", ] [[package]] name = "rand_core" -version = "0.5.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.1.16", + "getrandom", ] [[package]] -name = "rand_core" -version = "0.6.2" +name = "rayon" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" +checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" dependencies = [ - "getrandom 0.2.2", + "autocfg", + "crossbeam-deque", + "either", + "rayon-core", ] [[package]] -name = "rand_hc" -version = "0.2.0" +name = "rayon-core" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" dependencies = [ - "rand_core 0.5.1", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", ] [[package]] -name = "rand_hc" -version = "0.3.0" +name = "redox_syscall" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ - "rand_core 0.6.2", + "bitflags", ] [[package]] -name = "redox_syscall" -version = "0.2.5" +name = "redox_users" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "bitflags", + "getrandom", + "redox_syscall", + "thiserror", ] [[package]] name = "regex" -version = "1.4.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "aho-corasick", "memchr", "regex-syntax", - "thread_local", -] - -[[package]] -name = "regex-automata" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" -dependencies = [ - "byteorder", ] [[package]] name = "regex-syntax" -version = "0.6.22" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "rustc-demangle" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "ryu" @@ -908,28 +1131,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" [[package]] -name = "serde" -version = "1.0.123" +name = "scopeguard" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" -dependencies = [ - "serde_derive", -] +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] -name = "serde_bytes" -version = "0.11.5" +name = "serde" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +checksum = "0171ebb889e45aa68b44aee0859b3eede84c6f5f5c228e6f140c0b2a0a46cad6" dependencies = [ - "serde", + "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.123" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" +checksum = "dc1d3230c1de7932af58ad8ffbe1d784bd55efd5a9d84ac24f69c72d83543dfb" dependencies = [ "proc-macro2", "quote", @@ -949,15 +1169,12 @@ dependencies = [ ] [[package]] -name = "serde_yaml" -version = "0.8.17" +name = "serde_test" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15654ed4ab61726bf918a39cb8d98a2e2995b002387807fa6ba58fdf7f59bb23" +checksum = "cc933653ac6800dd970d54829f0646dcfd078bcaae7fbd19c6e58a584564a5de" dependencies = [ - "dtoa", - "linked-hash-map", "serde", - "yaml-rust", ] [[package]] @@ -966,6 +1183,12 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" +[[package]] +name = "smawk" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" + [[package]] name = "snap" version = "1.0.4" @@ -978,69 +1201,128 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "supports-color" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4872ced36b91d47bae8a214a683fe54e7078875b399dfa251df346c9b547d1f9" +dependencies = [ + "atty", + "is_ci", +] + +[[package]] +name = "supports-hyperlinks" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "590b34f7c5f01ecc9d78dba4b3f445f31df750a67621cf31626f3b7441ce6406" +dependencies = [ + "atty", +] + +[[package]] +name = "supports-unicode" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8b945e45b417b125a8ec51f1b7df2f8df7920367700d1f98aedd21e5735f8b2" +dependencies = [ + "atty", +] + [[package]] name = "syn" -version = "1.0.60" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", + "syn", "unicode-xid", ] [[package]] -name = "tempfile" -version = "3.2.0" +name = "sys-locale" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658ee915b6c7b73ec4c1ffcd838506b5c5a4087eadc1ec8f862f1066cf2c8132" +dependencies = [ + "cc", + "cstr_core", + "js-sys", + "libc", + "wasm-bindgen", + "web-sys", + "winapi", +] + +[[package]] +name = "sysinfo" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "3977ec2e0520829be45c8a2df70db2bf364714d8a748316a10c3c35d4d2b01c9" dependencies = [ "cfg-if", + "core-foundation-sys", + "libc", + "ntapi", + "once_cell", + "rayon", + "winapi", +] + +[[package]] +name = "terminal_size" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" +dependencies = [ "libc", - "rand 0.8.3", - "redox_syscall", - "remove_dir_all", "winapi", ] [[package]] -name = "termcolor" -version = "1.1.2" +name = "textwrap" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" dependencies = [ - "winapi-util", + "smawk", + "unicode-linebreak", + "unicode-width", ] [[package]] name = "thiserror" -version = "1.0.23" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146" +checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.23" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" +checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2", "quote", "syn", ] -[[package]] -name = "thread_local" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" -dependencies = [ - "once_cell", -] - [[package]] name = "threadpool" version = "1.8.1" @@ -1075,25 +1357,49 @@ dependencies = [ ] [[package]] -name = "toml" -version = "0.5.8" +name = "typetag" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "4080564c5b2241b5bff53ab610082234e0c57b0417f4bd10596f183001505b8a" dependencies = [ + "erased-serde", + "inventory", + "once_cell", "serde", + "typetag-impl", +] + +[[package]] +name = "typetag-impl" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e60147782cc30833c05fba3bab1d9b5771b2685a2557672ac96fa5d154099c0e" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "typed-arena" -version = "1.7.0" +name = "unicode-ident" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" + +[[package]] +name = "unicode-linebreak" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b2228007eba4120145f785df0f6c92ea538f5a3635a612ecf4e334c8c1446d" +checksum = "3a52dcaab0c48d931f7cc8ef826fa51690a08e1ea55117ef26f89864f532383f" +dependencies = [ + "regex", +] [[package]] name = "unicode-width" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" @@ -1109,21 +1415,85 @@ checksum = "9071ac216321a4470a69fb2b28cfc68dcd1a39acd877c8be8e014df6772d8efa" [[package]] name = "version_check" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5491a68ab4500fa6b4d726bd67408630c3dbe9c4fe7bda16d5c82a1fd8c7340a" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be" + +[[package]] +name = "web-sys" +version = "0.3.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fed94beee57daf8dd7d51f2b15dc2bcde92d7a72304cdf662a4371008b71b90" +dependencies = [ + "js-sys", + "wasm-bindgen", +] [[package]] name = "winapi" @@ -1141,44 +1511,26 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "zstd" -version = "0.6.0+zstd.1.4.8" +version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e44664feba7f2f1a9f300c1f6157f2d1bfc3c15c6f3cf4beabf3f5abe9c237" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "3.0.0+zstd.1.4.8" +version = "5.0.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9447afcd795693ad59918c7bbffe42fdd6e467d708f3537e3dc14dc598c573f" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" dependencies = [ "libc", "zstd-sys", @@ -1186,12 +1538,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "1.4.19+zstd.1.4.8" +version = "2.0.1+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec24a9273d24437afb8e71b16f3d9a5d569193cccdb7896213b59f552f387674" +checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" dependencies = [ "cc", - "glob", - "itertools 0.9.0", "libc", ] diff --git a/Cargo.toml b/Cargo.toml index 6a288b9..12c48f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,14 +10,10 @@ license = "MIT" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-errors = "~0" -nu-plugin = "~0" -nu-protocol = "~0" -nu-source = "~0" -nu-value-ext = "~0" -parquet = "3.0.0" -bigdecimal = "0.2.0" -indexmap = "1.6.1" +nu-plugin = "0.65" +nu-protocol = "0.65" +parquet = "18.0.0" +bytes = "1.1.0" [dependencies.chrono] version = "0.4.19" diff --git a/README.md b/README.md index 49b5979..0ed3be7 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,15 @@ This is a [nushell] [plugin] to parse parquet data files into `nu` structured t # Installing -Plugins for `nu` just need to be installed into a directing in `PATH`. + +[add the plugin]: https://www.nushell.sh/book/plugins.html#adding-a-plugin +[`register`]: https://www.nushell.sh/book/commands/register.html + +To [add the plugin] permanently, just install it and call [`register`] on it: ## Using Cargo ```bash cargo install nu_plugin_from_parquet +register --encoding=json ~/.cargo/bin/nu_plugin_from_parquet ``` diff --git a/src/from_parquet.rs b/src/from_parquet.rs index 8c6438c..bc899a6 100644 --- a/src/from_parquet.rs +++ b/src/from_parquet.rs @@ -1,85 +1,73 @@ +use bytes::Bytes; use parquet::record::{Field, Row}; -use parquet::file::serialized_reader::{SerializedFileReader, SliceableCursor}; +use parquet::file::serialized_reader::SerializedFileReader; use parquet::file::reader::FileReader; -use nu_protocol::{UntaggedValue, Value, ReturnValue}; -use nu_source::Tag; +use nu_protocol::{Value, Span, ShellError}; use chrono::{Duration, FixedOffset, TimeZone, DateTime}; +use std::convert::TryInto; use std::ops::Add; -use bigdecimal::{BigDecimal, FromPrimitive}; -use indexmap::IndexMap; -fn convert_to_nu(field: &Field, tag: impl Into) -> Value { +fn convert_to_nu(field: &Field, span: Span) -> Value { let epoch: DateTime = FixedOffset::west(0) .ymd(1970, 1, 1) .and_hms(0, 0, 0); match field { - Field::Null => UntaggedValue::nothing().into_value(tag), - Field::Bool(b) => UntaggedValue::boolean(*b).into_value(tag), - Field::Byte(b) => UntaggedValue::binary(vec![*b as u8]).into_value(tag), - Field::UByte(b) => UntaggedValue::binary(vec![*b]).into_value(tag), - Field::Short(s) => UntaggedValue::int(*s).into_value(tag), - Field::UShort(s) => UntaggedValue::int(*s).into_value(tag), - Field::Int(i) => UntaggedValue::int(*i).into_value(tag), - Field::UInt(i) => UntaggedValue::int(*i).into_value(tag), - Field::Long(l) => UntaggedValue::int(*l).into_value(tag), - Field::ULong(l) => UntaggedValue::int(*l).into_value(tag), - Field::Float(float) => { - if let Some(f) = BigDecimal::from_f32(*float) { - UntaggedValue::decimal(f).into_value(tag) - } else { - unreachable!("Internal error: protocol did not use f32-compatible decimal") - } - }, - Field::Double(double) => { - if let Some(d) = BigDecimal::from_f64(*double) { - UntaggedValue::decimal(d).into_value(tag) - } else { - unreachable!("Internal error: protocol did not use f64-compatible decimal") - } - }, - Field::Str(s) => UntaggedValue::string(s).into_value(tag), - Field::Bytes(bytes) => UntaggedValue::binary(bytes.data().to_vec()).into_value(tag), + Field::Null => Value::nothing(span), + Field::Bool(b) => Value::boolean(*b, span), + Field::Byte(b) => Value::binary(vec![*b as u8], span), + Field::UByte(b) => Value::binary(vec![*b], span), + Field::Short(s) => Value::int((*s).into(), span), + Field::UShort(s) => Value::int((*s).into(), span), + Field::Int(i) => Value::int((*i).into(), span), + Field::UInt(i) => Value::int((*i).into(), span), + Field::Long(l) => Value::int(*l, span), + Field::ULong(l) => { + (*l).try_into() + .map(|l| Value::int(l, span)) + .unwrap_or_else(|e| Value::Error { error: ShellError::CantConvert("i64".into(), "u64".into(), span, Some(e.to_string())) }) + } + Field::Float(f) => Value::float((*f).into(), span), + Field::Double(f) => Value::float(*f, span), + Field::Str(s) => Value::string(s, span), + Field::Bytes(bytes) => Value::binary(bytes.data().to_vec(), span), Field::Date(days_since_epoch) => { - let value = epoch.add(Duration::days(*days_since_epoch as i64)); - UntaggedValue::date(value).into_value(tag) + let val = epoch.add(Duration::days(*days_since_epoch as i64)); + Value::Date { val, span } } Field::TimestampMillis(millis_since_epoch) => { - let value = epoch.add(Duration::milliseconds(*millis_since_epoch as i64)); - UntaggedValue::date(value).into_value(tag) + let val = epoch.add(Duration::milliseconds(*millis_since_epoch as i64)); + Value::Date { val, span } } Field::TimestampMicros(micros_since_epoch) => { - let value = epoch.add(Duration::microseconds(*micros_since_epoch as i64)); - UntaggedValue::date(value).into_value(tag) + let val = epoch.add(Duration::microseconds(*micros_since_epoch as i64)); + Value::Date { val, span } } - Field::Decimal(_d) => unimplemented!("Parquet DECIMAL is not handled yet"), + Field::Decimal(_d) => { unimplemented!("Parquet DECIMAL is not handled yet") } Field::Group(_row) => { unimplemented!("Nested structs not supported yet") } Field::ListInternal(_list) => { unimplemented!("Lists not supported yet") } Field::MapInternal(_map) => { unimplemented!("Maps not supported yet") } } } -fn convert_parquet_row(row: Row, tag: impl Into) -> Value { - let mut map: IndexMap = IndexMap::with_capacity(row.len()); - let mut row_iter = row.get_column_iter(); - let tag = tag.into(); - while let Some(col) = row_iter.next() { - map.insert(col.0.clone(), convert_to_nu(col.1, tag.clone())); +fn convert_parquet_row(row: Row, span: Span) -> Value { + let mut cols = vec![]; + let mut vals = vec![]; + for (name, field) in row.get_column_iter() { + cols.push(name.clone()); + vals.push(convert_to_nu(field, span.clone())); } - - UntaggedValue::row(map).into_value(tag) + Value::Record { cols, vals, span } } -pub fn from_parquet_bytes(bytes: Vec) -> ReturnValue { - let cursor = SliceableCursor::new(bytes); +pub fn from_parquet_bytes(bytes: Vec, span: Span) -> Value { + let cursor = Bytes::from(bytes); let reader = SerializedFileReader::new(cursor).unwrap(); let mut iter = reader.get_row_iter(None) .unwrap(); - let mut result = Vec::new(); + let mut vals = Vec::new(); while let Some(record) = iter.next() { - let row = convert_parquet_row(record, Tag::unknown()); - result.push(row); + let row = convert_parquet_row(record, span); + vals.push(row); } - - let value: Value = UntaggedValue::Table(result).into_value(Tag::unknown()); - ReturnValue::from(value) + Value::List { vals, span } } \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 2acb668..d1fbad4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,69 +1,47 @@ mod from_parquet; -use nu_source::{Tag}; +use nu_plugin::{serve_plugin, Plugin, JsonSerializer, EvaluatedCall, LabeledError}; +use nu_protocol::{Signature, Value}; -use nu_errors::ShellError; -use nu_plugin::{serve_plugin, Plugin}; -use nu_protocol::{ - CallInfo, Primitive, ReturnValue, Signature, UntaggedValue, Value, -}; - -struct FromParquet { - bytes: Vec, - name_tag: Tag -} +struct FromParquet; impl FromParquet { fn new() -> Self { - Self { - bytes: Vec::new(), - name_tag: Tag::unknown() - } + Self {} } } impl Plugin for FromParquet { - fn config(&mut self) -> Result { - Ok(Signature::build("from parquet") - .desc("Convert from .parquet binary into table") - .filter()) + fn signature(&self) -> Vec { + vec![ + Signature::build("from parquet") + .usage("Convert from .parquet binary into table") + .filter() + ] } - fn begin_filter(&mut self, call_info: CallInfo) -> Result, ShellError> { - self.name_tag = call_info.name_tag; - Ok(vec![]) - } - - fn filter(&mut self, input: Value) -> Result, ShellError> { + fn run( + &mut self, + name: &str, + call: &EvaluatedCall, + input: &Value, + ) -> Result { + assert_eq!(name, "from parquet"); match input { - Value { - value: UntaggedValue::Primitive(Primitive::Binary(b)), - .. - } => { - self.bytes.extend_from_slice(&b); + Value::Binary { val, span } => { + Ok(crate::from_parquet::from_parquet_bytes(val.clone(), span.clone())) } - Value { tag, .. } => { - return Err(ShellError::labeled_error_with_secondary( - "Expected binary from pipeline", - "requires binary input", - self.name_tag.clone(), - "value originates from here", - tag, - )); + v => { + return Err(LabeledError { + label: "Expected binary from pipeline".into(), + msg: format!("requires binary input, got {}", v.get_type()), + span: Some(call.head), + }); } } - Ok(vec![]) - } - - fn end_filter(&mut self) -> Result, ShellError> { - let result = vec![ - crate::from_parquet::from_parquet_bytes(self.bytes.clone()) - ]; - self.bytes.clear(); - Ok(result) } } fn main() { - serve_plugin(&mut FromParquet::new()); + serve_plugin(&mut FromParquet::new(), JsonSerializer); }