diff --git a/BUILD.md b/BUILD.md index a383608d..0349ede5 100644 --- a/BUILD.md +++ b/BUILD.md @@ -103,16 +103,3 @@ pixi add my-new-package --build ``` This will install the package and update the pixi.lock file with the new environment solution. - -## Updating DataFusion protobuf -When updating the version of DataFusion that VegaFusion depends on, the protobuf definition file at `python/vegafusion/proto/datafusion.proto` must be updated to match. This file should be downloaded from GitHub from https://raw.githubusercontent.com/apache/arrow-datafusion/27.0.0/datafusion/proto/proto/datafusion.proto, replacing `27.0.0` with the matching version of DataFusion. - -Then Python bindings should be generated using `protoc` - -``` -pixi shell -cd vegafusion-python -protoc --python_out=vegafusion ./proto/datafusion.proto -``` - -This will update the `vegafusion-python/vegafusion/proto/datafusion_pb2.py` file. diff --git a/Cargo.lock b/Cargo.lock index 757b984a..bcc98374 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -17,6 +17,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "adler32" version = "1.2.0" @@ -25,9 +31,9 @@ checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" [[package]] name = "ahash" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d713b3834d76b85304d4d525563c1276e2e30dc97cc67bfb4585a4a29fc2c89f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "const-random", @@ -39,9 +45,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -63,9 +69,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "android-tzdata" @@ -90,47 +96,48 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -138,27 +145,27 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "arrow" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05048a8932648b63f21c37d88b552ccc8a65afb6dfe9fc9f30ce79174c2e7a85" +checksum = "a9ba0d7248932f4e2a12fb37f0a2e3ec82b3bdedbac2a1dce186e036843b8f8c" dependencies = [ "arrow-arith", "arrow-array", @@ -178,9 +185,9 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8a57966e43bfe9a3277984a14c24ec617ad874e4c0e1d2a1b083a39cfbf22c" +checksum = "d60afcdc004841a5c8d8da4f4fa22d64eb19c0c01ef4bcedd77f175a7cf6e38f" dependencies = [ "arrow-array", "arrow-buffer", @@ -193,16 +200,16 @@ dependencies = [ [[package]] name = "arrow-array" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f4a9468c882dc66862cef4e1fd8423d47e67972377d85d80e022786427768c" +checksum = "7f16835e8599dbbb1659fd869d865254c4cf32c6c2bb60b6942ac9fc36bfa5da" dependencies = [ "ahash", "arrow-buffer", "arrow-data", "arrow-schema", "chrono", - "chrono-tz", + "chrono-tz 0.10.0", "half", "hashbrown 0.14.5", "num", @@ -210,9 +217,9 @@ dependencies = [ [[package]] name = "arrow-buffer" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c975484888fc95ec4a632cdc98be39c085b1bb518531b0c80c5d462063e5daa1" +checksum = "1a1f34f0faae77da6b142db61deba2cb6d60167592b178be317b341440acba80" dependencies = [ "bytes", "half", @@ -221,9 +228,9 @@ dependencies = [ [[package]] name = "arrow-cast" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da26719e76b81d8bc3faad1d4dbdc1bcc10d14704e63dc17fc9f3e7e1e567c8e" +checksum = "450e4abb5775bca0740bec0bcf1b1a5ae07eff43bd625661c4436d8e8e4540c4" dependencies = [ "arrow-array", "arrow-buffer", @@ -242,9 +249,9 @@ dependencies = [ [[package]] name = "arrow-csv" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13c36dc5ddf8c128df19bab27898eea64bf9da2b555ec1cd17a8ff57fba9ec2" +checksum = "d3a4e4d63830a341713e35d9a42452fbc6241d5f42fa5cf6a4681b8ad91370c4" dependencies = [ "arrow-array", "arrow-buffer", @@ -261,9 +268,9 @@ dependencies = [ [[package]] name = "arrow-data" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd9d6f18c65ef7a2573ab498c374d8ae364b4a4edf67105357491c031f716ca5" +checksum = "2b1e618bbf714c7a9e8d97203c806734f012ff71ae3adc8ad1b075689f540634" dependencies = [ "arrow-buffer", "arrow-schema", @@ -273,9 +280,9 @@ dependencies = [ [[package]] name = "arrow-ipc" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e786e1cdd952205d9a8afc69397b317cfbb6e0095e445c69cda7e8da5c1eeb0f" +checksum = "f98e983549259a2b97049af7edfb8f28b8911682040e99a94e4ceb1196bd65c2" dependencies = [ "arrow-array", "arrow-buffer", @@ -288,9 +295,9 @@ dependencies = [ [[package]] name = "arrow-json" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb22284c5a2a01d73cebfd88a33511a3234ab45d66086b2ca2d1228c3498e445" +checksum = "b198b9c6fcf086501730efbbcb483317b39330a116125af7bb06467d04b352a3" dependencies = [ "arrow-array", "arrow-buffer", @@ -299,7 +306,7 @@ dependencies = [ "arrow-schema", "chrono", "half", - "indexmap 2.2.3", + "indexmap 2.6.0", "lexical-core", "num", "serde", @@ -308,9 +315,9 @@ dependencies = [ [[package]] name = "arrow-ord" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42745f86b1ab99ef96d1c0bcf49180848a64fe2c7a7a0d945bc64fa2b21ba9bc" +checksum = "2427f37b4459a4b9e533045abe87a5183a5e0995a3fc2c2fd45027ae2cc4ef3f" dependencies = [ "arrow-array", "arrow-buffer", @@ -323,9 +330,9 @@ dependencies = [ [[package]] name = "arrow-row" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd09a518c602a55bd406bcc291a967b284cfa7a63edfbf8b897ea4748aad23c" +checksum = "15959657d92e2261a7a323517640af87f5afd9fd8a6492e424ebee2203c567f6" dependencies = [ "ahash", "arrow-array", @@ -337,18 +344,18 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e972cd1ff4a4ccd22f86d3e53e835c2ed92e0eea6a3e8eadb72b4f1ac802cf8" +checksum = "fbf0388a18fd7f7f3fe3de01852d30f54ed5182f9004db700fbe3ba843ed2794" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", ] [[package]] name = "arrow-select" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600bae05d43483d216fb3494f8c32fdbefd8aa4e1de237e790dbb3d9f44690a3" +checksum = "b83e5723d307a38bf00ecd2972cd078d1339c7fd3eb044f609958a9a24463f3a" dependencies = [ "ahash", "arrow-array", @@ -360,9 +367,9 @@ dependencies = [ [[package]] name = "arrow-string" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dc1985b67cb45f6606a248ac2b4a288849f196bab8c657ea5589f47cdd55e6" +checksum = "7ab3db7c09dd826e74079661d84ed01ed06547cf75d52c2818ef776d0d852305" dependencies = [ "arrow-array", "arrow-buffer", @@ -377,13 +384,14 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "2.0.14" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed72493ac66d5804837f480ab3766c72bdfab91a65e565fc54fa9e42db0073a8" +checksum = "dc1835b7f27878de8525dc71410b5a31cdcc5f230aed5ba5df968e09c201b23d" dependencies = [ "anstyle", "bstr", "doc-comment", + "libc", "predicates", "predicates-core", "predicates-tree", @@ -413,22 +421,21 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 5.1.0", - "event-listener-strategy 0.5.0", + "event-listener-strategy", "futures-core", "pin-project-lite", ] [[package]] name = "async-compression" -version = "0.4.6" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" +checksum = "7e614738943d3f68c628ae3dbce7c3daffb196665f82f8c8ea6b65de73c79429" dependencies = [ "bzip2", "flate2", @@ -444,15 +451,14 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.8.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ - "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.2.0", + "fastrand", + "futures-lite", "slab", ] @@ -462,52 +468,32 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.2.0", + "async-channel 2.3.1", "async-executor", - "async-io 2.3.1", - "async-lock 3.3.0", + "async-io", + "async-lock 3.4.0", "blocking", - "futures-lite 2.2.0", + "futures-lite", "once_cell", ] [[package]] name = "async-io" -version = "1.13.0" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", -] - -[[package]] -name = "async-io" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" -dependencies = [ - "async-lock 3.3.0", + "async-lock 3.4.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.2.0", + "futures-lite", "parking", - "polling 3.5.0", - "rustix 0.38.31", + "polling", + "rustix", "slab", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -521,42 +507,42 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener 5.3.1", + "event-listener-strategy", "pin-project-lite", ] [[package]] name = "async-recursion" -version = "1.0.5" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "async-std" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" +checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615" dependencies = [ "async-attributes", "async-channel 1.9.0", "async-global-executor", - "async-io 1.13.0", - "async-lock 2.8.0", + "async-io", + "async-lock 3.4.0", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite 1.13.0", + "futures-lite", "gloo-timers", "kv-log-macro", "log", @@ -570,9 +556,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -581,30 +567,30 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "async-task" -version = "4.7.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -635,15 +621,15 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "autotools" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8da1805e028a172334c3b680f93e71126f2327622faef2ec3d893c0a4ad77" +checksum = "ef941527c41b0fc0dd48511a8154cd5fc7e29200a0ff8b7203c5d777dbc795cf" dependencies = [ "cc", ] @@ -659,9 +645,9 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.30", "itoa", "matchit", "memchr", @@ -685,7 +671,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "mime", "rustversion", @@ -695,17 +681,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.2", + "miniz_oxide 0.8.0", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -728,9 +714,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "blake2" @@ -743,9 +729,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.0" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" dependencies = [ "arrayref", "arrayvec", @@ -765,18 +751,15 @@ dependencies = [ [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.2.0", - "async-lock 3.3.0", + "async-channel 2.3.1", "async-task", - "fastrand 2.0.1", "futures-io", - "futures-lite 2.2.0", + "futures-lite", "piper", - "tracing", ] [[package]] @@ -802,9 +785,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "regex-automata", @@ -813,15 +796,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.3" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.14.3" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" [[package]] name = "byteorder" @@ -831,9 +814,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "bzip2" @@ -864,11 +847,13 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.87" +version = "1.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3286b845d0fccbdd15af433f61c5970e711987036cb468f437ff6badd70f4e24" +checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" dependencies = [ + "jobserver", "libc", + "shlex", ] [[package]] @@ -895,7 +880,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.3", + "windows-targets 0.52.6", ] [[package]] @@ -905,11 +890,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" dependencies = [ "chrono", - "chrono-tz-build", + "chrono-tz-build 0.3.0", "phf", "uncased", ] +[[package]] +name = "chrono-tz" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd6dd8046d00723a59a2f8c5f295c515b9bb9a331ee4f8f3d4dd49e428acd3b6" +dependencies = [ + "chrono", + "chrono-tz-build 0.4.0", + "phf", +] + [[package]] name = "chrono-tz-build" version = "0.3.0" @@ -923,6 +919,16 @@ dependencies = [ "uncased", ] +[[package]] +name = "chrono-tz-build" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94fea34d77a245229e7746bd2beb786cd2a896f306ff491fb8cecb3074b10a7" +dependencies = [ + "parse-zoneinfo", + "phf_codegen", +] + [[package]] name = "ciborium" version = "0.2.2" @@ -964,9 +970,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.1" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" dependencies = [ "clap_builder", "clap_derive", @@ -974,26 +980,26 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.1" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" dependencies = [ "anstream", "anstyle", - "clap_lex 0.7.0", + "clap_lex 0.7.2", "strsim", ] [[package]] name = "clap_derive" -version = "4.5.0" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -1007,9 +1013,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "color_quant" @@ -1019,15 +1025,15 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "memchr", @@ -1035,20 +1041,20 @@ dependencies = [ [[package]] name = "comfy-table" -version = "7.1.0" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" +checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" dependencies = [ - "strum 0.25.0", - "strum_macros 0.25.3", + "strum", + "strum_macros", "unicode-width", ] [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -1065,9 +1071,9 @@ dependencies = [ [[package]] name = "const-random" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" dependencies = [ "const-random-macro", ] @@ -1085,9 +1091,9 @@ dependencies = [ [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "core-foundation" @@ -1101,24 +1107,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -1182,9 +1188,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1225,23 +1231,23 @@ dependencies = [ [[package]] name = "dashmap" -version = "6.0.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804c8821570c3f8b70230c2ba75ffa5c0f9a4189b9a432b6656c536712acae28" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ "cfg-if", "crossbeam-utils", "hashbrown 0.14.5", "lock_api", "once_cell", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.10", ] [[package]] name = "datafusion" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4fd4a99fc70d40ef7e52b243b4a399c3f8d353a40d5ecb200deee05e49c61bb" +checksum = "ee907b081e45e1d14e1f327e89ef134f91fcebad0bfc2dc229fa9f6044379682" dependencies = [ "ahash", "arrow", @@ -1262,6 +1268,7 @@ dependencies = [ "datafusion-functions", "datafusion-functions-aggregate", "datafusion-functions-nested", + "datafusion-functions-window", "datafusion-optimizer", "datafusion-physical-expr", "datafusion-physical-expr-common", @@ -1273,12 +1280,12 @@ dependencies = [ "glob", "half", "hashbrown 0.14.5", - "indexmap 2.2.3", - "itertools 0.12.1", + "indexmap 2.6.0", + "itertools 0.13.0", "log", "num_cpus", "object_store", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "parquet", "paste", "pin-project-lite", @@ -1295,9 +1302,9 @@ dependencies = [ [[package]] name = "datafusion-catalog" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13b3cfbd84c6003594ae1972314e3df303a27ce8ce755fcea3240c90f4c0529" +checksum = "6c2b914f6e33c429af7d8696c72a47ed9225d7e2b82c747ebdfa2408ed53579f" dependencies = [ "arrow-schema", "async-trait", @@ -1305,13 +1312,14 @@ dependencies = [ "datafusion-execution", "datafusion-expr", "datafusion-physical-plan", + "parking_lot 0.12.3", ] [[package]] name = "datafusion-common" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fdbc877e3e40dcf88cc8f283d9f5c8851f0a3aa07fee657b1b75ac1ad49b9c" +checksum = "3a84f8e76330c582a6b8ada0b2c599ca46cfe46b7585e458fc3f4092bc722a18" dependencies = [ "ahash", "arrow", @@ -1326,24 +1334,27 @@ dependencies = [ "num_cpus", "object_store", "parquet", + "paste", "pyo3", "sqlparser", + "tokio", ] [[package]] name = "datafusion-common-runtime" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7496d1f664179f6ce3a5cbef6566056ccaf3ea4aa72cc455f80e62c1dd86b1" +checksum = "cf08cc30d92720d557df13bd5a5696213bd5ea0f38a866d8d85055d866fba774" dependencies = [ + "log", "tokio", ] [[package]] name = "datafusion-execution" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799e70968c815b611116951e3dd876aef04bf217da31b72eec01ee6a959336a1" +checksum = "86bc4183d5c45b9f068a6f351678a0d1eb1225181424542bb75db18ec280b822" dependencies = [ "arrow", "chrono", @@ -1354,7 +1365,7 @@ dependencies = [ "hashbrown 0.14.5", "log", "object_store", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "rand", "tempfile", "url", @@ -1362,9 +1373,9 @@ dependencies = [ [[package]] name = "datafusion-expr" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c1841c409d9518c17971d15c9bae62e629eb937e6fb6c68cd32e9186f8b30d2" +checksum = "202119ce58e4d103e37ae64aab40d4e574c97bdd2bea994bf307b175fcbfa74d" dependencies = [ "ahash", "arrow", @@ -1372,18 +1383,32 @@ dependencies = [ "arrow-buffer", "chrono", "datafusion-common", + "datafusion-expr-common", + "datafusion-functions-aggregate-common", + "datafusion-physical-expr-common", "paste", "serde_json", "sqlparser", - "strum 0.26.1", - "strum_macros 0.26.1", + "strum", + "strum_macros", +] + +[[package]] +name = "datafusion-expr-common" +version = "42.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8b181ce8569216abb01ef3294aa16c0a40d7d39350c2ff01ede00f167a535f2" +dependencies = [ + "arrow", + "datafusion-common", + "paste", ] [[package]] name = "datafusion-functions" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8e481cf34d2a444bd8fa09b65945f0ce83dc92df8665b761505b3d9f351bebb" +checksum = "6e4124b8066444e05a24472f852e94cf56546c0f4d92d00f018f207216902712" dependencies = [ "arrow", "arrow-buffer", @@ -1396,7 +1421,7 @@ dependencies = [ "datafusion-expr", "hashbrown 0.14.5", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "log", "md-5", "rand", @@ -1408,9 +1433,9 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b4ece19f73c02727e5e8654d79cd5652de371352c1df3c4ac3e419ecd6943fb" +checksum = "b94acdac235ea21810150a89751617ef2db7e32eba27f54be48a81bde2bfe119" dependencies = [ "ahash", "arrow", @@ -1418,17 +1443,34 @@ dependencies = [ "datafusion-common", "datafusion-execution", "datafusion-expr", + "datafusion-functions-aggregate-common", + "datafusion-physical-expr", "datafusion-physical-expr-common", + "half", "log", "paste", "sqlparser", ] +[[package]] +name = "datafusion-functions-aggregate-common" +version = "42.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c9ea085bbf900bf16e2ca0f56fc56236b2e4f2e1a2cccb67bcd83c5ab4ad0ef" +dependencies = [ + "ahash", + "arrow", + "datafusion-common", + "datafusion-expr-common", + "datafusion-physical-expr-common", + "rand", +] + [[package]] name = "datafusion-functions-nested" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1474552cc824e8c9c88177d454db5781d4b66757d4aca75719306b8343a5e8d" +checksum = "6c882e61665ed60c5ce9b061c1e587aeb8ae5ae4bcb5e5f2465139ab25328e0f" dependencies = [ "arrow", "arrow-array", @@ -1440,17 +1482,30 @@ dependencies = [ "datafusion-expr", "datafusion-functions", "datafusion-functions-aggregate", - "itertools 0.12.1", + "datafusion-physical-expr-common", + "itertools 0.13.0", "log", "paste", "rand", ] +[[package]] +name = "datafusion-functions-window" +version = "42.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98a354ce96df3ca6d025093adac9fd55ca09931c9b6f2630140721a95873fde4" +dependencies = [ + "datafusion-common", + "datafusion-expr", + "datafusion-physical-expr-common", + "log", +] + [[package]] name = "datafusion-optimizer" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791ff56f55608bc542d1ea7a68a64bdc86a9413f5a381d06a39fd49c2a3ab906" +checksum = "baf677c74fb7b5a1899ef52709e4a70fff3ed80bdfb4bbe495909810e83d5f39" dependencies = [ "arrow", "async-trait", @@ -1459,8 +1514,8 @@ dependencies = [ "datafusion-expr", "datafusion-physical-expr", "hashbrown 0.14.5", - "indexmap 2.2.3", - "itertools 0.12.1", + "indexmap 2.6.0", + "itertools 0.13.0", "log", "paste", "regex-syntax", @@ -1468,9 +1523,9 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a223962b3041304a3e20ed07a21d5de3d88d7e4e71ca192135db6d24e3365a4" +checksum = "30b077999f6eb6c43d6b25bc66332a3be2f693c382840f008dd763b8540f9530" dependencies = [ "ahash", "arrow", @@ -1484,12 +1539,14 @@ dependencies = [ "datafusion-common", "datafusion-execution", "datafusion-expr", + "datafusion-expr-common", + "datafusion-functions-aggregate-common", "datafusion-physical-expr-common", "half", "hashbrown 0.14.5", "hex", - "indexmap 2.2.3", - "itertools 0.12.1", + "indexmap 2.6.0", + "itertools 0.13.0", "log", "paste", "petgraph", @@ -1498,35 +1555,37 @@ dependencies = [ [[package]] name = "datafusion-physical-expr-common" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db5e7d8532a1601cd916881db87a70b0a599900d23f3db2897d389032da53bc6" +checksum = "dce847f885c2b13bbe29f5c8b7948797131aa470af6e16d2a94f4428b4f4f1bd" dependencies = [ "ahash", "arrow", "datafusion-common", - "datafusion-expr", + "datafusion-expr-common", "hashbrown 0.14.5", "rand", ] [[package]] name = "datafusion-physical-optimizer" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb9c78f308e050f5004671039786a925c3fee83b90004e9fcfd328d7febdcc0" +checksum = "d13238e3b9fdd62a4c18760bfef714bb990d1e1d3430e9f416aae4b3cfaa71af" dependencies = [ + "arrow-schema", "datafusion-common", "datafusion-execution", "datafusion-physical-expr", "datafusion-physical-plan", + "itertools 0.13.0", ] [[package]] name = "datafusion-physical-plan" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d1116949432eb2d30f6362707e2846d942e491052a206f2ddcb42d08aea1ffe" +checksum = "faba6f55a7eaf0241d07d12c2640de52742646b10f754485d5192bdfe2c9ceae" dependencies = [ "ahash", "arrow", @@ -1541,16 +1600,17 @@ dependencies = [ "datafusion-execution", "datafusion-expr", "datafusion-functions-aggregate", + "datafusion-functions-aggregate-common", "datafusion-physical-expr", "datafusion-physical-expr-common", "futures", "half", "hashbrown 0.14.5", - "indexmap 2.2.3", - "itertools 0.12.1", + "indexmap 2.6.0", + "itertools 0.13.0", "log", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pin-project-lite", "rand", "tokio", @@ -1558,9 +1618,9 @@ dependencies = [ [[package]] name = "datafusion-proto" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1d25864c18178d0e51438648f5e0fa08417dbbc39b642c1752cbbb1013abf0" +checksum = "585357d621fa03ea85a7fefca79ebc5ef0ee13a7f82be0762a414879a4d190a7" dependencies = [ "arrow", "chrono", @@ -1569,27 +1629,27 @@ dependencies = [ "datafusion-expr", "datafusion-proto-common", "object_store", - "prost", + "prost 0.13.3", ] [[package]] name = "datafusion-proto-common" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a683253732334526b1cc5314a73a0f786803831f7e189ed3fe387ac50d7222" +checksum = "4db6534382f92f528bdb5d925b4214c31ffd84fa7fe1eff3ed0d2f1286851ab8" dependencies = [ "arrow", "chrono", "datafusion-common", "object_store", - "prost", + "prost 0.13.3", ] [[package]] name = "datafusion-sql" -version = "41.0.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45d0180711165fe94015d7c4123eb3e1cf5fb60b1506453200b8d1ce666bef0" +checksum = "dad8d96a9b52e1aa24f9373696a815be828193efce7cb0bbd2140b6bb67d1819" dependencies = [ "arrow", "arrow-array", @@ -1599,7 +1659,7 @@ dependencies = [ "log", "regex", "sqlparser", - "strum 0.26.1", + "strum", ] [[package]] @@ -1643,15 +1703,15 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -1677,9 +1737,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1693,20 +1753,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "5.1.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ad6fd685ce13acd6d9541a30f6db6567a7a24c9ffd4ba2955d29e3f22c8b27" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -1715,47 +1764,19 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.4.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 4.0.3", + "event-listener 5.3.1", "pin-project-lite", ] -[[package]] -name = "event-listener-strategy" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" -dependencies = [ - "event-listener 5.1.0", - "pin-project-lite", -] - -[[package]] -name = "fallible_collections" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88c69768c0a15262df21899142bc6df9b9b823546d4b4b9a7bc2d6c448ec6fd" -dependencies = [ - "hashbrown 0.13.2", -] - [[package]] name = "fastrand" -version = "1.9.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fixedbitset" @@ -1775,12 +1796,12 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", - "miniz_oxide 0.7.2", + "miniz_oxide 0.8.0", ] [[package]] @@ -1809,9 +1830,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1824,9 +1845,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1834,15 +1855,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1851,32 +1872,17 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "1.13.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - -[[package]] -name = "futures-lite" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" -dependencies = [ - "fastrand 2.0.1", + "fastrand", "futures-core", "futures-io", "parking", @@ -1885,26 +1891,26 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -1914,9 +1920,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1942,9 +1948,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1965,9 +1971,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -1977,9 +1983,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "gloo-timers" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" dependencies = [ "futures-channel", "futures-core", @@ -1989,17 +1995,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.11", - "indexmap 2.2.3", + "http 0.2.12", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -2008,9 +2014,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", @@ -2018,7 +2024,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.2.3", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -2027,9 +2033,9 @@ dependencies = [ [[package]] name = "half" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ "cfg-if", "crunchy", @@ -2044,28 +2050,25 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", + "allocator-api2", ] [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -2078,30 +2081,27 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379dada1584ad501b383485dd706b8afb7a70fcbc7f4da7d780638a5a6124a60" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] -name = "hex" -version = "0.4.3" +name = "hermit-abi" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] -name = "home" -version = "0.5.9" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -2126,7 +2126,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http 0.2.11", + "http 0.2.12", "pin-project-lite", ] @@ -2161,9 +2161,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -2179,22 +2179,22 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2 0.3.24", - "http 0.2.11", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.6", + "socket2", "tokio", "tower-service", "tracing", @@ -2210,7 +2210,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -2228,24 +2228,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http 0.2.11", - "hyper 0.14.28", - "rustls 0.21.10", + "http 0.2.12", + "hyper 0.14.30", + "rustls 0.21.12", "tokio", "tokio-rustls 0.24.1", ] [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", "hyper 1.4.1", "hyper-util", - "rustls 0.23.12", + "rustls 0.23.14", "rustls-native-certs", "rustls-pki-types", "tokio", @@ -2259,7 +2259,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper 0.14.28", + "hyper 0.14.30", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -2267,9 +2267,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", @@ -2278,18 +2278,17 @@ dependencies = [ "http-body 1.0.1", "hyper 1.4.1", "pin-project-lite", - "socket2 0.5.6", + "socket2", "tokio", - "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2349,25 +2348,25 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", ] [[package]] name = "indoc" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", "js-sys", @@ -2381,34 +2380,29 @@ version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.8", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.8", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.10.5" @@ -2447,9 +2441,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jni" @@ -2473,6 +2467,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + [[package]] name = "jpeg-decoder" version = "0.1.22" @@ -2484,23 +2487,22 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] [[package]] name = "json-patch" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6" +checksum = "ec9ad60d674508f3ca8f380a928cfe7b096bc729c4e2dbfe3852bc45da3ab30b" dependencies = [ "serde", "serde_json", "thiserror", - "treediff", ] [[package]] @@ -2514,15 +2516,15 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lexical-core" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" +checksum = "0431c65b318a590c1de6b8fd6e72798c92291d27762d94c9e6c37ed7a73d8458" dependencies = [ "lexical-parse-float", "lexical-parse-integer", @@ -2533,9 +2535,9 @@ dependencies = [ [[package]] name = "lexical-parse-float" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +checksum = "eb17a4bdb9b418051aa59d41d65b1c9be5affab314a872e5ad7f06231fb3b4e0" dependencies = [ "lexical-parse-integer", "lexical-util", @@ -2544,9 +2546,9 @@ dependencies = [ [[package]] name = "lexical-parse-integer" -version = "0.8.6" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +checksum = "5df98f4a4ab53bf8b175b363a34c7af608fe31f93cc1fb1bf07130622ca4ef61" dependencies = [ "lexical-util", "static_assertions", @@ -2554,18 +2556,18 @@ dependencies = [ [[package]] name = "lexical-util" -version = "0.8.5" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +checksum = "85314db53332e5c192b6bca611fb10c114a80d1b831ddac0af1e9be1b9232ca0" dependencies = [ "static_assertions", ] [[package]] name = "lexical-write-float" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +checksum = "6e7c3ad4e37db81c1cbe7cf34610340adc09c322871972f74877a712abc6c809" dependencies = [ "lexical-util", "lexical-write-integer", @@ -2574,9 +2576,9 @@ dependencies = [ [[package]] name = "lexical-write-integer" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +checksum = "eb89e9f6958b83258afa3deed90b5de9ef68eef090ad5086c791cd2345610162" dependencies = [ "lexical-util", "static_assertions", @@ -2584,9 +2586,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libm" @@ -2596,21 +2598,15 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -2618,12 +2614,11 @@ dependencies = [ [[package]] name = "lodepng" -version = "3.10.1" +version = "3.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a42d298694b14401847de29abd44adf278b42e989e516deac7b72018400002d8" +checksum = "7b2dea7cda68e381418c985fd8f32a9c279a21ae8c715f2376adb20c27a0fad3" dependencies = [ "crc32fast", - "fallible_collections", "flate2", "libc", "rgb", @@ -2631,9 +2626,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" dependencies = [ "value-bag", ] @@ -2649,9 +2644,9 @@ dependencies = [ [[package]] name = "lz4_flex" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912b45c753ff5f7f5208307e8ace7d2a2e30d024e26d3509f3dce546c044ce15" +checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5" dependencies = [ "twox-hash", ] @@ -2685,15 +2680,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memoffset" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] @@ -2705,13 +2700,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] -name = "mime_guess" -version = "2.0.4" +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "minicov" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "5c71e683cd655513b99affab7d317deb690528255a0d5f717f1024093c12b169" dependencies = [ - "mime", - "unicase", + "cc", + "walkdir", ] [[package]] @@ -2735,29 +2740,30 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.10" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "multimap" -version = "0.8.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" [[package]] name = "normalize-line-endings" @@ -2767,34 +2773,33 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", "num-integer", "num-iter", - "num-rational 0.4.1", + "num-rational 0.4.2", "num-traits", ] [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -2810,9 +2815,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -2832,11 +2837,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -2844,9 +2848,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -2858,24 +2862,24 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.8", + "hermit-abi 0.3.9", "libc", ] [[package]] name = "object" -version = "0.32.2" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "object_store" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6da452820c715ce78221e8202ccc599b4a52f3e1eb3eedb487b680c81a8e3f3" +checksum = "25a0c4b3a0e31f8b66f71ad8064521efa773910196e2cde791436f13409f3b45" dependencies = [ "async-trait", "base64 0.22.1", @@ -2886,11 +2890,11 @@ dependencies = [ "hyper 1.4.1", "itertools 0.13.0", "md-5", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "percent-encoding", "quick-xml", "rand", - "reqwest 0.12.5", + "reqwest 0.12.8", "ring", "serde", "serde_json", @@ -2903,15 +2907,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "openssl-probe" @@ -2945,9 +2949,9 @@ checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -2962,12 +2966,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.10", ] [[package]] @@ -2986,22 +2990,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall 0.5.7", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] name = "parquet" -version = "52.2.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e977b9066b4d3b03555c22bdc442f3fadebd96a39111249113087d0edb2691cd" +checksum = "310c46a70a3ba90d98fec39fa2da6d9d731e544191da6fb56c9d199484d0dd3e" dependencies = [ "ahash", "arrow-array", @@ -3035,9 +3039,9 @@ dependencies = [ [[package]] name = "parse-zoneinfo" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" +checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" dependencies = [ "regex", ] @@ -3056,12 +3060,12 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.3", + "indexmap 2.6.0", ] [[package]] @@ -3105,29 +3109,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -3137,12 +3141,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand", "futures-io", ] @@ -3157,15 +3161,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -3176,15 +3180,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] @@ -3203,51 +3207,39 @@ dependencies = [ [[package]] name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - -[[package]] -name = "polling" -version = "3.5.0" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ "cfg-if", "concurrent-queue", + "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.31", + "rustix", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "predicates" -version = "3.1.0" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" +checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" dependencies = [ "anstyle", "difflib", @@ -3259,15 +3251,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", @@ -3275,75 +3267,97 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "prost" -version = "0.12.3" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +dependencies = [ + "bytes", + "prost-derive 0.12.6", +] + +[[package]] +name = "prost" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.13.3", ] [[package]] name = "prost-build" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes", "heck", - "itertools 0.11.0", + "itertools 0.12.1", "log", "multimap", "once_cell", "petgraph", "prettyplease", - "prost", + "prost 0.12.6", "prost-types", "regex", - "syn 2.0.50", + "syn 2.0.79", "tempfile", - "which", ] [[package]] name = "prost-derive" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.11.0", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "prost-derive" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +dependencies = [ + "anyhow", + "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "prost-types" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ - "prost", + "prost 0.12.6", ] [[package]] @@ -3357,15 +3371,15 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.21.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8" +checksum = "15ee168e30649f7f234c3d49ef5a7a6cbf5134289bc46c29ff3155fa3221c225" dependencies = [ "cfg-if", "indoc", "libc", "memoffset", - "parking_lot 0.12.1", + "once_cell", "portable-atomic", "pyo3-build-config", "pyo3-ffi", @@ -3375,9 +3389,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.21.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50" +checksum = "e61cef80755fe9e46bb8a0b8f20752ca7676dcc07a5277d8b7768c6172e529b3" dependencies = [ "once_cell", "target-lexicon", @@ -3385,9 +3399,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.21.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403" +checksum = "67ce096073ec5405f5ee2b8b31f03a68e02aa10d5d4f565eca04acc41931fa1c" dependencies = [ "libc", "pyo3-build-config", @@ -3395,34 +3409,34 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.21.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c" +checksum = "2440c6d12bc8f3ae39f1e775266fa5122fd0c8891ce7520fa6048e683ad3de28" dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "pyo3-macros-backend" -version = "0.21.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c" +checksum = "1be962f0e06da8f8465729ea2cb71a416d2257dff56cbe40a70d3e62a93ae5d1" dependencies = [ "heck", "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "pythonize" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0664248812c38cc55a4ed07f88e4df516ce82604b93b1ffdc041aa77a6cb3c" +checksum = "90fcf491425978bd889015d5430f6473d91bdfa2097262f1e731aadcf6c2113e" dependencies = [ "pyo3", "serde", @@ -3430,9 +3444,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.36.1" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a05e2e8efddfa51a84ca47cec303fac86c8541b686d37cac5efc0e094417bc" +checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" dependencies = [ "memchr", "serde", @@ -3440,17 +3454,17 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.12", - "socket2 0.5.6", + "rustls 0.23.14", + "socket2", "thiserror", "tokio", "tracing", @@ -3458,15 +3472,15 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.6" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" dependencies = [ "bytes", "rand", "ring", "rustc-hash", - "rustls 0.23.12", + "rustls 0.23.14", "slab", "thiserror", "tinyvec", @@ -3475,22 +3489,22 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" dependencies = [ "libc", "once_cell", - "socket2 0.5.6", + "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3527,9 +3541,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -3556,18 +3570,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.3" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", @@ -3577,9 +3591,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -3588,31 +3602,31 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "relative-path" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.3.24", - "http 0.2.11", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.30", "hyper-rustls 0.24.2", "ipnet", "js-sys", @@ -3622,7 +3636,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -3637,25 +3651,25 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "webpki-roots", - "winreg 0.50.0", + "winreg", ] [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ "base64 0.22.1", "bytes", "futures-core", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "http-body-util", "hyper 1.4.1", - "hyper-rustls 0.27.2", + "hyper-rustls 0.27.3", "hyper-util", "ipnet", "js-sys", @@ -3665,9 +3679,9 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.12", + "rustls 0.23.14", "rustls-native-certs", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", "serde_json", @@ -3682,19 +3696,19 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg 0.52.0", + "windows-registry", ] [[package]] name = "reqwest-middleware" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a3e86aa6053e59030e7ce2d2a3b258dd08fc2d337d52f73f6cb480f5858690" +checksum = "5a735987236a8e238bf0296c7e351b999c188ccc11477f311b82b55c93984216" dependencies = [ "anyhow", "async-trait", - "http 0.2.11", - "reqwest 0.11.24", + "http 0.2.12", + "reqwest 0.11.27", "serde", "task-local-extensions", "thiserror", @@ -3711,10 +3725,10 @@ dependencies = [ "chrono", "futures", "getrandom", - "http 0.2.11", - "hyper 0.14.28", + "http 0.2.12", + "hyper 0.14.30", "parking_lot 0.11.2", - "reqwest 0.11.24", + "reqwest 0.11.27", "reqwest-middleware", "retry-policies", "task-local-extensions", @@ -3736,9 +3750,9 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.37" +version = "0.8.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8" +checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" dependencies = [ "bytemuck", ] @@ -3783,7 +3797,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.50", + "syn 2.0.79", "unicode-ident", ] @@ -3796,14 +3810,14 @@ dependencies = [ "quote", "rand", "rustc_version", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -3813,45 +3827,31 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.31" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys", "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", @@ -3861,26 +3861,26 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.6", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] [[package]] name = "rustls-native-certs" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", "security-framework", @@ -3897,19 +3897,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" [[package]] name = "rustls-webpki" @@ -3923,9 +3922,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -3934,15 +3933,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -3955,11 +3954,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3992,11 +3991,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -4005,9 +4004,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -4015,9 +4014,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "seq-macro" @@ -4027,41 +4026,42 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.197" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ - "indexmap 2.2.3", + "indexmap 2.6.0", "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -4089,6 +4089,12 @@ dependencies = [ "digest", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "siphasher" version = "0.3.11" @@ -4106,30 +4112,29 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "snafu" -version = "0.7.5" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" +checksum = "223891c85e2a29c3fe8fb900c1fae5e69c2e42415e3177752e8718475efa5019" dependencies = [ - "doc-comment", "snafu-derive", ] [[package]] name = "snafu-derive" -version = "0.7.5" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" +checksum = "03c3c6b7927ffe7ecaa769ee0e3994da3b8cafc8f444578982c83ecb161af917" dependencies = [ "heck", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] @@ -4140,19 +4145,9 @@ checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -4166,9 +4161,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "sqlparser" -version = "0.49.0" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a404d0e14905361b918cb8afdb73605e25c1d5029312bd9785142dcb3aa49e" +checksum = "b2e5b515a2bd5168426033e9efbfd05500114833916f1d5c268f938b4ee130ac" dependencies = [ "log", "sqlparser_derive", @@ -4182,7 +4177,7 @@ checksum = "01b2e185515564f15375f593fb966b5718bc624ba77fe49fa4616ad619690554" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -4193,56 +4188,37 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strsim" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" - -[[package]] -name = "strum" -version = "0.25.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" -dependencies = [ - "strum_macros 0.26.1", -] - -[[package]] -name = "strum_macros" -version = "0.25.3" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.50", + "strum_macros", ] [[package]] name = "strum_macros" -version = "0.26.1" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -4257,9 +4233,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.50" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -4277,6 +4253,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "system-configuration" @@ -4301,9 +4280,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "task-local-extensions" @@ -4316,14 +4295,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", - "fastrand 2.0.1", - "rustix 0.38.31", - "windows-sys 0.52.0", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", ] [[package]] @@ -4359,7 +4339,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -4370,7 +4350,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", "test-case-core", ] @@ -4382,22 +4362,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -4443,9 +4423,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -4458,19 +4438,18 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", - "socket2 0.5.6", + "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4485,13 +4464,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -4500,7 +4479,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.12", "tokio", ] @@ -4510,16 +4489,16 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.12", + "rustls 0.23.14", "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -4528,16 +4507,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -4554,9 +4532,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -4567,7 +4545,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.3", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", @@ -4585,15 +4563,15 @@ dependencies = [ "axum", "base64 0.21.7", "bytes", - "h2 0.3.24", - "http 0.2.11", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.30", "hyper-timeout", "percent-encoding", "pin-project", - "prost", - "rustls 0.21.10", + "prost 0.12.6", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "tokio", "tokio-rustls 0.24.1", @@ -4614,7 +4592,7 @@ dependencies = [ "proc-macro2", "prost-build", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -4625,9 +4603,9 @@ checksum = "0fddb2a37b247e6adcb9f239f4e5cefdcc5ed526141a416b943929f13aea2cce" dependencies = [ "base64 0.21.7", "bytes", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.30", "pin-project", "tokio-stream", "tonic", @@ -4663,11 +4641,11 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "bytes", "futures-core", "futures-util", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "http-range-header", "pin-project-lite", @@ -4677,15 +4655,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -4706,7 +4684,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -4718,15 +4696,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "treediff" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d127780145176e2b5d16611cc25a900150e86e9fd79d3bde6ff3a37359c9cb5" -dependencies = [ - "serde_json", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -4769,36 +4738,36 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unindent" @@ -4814,9 +4783,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -4825,24 +4794,24 @@ dependencies = [ [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "getrandom", ] [[package]] name = "value-bag" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126e423afe2dd9ac52142e7e9d5ce4135d7e13776c529d27fd6bc49f19e3280b" +checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" [[package]] name = "vegafusion" @@ -4854,7 +4823,7 @@ dependencies = [ "deterministic-hash", "env_logger", "log", - "prost", + "prost 0.12.6", "pyo3", "pythonize", "serde", @@ -4902,7 +4871,7 @@ dependencies = [ "num-complex", "ordered-float 3.9.2", "petgraph", - "prost", + "prost 0.12.6", "prost-build", "prost-types", "protobuf-src", @@ -4926,6 +4895,7 @@ dependencies = [ "async-trait", "datafusion-common", "datafusion-expr", + "datafusion-functions-window", "pyo3", "sqlparser", "vegafusion-common", @@ -4936,7 +4906,7 @@ name = "vegafusion-datafusion-udfs" version = "1.6.9" dependencies = [ "chrono", - "chrono-tz", + "chrono-tz 0.9.0", "datafusion-functions", "datafusion-physical-expr", "lazy_static", @@ -4955,13 +4925,14 @@ dependencies = [ "base64 0.21.7", "bytes", "chrono", - "chrono-tz", + "chrono-tz 0.9.0", "criterion", "datafusion-common", "datafusion-expr", "datafusion-functions", "datafusion-functions-aggregate", "datafusion-functions-nested", + "datafusion-functions-window", "datafusion-optimizer", "datafusion-physical-expr", "deterministic-hash", @@ -4978,10 +4949,10 @@ dependencies = [ "object_store", "ordered-float 3.9.2", "pixelmatch", - "prost", + "prost 0.12.6", "prost-types", "regex", - "reqwest 0.11.24", + "reqwest 0.11.27", "reqwest-middleware", "reqwest-retry", "rgb", @@ -5005,11 +4976,11 @@ name = "vegafusion-server" version = "1.6.9" dependencies = [ "assert_cmd", - "clap 4.5.1", + "clap 4.5.19", "futures-util", - "h2 0.3.24", + "h2 0.3.26", "predicates", - "prost", + "prost 0.12.6", "prost-build", "protobuf-src", "regex", @@ -5037,13 +5008,14 @@ dependencies = [ "datafusion-expr", "datafusion-functions", "datafusion-functions-aggregate", + "datafusion-functions-window", "deterministic-hash", "lazy_static", "log", "object_store", "pyo3", "regex", - "reqwest 0.11.24", + "reqwest 0.11.27", "reqwest-middleware", "reqwest-retry", "rstest", @@ -5070,7 +5042,7 @@ dependencies = [ "getrandom", "indexmap 1.9.3", "js-sys", - "prost", + "prost 0.12.6", "prost-types", "serde", "serde_json", @@ -5084,9 +5056,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wait-timeout" @@ -5097,17 +5069,11 @@ dependencies = [ "libc", ] -[[package]] -name = "waker-fn" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" - [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -5130,34 +5096,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -5167,9 +5134,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5177,31 +5144,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-bindgen-test" -version = "0.3.41" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143ddeb4f833e2ed0d252e618986e18bfc7b0e52f2d28d77d05b2f045dd8eb61" +checksum = "68497a05fb21143a08a7d24fc81763384a3072ee43c44e86aad1744d6adef9d9" dependencies = [ "console_error_panic_hook", "js-sys", + "minicov", "scoped-tls", "wasm-bindgen", "wasm-bindgen-futures", @@ -5210,20 +5178,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.41" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5211b7550606857312bba1d978a8ec75692eae187becc5e680444fffc5e6f89" +checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" dependencies = [ "futures-util", "js-sys", @@ -5249,9 +5217,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.68" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -5259,9 +5227,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "weezl" @@ -5269,18 +5237,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.31", -] - [[package]] name = "winapi" version = "0.3.9" @@ -5299,11 +5255,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -5318,7 +5274,37 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.3", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", ] [[package]] @@ -5345,7 +5331,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.3", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -5380,17 +5375,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.3", - "windows_aarch64_msvc 0.52.3", - "windows_i686_gnu 0.52.3", - "windows_i686_msvc 0.52.3", - "windows_x86_64_gnu 0.52.3", - "windows_x86_64_gnullvm 0.52.3", - "windows_x86_64_msvc 0.52.3", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -5407,9 +5403,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -5425,9 +5421,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -5443,9 +5439,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.3" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -5461,9 +5463,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -5479,9 +5481,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -5497,9 +5499,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -5515,9 +5517,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -5538,16 +5540,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "xz2" version = "0.1.7" @@ -5559,22 +5551,23 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -5585,27 +5578,27 @@ checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zstd" -version = "0.13.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.0.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 35ae2eb0..90119485 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,8 +13,9 @@ members = [ ] [workspace.dependencies] -arrow = { version = "52.2.0", default-features = false } -sqlparser = { version = "0.49.0" } +arrow = { version = "53.1.0", default-features = false } + +sqlparser = { version = "0.50.0" } chrono = { version = "0.4.35", default-features = false } chrono-tz = { version = "0.9.0", features = [ "case-insensitive", @@ -22,41 +23,44 @@ chrono-tz = { version = "0.9.0", features = [ ] } reqwest = { version = "0.11.22", default-features = false } tokio = { version = "1.36.0" } -pyo3 = { version = "0.21.1" } -pythonize = { version = "0.21.1" } +pyo3 = { version = "0.22" } +pythonize = { version = "0.22" } prost = { version = "0.12.3" } prost-types = { version = "0.12.3" } -object_store = { version = "0.10.1" } +object_store = { version = "0.11.0" } [workspace.dependencies.datafusion] -version = "41.0.0" +version = "42.0.0" [workspace.dependencies.datafusion-common] -version = "41.0.0" +version = "42.0.0" [workspace.dependencies.datafusion-expr] -version = "41.0.0" +version = "42.0.0" [workspace.dependencies.datafusion-proto] -version = "41.0.0" +version = "42.0.0" [workspace.dependencies.datafusion-proto-common] -version = "41.0.0" +version = "42.0.0" [workspace.dependencies.datafusion-physical-expr] -version = "41.0.0" +version = "42.0.0" [workspace.dependencies.datafusion-optimizer] -version = "41.0.0" +version = "42.0.0" [workspace.dependencies.datafusion-functions] -version = "41.0.0" +version = "42.0.0" [workspace.dependencies.datafusion-functions-nested] -version = "41.0.0" +version = "42.0.0" [workspace.dependencies.datafusion-functions-aggregate] -version = "41.0.0" +version = "42.0.0" + +[workspace.dependencies.datafusion-functions-window] +version = "42.0.0" [profile.release] ## Tell `rustc` to use highest performance optimization and perform Link Time Optimization diff --git a/vegafusion-common/src/data/json_writer.rs b/vegafusion-common/src/data/json_writer.rs index 264972c3..c69b6d13 100644 --- a/vegafusion-common/src/data/json_writer.rs +++ b/vegafusion-common/src/data/json_writer.rs @@ -197,7 +197,7 @@ macro_rules! set_temporal_column_by_array_type { }; } -fn set_column_by_primitive_type( +fn set_column_by_primitive_type( rows: &mut [JsonMap], row_count: usize, array: &ArrayRef, @@ -1015,7 +1015,7 @@ mod tests { let a_values = StringArray::from(vec!["a", "a1", "b", "c", "d", "e"]); // list column rows: ["a", "a1"], ["b"], ["c"], ["d"], ["e"] - let a_value_offsets = Buffer::from(&[0, 2, 3, 4, 5, 6].to_byte_slice()); + let a_value_offsets = Buffer::from([0, 2, 3, 4, 5, 6].to_byte_slice()); let a_list_data = ArrayData::builder(field_c1.data_type().clone()) .len(5) .add_buffer(a_value_offsets) @@ -1064,7 +1064,7 @@ mod tests { // list column rows: [[1, 2], [3]], [], [[4, 5, 6]] let a_values = Int32Array::from(vec![1, 2, 3, 4, 5, 6]); - let a_value_offsets = Buffer::from(&[0, 2, 3, 6].to_byte_slice()); + let a_value_offsets = Buffer::from([0, 2, 3, 6].to_byte_slice()); // Construct a list array from the above two let a_list_data = ArrayData::builder(list_inner_type.data_type().clone()) .len(3) @@ -1074,7 +1074,7 @@ mod tests { .build() .unwrap(); - let c1_value_offsets = Buffer::from(&[0, 2, 2, 3].to_byte_slice()); + let c1_value_offsets = Buffer::from([0, 2, 2, 3].to_byte_slice()); let c1_list_data = ArrayData::builder(field_c1.data_type().clone()) .len(3) .add_buffer(c1_value_offsets) @@ -1155,7 +1155,7 @@ mod tests { // [{"c11": 1, "c12": {"c121": "e"}}, {"c12": {"c121": "f"}}], // null, // [{"c11": 5, "c12": {"c121": "g"}}] - let c1_value_offsets = Buffer::from(&[0, 2, 2, 3].to_byte_slice()); + let c1_value_offsets = Buffer::from([0, 2, 2, 3].to_byte_slice()); let c1_list_data = ArrayData::builder(field_c1.data_type().clone()) .len(3) .add_buffer(c1_value_offsets) diff --git a/vegafusion-common/src/data/table.rs b/vegafusion-common/src/data/table.rs index bdab2141..4d00fa8d 100644 --- a/vegafusion-common/src/data/table.rs +++ b/vegafusion-common/src/data/table.rs @@ -120,6 +120,41 @@ impl VegaFusionTable { VegaFusionTable::from(empty_record_batch) } + pub fn without_ordering(self) -> Result { + let mut new_fields = self.schema.fields.to_vec(); + if new_fields.len() == 1 { + // Only one column, so we can't remove it, even if it's an ordering column + return Ok(self); + } + let order_col_index = self + .schema + .fields + .iter() + .enumerate() + .find(|(_i, field)| field.name() == ORDER_COL) + .map(|(i, _)| i); + + if let Some(order_col_index) = order_col_index { + new_fields.remove(order_col_index); + + let new_schema = Arc::new(Schema::new(new_fields)) as SchemaRef; + let new_batches = self + .batches + .into_iter() + .map(|batch| { + let mut new_columns = Vec::from(batch.columns()); + new_columns.remove(order_col_index); + Ok(RecordBatch::try_new(new_schema.clone(), new_columns)?) + }) + .collect::>>()?; + + Self::try_new(new_schema, new_batches) + } else { + // Not ordering column present, return as-is + Ok(self) + } + } + pub fn with_ordering(self) -> Result { // Build new schema with leading ORDER_COL let mut new_fields = self.schema.fields.to_vec(); diff --git a/vegafusion-core/src/lib.rs b/vegafusion-core/src/lib.rs index c5054ec6..beb6891c 100644 --- a/vegafusion-core/src/lib.rs +++ b/vegafusion-core/src/lib.rs @@ -29,8 +29,7 @@ mod tests { value: Some(expression::literal::Value::Number(23.5)), }; - let mut buf = Vec::new(); - buf.reserve(lit.encoded_len()); + let mut buf = Vec::with_capacity(lit.encoded_len()); // Unwrap is safe, since we have reserved sufficient capacity in the vector. lit.encode(&mut buf).unwrap(); diff --git a/vegafusion-core/src/proto/prost_gen/errors.rs b/vegafusion-core/src/proto/prost_gen/errors.rs index b7aa41b3..e57f6c03 100644 --- a/vegafusion-core/src/proto/prost_gen/errors.rs +++ b/vegafusion-core/src/proto/prost_gen/errors.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TaskGraphValueError { diff --git a/vegafusion-core/src/proto/prost_gen/expression.rs b/vegafusion-core/src/proto/prost_gen/expression.rs index d233a50a..62fa3cd9 100644 --- a/vegafusion-core/src/proto/prost_gen/expression.rs +++ b/vegafusion-core/src/proto/prost_gen/expression.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// ESTree-style AST nodes #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/vegafusion-core/src/proto/prost_gen/pretransform.rs b/vegafusion-core/src/proto/prost_gen/pretransform.rs index ce3f11a9..284a4452 100644 --- a/vegafusion-core/src/proto/prost_gen/pretransform.rs +++ b/vegafusion-core/src/proto/prost_gen/pretransform.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// / Pre transform spec messages #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/vegafusion-core/src/proto/prost_gen/services.rs b/vegafusion-core/src/proto/prost_gen/services.rs index b49604c3..6868a08c 100644 --- a/vegafusion-core/src/proto/prost_gen/services.rs +++ b/vegafusion-core/src/proto/prost_gen/services.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryRequest { diff --git a/vegafusion-core/src/proto/prost_gen/tasks.rs b/vegafusion-core/src/proto/prost_gen/tasks.rs index 4125fded..df00a25b 100644 --- a/vegafusion-core/src/proto/prost_gen/tasks.rs +++ b/vegafusion-core/src/proto/prost_gen/tasks.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// ## Task Value #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/vegafusion-core/src/proto/prost_gen/transforms.rs b/vegafusion-core/src/proto/prost_gen/transforms.rs index bb1d74ab..4c48a1b4 100644 --- a/vegafusion-core/src/proto/prost_gen/transforms.rs +++ b/vegafusion-core/src/proto/prost_gen/transforms.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// Filter #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/vegafusion-core/src/proto/tonic_gen/errors.rs b/vegafusion-core/src/proto/tonic_gen/errors.rs index b7aa41b3..e57f6c03 100644 --- a/vegafusion-core/src/proto/tonic_gen/errors.rs +++ b/vegafusion-core/src/proto/tonic_gen/errors.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TaskGraphValueError { diff --git a/vegafusion-core/src/proto/tonic_gen/expression.rs b/vegafusion-core/src/proto/tonic_gen/expression.rs index d233a50a..62fa3cd9 100644 --- a/vegafusion-core/src/proto/tonic_gen/expression.rs +++ b/vegafusion-core/src/proto/tonic_gen/expression.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// ESTree-style AST nodes #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/vegafusion-core/src/proto/tonic_gen/pretransform.rs b/vegafusion-core/src/proto/tonic_gen/pretransform.rs index ce3f11a9..284a4452 100644 --- a/vegafusion-core/src/proto/tonic_gen/pretransform.rs +++ b/vegafusion-core/src/proto/tonic_gen/pretransform.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// / Pre transform spec messages #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/vegafusion-core/src/proto/tonic_gen/services.rs b/vegafusion-core/src/proto/tonic_gen/services.rs index d252d5f3..805524b1 100644 --- a/vegafusion-core/src/proto/tonic_gen/services.rs +++ b/vegafusion-core/src/proto/tonic_gen/services.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryRequest { diff --git a/vegafusion-core/src/proto/tonic_gen/tasks.rs b/vegafusion-core/src/proto/tonic_gen/tasks.rs index 4125fded..df00a25b 100644 --- a/vegafusion-core/src/proto/tonic_gen/tasks.rs +++ b/vegafusion-core/src/proto/tonic_gen/tasks.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// ## Task Value #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/vegafusion-core/src/proto/tonic_gen/transforms.rs b/vegafusion-core/src/proto/tonic_gen/transforms.rs index bb1d74ab..4c48a1b4 100644 --- a/vegafusion-core/src/proto/tonic_gen/transforms.rs +++ b/vegafusion-core/src/proto/tonic_gen/transforms.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// Filter #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/vegafusion-dataframe/Cargo.toml b/vegafusion-dataframe/Cargo.toml index bdfc1081..2f4f1fa5 100644 --- a/vegafusion-dataframe/Cargo.toml +++ b/vegafusion-dataframe/Cargo.toml @@ -24,9 +24,11 @@ workspace = true [dependencies.datafusion-expr] workspace = true +[dependencies.datafusion-functions-window] +workspace = true + [dependencies.arrow] workspace = true -default-features = false [dependencies.pyo3] workspace = true diff --git a/vegafusion-dataframe/src/dataframe.rs b/vegafusion-dataframe/src/dataframe.rs index 5f30bc7e..1c9544c1 100644 --- a/vegafusion-dataframe/src/dataframe.rs +++ b/vegafusion-dataframe/src/dataframe.rs @@ -4,8 +4,9 @@ use arrow::datatypes::{Schema, SchemaRef}; use arrow::record_batch::RecordBatch; use async_trait::async_trait; use datafusion_common::{DFSchema, ScalarValue}; -use datafusion_expr::{expr, BuiltInWindowFunction, Expr, WindowFrame, WindowFunctionDefinition}; -use sqlparser::ast::NullTreatment; +use datafusion_expr::expr::WildcardOptions; +use datafusion_expr::{Expr, SortExpr}; +use datafusion_functions_window::row_number::row_number; use std::any::Any; use std::fmt::{Display, Formatter}; use std::sync::Arc; @@ -38,7 +39,7 @@ pub trait DataFrame: Send + Sync + 'static { .with_context(|| String::from("Failed to concatenate RecordBatches")) } - async fn sort(&self, _exprs: Vec, _limit: Option) -> Result> { + async fn sort(&self, _exprs: Vec, _limit: Option) -> Result> { Err(VegaFusionError::sql_not_supported("sort not supported")) } @@ -87,7 +88,7 @@ pub trait DataFrame: Send + Sync + 'static { async fn stack( &self, _field: &str, - _orderby: Vec, + _orderby: Vec, _groupby: &[String], _start_field: &str, _stop_field: &str, @@ -110,21 +111,18 @@ pub trait DataFrame: Send + Sync + 'static { async fn with_index(&self, index_name: &str) -> Result> { if self.schema().column_with_name(index_name).is_some() { // Column is already present, don't overwrite - self.select(vec![Expr::Wildcard { qualifier: None }]).await + self.select(vec![Expr::Wildcard { + qualifier: None, + options: WildcardOptions::default(), + }]) + .await } else { let selections = vec![ - Expr::WindowFunction(expr::WindowFunction { - fun: WindowFunctionDefinition::BuiltInWindowFunction( - BuiltInWindowFunction::RowNumber, - ), - args: vec![], - partition_by: vec![], - order_by: vec![], - window_frame: WindowFrame::new(Some(true)), - null_treatment: Some(NullTreatment::IgnoreNulls), - }) - .alias(index_name), - Expr::Wildcard { qualifier: None }, + row_number().alias(index_name), + Expr::Wildcard { + qualifier: None, + options: WildcardOptions::default(), + }, ]; self.select(selections).await } diff --git a/vegafusion-datafusion-udfs/src/udafs/mod.rs b/vegafusion-datafusion-udfs/src/udafs/mod.rs index 2c3b915d..7595da6f 100644 --- a/vegafusion-datafusion-udfs/src/udafs/mod.rs +++ b/vegafusion-datafusion-udfs/src/udafs/mod.rs @@ -147,7 +147,7 @@ lazy_static! { Volatility::Immutable, // Accumulator factory Arc::new(|accum_args| Ok(Box::new(PercentileContAccumulator { - data_type: accum_args.data_type.clone(), + data_type: accum_args.return_type.clone(), all_values: Default::default(), percentile: 0.25, }))), @@ -166,7 +166,7 @@ lazy_static! { Volatility::Immutable, // Accumulator factory Arc::new(|accum_args| Ok(Box::new(PercentileContAccumulator { - data_type: accum_args.data_type.clone(), + data_type: accum_args.return_type.clone(), all_values: Default::default(), percentile: 0.75, }))), diff --git a/vegafusion-python/src/connection.rs b/vegafusion-python/src/connection.rs index cba6dfd5..f448e3e7 100644 --- a/vegafusion-python/src/connection.rs +++ b/vegafusion-python/src/connection.rs @@ -63,7 +63,7 @@ fn perform_fetch_query(query: &str, schema: &Schema, conn: &PyObject) -> Result< #[pyclass] #[derive(Clone)] pub struct PySqlConnection { - conn: PyObject, + conn: Arc, dialect: Dialect, fallback_conn: Option>, } @@ -75,7 +75,7 @@ impl PySqlConnection { let (dialect, fallback_conn) = get_dialect_and_fallback_connection(&conn)?; Ok(Self { - conn, + conn: Arc::new(conn), dialect, fallback_conn, }) @@ -365,7 +365,7 @@ impl SqlConnection for PySqlConnection { #[pyclass] #[derive(Clone)] pub struct PySqlDataset { - pub dataset: PyObject, + pub dataset: Arc, pub dialect: Dialect, pub table_name: String, pub table_schema: Schema, @@ -387,7 +387,7 @@ impl PySqlDataset { })?; Ok(Self { - dataset, + dataset: Arc::new(dataset), dialect, table_name, table_schema, diff --git a/vegafusion-python/src/dataframe.rs b/vegafusion-python/src/dataframe.rs deleted file mode 100644 index 1c5b7878..00000000 --- a/vegafusion-python/src/dataframe.rs +++ /dev/null @@ -1,582 +0,0 @@ -use arrow::datatypes::Schema; -use arrow::pyarrow::FromPyArrow; -use async_trait::async_trait; -use datafusion_proto::logical_plan::to_proto::serialize_expr; -use datafusion_proto::logical_plan::DefaultLogicalExtensionCodec; -use prost::Message; -use pyo3::prelude::PyModule; -use pyo3::types::{PyAnyMethods, PyBytes, PyTuple, PyTypeMethods}; -use pyo3::{pyclass, pymethods, IntoPy, PyErr, PyObject, Python}; -use serde_json::Value; -use std::any::Any; -use std::collections::hash_map::DefaultHasher; -use std::hash::{Hash, Hasher}; -use std::sync::Arc; -use vegafusion_common::data::scalar::ScalarValueHelpers; -use vegafusion_common::data::table::VegaFusionTable; -use vegafusion_common::datafusion_common::ScalarValue; -use vegafusion_common::datafusion_expr::Expr; -use vegafusion_common::error::{Result, VegaFusionError}; -use vegafusion_dataframe::connection::Connection; -use vegafusion_dataframe::dataframe::{DataFrame, StackMode}; -use vegafusion_sql::connection::datafusion_conn::DataFusionConnection; - -#[pyclass] -#[derive(Clone)] -pub struct PyDataFrame { - dataframe: PyObject, - fallback_conn: Arc, -} - -#[pymethods] -impl PyDataFrame { - #[new] - pub fn new(dataframe: PyObject) -> Result { - Ok(Self { - dataframe, - fallback_conn: Arc::new(DataFusionConnection::default()), - }) - } -} - -#[async_trait] -impl DataFrame for PyDataFrame { - fn as_any(&self) -> &dyn Any { - self as &dyn Any - } - - fn schema(&self) -> Schema { - Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let schema_obj = self.dataframe.call_method0(py, "schema")?; - let schema = Schema::from_pyarrow_bound(schema_obj.bind(py))?; - Ok(schema) - }) - .expect("Failed to return Schema of DataFrameDatasource") - } - - fn connection(&self) -> Arc { - self.fallback_conn.clone() - } - - fn fingerprint(&self) -> u64 { - // Use a random fingerprint for now to not assume that repeated evaluations will be - // the identical. This is the conservative approach, and later on we can revisit how - // to configure this as an optimization. - let mut hasher = deterministic_hash::DeterministicHasher::new(DefaultHasher::new()); - let rand_uuid = uuid::Uuid::new_v4().to_string(); - rand_uuid.hash(&mut hasher); - - hasher.finish() - } - - async fn collect(&self) -> Result { - let table = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let table_object = self.dataframe.call_method0(py, "collect")?; - VegaFusionTable::from_pyarrow(table_object.bind(py)) - })?; - Ok(table) - } - - async fn sort(&self, exprs: Vec, limit: Option) -> Result> { - let new_df = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let py_exprs = exprs_to_py(py, exprs.clone())?; - - // Convert limit to PyObject - let py_limit = limit.into_py(py); - - // Build arguments for Python sort method - let args = PyTuple::new_bound(py, vec![py_exprs, py_limit]); - - let new_py_df = match self.dataframe.call_method_bound(py, "sort", args, None) { - Ok(new_py_df) => new_py_df, - Err(err) => { - let err_bound = err.get_type_bound(py); - let exception_name = err_bound.name()?; - if exception_name == "DataFrameOperationNotSupportedError" { - // Should fall back to fallback connection below - return Ok(None); - } - // Propagate other exceptions - return Err(err); - } - }; - - Ok(Some(Arc::new(PyDataFrame { - dataframe: new_py_df, - fallback_conn: self.fallback_conn.clone(), - }))) - })?; - - if let Some(new_df) = new_df { - Ok(new_df) - } else { - // Fallback - let table = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let table = self.dataframe.call_method0(py, "collect")?; - VegaFusionTable::from_pyarrow(table.bind(py)) - })?; - - let new_df: Arc = self.fallback_conn.scan_arrow(table).await?; - - new_df.sort(exprs, limit).await - } - } - - async fn select(&self, exprs: Vec) -> Result> { - let new_df = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let py_exprs = exprs_to_py(py, exprs.clone())?; - // Build arguments for Python sort method - let args = PyTuple::new_bound(py, vec![py_exprs]); - - let new_py_df = match self.dataframe.call_method_bound(py, "select", args, None) { - Ok(new_py_df) => new_py_df, - Err(err) => { - let err_bound = err.get_type_bound(py); - let exception_name = err_bound.name()?; - if exception_name == "DataFrameOperationNotSupportedError" { - // Should fall back to fallback connection below - return Ok(None); - } - // Propagate other exceptions - return Err(err); - } - }; - - Ok(Some(Arc::new(PyDataFrame { - dataframe: new_py_df, - fallback_conn: self.fallback_conn.clone(), - }))) - })?; - - if let Some(new_df) = new_df { - Ok(new_df) - } else { - // Fallback - let table = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let table = self.dataframe.call_method0(py, "collect")?; - VegaFusionTable::from_pyarrow(table.bind(py)) - })?; - - let new_df: Arc = self.fallback_conn.scan_arrow(table).await?; - - new_df.select(exprs).await - } - } - - async fn aggregate( - &self, - group_exprs: Vec, - aggr_exprs: Vec, - ) -> Result> { - let new_df = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let py_group_exprs = exprs_to_py(py, group_exprs.clone())?; - let py_aggr_exprs = exprs_to_py(py, aggr_exprs.clone())?; - - // Build arguments for Python sort method - let args = PyTuple::new_bound(py, vec![py_group_exprs, py_aggr_exprs]); - - let new_py_df = match self - .dataframe - .call_method_bound(py, "aggregate", args, None) - { - Ok(new_py_df) => new_py_df, - Err(err) => { - let err_bound = err.get_type_bound(py); - let exception_name = err_bound.name()?; - if exception_name == "DataFrameOperationNotSupportedError" { - // Should fall back to fallback connection below - return Ok(None); - } - // Propagate other exceptions - return Err(err); - } - }; - - Ok(Some(Arc::new(PyDataFrame { - dataframe: new_py_df, - fallback_conn: self.fallback_conn.clone(), - }))) - })?; - - if let Some(new_df) = new_df { - Ok(new_df) - } else { - // Fallback - let table = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let table = self.dataframe.call_method0(py, "collect")?; - VegaFusionTable::from_pyarrow(table.bind(py)) - })?; - - let new_df: Arc = self.fallback_conn.scan_arrow(table).await?; - - new_df.aggregate(group_exprs, aggr_exprs).await - } - } - - async fn joinaggregate( - &self, - group_exprs: Vec, - aggr_exprs: Vec, - ) -> Result> { - let new_df = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let py_group_exprs = exprs_to_py(py, group_exprs.clone())?; - let py_aggr_exprs = exprs_to_py(py, aggr_exprs.clone())?; - - // Build arguments for Python sort method - let args = PyTuple::new_bound(py, vec![py_group_exprs, py_aggr_exprs]); - - let new_py_df = match self - .dataframe - .call_method_bound(py, "joinaggregate", args, None) - { - Ok(new_py_df) => new_py_df, - Err(err) => { - let err_bound = err.get_type_bound(py); - let exception_name = err_bound.name()?; - if exception_name == "DataFrameOperationNotSupportedError" { - // Should fall back to fallback connection below - return Ok(None); - } - // Propagate other exceptions - return Err(err); - } - }; - - Ok(Some(Arc::new(PyDataFrame { - dataframe: new_py_df, - fallback_conn: self.fallback_conn.clone(), - }))) - })?; - - if let Some(new_df) = new_df { - Ok(new_df) - } else { - // Fallback - let table = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let table = self.dataframe.call_method0(py, "collect")?; - VegaFusionTable::from_pyarrow(table.bind(py)) - })?; - - let new_df: Arc = self.fallback_conn.scan_arrow(table).await?; - - new_df.joinaggregate(group_exprs, aggr_exprs).await - } - } - - async fn filter(&self, predicate: Expr) -> Result> { - let new_df = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let py_exprs = expr_to_py(py, &predicate)?; - // Build arguments for Python sort method - let args = PyTuple::new_bound(py, vec![py_exprs]); - - let new_py_df = match self.dataframe.call_method_bound(py, "filter", args, None) { - Ok(new_py_df) => new_py_df, - Err(err) => { - let err_bound = err.get_type_bound(py); - let exception_name = err_bound.name()?; - if exception_name == "DataFrameOperationNotSupportedError" { - // Should fall back to fallback connection below - return Ok(None); - } - // Propagate other exceptions - return Err(err); - } - }; - - Ok(Some(Arc::new(PyDataFrame { - dataframe: new_py_df, - fallback_conn: self.fallback_conn.clone(), - }))) - })?; - - if let Some(new_df) = new_df { - Ok(new_df) - } else { - // Fallback - let table = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let table = self.dataframe.call_method0(py, "collect")?; - VegaFusionTable::from_pyarrow(table.bind(py)) - })?; - - let new_df: Arc = self.fallback_conn.scan_arrow(table).await?; - - new_df.filter(predicate).await - } - } - - async fn limit(&self, limit: i32) -> Result> { - let new_df = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - // Convert limit to PyObject - let py_limit = limit.into_py(py); - - // Build arguments for Python sort method - let args = PyTuple::new_bound(py, vec![py_limit]); - - let new_py_df = match self.dataframe.call_method_bound(py, "limit", args, None) { - Ok(new_py_df) => new_py_df, - Err(err) => { - let err_bound = err.get_type_bound(py); - let exception_name = err_bound.name()?; - if exception_name == "DataFrameOperationNotSupportedError" { - // Should fall back to fallback connection below - return Ok(None); - } - // Propagate other exceptions - return Err(err); - } - }; - - Ok(Some(Arc::new(PyDataFrame { - dataframe: new_py_df, - fallback_conn: self.fallback_conn.clone(), - }))) - })?; - - if let Some(new_df) = new_df { - Ok(new_df) - } else { - // Fallback - let table = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let table = self.dataframe.call_method0(py, "collect")?; - VegaFusionTable::from_pyarrow(table.bind(py)) - })?; - - let new_df: Arc = self.fallback_conn.scan_arrow(table).await?; - - new_df.limit(limit).await - } - } - - async fn fold( - &self, - fields: &[String], - value_col: &str, - key_col: &str, - order_field: Option<&str>, - ) -> Result> { - let new_df = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - // Convert limit to PyObject - let py_fields = Vec::from(fields).into_py(py); - let py_value_col = value_col.into_py(py); - let py_key_col = key_col.into_py(py); - let py_order_field = order_field.into_py(py); - - // Build arguments for Python sort method - let args = PyTuple::new_bound( - py, - vec![py_fields, py_value_col, py_key_col, py_order_field], - ); - - let new_py_df = match self.dataframe.call_method_bound(py, "fold", args, None) { - Ok(new_py_df) => new_py_df, - Err(err) => { - let err_bound = err.get_type_bound(py); - let exception_name = err_bound.name()?; - if exception_name == "DataFrameOperationNotSupportedError" { - // Should fall back to fallback connection below - return Ok(None); - } - // Propagate other exceptions - return Err(err); - } - }; - - Ok(Some(Arc::new(PyDataFrame { - dataframe: new_py_df, - fallback_conn: self.fallback_conn.clone(), - }))) - })?; - - if let Some(new_df) = new_df { - Ok(new_df) - } else { - // Fallback - let table = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let table = self.dataframe.call_method0(py, "collect")?; - VegaFusionTable::from_pyarrow(table.bind(py)) - })?; - - let new_df: Arc = self.fallback_conn.scan_arrow(table).await?; - - new_df.fold(fields, value_col, key_col, order_field).await - } - } - - async fn stack( - &self, - field: &str, - orderby: Vec, - groupby: &[String], - start_field: &str, - stop_field: &str, - mode: StackMode, - ) -> Result> { - let new_df = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - // Convert limit to PyObject - let py_field = field.into_py(py); - let py_orderby = exprs_to_py(py, orderby.clone())?; - let py_groupby = Vec::from(groupby).into_py(py); - let py_start_field = start_field.into_py(py); - let py_stop_field = stop_field.into_py(py); - let py_mode = mode.to_string().to_ascii_lowercase().into_py(py); - - // Build arguments for Python sort method - let args = PyTuple::new_bound( - py, - vec![ - py_field, - py_orderby, - py_groupby, - py_start_field, - py_stop_field, - py_mode, - ], - ); - - let new_py_df = match self.dataframe.call_method_bound(py, "stack", args, None) { - Ok(new_py_df) => new_py_df, - Err(err) => { - let err_bound = err.get_type_bound(py); - let exception_name = err_bound.name()?; - if exception_name == "DataFrameOperationNotSupportedError" { - // Should fall back to fallback connection below - return Ok(None); - } - // Propagate other exceptions - return Err(err); - } - }; - - Ok(Some(Arc::new(PyDataFrame { - dataframe: new_py_df, - fallback_conn: self.fallback_conn.clone(), - }))) - })?; - - if let Some(new_df) = new_df { - Ok(new_df) - } else { - // Fallback - let table = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let table = self.dataframe.call_method0(py, "collect")?; - VegaFusionTable::from_pyarrow(table.bind(py)) - })?; - - let new_df: Arc = self.fallback_conn.scan_arrow(table).await?; - - new_df - .stack(field, orderby, groupby, start_field, stop_field, mode) - .await - } - } - - async fn impute( - &self, - field: &str, - value: ScalarValue, - key: &str, - groupby: &[String], - order_field: Option<&str>, - ) -> Result> { - let new_df = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - // Convert limit to PyObject - let py_field = field.into_py(py); - let py_value = scalar_value_to_py(py, &value)?; - let py_key = key.into_py(py); - let py_groupby = Vec::from(groupby).into_py(py); - let py_order_field = order_field.into_py(py); - - // Build arguments for Python sort method - let args = PyTuple::new_bound( - py, - vec![py_field, py_value, py_key, py_groupby, py_order_field], - ); - - let new_py_df = match self.dataframe.call_method_bound(py, "impute", args, None) { - Ok(new_py_df) => new_py_df, - Err(err) => { - let err_bound = err.get_type_bound(py); - let exception_name = err_bound.name()?; - if exception_name == "DataFrameOperationNotSupportedError" { - // Should fall back to fallback connection below - return Ok(None); - } - // Propagate other exceptions - return Err(err); - } - }; - - Ok(Some(Arc::new(PyDataFrame { - dataframe: new_py_df, - fallback_conn: self.fallback_conn.clone(), - }))) - })?; - - if let Some(new_df) = new_df { - Ok(new_df) - } else { - // Fallback - let table = Python::with_gil(|py| -> std::result::Result<_, PyErr> { - let table = self.dataframe.call_method0(py, "collect")?; - VegaFusionTable::from_pyarrow(table.bind(py)) - })?; - - let new_df: Arc = self.fallback_conn.scan_arrow(table).await?; - - new_df.impute(field, value, key, groupby, order_field).await - } - } -} - -fn exprs_to_py(py: Python, exprs: Vec) -> Result { - let py_exprs: Vec = exprs - .iter() - .map(|expr| expr_to_py(py, expr)) - .collect::>>()?; - let py_exprs = py_exprs.into_py(py); - Ok(py_exprs) -} - -fn expr_to_py(py: Python, expr: &Expr) -> Result { - let extension_codec = DefaultLogicalExtensionCodec {}; - let proto_module = PyModule::import_bound(py, "vegafusion.proto.datafusion_pb2")?; - let logical_expr_class = proto_module.getattr("LogicalExprNode")?; - - let proto_sort_expr = serialize_expr(expr, &extension_codec)?; - - let sort_expr_bytes: Vec = proto_sort_expr.encode_to_vec(); - - // py_logical_expr = LogicalExprNode() - let py_logical_expr = logical_expr_class.call(PyTuple::empty_bound(py), None)?; - - // py_logical_expr.ParseFromString(sort_expr_bytes) - let py_bytes = PyBytes::new_bound(py, sort_expr_bytes.as_slice()); - let args = PyTuple::new_bound(py, vec![py_bytes]); - py_logical_expr.call_method("ParseFromString", args, None)?; - - // From &PyAny to PyObject to maintain ownership - Ok(py_logical_expr.into_py(py)) -} - -fn scalar_value_to_py(py: Python, value: &ScalarValue) -> Result { - Ok(match value.to_json()? { - Value::Null => Python::None(py), - Value::Bool(v) => v.into_py(py), - Value::Number(v) => { - if v.is_i64() { - v.as_i64().into_py(py) - } else if v.is_u64() { - v.as_u64().into_py(py) - } else { - v.as_f64().into_py(py) - } - } - Value::String(v) => v.into_py(py), - _ => { - return Err(VegaFusionError::internal(format!( - "Unsupported value for conversion to Python: {:?}", - value - ))) - } - }) -} diff --git a/vegafusion-python/src/lib.rs b/vegafusion-python/src/lib.rs index 8892cfb3..74bfda4e 100644 --- a/vegafusion-python/src/lib.rs +++ b/vegafusion-python/src/lib.rs @@ -1,5 +1,4 @@ pub mod connection; -pub mod dataframe; use pyo3::exceptions::PyValueError; use pyo3::prelude::*; @@ -14,9 +13,8 @@ use vegafusion_core::proto::gen::pretransform::pre_transform_values_warning::War use vegafusion_runtime::task_graph::runtime::{ChartState as RsChartState, VegaFusionRuntime}; use crate::connection::{PySqlConnection, PySqlDataset}; -use crate::dataframe::PyDataFrame; use env_logger::{Builder, Target}; -use pythonize::{depythonize_bound, pythonize}; +use pythonize::{depythonize, pythonize}; use serde_json::json; use vegafusion_common::data::table::VegaFusionTable; use vegafusion_core::patch::patch_pre_transformed_spec; @@ -79,7 +77,7 @@ impl PyChartState { pub fn update(&self, py: Python, updates: Vec) -> PyResult> { let updates = updates .into_iter() - .map(|el| Ok(depythonize_bound::(el.bind(py).clone())?)) + .map(|el| Ok(depythonize::(&el.bind(py).clone())?)) .collect::>>()?; let result_updates = py.allow_threads(|| { @@ -89,35 +87,35 @@ impl PyChartState { let a = result_updates .into_iter() - .map(|el| Ok(pythonize(py, &el)?)) - .collect::>>()?; + .map(|el| Ok(pythonize(py, &el)?.into())) + .collect::>>()?; Ok(a) } /// Get ChartState's initial input spec pub fn get_input_spec(&self, py: Python) -> PyResult { - Ok(pythonize(py, self.state.get_input_spec())?) + Ok(pythonize(py, self.state.get_input_spec())?.into()) } /// Get ChartState's server spec pub fn get_server_spec(&self, py: Python) -> PyResult { - Ok(pythonize(py, self.state.get_server_spec())?) + Ok(pythonize(py, self.state.get_server_spec())?.into()) } /// Get ChartState's client spec pub fn get_client_spec(&self, py: Python) -> PyResult { - Ok(pythonize(py, self.state.get_client_spec())?) + Ok(pythonize(py, self.state.get_client_spec())?.into()) } /// Get ChartState's initial transformed spec pub fn get_transformed_spec(&self, py: Python) -> PyResult { - Ok(pythonize(py, self.state.get_transformed_spec())?) + Ok(pythonize(py, self.state.get_transformed_spec())?.into()) } /// Get ChartState's watch plan pub fn get_watch_plan(&self, py: Python) -> PyResult { let watch_plan = WatchPlan::from(self.state.get_comm_plan().clone()); - Ok(pythonize(py, &watch_plan)?) + Ok(pythonize(py, &watch_plan)?.into()) } /// Get list of transform warnings @@ -128,7 +126,7 @@ impl PyChartState { .iter() .map(PreTransformSpecWarningSpec::from) .collect(); - Ok(pythonize::pythonize(py, &warnings)?) + Ok(pythonize::pythonize(py, &warnings)?.into()) } } @@ -149,7 +147,6 @@ impl PyVegaFusionRuntime { Python::with_gil(|py| -> PyResult<_> { let vegafusion_dataset_module = PyModule::import_bound(py, "vegafusion.dataset")?; let sql_dataset_type = vegafusion_dataset_module.getattr("SqlDataset")?; - let df_dataset_type = vegafusion_dataset_module.getattr("DataFrameDataset")?; let vegafusion_datasource_module = PyModule::import_bound(py, "vegafusion.datasource")?; @@ -175,14 +172,6 @@ impl PyVegaFusionRuntime { rt.block_on(sql_dataset.scan_table(&sql_dataset.table_name)) })?; VegaFusionDataset::DataFrame(df) - } else if inline_dataset.is_instance(&df_dataset_type)? { - let main_thread = inline_dataset - .call_method0("main_thread")? - .extract::()?; - any_main_thread = any_main_thread || main_thread; - - let df = Arc::new(PyDataFrame::new(inline_dataset.to_object(py))?); - VegaFusionDataset::DataFrame(df) } else if inline_dataset.is_instance(&datasource_type)? { let df = self.tokio_runtime_connection.block_on( self.runtime @@ -213,6 +202,7 @@ impl PyVegaFusionRuntime { #[pymethods] impl PyVegaFusionRuntime { #[new] + #[pyo3(signature = (max_capacity=None, memory_limit=None, worker_threads=None, connection=None))] pub fn new( max_capacity: Option, memory_limit: Option, @@ -256,6 +246,7 @@ impl PyVegaFusionRuntime { }) } + #[pyo3(signature = (spec, local_tz, default_input_tz=None, row_limit=None, inline_datasets=None))] pub fn new_chart_state( &self, py: Python, @@ -308,6 +299,7 @@ impl PyVegaFusionRuntime { } #[allow(clippy::too_many_arguments)] + #[pyo3(signature = (spec, preserve_interactivity=None, keep_signals=None, keep_datasets=None))] pub fn build_pre_transform_spec_plan( &self, spec: PyObject, @@ -342,11 +334,12 @@ impl PyVegaFusionRuntime { Python::with_gil(|py| -> PyResult { let py_plan = pythonize::pythonize(py, &json_plan)?; - Ok(py_plan) + Ok(py_plan.into()) }) } #[allow(clippy::too_many_arguments)] + #[pyo3(signature = (spec, local_tz, default_input_tz=None, row_limit=None, preserve_interactivity=None, inline_datasets=None, keep_signals=None, keep_datasets=None))] pub fn pre_transform_spec( &self, py: Python, @@ -402,10 +395,12 @@ impl PyVegaFusionRuntime { Python::with_gil(|py| -> PyResult<(PyObject, PyObject)> { let py_spec = pythonize::pythonize(py, &spec)?; let py_warnings = pythonize::pythonize(py, &warnings)?; - Ok((py_spec, py_warnings)) + Ok((py_spec.into(), py_warnings.into())) }) } + #[pyo3(signature = (spec, variables, local_tz, default_input_tz=None, row_limit=None, inline_datasets=None))] + #[allow(clippy::too_many_arguments)] pub fn pre_transform_datasets( &self, py: Python, @@ -477,11 +472,12 @@ impl PyVegaFusionRuntime { } let py_warnings = pythonize::pythonize(py, &warnings)?; - Ok((py_response_list.into(), py_warnings)) + Ok((py_response_list.into(), py_warnings.into())) }) } #[allow(clippy::too_many_arguments)] + #[pyo3(signature = (spec, local_tz, default_input_tz=None, preserve_interactivity=None, extract_threshold=None, extracted_format=None, inline_datasets=None, keep_signals=None, keep_datasets=None))] pub fn pre_transform_extract( &self, py: Python, @@ -571,7 +567,7 @@ impl PyVegaFusionRuntime { let warnings = pythonize::pythonize(py, &warnings)?; - Ok((tx_spec, datasets, warnings)) + Ok((tx_spec.into(), datasets, warnings.into())) }) } @@ -587,9 +583,9 @@ impl PyVegaFusionRuntime { Python::with_gil(|py| { match patch_pre_transformed_spec(&spec1, &pre_transformed_spec1, &spec2)? { None => Ok(None), - Some(pre_transformed_spec2) => { - Ok(Some(pythonize::pythonize(py, &pre_transformed_spec2)?)) - } + Some(pre_transformed_spec2) => Ok(Some( + pythonize::pythonize(py, &pre_transformed_spec2)?.into(), + )), } }) } @@ -641,7 +637,7 @@ fn parse_json_spec(chart_spec: PyObject) -> PyResult { ))), } } else if let Ok(chart_spec) = chart_spec.downcast_bound::(py) { - match depythonize_bound::(chart_spec.clone()) { + match depythonize::(&chart_spec.clone()) { Ok(chart_spec) => Ok(chart_spec), Err(err) => Err(PyValueError::new_err(format!( "Failed to parse chart_spec dict as Vega: {err}" diff --git a/vegafusion-python/vegafusion/__init__.py b/vegafusion-python/vegafusion/__init__.py index 9304b911..79b4a1fa 100644 --- a/vegafusion-python/vegafusion/__init__.py +++ b/vegafusion-python/vegafusion/__init__.py @@ -7,10 +7,6 @@ from ._vegafusion import __version__ - -# Match the version of the vegafusion package -from vegafusion import __version__ - def patched_version(distribution_name): """ Fake the version of the vegafusion-python-embed package to match the version of the diff --git a/vegafusion-python/vegafusion/dataset/__init__.py b/vegafusion-python/vegafusion/dataset/__init__.py index 0102e4c7..4453b1a0 100644 --- a/vegafusion-python/vegafusion/dataset/__init__.py +++ b/vegafusion-python/vegafusion/dataset/__init__.py @@ -1,2 +1,2 @@ from .sql import SqlDataset -from .dataframe import DataFrameDataset, DataFrameOperationNotSupportedError + diff --git a/vegafusion-python/vegafusion/dataset/dataframe.py b/vegafusion-python/vegafusion/dataset/dataframe.py deleted file mode 100644 index 43a772b8..00000000 --- a/vegafusion-python/vegafusion/dataset/dataframe.py +++ /dev/null @@ -1,190 +0,0 @@ -from abc import ABC, abstractmethod -from typing import Optional, List, Literal, Union, Any, TYPE_CHECKING - -if TYPE_CHECKING: - from pyarrow import Schema, Table - from vegafusion.proto.datafusion_pb2 import LogicalExprNode - - -class DataFrameOperationNotSupportedError(RuntimeError): - """ - Exception raised when a DataFrame transform method is not - supported - """ - pass - - -class DataFrameDataset(ABC): - """ - Python interface for VegaFusion DataFrame - """ - - @abstractmethod - def schema(self) -> "Schema": - """DataFrame's pyarrow schema""" - raise NotImplementedError() - - @abstractmethod - def collect(self) -> "Table": - """Return DataFrame's value as a pyarrow Table""" - raise NotImplementedError() - - def fallback(self) -> bool: - """ - Whether VegaFusion should fall back to the built-in DataFusion connection - when DataFrame operations are encountered that are not supported - - :return: bool - """ - return True - - def main_thread(self) -> bool: - """ - True if the dataset must be evaluated run on the main thread. - This blocks multithreaded parallelization, but is sometimes required - - :return: bool - """ - return True - - def sort( - self, exprs: List["LogicalExprNode"], limit: Optional[int] - ) -> "DataFrameDataset": - """ - Sort and optionally limit dataset - - :param exprs: Sort expressions - :param limit: Max number of rows to return - :return: DataFrameDataset - """ - raise DataFrameOperationNotSupportedError() - - def select(self, exprs: List["LogicalExprNode"]) -> "DataFrameDataset": - """ - Select columns from Dataset. Selection expressions may include column names, - column expressions, or window expressions - - :param exprs: Selection expressions - :return: DataFrameDataset - """ - raise DataFrameOperationNotSupportedError() - - def aggregate( - self, group_exprs: List["LogicalExprNode"], agg_exprs: List["LogicalExprNode"] - ) -> "DataFrameDataset": - """ - Perform dataset aggregation. Resulting dataset includes grouping - columns and aggregate expressions - - :param group_exprs: Expressions to group by - :param agg_exprs: Aggregate expressions - :return: DataFrameDataset - """ - raise DataFrameOperationNotSupportedError() - - def joinaggregate( - self, group_exprs: List["LogicalExprNode"], agg_exprs: List["LogicalExprNode"] - ) -> "DataFrameDataset": - """ - Perform joinaggregate dataset operation. - - See: https://vega.github.io/vega/docs/transforms/joinaggregate/ - - :param group_exprs: Expressions to group by - :param agg_exprs: Aggregate expressions - :return: DataFrameDataset - """ - raise DataFrameOperationNotSupportedError() - - def filter(self, predicate: "LogicalExprNode") -> "DataFrameDataset": - """ - Filter dataset by predicate expression - - :param predicate: Predicate expression - :return: DataFrameDataset - """ - raise DataFrameOperationNotSupportedError() - - def limit(self, limit: int) -> "DataFrameDataset": - """ - Limit dataset to max number of rows - - :param limit: Max number of rows - :return: DataFrameDataset - """ - raise DataFrameOperationNotSupportedError() - - def fold( - self, - fields: List[str], - value_col: str, - key_col: str, - order_field: Optional[str], - ) -> "DataFrameDataset": - """ - See: https://vega.github.io/vega/docs/transforms/fold/ - - :param fields: List of fields to fold - :param value_col: Name of output value column - :param key_col: Name of output key column - :param order_field: Name of input ordering column or - None if input ordering is not defined - :return: DataFrameDataset - """ - raise DataFrameOperationNotSupportedError() - - def stack( - self, - field: str, - orderby: List["LogicalExprNode"], - groupby: List[str], - start_field: str, - stop_field: str, - mode: Literal["zero", "center", "normalize"], - ) -> "DataFrameDataset": - """ - Computes a layout of stacking groups of values - - See: https://vega.github.io/vega/docs/transforms/stack/ - - :param field: Column that determines stack height - :param orderby: Criteria for sorting values within each stack - :param groupby: List of columns by which to partition data into separate stacks - :param start_field: Name of output stack start column - :param stop_field: Name of output stack stop column - :param mode: Stack mode. One of: "zero", "center", "normalize" - :return: - """ - raise DataFrameOperationNotSupportedError() - - def impute( - self, - field: str, - value: Union[str, int, float], - key: str, - groupby: List[str], - order_field: Optional[str], - ) -> "DataFrameDataset": - """ - Performs imputation of missing data objects. - - See: https://vega.github.io/vega/docs/transforms/impute/ - - :param field: Column for which missing values should be imputed - :param value: Value to impute with - :param key: Key column that uniquely identifies data objects within a group. - Missing key values (those occurring in the data but not in the current group) - will be imputed. - :param groupby: Optional list of columns to group by - :param order_field: Optional input ordering field. If not provided, input is - assumed to have arbitrary ordering - :return: - """ - raise DataFrameOperationNotSupportedError() - - def __dataframe__( - self, nan_as_null: bool = False, allow_copy: bool = True, **kwargs - ) -> Any: - """DataFrame interchange protocol support""" - table = self.collect() - return table.__dataframe__(nan_as_null=nan_as_null, allow_copy=allow_copy) diff --git a/vegafusion-python/vegafusion/proto/__init__.py b/vegafusion-python/vegafusion/proto/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/vegafusion-python/vegafusion/proto/datafusion_pb2.py b/vegafusion-python/vegafusion/proto/datafusion_pb2.py deleted file mode 100644 index 53060149..00000000 --- a/vegafusion-python/vegafusion/proto/datafusion_pb2.py +++ /dev/null @@ -1,479 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: proto/datafusion.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16proto/datafusion.proto\x12\ndatafusion\"\"\n\x0e\x43olumnRelation\x12\x10\n\x08relation\x18\x01 \x01(\t\"D\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x08relation\x18\x02 \x01(\x0b\x32\x1a.datafusion.ColumnRelation\"Z\n\x07\x44\x66\x46ield\x12 \n\x05\x66ield\x18\x01 \x01(\x0b\x32\x11.datafusion.Field\x12-\n\tqualifier\x18\x02 \x01(\x0b\x32\x1a.datafusion.ColumnRelation\"\x97\x01\n\x08\x44\x66Schema\x12$\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x13.datafusion.DfField\x12\x34\n\x08metadata\x18\x02 \x03(\x0b\x32\".datafusion.DfSchema.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x0b\n\x0fLogicalPlanNode\x12\x38\n\x0clisting_scan\x18\x01 \x01(\x0b\x32 .datafusion.ListingTableScanNodeH\x00\x12\x30\n\nprojection\x18\x03 \x01(\x0b\x32\x1a.datafusion.ProjectionNodeH\x00\x12.\n\tselection\x18\x04 \x01(\x0b\x32\x19.datafusion.SelectionNodeH\x00\x12&\n\x05limit\x18\x05 \x01(\x0b\x32\x15.datafusion.LimitNodeH\x00\x12.\n\taggregate\x18\x06 \x01(\x0b\x32\x19.datafusion.AggregateNodeH\x00\x12$\n\x04join\x18\x07 \x01(\x0b\x32\x14.datafusion.JoinNodeH\x00\x12$\n\x04sort\x18\x08 \x01(\x0b\x32\x14.datafusion.SortNodeH\x00\x12\x32\n\x0brepartition\x18\t \x01(\x0b\x32\x1b.datafusion.RepartitionNodeH\x00\x12\x37\n\x0e\x65mpty_relation\x18\n \x01(\x0b\x32\x1d.datafusion.EmptyRelationNodeH\x00\x12\x44\n\x15\x63reate_external_table\x18\x0b \x01(\x0b\x32#.datafusion.CreateExternalTableNodeH\x00\x12*\n\x07\x65xplain\x18\x0c \x01(\x0b\x32\x17.datafusion.ExplainNodeH\x00\x12(\n\x06window\x18\r \x01(\x0b\x32\x16.datafusion.WindowNodeH\x00\x12*\n\x07\x61nalyze\x18\x0e \x01(\x0b\x32\x17.datafusion.AnalyzeNodeH\x00\x12/\n\ncross_join\x18\x0f \x01(\x0b\x32\x19.datafusion.CrossJoinNodeH\x00\x12(\n\x06values\x18\x10 \x01(\x0b\x32\x16.datafusion.ValuesNodeH\x00\x12\x35\n\textension\x18\x11 \x01(\x0b\x32 .datafusion.LogicalExtensionNodeH\x00\x12\x44\n\x15\x63reate_catalog_schema\x18\x12 \x01(\x0b\x32#.datafusion.CreateCatalogSchemaNodeH\x00\x12&\n\x05union\x18\x13 \x01(\x0b\x32\x15.datafusion.UnionNodeH\x00\x12\x37\n\x0e\x63reate_catalog\x18\x14 \x01(\x0b\x32\x1d.datafusion.CreateCatalogNodeH\x00\x12\x37\n\x0esubquery_alias\x18\x15 \x01(\x0b\x32\x1d.datafusion.SubqueryAliasNodeH\x00\x12\x31\n\x0b\x63reate_view\x18\x16 \x01(\x0b\x32\x1a.datafusion.CreateViewNodeH\x00\x12,\n\x08\x64istinct\x18\x17 \x01(\x0b\x32\x18.datafusion.DistinctNodeH\x00\x12\x32\n\tview_scan\x18\x18 \x01(\x0b\x32\x1d.datafusion.ViewTableScanNodeH\x00\x12\x36\n\x0b\x63ustom_scan\x18\x19 \x01(\x0b\x32\x1f.datafusion.CustomTableScanNodeH\x00\x12*\n\x07prepare\x18\x1a \x01(\x0b\x32\x17.datafusion.PrepareNodeH\x00\x12-\n\tdrop_view\x18\x1b \x01(\x0b\x32\x18.datafusion.DropViewNodeH\x00\x12\x31\n\x0b\x64istinct_on\x18\x1c \x01(\x0b\x32\x1a.datafusion.DistinctOnNodeH\x00\x12)\n\x07\x63opy_to\x18\x1d \x01(\x0b\x32\x16.datafusion.CopyToNodeH\x00\x42\x11\n\x0fLogicalPlanType\"Q\n\x14LogicalExtensionNode\x12\x0c\n\x04node\x18\x01 \x01(\x0c\x12+\n\x06inputs\x18\x02 \x03(\x0b\x32\x1b.datafusion.LogicalPlanNode\"$\n\x11ProjectionColumns\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"f\n\tCsvFormat\x12\x12\n\nhas_header\x18\x01 \x01(\x08\x12\x11\n\tdelimiter\x18\x02 \x01(\t\x12\r\n\x05quote\x18\x03 \x01(\t\x12\x10\n\x06\x65scape\x18\x04 \x01(\tH\x00\x42\x11\n\x0foptional_escape\"\x15\n\rParquetFormatJ\x04\x08\x01\x10\x02\"\x0c\n\nAvroFormat\"T\n\x19LogicalExprNodeCollection\x12\x37\n\x12logical_expr_nodes\x18\x01 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\"\x9a\x04\n\x14ListingTableScanNode\x12\x33\n\ntable_name\x18\x0e \x01(\x0b\x32\x1f.datafusion.OwnedTableReference\x12\r\n\x05paths\x18\x02 \x03(\t\x12\x16\n\x0e\x66ile_extension\x18\x03 \x01(\t\x12\x31\n\nprojection\x18\x04 \x01(\x0b\x32\x1d.datafusion.ProjectionColumns\x12\"\n\x06schema\x18\x05 \x01(\x0b\x32\x12.datafusion.Schema\x12,\n\x07\x66ilters\x18\x06 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x1c\n\x14table_partition_cols\x18\x07 \x03(\t\x12\x14\n\x0c\x63ollect_stat\x18\x08 \x01(\x08\x12\x19\n\x11target_partitions\x18\t \x01(\r\x12$\n\x03\x63sv\x18\n \x01(\x0b\x32\x15.datafusion.CsvFormatH\x00\x12,\n\x07parquet\x18\x0b \x01(\x0b\x32\x19.datafusion.ParquetFormatH\x00\x12&\n\x04\x61vro\x18\x0c \x01(\x0b\x32\x16.datafusion.AvroFormatH\x00\x12>\n\x0f\x66ile_sort_order\x18\r \x03(\x0b\x32%.datafusion.LogicalExprNodeCollectionB\x10\n\x0e\x46ileFormatTypeJ\x04\x08\x01\x10\x02\"\xe5\x01\n\x11ViewTableScanNode\x12\x33\n\ntable_name\x18\x06 \x01(\x0b\x32\x1f.datafusion.OwnedTableReference\x12*\n\x05input\x18\x02 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12\"\n\x06schema\x18\x03 \x01(\x0b\x32\x12.datafusion.Schema\x12\x31\n\nprojection\x18\x04 \x01(\x0b\x32\x1d.datafusion.ProjectionColumns\x12\x12\n\ndefinition\x18\x05 \x01(\tJ\x04\x08\x01\x10\x02\"\xf0\x01\n\x13\x43ustomTableScanNode\x12\x33\n\ntable_name\x18\x06 \x01(\x0b\x32\x1f.datafusion.OwnedTableReference\x12\x31\n\nprojection\x18\x02 \x01(\x0b\x32\x1d.datafusion.ProjectionColumns\x12\"\n\x06schema\x18\x03 \x01(\x0b\x32\x12.datafusion.Schema\x12,\n\x07\x66ilters\x18\x04 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x19\n\x11\x63ustom_table_data\x18\x05 \x01(\x0cJ\x04\x08\x01\x10\x02\"\x8a\x01\n\x0eProjectionNode\x12*\n\x05input\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12)\n\x04\x65xpr\x18\x02 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x0f\n\x05\x61lias\x18\x03 \x01(\tH\x00\x42\x10\n\x0eoptional_alias\"f\n\rSelectionNode\x12*\n\x05input\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12)\n\x04\x65xpr\x18\x02 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"p\n\x08SortNode\x12*\n\x05input\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12)\n\x04\x65xpr\x18\x02 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\r\n\x05\x66\x65tch\x18\x03 \x01(\x03\"\x95\x01\n\x0fRepartitionNode\x12*\n\x05input\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12\x15\n\x0bround_robin\x18\x02 \x01(\x04H\x00\x12+\n\x04hash\x18\x03 \x01(\x0b\x32\x1b.datafusion.HashRepartitionH\x00\x42\x12\n\x10partition_method\"Z\n\x0fHashRepartition\x12.\n\thash_expr\x18\x01 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x17\n\x0fpartition_count\x18\x02 \x01(\x04\",\n\x11\x45mptyRelationNode\x12\x17\n\x0fproduce_one_row\x18\x01 \x01(\x08\"\'\n\x14PrimaryKeyConstraint\x12\x0f\n\x07indices\x18\x01 \x03(\x04\"#\n\x10UniqueConstraint\x12\x0f\n\x07indices\x18\x01 \x03(\x04\"\x88\x01\n\nConstraint\x12\x37\n\x0bprimary_key\x18\x01 \x01(\x0b\x32 .datafusion.PrimaryKeyConstraintH\x00\x12.\n\x06unique\x18\x02 \x01(\x0b\x32\x1c.datafusion.UniqueConstraintH\x00\x42\x11\n\x0f\x63onstraint_mode\":\n\x0b\x43onstraints\x12+\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32\x16.datafusion.Constraint\"\xe8\x05\n\x17\x43reateExternalTableNode\x12-\n\x04name\x18\x0c \x01(\x0b\x32\x1f.datafusion.OwnedTableReference\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x11\n\tfile_type\x18\x03 \x01(\t\x12\x12\n\nhas_header\x18\x04 \x01(\x08\x12$\n\x06schema\x18\x05 \x01(\x0b\x32\x14.datafusion.DfSchema\x12\x1c\n\x14table_partition_cols\x18\x06 \x03(\t\x12\x15\n\rif_not_exists\x18\x07 \x01(\x08\x12\x11\n\tdelimiter\x18\x08 \x01(\t\x12\x12\n\ndefinition\x18\t \x01(\t\x12\x41\n\x15\x66ile_compression_type\x18\x11 \x01(\x0e\x32\".datafusion.CompressionTypeVariant\x12:\n\x0border_exprs\x18\r \x03(\x0b\x32%.datafusion.LogicalExprNodeCollection\x12\x11\n\tunbounded\x18\x0e \x01(\x08\x12\x41\n\x07options\x18\x0b \x03(\x0b\x32\x30.datafusion.CreateExternalTableNode.OptionsEntry\x12,\n\x0b\x63onstraints\x18\x0f \x01(\x0b\x32\x17.datafusion.Constraints\x12P\n\x0f\x63olumn_defaults\x18\x10 \x03(\x0b\x32\x37.datafusion.CreateExternalTableNode.ColumnDefaultsEntry\x1a.\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aR\n\x13\x43olumnDefaultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12*\n\x05value\x18\x02 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode:\x02\x38\x01J\x04\x08\x01\x10\x02J\x04\x08\n\x10\x0b\"r\n\x0bPrepareNode\x12\x0c\n\x04name\x18\x01 \x01(\t\x12)\n\ndata_types\x18\x02 \x03(\x0b\x32\x15.datafusion.ArrowType\x12*\n\x05input\x18\x03 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\"k\n\x17\x43reateCatalogSchemaNode\x12\x13\n\x0bschema_name\x18\x01 \x01(\t\x12\x15\n\rif_not_exists\x18\x02 \x01(\x08\x12$\n\x06schema\x18\x03 \x01(\x0b\x32\x14.datafusion.DfSchema\"f\n\x11\x43reateCatalogNode\x12\x14\n\x0c\x63\x61talog_name\x18\x01 \x01(\t\x12\x15\n\rif_not_exists\x18\x02 \x01(\x08\x12$\n\x06schema\x18\x03 \x01(\x0b\x32\x14.datafusion.DfSchema\"v\n\x0c\x44ropViewNode\x12-\n\x04name\x18\x01 \x01(\x0b\x32\x1f.datafusion.OwnedTableReference\x12\x11\n\tif_exists\x18\x02 \x01(\x08\x12$\n\x06schema\x18\x03 \x01(\x0b\x32\x14.datafusion.DfSchema\"\x99\x01\n\x0e\x43reateViewNode\x12-\n\x04name\x18\x05 \x01(\x0b\x32\x1f.datafusion.OwnedTableReference\x12*\n\x05input\x18\x02 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12\x12\n\nor_replace\x18\x03 \x01(\x08\x12\x12\n\ndefinition\x18\x04 \x01(\tJ\x04\x08\x01\x10\x02\"N\n\nValuesNode\x12\x0e\n\x06n_cols\x18\x01 \x01(\x04\x12\x30\n\x0bvalues_list\x18\x02 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\"J\n\x0b\x41nalyzeNode\x12*\n\x05input\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12\x0f\n\x07verbose\x18\x02 \x01(\x08\"J\n\x0b\x45xplainNode\x12*\n\x05input\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12\x0f\n\x07verbose\x18\x02 \x01(\x08\"\x9c\x01\n\rAggregateNode\x12*\n\x05input\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12/\n\ngroup_expr\x18\x02 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12.\n\taggr_expr\x18\x03 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\"j\n\nWindowNode\x12*\n\x05input\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12\x30\n\x0bwindow_expr\x18\x02 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\"\xef\x02\n\x08JoinNode\x12)\n\x04left\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12*\n\x05right\x18\x02 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12\'\n\tjoin_type\x18\x03 \x01(\x0e\x32\x14.datafusion.JoinType\x12\x33\n\x0fjoin_constraint\x18\x04 \x01(\x0e\x32\x1a.datafusion.JoinConstraint\x12\x32\n\rleft_join_key\x18\x05 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x33\n\x0eright_join_key\x18\x06 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x18\n\x10null_equals_null\x18\x07 \x01(\x08\x12+\n\x06\x66ilter\x18\x08 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\":\n\x0c\x44istinctNode\x12*\n\x05input\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\"\xcc\x01\n\x0e\x44istinctOnNode\x12,\n\x07on_expr\x18\x01 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x30\n\x0bselect_expr\x18\x02 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12.\n\tsort_expr\x18\x03 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12*\n\x05input\x18\x04 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\"\xda\x01\n\nCopyToNode\x12*\n\x05input\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12\x12\n\noutput_url\x18\x02 \x01(\t\x12-\n\x0bsql_options\x18\x04 \x01(\x0b\x32\x16.datafusion.SQLOptionsH\x00\x12;\n\x0ewriter_options\x18\x05 \x01(\x0b\x32!.datafusion.FileTypeWriterOptionsH\x00\x12\x11\n\tfile_type\x18\x06 \x01(\tB\r\n\x0b\x43opyOptions\"3\n\nSQLOptions\x12%\n\x06option\x18\x01 \x03(\x0b\x32\x15.datafusion.SQLOption\"\'\n\tSQLOption\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"8\n\tUnionNode\x12+\n\x06inputs\x18\x01 \x03(\x0b\x32\x1b.datafusion.LogicalPlanNode\"f\n\rCrossJoinNode\x12)\n\x04left\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12*\n\x05right\x18\x02 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\"T\n\tLimitNode\x12*\n\x05input\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12\x0c\n\x04skip\x18\x02 \x01(\x03\x12\r\n\x05\x66\x65tch\x18\x03 \x01(\x03\">\n\x11SelectionExecNode\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"u\n\x11SubqueryAliasNode\x12*\n\x05input\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalPlanNode\x12.\n\x05\x61lias\x18\x03 \x01(\x0b\x32\x1f.datafusion.OwnedTableReferenceJ\x04\x08\x02\x10\x03\"\xe9\x0c\n\x0fLogicalExprNode\x12$\n\x06\x63olumn\x18\x01 \x01(\x0b\x32\x12.datafusion.ColumnH\x00\x12&\n\x05\x61lias\x18\x02 \x01(\x0b\x32\x15.datafusion.AliasNodeH\x00\x12*\n\x07literal\x18\x03 \x01(\x0b\x32\x17.datafusion.ScalarValueH\x00\x12\x31\n\x0b\x62inary_expr\x18\x04 \x01(\x0b\x32\x1a.datafusion.BinaryExprNodeH\x00\x12\x37\n\x0e\x61ggregate_expr\x18\x05 \x01(\x0b\x32\x1d.datafusion.AggregateExprNodeH\x00\x12*\n\x0cis_null_expr\x18\x06 \x01(\x0b\x32\x12.datafusion.IsNullH\x00\x12\x31\n\x10is_not_null_expr\x18\x07 \x01(\x0b\x32\x15.datafusion.IsNotNullH\x00\x12#\n\x08not_expr\x18\x08 \x01(\x0b\x32\x0f.datafusion.NotH\x00\x12*\n\x07\x62\x65tween\x18\t \x01(\x0b\x32\x17.datafusion.BetweenNodeH\x00\x12%\n\x05\x63\x61se_\x18\n \x01(\x0b\x32\x14.datafusion.CaseNodeH\x00\x12$\n\x04\x63\x61st\x18\x0b \x01(\x0b\x32\x14.datafusion.CastNodeH\x00\x12(\n\x04sort\x18\x0c \x01(\x0b\x32\x18.datafusion.SortExprNodeH\x00\x12,\n\x08negative\x18\r \x01(\x0b\x32\x18.datafusion.NegativeNodeH\x00\x12)\n\x07in_list\x18\x0e \x01(\x0b\x32\x16.datafusion.InListNodeH\x00\x12(\n\x08wildcard\x18\x0f \x01(\x0b\x32\x14.datafusion.WildcardH\x00\x12\x39\n\x0fscalar_function\x18\x10 \x01(\x0b\x32\x1e.datafusion.ScalarFunctionNodeH\x00\x12+\n\x08try_cast\x18\x11 \x01(\x0b\x32\x17.datafusion.TryCastNodeH\x00\x12\x31\n\x0bwindow_expr\x18\x12 \x01(\x0b\x32\x1a.datafusion.WindowExprNodeH\x00\x12>\n\x12\x61ggregate_udf_expr\x18\x13 \x01(\x0b\x32 .datafusion.AggregateUDFExprNodeH\x00\x12\x38\n\x0fscalar_udf_expr\x18\x14 \x01(\x0b\x32\x1d.datafusion.ScalarUDFExprNodeH\x00\x12\x38\n\x11get_indexed_field\x18\x15 \x01(\x0b\x32\x1b.datafusion.GetIndexedFieldH\x00\x12\x33\n\x0cgrouping_set\x18\x16 \x01(\x0b\x32\x1b.datafusion.GroupingSetNodeH\x00\x12$\n\x04\x63ube\x18\x17 \x01(\x0b\x32\x14.datafusion.CubeNodeH\x00\x12(\n\x06rollup\x18\x18 \x01(\x0b\x32\x16.datafusion.RollupNodeH\x00\x12%\n\x07is_true\x18\x19 \x01(\x0b\x32\x12.datafusion.IsTrueH\x00\x12\'\n\x08is_false\x18\x1a \x01(\x0b\x32\x13.datafusion.IsFalseH\x00\x12+\n\nis_unknown\x18\x1b \x01(\x0b\x32\x15.datafusion.IsUnknownH\x00\x12,\n\x0bis_not_true\x18\x1c \x01(\x0b\x32\x15.datafusion.IsNotTrueH\x00\x12.\n\x0cis_not_false\x18\x1d \x01(\x0b\x32\x16.datafusion.IsNotFalseH\x00\x12\x32\n\x0eis_not_unknown\x18\x1e \x01(\x0b\x32\x18.datafusion.IsNotUnknownH\x00\x12$\n\x04like\x18\x1f \x01(\x0b\x32\x14.datafusion.LikeNodeH\x00\x12&\n\x05ilike\x18 \x01(\x0b\x32\x15.datafusion.ILikeNodeH\x00\x12/\n\nsimilar_to\x18! \x01(\x0b\x32\x19.datafusion.SimilarToNodeH\x00\x12\x32\n\x0bplaceholder\x18\" \x01(\x0b\x32\x1b.datafusion.PlaceholderNodeH\x00\x12$\n\x06unnest\x18# \x01(\x0b\x32\x12.datafusion.UnnestH\x00\x42\n\n\x08\x45xprType\"\x1d\n\x08Wildcard\x12\x11\n\tqualifier\x18\x01 \x01(\t\"G\n\x0fPlaceholderNode\x12\n\n\x02id\x18\x01 \x01(\t\x12(\n\tdata_type\x18\x02 \x01(\x0b\x32\x15.datafusion.ArrowType\"<\n\x0fLogicalExprList\x12)\n\x04\x65xpr\x18\x01 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\"<\n\x0fGroupingSetNode\x12)\n\x04\x65xpr\x18\x01 \x03(\x0b\x32\x1b.datafusion.LogicalExprList\"5\n\x08\x43ubeNode\x12)\n\x04\x65xpr\x18\x01 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\"7\n\nRollupNode\x12)\n\x04\x65xpr\x18\x01 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\"9\n\x10NamedStructField\x12%\n\x04name\x18\x01 \x01(\x0b\x32\x17.datafusion.ScalarValue\"5\n\tListIndex\x12(\n\x03key\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"\x8f\x01\n\tListRange\x12*\n\x05start\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12)\n\x04stop\x18\x02 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12+\n\x06stride\x18\x03 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"\xdb\x01\n\x0fGetIndexedField\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12:\n\x12named_struct_field\x18\x02 \x01(\x0b\x32\x1c.datafusion.NamedStructFieldH\x00\x12+\n\nlist_index\x18\x03 \x01(\x0b\x32\x15.datafusion.ListIndexH\x00\x12+\n\nlist_range\x18\x04 \x01(\x0b\x32\x15.datafusion.ListRangeH\x00\x42\x07\n\x05\x66ield\"3\n\x06IsNull\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"6\n\tIsNotNull\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"3\n\x06IsTrue\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"4\n\x07IsFalse\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"6\n\tIsUnknown\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"6\n\tIsNotTrue\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"7\n\nIsNotFalse\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"9\n\x0cIsNotUnknown\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"0\n\x03Not\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"x\n\tAliasNode\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\r\n\x05\x61lias\x18\x02 \x01(\t\x12\x31\n\x08relation\x18\x03 \x03(\x0b\x32\x1f.datafusion.OwnedTableReference\"K\n\x0e\x42inaryExprNode\x12-\n\x08operands\x18\x01 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\n\n\x02op\x18\x03 \x01(\t\"9\n\x0cNegativeNode\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"4\n\x06Unnest\x12*\n\x05\x65xprs\x18\x01 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\"s\n\nInListNode\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12)\n\x04list\x18\x02 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x0f\n\x07negated\x18\x03 \x01(\x08\"h\n\x12ScalarFunctionNode\x12\'\n\x03\x66un\x18\x01 \x01(\x0e\x32\x1a.datafusion.ScalarFunction\x12)\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\"\xe2\x01\n\x11\x41ggregateExprNode\x12\x34\n\raggr_function\x18\x01 \x01(\x0e\x32\x1d.datafusion.AggregateFunction\x12)\n\x04\x65xpr\x18\x02 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x10\n\x08\x64istinct\x18\x03 \x01(\x08\x12+\n\x06\x66ilter\x18\x04 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12-\n\x08order_by\x18\x05 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\"\xaf\x01\n\x14\x41ggregateUDFExprNode\x12\x10\n\x08\x66un_name\x18\x01 \x01(\t\x12)\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12+\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12-\n\x08order_by\x18\x04 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\"P\n\x11ScalarUDFExprNode\x12\x10\n\x08\x66un_name\x18\x01 \x01(\t\x12)\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\"\xf7\x02\n\x0eWindowExprNode\x12\x36\n\raggr_function\x18\x01 \x01(\x0e\x32\x1d.datafusion.AggregateFunctionH\x00\x12>\n\x11\x62uilt_in_function\x18\x02 \x01(\x0e\x32!.datafusion.BuiltInWindowFunctionH\x00\x12\x0e\n\x04udaf\x18\x03 \x01(\tH\x00\x12\x0e\n\x04udwf\x18\t \x01(\tH\x00\x12)\n\x04\x65xpr\x18\x04 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x31\n\x0cpartition_by\x18\x05 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12-\n\x08order_by\x18\x06 \x03(\x0b\x32\x1b.datafusion.LogicalExprNode\x12-\n\x0cwindow_frame\x18\x08 \x01(\x0b\x32\x17.datafusion.WindowFrameB\x11\n\x0fwindow_function\"\x9e\x01\n\x0b\x42\x65tweenNode\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x0f\n\x07negated\x18\x02 \x01(\x08\x12(\n\x03low\x18\x03 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12)\n\x04high\x18\x04 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"\x89\x01\n\x08LikeNode\x12\x0f\n\x07negated\x18\x01 \x01(\x08\x12)\n\x04\x65xpr\x18\x02 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12,\n\x07pattern\x18\x03 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x13\n\x0b\x65scape_char\x18\x04 \x01(\t\"\x8a\x01\n\tILikeNode\x12\x0f\n\x07negated\x18\x01 \x01(\x08\x12)\n\x04\x65xpr\x18\x02 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12,\n\x07pattern\x18\x03 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x13\n\x0b\x65scape_char\x18\x04 \x01(\t\"\x8e\x01\n\rSimilarToNode\x12\x0f\n\x07negated\x18\x01 \x01(\x08\x12)\n\x04\x65xpr\x18\x02 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12,\n\x07pattern\x18\x03 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x13\n\x0b\x65scape_char\x18\x04 \x01(\t\"\x93\x01\n\x08\x43\x61seNode\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12,\n\x0ewhen_then_expr\x18\x02 \x03(\x0b\x32\x14.datafusion.WhenThen\x12.\n\telse_expr\x18\x03 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"j\n\x08WhenThen\x12.\n\twhen_expr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12.\n\tthen_expr\x18\x02 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\"`\n\x08\x43\x61stNode\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12)\n\narrow_type\x18\x02 \x01(\x0b\x32\x15.datafusion.ArrowType\"c\n\x0bTryCastNode\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12)\n\narrow_type\x18\x02 \x01(\x0b\x32\x15.datafusion.ArrowType\"[\n\x0cSortExprNode\x12)\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1b.datafusion.LogicalExprNode\x12\x0b\n\x03\x61sc\x18\x02 \x01(\x08\x12\x13\n\x0bnulls_first\x18\x03 \x01(\x08\"\xb6\x01\n\x0bWindowFrame\x12\x38\n\x12window_frame_units\x18\x01 \x01(\x0e\x32\x1c.datafusion.WindowFrameUnits\x12\x31\n\x0bstart_bound\x18\x02 \x01(\x0b\x32\x1c.datafusion.WindowFrameBound\x12-\n\x05\x62ound\x18\x03 \x01(\x0b\x32\x1c.datafusion.WindowFrameBoundH\x00\x42\x0b\n\tend_bound\"\x83\x01\n\x10WindowFrameBound\x12\x41\n\x17window_frame_bound_type\x18\x01 \x01(\x0e\x32 .datafusion.WindowFrameBoundType\x12,\n\x0b\x62ound_value\x18\x02 \x01(\x0b\x32\x17.datafusion.ScalarValue\"\x91\x01\n\x06Schema\x12\"\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x11.datafusion.Field\x12\x32\n\x08metadata\x18\x02 \x03(\x0b\x32 .datafusion.Schema.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x82\x02\n\x05\x46ield\x12\x0c\n\x04name\x18\x01 \x01(\t\x12)\n\narrow_type\x18\x02 \x01(\x0b\x32\x15.datafusion.ArrowType\x12\x10\n\x08nullable\x18\x03 \x01(\x08\x12#\n\x08\x63hildren\x18\x04 \x03(\x0b\x32\x11.datafusion.Field\x12\x31\n\x08metadata\x18\x05 \x03(\x0b\x32\x1f.datafusion.Field.MetadataEntry\x12\x0f\n\x07\x64ict_id\x18\x06 \x01(\x03\x12\x14\n\x0c\x64ict_ordered\x18\x07 \x01(\x08\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"!\n\x0f\x46ixedSizeBinary\x12\x0e\n\x06length\x18\x01 \x01(\x05\"F\n\tTimestamp\x12\'\n\ttime_unit\x18\x01 \x01(\x0e\x32\x14.datafusion.TimeUnit\x12\x10\n\x08timezone\x18\x02 \x01(\t\"7\n\x07\x44\x65\x63imal\x12\x11\n\tprecision\x18\x03 \x01(\r\x12\r\n\x05scale\x18\x04 \x01(\x05J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03\"-\n\x04List\x12%\n\nfield_type\x18\x01 \x01(\x0b\x32\x11.datafusion.Field\"I\n\rFixedSizeList\x12%\n\nfield_type\x18\x01 \x01(\x0b\x32\x11.datafusion.Field\x12\x11\n\tlist_size\x18\x02 \x01(\x05\"V\n\nDictionary\x12\"\n\x03key\x18\x01 \x01(\x0b\x32\x15.datafusion.ArrowType\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.datafusion.ArrowType\"4\n\x06Struct\x12*\n\x0fsub_field_types\x18\x01 \x03(\x0b\x32\x11.datafusion.Field\"A\n\x03Map\x12%\n\nfield_type\x18\x01 \x01(\x0b\x32\x11.datafusion.Field\x12\x13\n\x0bkeys_sorted\x18\x02 \x01(\x08\"l\n\x05Union\x12&\n\x0bunion_types\x18\x01 \x03(\x0b\x32\x11.datafusion.Field\x12)\n\nunion_mode\x18\x02 \x01(\x0e\x32\x15.datafusion.UnionMode\x12\x10\n\x08type_ids\x18\x03 \x03(\x05\"`\n\x11ScalarNestedValue\x12\x13\n\x0bipc_message\x18\x01 \x01(\x0c\x12\x12\n\narrow_data\x18\x02 \x01(\x0c\x12\"\n\x06schema\x18\x03 \x01(\x0b\x32\x12.datafusion.Schema\"_\n\x11ScalarTime32Value\x12\x1d\n\x13time32_second_value\x18\x01 \x01(\x05H\x00\x12\"\n\x18time32_millisecond_value\x18\x02 \x01(\x05H\x00\x42\x07\n\x05value\"c\n\x11ScalarTime64Value\x12\"\n\x18time64_microsecond_value\x18\x01 \x01(\x03H\x00\x12!\n\x17time64_nanosecond_value\x18\x02 \x01(\x03H\x00\x42\x07\n\x05value\"\xb3\x01\n\x14ScalarTimestampValue\x12 \n\x16time_microsecond_value\x18\x01 \x01(\x03H\x00\x12\x1f\n\x15time_nanosecond_value\x18\x02 \x01(\x03H\x00\x12\x1b\n\x11time_second_value\x18\x03 \x01(\x03H\x00\x12 \n\x16time_millisecond_value\x18\x04 \x01(\x03H\x00\x12\x10\n\x08timezone\x18\x05 \x01(\tB\x07\n\x05value\"j\n\x15ScalarDictionaryValue\x12)\n\nindex_type\x18\x01 \x01(\x0b\x32\x15.datafusion.ArrowType\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.datafusion.ScalarValue\"H\n\x19IntervalMonthDayNanoValue\x12\x0e\n\x06months\x18\x01 \x01(\x05\x12\x0c\n\x04\x64\x61ys\x18\x02 \x01(\x05\x12\r\n\x05nanos\x18\x03 \x01(\x03\"7\n\x15ScalarFixedSizeBinary\x12\x0e\n\x06values\x18\x01 \x01(\x0c\x12\x0e\n\x06length\x18\x02 \x01(\x05\"\x86\x0b\n\x0bScalarValue\x12+\n\nnull_value\x18! \x01(\x0b\x32\x15.datafusion.ArrowTypeH\x00\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x14\n\nutf8_value\x18\x02 \x01(\tH\x00\x12\x1a\n\x10large_utf8_value\x18\x03 \x01(\tH\x00\x12\x14\n\nint8_value\x18\x04 \x01(\x05H\x00\x12\x15\n\x0bint16_value\x18\x05 \x01(\x05H\x00\x12\x15\n\x0bint32_value\x18\x06 \x01(\x05H\x00\x12\x15\n\x0bint64_value\x18\x07 \x01(\x03H\x00\x12\x15\n\x0buint8_value\x18\x08 \x01(\rH\x00\x12\x16\n\x0cuint16_value\x18\t \x01(\rH\x00\x12\x16\n\x0cuint32_value\x18\n \x01(\rH\x00\x12\x16\n\x0cuint64_value\x18\x0b \x01(\x04H\x00\x12\x17\n\rfloat32_value\x18\x0c \x01(\x02H\x00\x12\x17\n\rfloat64_value\x18\r \x01(\x01H\x00\x12\x17\n\rdate_32_value\x18\x0e \x01(\x05H\x00\x12\x35\n\x0ctime32_value\x18\x0f \x01(\x0b\x32\x1d.datafusion.ScalarTime32ValueH\x00\x12\x39\n\x10large_list_value\x18\x10 \x01(\x0b\x32\x1d.datafusion.ScalarNestedValueH\x00\x12\x33\n\nlist_value\x18\x11 \x01(\x0b\x32\x1d.datafusion.ScalarNestedValueH\x00\x12>\n\x15\x66ixed_size_list_value\x18\x12 \x01(\x0b\x32\x1d.datafusion.ScalarNestedValueH\x00\x12\x35\n\x0cstruct_value\x18 \x01(\x0b\x32\x1d.datafusion.ScalarNestedValueH\x00\x12\x32\n\x10\x64\x65\x63imal128_value\x18\x14 \x01(\x0b\x32\x16.datafusion.Decimal128H\x00\x12\x32\n\x10\x64\x65\x63imal256_value\x18\' \x01(\x0b\x32\x16.datafusion.Decimal256H\x00\x12\x17\n\rdate_64_value\x18\x15 \x01(\x03H\x00\x12\"\n\x18interval_yearmonth_value\x18\x18 \x01(\x05H\x00\x12 \n\x16interval_daytime_value\x18\x19 \x01(\x03H\x00\x12\x1f\n\x15\x64uration_second_value\x18# \x01(\x03H\x00\x12$\n\x1a\x64uration_millisecond_value\x18$ \x01(\x03H\x00\x12$\n\x1a\x64uration_microsecond_value\x18% \x01(\x03H\x00\x12#\n\x19\x64uration_nanosecond_value\x18& \x01(\x03H\x00\x12;\n\x0ftimestamp_value\x18\x1a \x01(\x0b\x32 .datafusion.ScalarTimestampValueH\x00\x12=\n\x10\x64ictionary_value\x18\x1b \x01(\x0b\x32!.datafusion.ScalarDictionaryValueH\x00\x12\x16\n\x0c\x62inary_value\x18\x1c \x01(\x0cH\x00\x12\x1c\n\x12large_binary_value\x18\x1d \x01(\x0cH\x00\x12\x35\n\x0ctime64_value\x18\x1e \x01(\x0b\x32\x1d.datafusion.ScalarTime64ValueH\x00\x12H\n\x17interval_month_day_nano\x18\x1f \x01(\x0b\x32%.datafusion.IntervalMonthDayNanoValueH\x00\x12\x44\n\x17\x66ixed_size_binary_value\x18\" \x01(\x0b\x32!.datafusion.ScalarFixedSizeBinaryH\x00\x42\x07\n\x05valueJ\x04\x08\x13\x10\x14\"1\n\nDecimal128\x12\r\n\x05value\x18\x01 \x01(\x0c\x12\t\n\x01p\x18\x02 \x01(\x03\x12\t\n\x01s\x18\x03 \x01(\x03\"1\n\nDecimal256\x12\r\n\x05value\x18\x01 \x01(\x0c\x12\t\n\x01p\x18\x02 \x01(\x03\x12\t\n\x01s\x18\x03 \x01(\x03\"\x94\x0b\n\tArrowType\x12(\n\x04NONE\x18\x01 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12(\n\x04\x42OOL\x18\x02 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12)\n\x05UINT8\x18\x03 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12(\n\x04INT8\x18\x04 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12*\n\x06UINT16\x18\x05 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12)\n\x05INT16\x18\x06 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12*\n\x06UINT32\x18\x07 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12)\n\x05INT32\x18\x08 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12*\n\x06UINT64\x18\t \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12)\n\x05INT64\x18\n \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12+\n\x07\x46LOAT16\x18\x0b \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12+\n\x07\x46LOAT32\x18\x0c \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12+\n\x07\x46LOAT64\x18\r \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12(\n\x04UTF8\x18\x0e \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12.\n\nLARGE_UTF8\x18 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12*\n\x06\x42INARY\x18\x0f \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12\x1b\n\x11\x46IXED_SIZE_BINARY\x18\x10 \x01(\x05H\x00\x12\x30\n\x0cLARGE_BINARY\x18\x1f \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12*\n\x06\x44\x41TE32\x18\x11 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12*\n\x06\x44\x41TE64\x18\x12 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12(\n\x08\x44URATION\x18\x13 \x01(\x0e\x32\x14.datafusion.TimeUnitH\x00\x12*\n\tTIMESTAMP\x18\x14 \x01(\x0b\x32\x15.datafusion.TimestampH\x00\x12&\n\x06TIME32\x18\x15 \x01(\x0e\x32\x14.datafusion.TimeUnitH\x00\x12&\n\x06TIME64\x18\x16 \x01(\x0e\x32\x14.datafusion.TimeUnitH\x00\x12,\n\x08INTERVAL\x18\x17 \x01(\x0e\x32\x18.datafusion.IntervalUnitH\x00\x12&\n\x07\x44\x45\x43IMAL\x18\x18 \x01(\x0b\x32\x13.datafusion.DecimalH\x00\x12 \n\x04LIST\x18\x19 \x01(\x0b\x32\x10.datafusion.ListH\x00\x12&\n\nLARGE_LIST\x18\x1a \x01(\x0b\x32\x10.datafusion.ListH\x00\x12\x34\n\x0f\x46IXED_SIZE_LIST\x18\x1b \x01(\x0b\x32\x19.datafusion.FixedSizeListH\x00\x12$\n\x06STRUCT\x18\x1c \x01(\x0b\x32\x12.datafusion.StructH\x00\x12\"\n\x05UNION\x18\x1d \x01(\x0b\x32\x11.datafusion.UnionH\x00\x12,\n\nDICTIONARY\x18\x1e \x01(\x0b\x32\x16.datafusion.DictionaryH\x00\x12\x1e\n\x03MAP\x18! \x01(\x0b\x32\x0f.datafusion.MapH\x00\x42\x11\n\x0f\x61rrow_type_enum\"\x0e\n\x0c\x45mptyMessage\"0\n\x17\x41nalyzedLogicalPlanType\x12\x15\n\ranalyzer_name\x18\x01 \x01(\t\"2\n\x18OptimizedLogicalPlanType\x12\x16\n\x0eoptimizer_name\x18\x01 \x01(\t\"3\n\x19OptimizedPhysicalPlanType\x12\x16\n\x0eoptimizer_name\x18\x01 \x01(\t\"\x8c\x05\n\x08PlanType\x12\x36\n\x12InitialLogicalPlan\x18\x01 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12\x42\n\x13\x41nalyzedLogicalPlan\x18\x07 \x01(\x0b\x32#.datafusion.AnalyzedLogicalPlanTypeH\x00\x12<\n\x18\x46inalAnalyzedLogicalPlan\x18\x08 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12\x44\n\x14OptimizedLogicalPlan\x18\x02 \x01(\x0b\x32$.datafusion.OptimizedLogicalPlanTypeH\x00\x12\x34\n\x10\x46inalLogicalPlan\x18\x03 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12\x37\n\x13InitialPhysicalPlan\x18\x04 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12@\n\x1cInitialPhysicalPlanWithStats\x18\t \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12\x46\n\x15OptimizedPhysicalPlan\x18\x05 \x01(\x0b\x32%.datafusion.OptimizedPhysicalPlanTypeH\x00\x12\x35\n\x11\x46inalPhysicalPlan\x18\x06 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12>\n\x1a\x46inalPhysicalPlanWithStats\x18\n \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x42\x10\n\x0eplan_type_enum\"H\n\x0fStringifiedPlan\x12\'\n\tplan_type\x18\x01 \x01(\x0b\x32\x14.datafusion.PlanType\x12\x0c\n\x04plan\x18\x02 \x01(\t\"#\n\x12\x42\x61reTableReference\x12\r\n\x05table\x18\x01 \x01(\t\"6\n\x15PartialTableReference\x12\x0e\n\x06schema\x18\x01 \x01(\t\x12\r\n\x05table\x18\x02 \x01(\t\"D\n\x12\x46ullTableReference\x12\x0f\n\x07\x63\x61talog\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\r\n\x05table\x18\x03 \x01(\t\"\xc3\x01\n\x13OwnedTableReference\x12.\n\x04\x62\x61re\x18\x01 \x01(\x0b\x32\x1e.datafusion.BareTableReferenceH\x00\x12\x34\n\x07partial\x18\x02 \x01(\x0b\x32!.datafusion.PartialTableReferenceH\x00\x12.\n\x04\x66ull\x18\x03 \x01(\x0b\x32\x1e.datafusion.FullTableReferenceH\x00\x42\x16\n\x14table_reference_enum\"\x92\x0c\n\x10PhysicalPlanNode\x12\x37\n\x0cparquet_scan\x18\x01 \x01(\x0b\x32\x1f.datafusion.ParquetScanExecNodeH\x00\x12/\n\x08\x63sv_scan\x18\x02 \x01(\x0b\x32\x1b.datafusion.CsvScanExecNodeH\x00\x12*\n\x05\x65mpty\x18\x03 \x01(\x0b\x32\x19.datafusion.EmptyExecNodeH\x00\x12\x34\n\nprojection\x18\x04 \x01(\x0b\x32\x1e.datafusion.ProjectionExecNodeH\x00\x12\x37\n\x0cglobal_limit\x18\x06 \x01(\x0b\x32\x1f.datafusion.GlobalLimitExecNodeH\x00\x12\x35\n\x0blocal_limit\x18\x07 \x01(\x0b\x32\x1e.datafusion.LocalLimitExecNodeH\x00\x12\x32\n\taggregate\x18\x08 \x01(\x0b\x32\x1d.datafusion.AggregateExecNodeH\x00\x12\x31\n\thash_join\x18\t \x01(\x0b\x32\x1c.datafusion.HashJoinExecNodeH\x00\x12(\n\x04sort\x18\n \x01(\x0b\x32\x18.datafusion.SortExecNodeH\x00\x12?\n\x10\x63oalesce_batches\x18\x0b \x01(\x0b\x32#.datafusion.CoalesceBatchesExecNodeH\x00\x12,\n\x06\x66ilter\x18\x0c \x01(\x0b\x32\x1a.datafusion.FilterExecNodeH\x00\x12\x37\n\x05merge\x18\r \x01(\x0b\x32&.datafusion.CoalescePartitionsExecNodeH\x00\x12\x36\n\x0brepartition\x18\x0e \x01(\x0b\x32\x1f.datafusion.RepartitionExecNodeH\x00\x12/\n\x06window\x18\x0f \x01(\x0b\x32\x1d.datafusion.WindowAggExecNodeH\x00\x12\x33\n\ncross_join\x18\x10 \x01(\x0b\x32\x1d.datafusion.CrossJoinExecNodeH\x00\x12\x31\n\tavro_scan\x18\x11 \x01(\x0b\x32\x1c.datafusion.AvroScanExecNodeH\x00\x12\x36\n\textension\x18\x12 \x01(\x0b\x32!.datafusion.PhysicalExtensionNodeH\x00\x12*\n\x05union\x18\x13 \x01(\x0b\x32\x19.datafusion.UnionExecNodeH\x00\x12.\n\x07\x65xplain\x18\x14 \x01(\x0b\x32\x1b.datafusion.ExplainExecNodeH\x00\x12H\n\x15sort_preserving_merge\x18\x15 \x01(\x0b\x32\'.datafusion.SortPreservingMergeExecNodeH\x00\x12>\n\x10nested_loop_join\x18\x16 \x01(\x0b\x32\".datafusion.NestedLoopJoinExecNodeH\x00\x12.\n\x07\x61nalyze\x18\x17 \x01(\x0b\x32\x1b.datafusion.AnalyzeExecNodeH\x00\x12\x31\n\tjson_sink\x18\x18 \x01(\x0b\x32\x1c.datafusion.JsonSinkExecNodeH\x00\x12\x44\n\x13symmetric_hash_join\x18\x19 \x01(\x0b\x32%.datafusion.SymmetricHashJoinExecNodeH\x00\x12\x34\n\ninterleave\x18\x1a \x01(\x0b\x32\x1e.datafusion.InterleaveExecNodeH\x00\x12=\n\x0fplaceholder_row\x18\x1b \x01(\x0b\x32\".datafusion.PlaceholderRowExecNodeH\x00\x12/\n\x08\x63sv_sink\x18\x1c \x01(\x0b\x32\x1b.datafusion.CsvSinkExecNodeH\x00\x12\x37\n\x0cparquet_sink\x18\x1d \x01(\x0b\x32\x1f.datafusion.ParquetSinkExecNodeH\x00\x42\x12\n\x10PhysicalPlanType\"J\n\x0fPartitionColumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12)\n\narrow_type\x18\x02 \x01(\x0b\x32\x15.datafusion.ArrowType\"\x85\x02\n\x15\x46ileTypeWriterOptions\x12\x35\n\x0cjson_options\x18\x01 \x01(\x0b\x32\x1d.datafusion.JsonWriterOptionsH\x00\x12;\n\x0fparquet_options\x18\x02 \x01(\x0b\x32 .datafusion.ParquetWriterOptionsH\x00\x12\x33\n\x0b\x63sv_options\x18\x03 \x01(\x0b\x32\x1c.datafusion.CsvWriterOptionsH\x00\x12\x37\n\rarrow_options\x18\x04 \x01(\x0b\x32\x1e.datafusion.ArrowWriterOptionsH\x00\x42\n\n\x08\x46ileType\"L\n\x11JsonWriterOptions\x12\x37\n\x0b\x63ompression\x18\x01 \x01(\x0e\x32\".datafusion.CompressionTypeVariant\"O\n\x14ParquetWriterOptions\x12\x37\n\x11writer_properties\x18\x01 \x01(\x0b\x32\x1c.datafusion.WriterProperties\"\xe3\x01\n\x10\x43svWriterOptions\x12\x37\n\x0b\x63ompression\x18\x01 \x01(\x0e\x32\".datafusion.CompressionTypeVariant\x12\x11\n\tdelimiter\x18\x02 \x01(\t\x12\x12\n\nhas_header\x18\x03 \x01(\x08\x12\x13\n\x0b\x64\x61te_format\x18\x04 \x01(\t\x12\x17\n\x0f\x64\x61tetime_format\x18\x05 \x01(\t\x12\x18\n\x10timestamp_format\x18\x06 \x01(\t\x12\x13\n\x0btime_format\x18\x07 \x01(\t\x12\x12\n\nnull_value\x18\x08 \x01(\t\"\x14\n\x12\x41rrowWriterOptions\"\xd9\x01\n\x10WriterProperties\x12\x1c\n\x14\x64\x61ta_page_size_limit\x18\x01 \x01(\x04\x12\"\n\x1a\x64ictionary_page_size_limit\x18\x02 \x01(\x04\x12!\n\x19\x64\x61ta_page_row_count_limit\x18\x03 \x01(\x04\x12\x18\n\x10write_batch_size\x18\x04 \x01(\x04\x12\x1a\n\x12max_row_group_size\x18\x05 \x01(\x04\x12\x16\n\x0ewriter_version\x18\x06 \x01(\t\x12\x12\n\ncreated_by\x18\x07 \x01(\t\"\xb5\x02\n\x0e\x46ileSinkConfig\x12\x18\n\x10object_store_url\x18\x01 \x01(\t\x12\x30\n\x0b\x66ile_groups\x18\x02 \x03(\x0b\x32\x1b.datafusion.PartitionedFile\x12\x13\n\x0btable_paths\x18\x03 \x03(\t\x12)\n\routput_schema\x18\x04 \x01(\x0b\x32\x12.datafusion.Schema\x12\x39\n\x14table_partition_cols\x18\x05 \x03(\x0b\x32\x1b.datafusion.PartitionColumn\x12\x11\n\toverwrite\x18\x08 \x01(\x08\x12\x43\n\x18\x66ile_type_writer_options\x18\t \x01(\x0b\x32!.datafusion.FileTypeWriterOptionsJ\x04\x08\x06\x10\x07\"6\n\x08JsonSink\x12*\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.datafusion.FileSinkConfig\"\xcc\x01\n\x10JsonSinkExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12\"\n\x04sink\x18\x02 \x01(\x0b\x32\x14.datafusion.JsonSink\x12\'\n\x0bsink_schema\x18\x03 \x01(\x0b\x32\x12.datafusion.Schema\x12>\n\nsort_order\x18\x04 \x01(\x0b\x32*.datafusion.PhysicalSortExprNodeCollection\"5\n\x07\x43svSink\x12*\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.datafusion.FileSinkConfig\"\xca\x01\n\x0f\x43svSinkExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12!\n\x04sink\x18\x02 \x01(\x0b\x32\x13.datafusion.CsvSink\x12\'\n\x0bsink_schema\x18\x03 \x01(\x0b\x32\x12.datafusion.Schema\x12>\n\nsort_order\x18\x04 \x01(\x0b\x32*.datafusion.PhysicalSortExprNodeCollection\"9\n\x0bParquetSink\x12*\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.datafusion.FileSinkConfig\"\xd2\x01\n\x13ParquetSinkExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12%\n\x04sink\x18\x02 \x01(\x0b\x32\x17.datafusion.ParquetSink\x12\'\n\x0bsink_schema\x18\x03 \x01(\x0b\x32\x12.datafusion.Schema\x12>\n\nsort_order\x18\x04 \x01(\x0b\x32*.datafusion.PhysicalSortExprNodeCollection\"S\n\x15PhysicalExtensionNode\x12\x0c\n\x04node\x18\x01 \x01(\x0c\x12,\n\x06inputs\x18\x02 \x03(\x0b\x32\x1c.datafusion.PhysicalPlanNode\"\x80\x08\n\x10PhysicalExprNode\x12,\n\x06\x63olumn\x18\x01 \x01(\x0b\x32\x1a.datafusion.PhysicalColumnH\x00\x12*\n\x07literal\x18\x02 \x01(\x0b\x32\x17.datafusion.ScalarValueH\x00\x12\x39\n\x0b\x62inary_expr\x18\x03 \x01(\x0b\x32\".datafusion.PhysicalBinaryExprNodeH\x00\x12?\n\x0e\x61ggregate_expr\x18\x04 \x01(\x0b\x32%.datafusion.PhysicalAggregateExprNodeH\x00\x12\x32\n\x0cis_null_expr\x18\x05 \x01(\x0b\x32\x1a.datafusion.PhysicalIsNullH\x00\x12\x39\n\x10is_not_null_expr\x18\x06 \x01(\x0b\x32\x1d.datafusion.PhysicalIsNotNullH\x00\x12+\n\x08not_expr\x18\x07 \x01(\x0b\x32\x17.datafusion.PhysicalNotH\x00\x12-\n\x05\x63\x61se_\x18\x08 \x01(\x0b\x32\x1c.datafusion.PhysicalCaseNodeH\x00\x12,\n\x04\x63\x61st\x18\t \x01(\x0b\x32\x1c.datafusion.PhysicalCastNodeH\x00\x12\x30\n\x04sort\x18\n \x01(\x0b\x32 .datafusion.PhysicalSortExprNodeH\x00\x12\x34\n\x08negative\x18\x0b \x01(\x0b\x32 .datafusion.PhysicalNegativeNodeH\x00\x12\x31\n\x07in_list\x18\x0c \x01(\x0b\x32\x1e.datafusion.PhysicalInListNodeH\x00\x12\x41\n\x0fscalar_function\x18\r \x01(\x0b\x32&.datafusion.PhysicalScalarFunctionNodeH\x00\x12\x33\n\x08try_cast\x18\x0e \x01(\x0b\x32\x1f.datafusion.PhysicalTryCastNodeH\x00\x12\x39\n\x0bwindow_expr\x18\x0f \x01(\x0b\x32\".datafusion.PhysicalWindowExprNodeH\x00\x12\x37\n\nscalar_udf\x18\x10 \x01(\x0b\x32!.datafusion.PhysicalScalarUdfNodeH\x00\x12\x35\n\tlike_expr\x18\x12 \x01(\x0b\x32 .datafusion.PhysicalLikeExprNodeH\x00\x12M\n\x16get_indexed_field_expr\x18\x13 \x01(\x0b\x32+.datafusion.PhysicalGetIndexedFieldExprNodeH\x00\x42\n\n\x08\x45xprTypeJ\x04\x08\x11\x10\x12\"}\n\x15PhysicalScalarUdfNode\x12\x0c\n\x04name\x18\x01 \x01(\t\x12*\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12*\n\x0breturn_type\x18\x04 \x01(\x0b\x32\x15.datafusion.ArrowType\"\x84\x02\n\x19PhysicalAggregateExprNode\x12\x36\n\raggr_function\x18\x01 \x01(\x0e\x32\x1d.datafusion.AggregateFunctionH\x00\x12$\n\x1auser_defined_aggr_function\x18\x04 \x01(\tH\x00\x12*\n\x04\x65xpr\x18\x02 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\x36\n\x0cordering_req\x18\x05 \x03(\x0b\x32 .datafusion.PhysicalSortExprNode\x12\x10\n\x08\x64istinct\x18\x03 \x01(\x08\x42\x13\n\x11\x41ggregateFunction\"\xf4\x02\n\x16PhysicalWindowExprNode\x12\x36\n\raggr_function\x18\x01 \x01(\x0e\x32\x1d.datafusion.AggregateFunctionH\x00\x12>\n\x11\x62uilt_in_function\x18\x02 \x01(\x0e\x32!.datafusion.BuiltInWindowFunctionH\x00\x12*\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\x32\n\x0cpartition_by\x18\x05 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\x32\n\x08order_by\x18\x06 \x03(\x0b\x32 .datafusion.PhysicalSortExprNode\x12-\n\x0cwindow_frame\x18\x07 \x01(\x0b\x32\x17.datafusion.WindowFrame\x12\x0c\n\x04name\x18\x08 \x01(\tB\x11\n\x0fwindow_function\"<\n\x0ePhysicalIsNull\x12*\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\"?\n\x11PhysicalIsNotNull\x12*\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\"9\n\x0bPhysicalNot\x12*\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\"N\n\x11PhysicalAliasNode\x12*\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\r\n\x05\x61lias\x18\x02 \x01(\t\"v\n\x16PhysicalBinaryExprNode\x12\'\n\x01l\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\'\n\x01r\x18\x02 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\n\n\x02op\x18\x03 \x01(\t\"\x80\x01\n PhysicalDateTimeIntervalExprNode\x12\'\n\x01l\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\'\n\x01r\x18\x02 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\n\n\x02op\x18\x03 \x01(\t\"\x9c\x01\n\x14PhysicalLikeExprNode\x12\x0f\n\x07negated\x18\x01 \x01(\x08\x12\x18\n\x10\x63\x61se_insensitive\x18\x02 \x01(\x08\x12*\n\x04\x65xpr\x18\x03 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12-\n\x07pattern\x18\x04 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\"d\n\x14PhysicalSortExprNode\x12*\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\x0b\n\x03\x61sc\x18\x02 \x01(\x08\x12\x13\n\x0bnulls_first\x18\x03 \x01(\x08\"t\n\x10PhysicalWhenThen\x12/\n\twhen_expr\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12/\n\tthen_expr\x18\x02 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\"}\n\x12PhysicalInListNode\x12*\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12*\n\x04list\x18\x02 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\x0f\n\x07negated\x18\x03 \x01(\x08\"\xa5\x01\n\x10PhysicalCaseNode\x12*\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\x34\n\x0ewhen_then_expr\x18\x02 \x03(\x0b\x32\x1c.datafusion.PhysicalWhenThen\x12/\n\telse_expr\x18\x03 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\"\xab\x01\n\x1aPhysicalScalarFunctionNode\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\'\n\x03\x66un\x18\x02 \x01(\x0e\x32\x1a.datafusion.ScalarFunction\x12*\n\x04\x61rgs\x18\x03 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12*\n\x0breturn_type\x18\x04 \x01(\x0b\x32\x15.datafusion.ArrowType\"l\n\x13PhysicalTryCastNode\x12*\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12)\n\narrow_type\x18\x02 \x01(\x0b\x32\x15.datafusion.ArrowType\"i\n\x10PhysicalCastNode\x12*\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12)\n\narrow_type\x18\x02 \x01(\x0b\x32\x15.datafusion.ArrowType\"B\n\x14PhysicalNegativeNode\x12*\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\"\x8d\x01\n\x0e\x46ilterExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12*\n\x04\x65xpr\x18\x02 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\"\n\x1a\x64\x65\x66\x61ult_filter_selectivity\x18\x03 \x01(\r\"7\n\tFileGroup\x12*\n\x05\x66iles\x18\x01 \x03(\x0b\x32\x1b.datafusion.PartitionedFile\"\x1a\n\tScanLimit\x12\r\n\x05limit\x18\x01 \x01(\r\"d\n\x1ePhysicalSortExprNodeCollection\x12\x42\n\x18physical_sort_expr_nodes\x18\x01 \x03(\x0b\x32 .datafusion.PhysicalSortExprNode\"\xcb\x02\n\x10\x46ileScanExecConf\x12*\n\x0b\x66ile_groups\x18\x01 \x03(\x0b\x32\x15.datafusion.FileGroup\x12\"\n\x06schema\x18\x02 \x01(\x0b\x32\x12.datafusion.Schema\x12\x12\n\nprojection\x18\x04 \x03(\r\x12$\n\x05limit\x18\x05 \x01(\x0b\x32\x15.datafusion.ScanLimit\x12*\n\nstatistics\x18\x06 \x01(\x0b\x32\x16.datafusion.Statistics\x12\x1c\n\x14table_partition_cols\x18\x07 \x03(\t\x12\x18\n\x10object_store_url\x18\x08 \x01(\t\x12\x43\n\x0foutput_ordering\x18\t \x03(\x0b\x32*.datafusion.PhysicalSortExprNodeCollectionJ\x04\x08\n\x10\x0b\"}\n\x13ParquetScanExecNode\x12/\n\tbase_conf\x18\x01 \x01(\x0b\x32\x1c.datafusion.FileScanExecConf\x12/\n\tpredicate\x18\x03 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNodeJ\x04\x08\x02\x10\x03\"\x9d\x01\n\x0f\x43svScanExecNode\x12/\n\tbase_conf\x18\x01 \x01(\x0b\x32\x1c.datafusion.FileScanExecConf\x12\x12\n\nhas_header\x18\x02 \x01(\x08\x12\x11\n\tdelimiter\x18\x03 \x01(\t\x12\r\n\x05quote\x18\x04 \x01(\t\x12\x10\n\x06\x65scape\x18\x05 \x01(\tH\x00\x42\x11\n\x0foptional_escape\"C\n\x10\x41vroScanExecNode\x12/\n\tbase_conf\x18\x01 \x01(\x0b\x32\x1c.datafusion.FileScanExecConf\"\xa9\x02\n\x10HashJoinExecNode\x12*\n\x04left\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12+\n\x05right\x18\x02 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12\x1e\n\x02on\x18\x03 \x03(\x0b\x32\x12.datafusion.JoinOn\x12\'\n\tjoin_type\x18\x04 \x01(\x0e\x32\x14.datafusion.JoinType\x12\x31\n\x0epartition_mode\x18\x06 \x01(\x0e\x32\x19.datafusion.PartitionMode\x12\x18\n\x10null_equals_null\x18\x07 \x01(\x08\x12&\n\x06\x66ilter\x18\x08 \x01(\x0b\x32\x16.datafusion.JoinFilter\"\xaf\x03\n\x19SymmetricHashJoinExecNode\x12*\n\x04left\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12+\n\x05right\x18\x02 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12\x1e\n\x02on\x18\x03 \x03(\x0b\x32\x12.datafusion.JoinOn\x12\'\n\tjoin_type\x18\x04 \x01(\x0e\x32\x14.datafusion.JoinType\x12\x37\n\x0epartition_mode\x18\x06 \x01(\x0e\x32\x1f.datafusion.StreamPartitionMode\x12\x18\n\x10null_equals_null\x18\x07 \x01(\x08\x12&\n\x06\x66ilter\x18\x08 \x01(\x0b\x32\x16.datafusion.JoinFilter\x12\x39\n\x0fleft_sort_exprs\x18\t \x03(\x0b\x32 .datafusion.PhysicalSortExprNode\x12:\n\x10right_sort_exprs\x18\n \x03(\x0b\x32 .datafusion.PhysicalSortExprNode\"B\n\x12InterleaveExecNode\x12,\n\x06inputs\x18\x01 \x03(\x0b\x32\x1c.datafusion.PhysicalPlanNode\"=\n\rUnionExecNode\x12,\n\x06inputs\x18\x01 \x03(\x0b\x32\x1c.datafusion.PhysicalPlanNode\"~\n\x0f\x45xplainExecNode\x12\"\n\x06schema\x18\x01 \x01(\x0b\x32\x12.datafusion.Schema\x12\x36\n\x11stringified_plans\x18\x02 \x03(\x0b\x32\x1b.datafusion.StringifiedPlan\x12\x0f\n\x07verbose\x18\x03 \x01(\x08\"\x8c\x01\n\x0f\x41nalyzeExecNode\x12\x0f\n\x07verbose\x18\x01 \x01(\x08\x12\x17\n\x0fshow_statistics\x18\x02 \x01(\x08\x12+\n\x05input\x18\x03 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12\"\n\x06schema\x18\x04 \x01(\x0b\x32\x12.datafusion.Schema\"l\n\x11\x43rossJoinExecNode\x12*\n\x04left\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12+\n\x05right\x18\x02 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\"-\n\x0ePhysicalColumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05index\x18\x02 \x01(\r\"a\n\x06JoinOn\x12*\n\x04left\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12+\n\x05right\x18\x02 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\"3\n\rEmptyExecNode\x12\"\n\x06schema\x18\x01 \x01(\x0b\x32\x12.datafusion.Schema\"<\n\x16PlaceholderRowExecNode\x12\"\n\x06schema\x18\x01 \x01(\x0b\x32\x12.datafusion.Schema\"\x80\x01\n\x12ProjectionExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12*\n\x04\x65xpr\x18\x02 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\x11\n\texpr_name\x18\x03 \x03(\t\"0\n\x1dPartiallySortedInputOrderMode\x12\x0f\n\x07\x63olumns\x18\x06 \x03(\x04\"\xe2\x02\n\x11WindowAggExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12\x37\n\x0bwindow_expr\x18\x02 \x03(\x0b\x32\".datafusion.PhysicalWindowExprNode\x12\x34\n\x0epartition_keys\x18\x05 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12*\n\x06linear\x18\x07 \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x12\x45\n\x10partially_sorted\x18\x08 \x01(\x0b\x32).datafusion.PartiallySortedInputOrderModeH\x00\x12*\n\x06sorted\x18\t \x01(\x0b\x32\x18.datafusion.EmptyMessageH\x00\x42\x12\n\x10input_order_mode\"9\n\x0bMaybeFilter\x12*\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\"M\n\x16MaybePhysicalSortExprs\x12\x33\n\tsort_expr\x18\x01 \x03(\x0b\x32 .datafusion.PhysicalSortExprNode\"\x96\x03\n\x11\x41ggregateExecNode\x12\x30\n\ngroup_expr\x18\x01 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12/\n\taggr_expr\x18\x02 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\'\n\x04mode\x18\x03 \x01(\x0e\x32\x19.datafusion.AggregateMode\x12+\n\x05input\x18\x04 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12\x17\n\x0fgroup_expr_name\x18\x05 \x03(\t\x12\x16\n\x0e\x61ggr_expr_name\x18\x06 \x03(\t\x12(\n\x0cinput_schema\x18\x07 \x01(\x0b\x32\x12.datafusion.Schema\x12/\n\tnull_expr\x18\x08 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\x0e\n\x06groups\x18\t \x03(\x08\x12,\n\x0b\x66ilter_expr\x18\n \x03(\x0b\x32\x17.datafusion.MaybeFilter\"_\n\x13GlobalLimitExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12\x0c\n\x04skip\x18\x02 \x01(\r\x12\r\n\x05\x66\x65tch\x18\x03 \x01(\x03\"P\n\x12LocalLimitExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12\r\n\x05\x66\x65tch\x18\x02 \x01(\r\"\x95\x01\n\x0cSortExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12*\n\x04\x65xpr\x18\x02 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\r\n\x05\x66\x65tch\x18\x03 \x01(\x03\x12\x1d\n\x15preserve_partitioning\x18\x04 \x01(\x08\"\x85\x01\n\x1bSortPreservingMergeExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12*\n\x04\x65xpr\x18\x02 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\r\n\x05\x66\x65tch\x18\x03 \x01(\x03\"\xc2\x01\n\x16NestedLoopJoinExecNode\x12*\n\x04left\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12+\n\x05right\x18\x02 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12\'\n\tjoin_type\x18\x03 \x01(\x0e\x32\x14.datafusion.JoinType\x12&\n\x06\x66ilter\x18\x04 \x01(\x0b\x32\x16.datafusion.JoinFilter\"a\n\x17\x43oalesceBatchesExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12\x19\n\x11target_batch_size\x18\x02 \x01(\r\"I\n\x1a\x43oalescePartitionsExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\"c\n\x17PhysicalHashRepartition\x12/\n\thash_expr\x18\x01 \x03(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\x17\n\x0fpartition_count\x18\x02 \x01(\x04\"\xb5\x01\n\x13RepartitionExecNode\x12+\n\x05input\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalPlanNode\x12\x15\n\x0bround_robin\x18\x02 \x01(\x04H\x00\x12\x33\n\x04hash\x18\x03 \x01(\x0b\x32#.datafusion.PhysicalHashRepartitionH\x00\x12\x11\n\x07unknown\x18\x04 \x01(\x04H\x00\x42\x12\n\x10partition_method\"\x93\x01\n\nJoinFilter\x12\x30\n\nexpression\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12/\n\x0e\x63olumn_indices\x18\x02 \x03(\x0b\x32\x17.datafusion.ColumnIndex\x12\"\n\x06schema\x18\x03 \x01(\x0b\x32\x12.datafusion.Schema\"@\n\x0b\x43olumnIndex\x12\r\n\x05index\x18\x01 \x01(\r\x12\"\n\x04side\x18\x02 \x01(\x0e\x32\x14.datafusion.JoinSide\"\xa0\x01\n\x0fPartitionedFile\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x04\x12\x18\n\x10last_modified_ns\x18\x03 \x01(\x04\x12\x31\n\x10partition_values\x18\x04 \x03(\x0b\x32\x17.datafusion.ScalarValue\x12$\n\x05range\x18\x05 \x01(\x0b\x32\x15.datafusion.FileRange\"\'\n\tFileRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"y\n\x0ePartitionStats\x12\x10\n\x08num_rows\x18\x01 \x01(\x03\x12\x13\n\x0bnum_batches\x18\x02 \x01(\x03\x12\x11\n\tnum_bytes\x18\x03 \x01(\x03\x12-\n\x0c\x63olumn_stats\x18\x04 \x03(\x0b\x32\x17.datafusion.ColumnStats\"d\n\tPrecision\x12\x31\n\x0eprecision_info\x18\x01 \x01(\x0e\x32\x19.datafusion.PrecisionInfo\x12$\n\x03val\x18\x02 \x01(\x0b\x32\x17.datafusion.ScalarValue\"\x94\x01\n\nStatistics\x12\'\n\x08num_rows\x18\x01 \x01(\x0b\x32\x15.datafusion.Precision\x12.\n\x0ftotal_byte_size\x18\x02 \x01(\x0b\x32\x15.datafusion.Precision\x12-\n\x0c\x63olumn_stats\x18\x03 \x03(\x0b\x32\x17.datafusion.ColumnStats\"\xbb\x01\n\x0b\x43olumnStats\x12(\n\tmin_value\x18\x01 \x01(\x0b\x32\x15.datafusion.Precision\x12(\n\tmax_value\x18\x02 \x01(\x0b\x32\x15.datafusion.Precision\x12)\n\nnull_count\x18\x03 \x01(\x0b\x32\x15.datafusion.Precision\x12-\n\x0e\x64istinct_count\x18\x04 \x01(\x0b\x32\x15.datafusion.Precision\"=\n\x14NamedStructFieldExpr\x12%\n\x04name\x18\x01 \x01(\x0b\x32\x17.datafusion.ScalarValue\":\n\rListIndexExpr\x12)\n\x03key\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\"\x96\x01\n\rListRangeExpr\x12+\n\x05start\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12*\n\x04stop\x18\x02 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12,\n\x06stride\x18\x03 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\"\x86\x02\n\x1fPhysicalGetIndexedFieldExprNode\x12)\n\x03\x61rg\x18\x01 \x01(\x0b\x32\x1c.datafusion.PhysicalExprNode\x12\x43\n\x17named_struct_field_expr\x18\x02 \x01(\x0b\x32 .datafusion.NamedStructFieldExprH\x00\x12\x34\n\x0flist_index_expr\x18\x03 \x01(\x0b\x32\x19.datafusion.ListIndexExprH\x00\x12\x34\n\x0flist_range_expr\x18\x04 \x01(\x0b\x32\x19.datafusion.ListRangeExprH\x00\x42\x07\n\x05\x66ield*n\n\x08JoinType\x12\t\n\x05INNER\x10\x00\x12\x08\n\x04LEFT\x10\x01\x12\t\n\x05RIGHT\x10\x02\x12\x08\n\x04\x46ULL\x10\x03\x12\x0c\n\x08LEFTSEMI\x10\x04\x12\x0c\n\x08LEFTANTI\x10\x05\x12\r\n\tRIGHTSEMI\x10\x06\x12\r\n\tRIGHTANTI\x10\x07*#\n\x0eJoinConstraint\x12\x06\n\x02ON\x10\x00\x12\t\n\x05USING\x10\x01*\xc0\x0e\n\x0eScalarFunction\x12\x07\n\x03\x41\x62s\x10\x00\x12\x08\n\x04\x41\x63os\x10\x01\x12\x08\n\x04\x41sin\x10\x02\x12\x08\n\x04\x41tan\x10\x03\x12\t\n\x05\x41scii\x10\x04\x12\x08\n\x04\x43\x65il\x10\x05\x12\x07\n\x03\x43os\x10\x06\x12\n\n\x06\x44igest\x10\x07\x12\x07\n\x03\x45xp\x10\x08\x12\t\n\x05\x46loor\x10\t\x12\x06\n\x02Ln\x10\n\x12\x07\n\x03Log\x10\x0b\x12\t\n\x05Log10\x10\x0c\x12\x08\n\x04Log2\x10\r\x12\t\n\x05Round\x10\x0e\x12\n\n\x06Signum\x10\x0f\x12\x07\n\x03Sin\x10\x10\x12\x08\n\x04Sqrt\x10\x11\x12\x07\n\x03Tan\x10\x12\x12\t\n\x05Trunc\x10\x13\x12\t\n\x05\x41rray\x10\x14\x12\x0f\n\x0bRegexpMatch\x10\x15\x12\r\n\tBitLength\x10\x16\x12\t\n\x05\x42trim\x10\x17\x12\x13\n\x0f\x43haracterLength\x10\x18\x12\x07\n\x03\x43hr\x10\x19\x12\n\n\x06\x43oncat\x10\x1a\x12\x17\n\x13\x43oncatWithSeparator\x10\x1b\x12\x0c\n\x08\x44\x61tePart\x10\x1c\x12\r\n\tDateTrunc\x10\x1d\x12\x0b\n\x07InitCap\x10\x1e\x12\x08\n\x04Left\x10\x1f\x12\x08\n\x04Lpad\x10 \x12\t\n\x05Lower\x10!\x12\t\n\x05Ltrim\x10\"\x12\x07\n\x03MD5\x10#\x12\x0f\n\x0bOctetLength\x10%\x12\n\n\x06Random\x10&\x12\x11\n\rRegexpReplace\x10\'\x12\n\n\x06Repeat\x10(\x12\x0b\n\x07Replace\x10)\x12\x0b\n\x07Reverse\x10*\x12\t\n\x05Right\x10+\x12\x08\n\x04Rpad\x10,\x12\t\n\x05Rtrim\x10-\x12\n\n\x06SHA224\x10.\x12\n\n\x06SHA256\x10/\x12\n\n\x06SHA384\x10\x30\x12\n\n\x06SHA512\x10\x31\x12\r\n\tSplitPart\x10\x32\x12\x0e\n\nStartsWith\x10\x33\x12\n\n\x06Strpos\x10\x34\x12\n\n\x06Substr\x10\x35\x12\t\n\x05ToHex\x10\x36\x12\x0f\n\x0bToTimestamp\x10\x37\x12\x15\n\x11ToTimestampMillis\x10\x38\x12\x15\n\x11ToTimestampMicros\x10\x39\x12\x16\n\x12ToTimestampSeconds\x10:\x12\x07\n\x03Now\x10;\x12\r\n\tTranslate\x10<\x12\x08\n\x04Trim\x10=\x12\t\n\x05Upper\x10>\x12\x0c\n\x08\x43oalesce\x10?\x12\t\n\x05Power\x10@\x12\r\n\tStructFun\x10\x41\x12\x10\n\x0c\x46romUnixtime\x10\x42\x12\t\n\x05\x41tan2\x10\x43\x12\x0b\n\x07\x44\x61teBin\x10\x44\x12\x0f\n\x0b\x41rrowTypeof\x10\x45\x12\x0f\n\x0b\x43urrentDate\x10\x46\x12\x0f\n\x0b\x43urrentTime\x10G\x12\x08\n\x04Uuid\x10H\x12\x08\n\x04\x43\x62rt\x10I\x12\t\n\x05\x41\x63osh\x10J\x12\t\n\x05\x41sinh\x10K\x12\t\n\x05\x41tanh\x10L\x12\x08\n\x04Sinh\x10M\x12\x08\n\x04\x43osh\x10N\x12\x08\n\x04Tanh\x10O\x12\x06\n\x02Pi\x10P\x12\x0b\n\x07\x44\x65grees\x10Q\x12\x0b\n\x07Radians\x10R\x12\r\n\tFactorial\x10S\x12\x07\n\x03Lcm\x10T\x12\x07\n\x03Gcd\x10U\x12\x0f\n\x0b\x41rrayAppend\x10V\x12\x0f\n\x0b\x41rrayConcat\x10W\x12\r\n\tArrayDims\x10X\x12\x0f\n\x0b\x41rrayRepeat\x10Y\x12\x0f\n\x0b\x41rrayLength\x10Z\x12\x0e\n\nArrayNdims\x10[\x12\x11\n\rArrayPosition\x10\\\x12\x12\n\x0e\x41rrayPositions\x10]\x12\x10\n\x0c\x41rrayPrepend\x10^\x12\x0f\n\x0b\x41rrayRemove\x10_\x12\x10\n\x0c\x41rrayReplace\x10`\x12\x0f\n\x0b\x43\x61rdinality\x10\x62\x12\x10\n\x0c\x41rrayElement\x10\x63\x12\x0e\n\nArraySlice\x10\x64\x12\x07\n\x03\x43ot\x10g\x12\x0c\n\x08\x41rrayHas\x10h\x12\x0f\n\x0b\x41rrayHasAny\x10i\x12\x0f\n\x0b\x41rrayHasAll\x10j\x12\x10\n\x0c\x41rrayRemoveN\x10k\x12\x11\n\rArrayReplaceN\x10l\x12\x12\n\x0e\x41rrayRemoveAll\x10m\x12\x13\n\x0f\x41rrayReplaceAll\x10n\x12\t\n\x05Nanvl\x10o\x12\x0b\n\x07\x46latten\x10p\x12\n\n\x06Iszero\x10r\x12\x0e\n\nArrayEmpty\x10s\x12\x10\n\x0c\x41rrayPopBack\x10t\x12\x11\n\rStringToArray\x10u\x12\x14\n\x10ToTimestampNanos\x10v\x12\x12\n\x0e\x41rrayIntersect\x10w\x12\x0e\n\nArrayUnion\x10x\x12\x0b\n\x07OverLay\x10y\x12\t\n\x05Range\x10z\x12\x0f\n\x0b\x41rrayExcept\x10{\x12\x11\n\rArrayPopFront\x10|\x12\x0f\n\x0bLevenshtein\x10}\x12\x0f\n\x0bSubstrIndex\x10~\x12\r\n\tFindInSet\x10\x7f\x12\x0e\n\tArraySort\x10\x80\x01\x12\x12\n\rArrayDistinct\x10\x81\x01\x12\x10\n\x0b\x41rrayResize\x10\x82\x01\x12\r\n\x08\x45ndsWith\x10\x83\x01\x12\n\n\x05InStr\x10\x84\x01\x12\r\n\x08MakeDate\x10\x85\x01\x12\x11\n\x0c\x41rrayReverse\x10\x86\x01\x12\x0f\n\nRegexpLike\x10\x87\x01\x12\x0b\n\x06ToChar\x10\x88\x01*\xde\x04\n\x11\x41ggregateFunction\x12\x07\n\x03MIN\x10\x00\x12\x07\n\x03MAX\x10\x01\x12\x07\n\x03SUM\x10\x02\x12\x07\n\x03\x41VG\x10\x03\x12\t\n\x05\x43OUNT\x10\x04\x12\x13\n\x0f\x41PPROX_DISTINCT\x10\x05\x12\r\n\tARRAY_AGG\x10\x06\x12\x0c\n\x08VARIANCE\x10\x07\x12\x10\n\x0cVARIANCE_POP\x10\x08\x12\x0e\n\nCOVARIANCE\x10\t\x12\x12\n\x0e\x43OVARIANCE_POP\x10\n\x12\n\n\x06STDDEV\x10\x0b\x12\x0e\n\nSTDDEV_POP\x10\x0c\x12\x0f\n\x0b\x43ORRELATION\x10\r\x12\x1a\n\x16\x41PPROX_PERCENTILE_CONT\x10\x0e\x12\x11\n\rAPPROX_MEDIAN\x10\x0f\x12&\n\"APPROX_PERCENTILE_CONT_WITH_WEIGHT\x10\x10\x12\x0c\n\x08GROUPING\x10\x11\x12\n\n\x06MEDIAN\x10\x12\x12\x0b\n\x07\x42IT_AND\x10\x13\x12\n\n\x06\x42IT_OR\x10\x14\x12\x0b\n\x07\x42IT_XOR\x10\x15\x12\x0c\n\x08\x42OOL_AND\x10\x16\x12\x0b\n\x07\x42OOL_OR\x10\x17\x12\x13\n\x0f\x46IRST_VALUE_AGG\x10\x18\x12\x12\n\x0eLAST_VALUE_AGG\x10\x19\x12\x0e\n\nREGR_SLOPE\x10\x1a\x12\x12\n\x0eREGR_INTERCEPT\x10\x1b\x12\x0e\n\nREGR_COUNT\x10\x1c\x12\x0b\n\x07REGR_R2\x10\x1d\x12\r\n\tREGR_AVGX\x10\x1e\x12\r\n\tREGR_AVGY\x10\x1f\x12\x0c\n\x08REGR_SXX\x10 \x12\x0c\n\x08REGR_SYY\x10!\x12\x0c\n\x08REGR_SXY\x10\"\x12\x0e\n\nSTRING_AGG\x10#\x12\x11\n\rNTH_VALUE_AGG\x10$*\xb0\x01\n\x15\x42uiltInWindowFunction\x12\x0e\n\nROW_NUMBER\x10\x00\x12\x08\n\x04RANK\x10\x01\x12\x0e\n\nDENSE_RANK\x10\x02\x12\x10\n\x0cPERCENT_RANK\x10\x03\x12\r\n\tCUME_DIST\x10\x04\x12\t\n\x05NTILE\x10\x05\x12\x07\n\x03LAG\x10\x06\x12\x08\n\x04LEAD\x10\x07\x12\x0f\n\x0b\x46IRST_VALUE\x10\x08\x12\x0e\n\nLAST_VALUE\x10\t\x12\r\n\tNTH_VALUE\x10\n*3\n\x10WindowFrameUnits\x12\x08\n\x04ROWS\x10\x00\x12\t\n\x05RANGE\x10\x01\x12\n\n\x06GROUPS\x10\x02*E\n\x14WindowFrameBoundType\x12\x0f\n\x0b\x43URRENT_ROW\x10\x00\x12\r\n\tPRECEDING\x10\x01\x12\r\n\tFOLLOWING\x10\x02*(\n\x08\x44\x61teUnit\x12\x07\n\x03\x44\x61y\x10\x00\x12\x13\n\x0f\x44\x61teMillisecond\x10\x01*H\n\x08TimeUnit\x12\n\n\x06Second\x10\x00\x12\x0f\n\x0bMillisecond\x10\x01\x12\x0f\n\x0bMicrosecond\x10\x02\x12\x0e\n\nNanosecond\x10\x03*<\n\x0cIntervalUnit\x12\r\n\tYearMonth\x10\x00\x12\x0b\n\x07\x44\x61yTime\x10\x01\x12\x10\n\x0cMonthDayNano\x10\x02*\"\n\tUnionMode\x12\n\n\x06sparse\x10\x00\x12\t\n\x05\x64\x65nse\x10\x01*Q\n\x16\x43ompressionTypeVariant\x12\x08\n\x04GZIP\x10\x00\x12\t\n\x05\x42ZIP2\x10\x01\x12\x06\n\x02XZ\x10\x02\x12\x08\n\x04ZSTD\x10\x03\x12\x10\n\x0cUNCOMPRESSED\x10\x04*<\n\rPartitionMode\x12\x10\n\x0c\x43OLLECT_LEFT\x10\x00\x12\x0f\n\x0bPARTITIONED\x10\x01\x12\x08\n\x04\x41UTO\x10\x02*A\n\x13StreamPartitionMode\x12\x14\n\x10SINGLE_PARTITION\x10\x00\x12\x14\n\x10PARTITIONED_EXEC\x10\x01*b\n\rAggregateMode\x12\x0b\n\x07PARTIAL\x10\x00\x12\t\n\x05\x46INAL\x10\x01\x12\x15\n\x11\x46INAL_PARTITIONED\x10\x02\x12\n\n\x06SINGLE\x10\x03\x12\x16\n\x12SINGLE_PARTITIONED\x10\x04*)\n\x08JoinSide\x12\r\n\tLEFT_SIDE\x10\x00\x12\x0e\n\nRIGHT_SIDE\x10\x01*3\n\rPrecisionInfo\x12\t\n\x05\x45XACT\x10\x00\x12\x0b\n\x07INEXACT\x10\x01\x12\n\n\x06\x41\x42SENT\x10\x02\x42\x39\n$org.apache.arrow.datafusion.protobufB\x0f\x44\x61tafusionProtoP\x01\x62\x06proto3') - -_globals = globals() -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.datafusion_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n$org.apache.arrow.datafusion.protobufB\017DatafusionProtoP\001' - _DFSCHEMA_METADATAENTRY._options = None - _DFSCHEMA_METADATAENTRY._serialized_options = b'8\001' - _CREATEEXTERNALTABLENODE_OPTIONSENTRY._options = None - _CREATEEXTERNALTABLENODE_OPTIONSENTRY._serialized_options = b'8\001' - _CREATEEXTERNALTABLENODE_COLUMNDEFAULTSENTRY._options = None - _CREATEEXTERNALTABLENODE_COLUMNDEFAULTSENTRY._serialized_options = b'8\001' - _SCHEMA_METADATAENTRY._options = None - _SCHEMA_METADATAENTRY._serialized_options = b'8\001' - _FIELD_METADATAENTRY._options = None - _FIELD_METADATAENTRY._serialized_options = b'8\001' - _globals['_JOINTYPE']._serialized_start=32527 - _globals['_JOINTYPE']._serialized_end=32637 - _globals['_JOINCONSTRAINT']._serialized_start=32639 - _globals['_JOINCONSTRAINT']._serialized_end=32674 - _globals['_SCALARFUNCTION']._serialized_start=32677 - _globals['_SCALARFUNCTION']._serialized_end=34533 - _globals['_AGGREGATEFUNCTION']._serialized_start=34536 - _globals['_AGGREGATEFUNCTION']._serialized_end=35142 - _globals['_BUILTINWINDOWFUNCTION']._serialized_start=35145 - _globals['_BUILTINWINDOWFUNCTION']._serialized_end=35321 - _globals['_WINDOWFRAMEUNITS']._serialized_start=35323 - _globals['_WINDOWFRAMEUNITS']._serialized_end=35374 - _globals['_WINDOWFRAMEBOUNDTYPE']._serialized_start=35376 - _globals['_WINDOWFRAMEBOUNDTYPE']._serialized_end=35445 - _globals['_DATEUNIT']._serialized_start=35447 - _globals['_DATEUNIT']._serialized_end=35487 - _globals['_TIMEUNIT']._serialized_start=35489 - _globals['_TIMEUNIT']._serialized_end=35561 - _globals['_INTERVALUNIT']._serialized_start=35563 - _globals['_INTERVALUNIT']._serialized_end=35623 - _globals['_UNIONMODE']._serialized_start=35625 - _globals['_UNIONMODE']._serialized_end=35659 - _globals['_COMPRESSIONTYPEVARIANT']._serialized_start=35661 - _globals['_COMPRESSIONTYPEVARIANT']._serialized_end=35742 - _globals['_PARTITIONMODE']._serialized_start=35744 - _globals['_PARTITIONMODE']._serialized_end=35804 - _globals['_STREAMPARTITIONMODE']._serialized_start=35806 - _globals['_STREAMPARTITIONMODE']._serialized_end=35871 - _globals['_AGGREGATEMODE']._serialized_start=35873 - _globals['_AGGREGATEMODE']._serialized_end=35971 - _globals['_JOINSIDE']._serialized_start=35973 - _globals['_JOINSIDE']._serialized_end=36014 - _globals['_PRECISIONINFO']._serialized_start=36016 - _globals['_PRECISIONINFO']._serialized_end=36067 - _globals['_COLUMNRELATION']._serialized_start=38 - _globals['_COLUMNRELATION']._serialized_end=72 - _globals['_COLUMN']._serialized_start=74 - _globals['_COLUMN']._serialized_end=142 - _globals['_DFFIELD']._serialized_start=144 - _globals['_DFFIELD']._serialized_end=234 - _globals['_DFSCHEMA']._serialized_start=237 - _globals['_DFSCHEMA']._serialized_end=388 - _globals['_DFSCHEMA_METADATAENTRY']._serialized_start=341 - _globals['_DFSCHEMA_METADATAENTRY']._serialized_end=388 - _globals['_LOGICALPLANNODE']._serialized_start=391 - _globals['_LOGICALPLANNODE']._serialized_end=1816 - _globals['_LOGICALEXTENSIONNODE']._serialized_start=1818 - _globals['_LOGICALEXTENSIONNODE']._serialized_end=1899 - _globals['_PROJECTIONCOLUMNS']._serialized_start=1901 - _globals['_PROJECTIONCOLUMNS']._serialized_end=1937 - _globals['_CSVFORMAT']._serialized_start=1939 - _globals['_CSVFORMAT']._serialized_end=2041 - _globals['_PARQUETFORMAT']._serialized_start=2043 - _globals['_PARQUETFORMAT']._serialized_end=2064 - _globals['_AVROFORMAT']._serialized_start=2066 - _globals['_AVROFORMAT']._serialized_end=2078 - _globals['_LOGICALEXPRNODECOLLECTION']._serialized_start=2080 - _globals['_LOGICALEXPRNODECOLLECTION']._serialized_end=2164 - _globals['_LISTINGTABLESCANNODE']._serialized_start=2167 - _globals['_LISTINGTABLESCANNODE']._serialized_end=2705 - _globals['_VIEWTABLESCANNODE']._serialized_start=2708 - _globals['_VIEWTABLESCANNODE']._serialized_end=2937 - _globals['_CUSTOMTABLESCANNODE']._serialized_start=2940 - _globals['_CUSTOMTABLESCANNODE']._serialized_end=3180 - _globals['_PROJECTIONNODE']._serialized_start=3183 - _globals['_PROJECTIONNODE']._serialized_end=3321 - _globals['_SELECTIONNODE']._serialized_start=3323 - _globals['_SELECTIONNODE']._serialized_end=3425 - _globals['_SORTNODE']._serialized_start=3427 - _globals['_SORTNODE']._serialized_end=3539 - _globals['_REPARTITIONNODE']._serialized_start=3542 - _globals['_REPARTITIONNODE']._serialized_end=3691 - _globals['_HASHREPARTITION']._serialized_start=3693 - _globals['_HASHREPARTITION']._serialized_end=3783 - _globals['_EMPTYRELATIONNODE']._serialized_start=3785 - _globals['_EMPTYRELATIONNODE']._serialized_end=3829 - _globals['_PRIMARYKEYCONSTRAINT']._serialized_start=3831 - _globals['_PRIMARYKEYCONSTRAINT']._serialized_end=3870 - _globals['_UNIQUECONSTRAINT']._serialized_start=3872 - _globals['_UNIQUECONSTRAINT']._serialized_end=3907 - _globals['_CONSTRAINT']._serialized_start=3910 - _globals['_CONSTRAINT']._serialized_end=4046 - _globals['_CONSTRAINTS']._serialized_start=4048 - _globals['_CONSTRAINTS']._serialized_end=4106 - _globals['_CREATEEXTERNALTABLENODE']._serialized_start=4109 - _globals['_CREATEEXTERNALTABLENODE']._serialized_end=4853 - _globals['_CREATEEXTERNALTABLENODE_OPTIONSENTRY']._serialized_start=4711 - _globals['_CREATEEXTERNALTABLENODE_OPTIONSENTRY']._serialized_end=4757 - _globals['_CREATEEXTERNALTABLENODE_COLUMNDEFAULTSENTRY']._serialized_start=4759 - _globals['_CREATEEXTERNALTABLENODE_COLUMNDEFAULTSENTRY']._serialized_end=4841 - _globals['_PREPARENODE']._serialized_start=4855 - _globals['_PREPARENODE']._serialized_end=4969 - _globals['_CREATECATALOGSCHEMANODE']._serialized_start=4971 - _globals['_CREATECATALOGSCHEMANODE']._serialized_end=5078 - _globals['_CREATECATALOGNODE']._serialized_start=5080 - _globals['_CREATECATALOGNODE']._serialized_end=5182 - _globals['_DROPVIEWNODE']._serialized_start=5184 - _globals['_DROPVIEWNODE']._serialized_end=5302 - _globals['_CREATEVIEWNODE']._serialized_start=5305 - _globals['_CREATEVIEWNODE']._serialized_end=5458 - _globals['_VALUESNODE']._serialized_start=5460 - _globals['_VALUESNODE']._serialized_end=5538 - _globals['_ANALYZENODE']._serialized_start=5540 - _globals['_ANALYZENODE']._serialized_end=5614 - _globals['_EXPLAINNODE']._serialized_start=5616 - _globals['_EXPLAINNODE']._serialized_end=5690 - _globals['_AGGREGATENODE']._serialized_start=5693 - _globals['_AGGREGATENODE']._serialized_end=5849 - _globals['_WINDOWNODE']._serialized_start=5851 - _globals['_WINDOWNODE']._serialized_end=5957 - _globals['_JOINNODE']._serialized_start=5960 - _globals['_JOINNODE']._serialized_end=6327 - _globals['_DISTINCTNODE']._serialized_start=6329 - _globals['_DISTINCTNODE']._serialized_end=6387 - _globals['_DISTINCTONNODE']._serialized_start=6390 - _globals['_DISTINCTONNODE']._serialized_end=6594 - _globals['_COPYTONODE']._serialized_start=6597 - _globals['_COPYTONODE']._serialized_end=6815 - _globals['_SQLOPTIONS']._serialized_start=6817 - _globals['_SQLOPTIONS']._serialized_end=6868 - _globals['_SQLOPTION']._serialized_start=6870 - _globals['_SQLOPTION']._serialized_end=6909 - _globals['_UNIONNODE']._serialized_start=6911 - _globals['_UNIONNODE']._serialized_end=6967 - _globals['_CROSSJOINNODE']._serialized_start=6969 - _globals['_CROSSJOINNODE']._serialized_end=7071 - _globals['_LIMITNODE']._serialized_start=7073 - _globals['_LIMITNODE']._serialized_end=7157 - _globals['_SELECTIONEXECNODE']._serialized_start=7159 - _globals['_SELECTIONEXECNODE']._serialized_end=7221 - _globals['_SUBQUERYALIASNODE']._serialized_start=7223 - _globals['_SUBQUERYALIASNODE']._serialized_end=7340 - _globals['_LOGICALEXPRNODE']._serialized_start=7343 - _globals['_LOGICALEXPRNODE']._serialized_end=8984 - _globals['_WILDCARD']._serialized_start=8986 - _globals['_WILDCARD']._serialized_end=9015 - _globals['_PLACEHOLDERNODE']._serialized_start=9017 - _globals['_PLACEHOLDERNODE']._serialized_end=9088 - _globals['_LOGICALEXPRLIST']._serialized_start=9090 - _globals['_LOGICALEXPRLIST']._serialized_end=9150 - _globals['_GROUPINGSETNODE']._serialized_start=9152 - _globals['_GROUPINGSETNODE']._serialized_end=9212 - _globals['_CUBENODE']._serialized_start=9214 - _globals['_CUBENODE']._serialized_end=9267 - _globals['_ROLLUPNODE']._serialized_start=9269 - _globals['_ROLLUPNODE']._serialized_end=9324 - _globals['_NAMEDSTRUCTFIELD']._serialized_start=9326 - _globals['_NAMEDSTRUCTFIELD']._serialized_end=9383 - _globals['_LISTINDEX']._serialized_start=9385 - _globals['_LISTINDEX']._serialized_end=9438 - _globals['_LISTRANGE']._serialized_start=9441 - _globals['_LISTRANGE']._serialized_end=9584 - _globals['_GETINDEXEDFIELD']._serialized_start=9587 - _globals['_GETINDEXEDFIELD']._serialized_end=9806 - _globals['_ISNULL']._serialized_start=9808 - _globals['_ISNULL']._serialized_end=9859 - _globals['_ISNOTNULL']._serialized_start=9861 - _globals['_ISNOTNULL']._serialized_end=9915 - _globals['_ISTRUE']._serialized_start=9917 - _globals['_ISTRUE']._serialized_end=9968 - _globals['_ISFALSE']._serialized_start=9970 - _globals['_ISFALSE']._serialized_end=10022 - _globals['_ISUNKNOWN']._serialized_start=10024 - _globals['_ISUNKNOWN']._serialized_end=10078 - _globals['_ISNOTTRUE']._serialized_start=10080 - _globals['_ISNOTTRUE']._serialized_end=10134 - _globals['_ISNOTFALSE']._serialized_start=10136 - _globals['_ISNOTFALSE']._serialized_end=10191 - _globals['_ISNOTUNKNOWN']._serialized_start=10193 - _globals['_ISNOTUNKNOWN']._serialized_end=10250 - _globals['_NOT']._serialized_start=10252 - _globals['_NOT']._serialized_end=10300 - _globals['_ALIASNODE']._serialized_start=10302 - _globals['_ALIASNODE']._serialized_end=10422 - _globals['_BINARYEXPRNODE']._serialized_start=10424 - _globals['_BINARYEXPRNODE']._serialized_end=10499 - _globals['_NEGATIVENODE']._serialized_start=10501 - _globals['_NEGATIVENODE']._serialized_end=10558 - _globals['_UNNEST']._serialized_start=10560 - _globals['_UNNEST']._serialized_end=10612 - _globals['_INLISTNODE']._serialized_start=10614 - _globals['_INLISTNODE']._serialized_end=10729 - _globals['_SCALARFUNCTIONNODE']._serialized_start=10731 - _globals['_SCALARFUNCTIONNODE']._serialized_end=10835 - _globals['_AGGREGATEEXPRNODE']._serialized_start=10838 - _globals['_AGGREGATEEXPRNODE']._serialized_end=11064 - _globals['_AGGREGATEUDFEXPRNODE']._serialized_start=11067 - _globals['_AGGREGATEUDFEXPRNODE']._serialized_end=11242 - _globals['_SCALARUDFEXPRNODE']._serialized_start=11244 - _globals['_SCALARUDFEXPRNODE']._serialized_end=11324 - _globals['_WINDOWEXPRNODE']._serialized_start=11327 - _globals['_WINDOWEXPRNODE']._serialized_end=11702 - _globals['_BETWEENNODE']._serialized_start=11705 - _globals['_BETWEENNODE']._serialized_end=11863 - _globals['_LIKENODE']._serialized_start=11866 - _globals['_LIKENODE']._serialized_end=12003 - _globals['_ILIKENODE']._serialized_start=12006 - _globals['_ILIKENODE']._serialized_end=12144 - _globals['_SIMILARTONODE']._serialized_start=12147 - _globals['_SIMILARTONODE']._serialized_end=12289 - _globals['_CASENODE']._serialized_start=12292 - _globals['_CASENODE']._serialized_end=12439 - _globals['_WHENTHEN']._serialized_start=12441 - _globals['_WHENTHEN']._serialized_end=12547 - _globals['_CASTNODE']._serialized_start=12549 - _globals['_CASTNODE']._serialized_end=12645 - _globals['_TRYCASTNODE']._serialized_start=12647 - _globals['_TRYCASTNODE']._serialized_end=12746 - _globals['_SORTEXPRNODE']._serialized_start=12748 - _globals['_SORTEXPRNODE']._serialized_end=12839 - _globals['_WINDOWFRAME']._serialized_start=12842 - _globals['_WINDOWFRAME']._serialized_end=13024 - _globals['_WINDOWFRAMEBOUND']._serialized_start=13027 - _globals['_WINDOWFRAMEBOUND']._serialized_end=13158 - _globals['_SCHEMA']._serialized_start=13161 - _globals['_SCHEMA']._serialized_end=13306 - _globals['_SCHEMA_METADATAENTRY']._serialized_start=341 - _globals['_SCHEMA_METADATAENTRY']._serialized_end=388 - _globals['_FIELD']._serialized_start=13309 - _globals['_FIELD']._serialized_end=13567 - _globals['_FIELD_METADATAENTRY']._serialized_start=341 - _globals['_FIELD_METADATAENTRY']._serialized_end=388 - _globals['_FIXEDSIZEBINARY']._serialized_start=13569 - _globals['_FIXEDSIZEBINARY']._serialized_end=13602 - _globals['_TIMESTAMP']._serialized_start=13604 - _globals['_TIMESTAMP']._serialized_end=13674 - _globals['_DECIMAL']._serialized_start=13676 - _globals['_DECIMAL']._serialized_end=13731 - _globals['_LIST']._serialized_start=13733 - _globals['_LIST']._serialized_end=13778 - _globals['_FIXEDSIZELIST']._serialized_start=13780 - _globals['_FIXEDSIZELIST']._serialized_end=13853 - _globals['_DICTIONARY']._serialized_start=13855 - _globals['_DICTIONARY']._serialized_end=13941 - _globals['_STRUCT']._serialized_start=13943 - _globals['_STRUCT']._serialized_end=13995 - _globals['_MAP']._serialized_start=13997 - _globals['_MAP']._serialized_end=14062 - _globals['_UNION']._serialized_start=14064 - _globals['_UNION']._serialized_end=14172 - _globals['_SCALARNESTEDVALUE']._serialized_start=14174 - _globals['_SCALARNESTEDVALUE']._serialized_end=14270 - _globals['_SCALARTIME32VALUE']._serialized_start=14272 - _globals['_SCALARTIME32VALUE']._serialized_end=14367 - _globals['_SCALARTIME64VALUE']._serialized_start=14369 - _globals['_SCALARTIME64VALUE']._serialized_end=14468 - _globals['_SCALARTIMESTAMPVALUE']._serialized_start=14471 - _globals['_SCALARTIMESTAMPVALUE']._serialized_end=14650 - _globals['_SCALARDICTIONARYVALUE']._serialized_start=14652 - _globals['_SCALARDICTIONARYVALUE']._serialized_end=14758 - _globals['_INTERVALMONTHDAYNANOVALUE']._serialized_start=14760 - _globals['_INTERVALMONTHDAYNANOVALUE']._serialized_end=14832 - _globals['_SCALARFIXEDSIZEBINARY']._serialized_start=14834 - _globals['_SCALARFIXEDSIZEBINARY']._serialized_end=14889 - _globals['_SCALARVALUE']._serialized_start=14892 - _globals['_SCALARVALUE']._serialized_end=16306 - _globals['_DECIMAL128']._serialized_start=16308 - _globals['_DECIMAL128']._serialized_end=16357 - _globals['_DECIMAL256']._serialized_start=16359 - _globals['_DECIMAL256']._serialized_end=16408 - _globals['_ARROWTYPE']._serialized_start=16411 - _globals['_ARROWTYPE']._serialized_end=17839 - _globals['_EMPTYMESSAGE']._serialized_start=17841 - _globals['_EMPTYMESSAGE']._serialized_end=17855 - _globals['_ANALYZEDLOGICALPLANTYPE']._serialized_start=17857 - _globals['_ANALYZEDLOGICALPLANTYPE']._serialized_end=17905 - _globals['_OPTIMIZEDLOGICALPLANTYPE']._serialized_start=17907 - _globals['_OPTIMIZEDLOGICALPLANTYPE']._serialized_end=17957 - _globals['_OPTIMIZEDPHYSICALPLANTYPE']._serialized_start=17959 - _globals['_OPTIMIZEDPHYSICALPLANTYPE']._serialized_end=18010 - _globals['_PLANTYPE']._serialized_start=18013 - _globals['_PLANTYPE']._serialized_end=18665 - _globals['_STRINGIFIEDPLAN']._serialized_start=18667 - _globals['_STRINGIFIEDPLAN']._serialized_end=18739 - _globals['_BARETABLEREFERENCE']._serialized_start=18741 - _globals['_BARETABLEREFERENCE']._serialized_end=18776 - _globals['_PARTIALTABLEREFERENCE']._serialized_start=18778 - _globals['_PARTIALTABLEREFERENCE']._serialized_end=18832 - _globals['_FULLTABLEREFERENCE']._serialized_start=18834 - _globals['_FULLTABLEREFERENCE']._serialized_end=18902 - _globals['_OWNEDTABLEREFERENCE']._serialized_start=18905 - _globals['_OWNEDTABLEREFERENCE']._serialized_end=19100 - _globals['_PHYSICALPLANNODE']._serialized_start=19103 - _globals['_PHYSICALPLANNODE']._serialized_end=20657 - _globals['_PARTITIONCOLUMN']._serialized_start=20659 - _globals['_PARTITIONCOLUMN']._serialized_end=20733 - _globals['_FILETYPEWRITEROPTIONS']._serialized_start=20736 - _globals['_FILETYPEWRITEROPTIONS']._serialized_end=20997 - _globals['_JSONWRITEROPTIONS']._serialized_start=20999 - _globals['_JSONWRITEROPTIONS']._serialized_end=21075 - _globals['_PARQUETWRITEROPTIONS']._serialized_start=21077 - _globals['_PARQUETWRITEROPTIONS']._serialized_end=21156 - _globals['_CSVWRITEROPTIONS']._serialized_start=21159 - _globals['_CSVWRITEROPTIONS']._serialized_end=21386 - _globals['_ARROWWRITEROPTIONS']._serialized_start=21388 - _globals['_ARROWWRITEROPTIONS']._serialized_end=21408 - _globals['_WRITERPROPERTIES']._serialized_start=21411 - _globals['_WRITERPROPERTIES']._serialized_end=21628 - _globals['_FILESINKCONFIG']._serialized_start=21631 - _globals['_FILESINKCONFIG']._serialized_end=21940 - _globals['_JSONSINK']._serialized_start=21942 - _globals['_JSONSINK']._serialized_end=21996 - _globals['_JSONSINKEXECNODE']._serialized_start=21999 - _globals['_JSONSINKEXECNODE']._serialized_end=22203 - _globals['_CSVSINK']._serialized_start=22205 - _globals['_CSVSINK']._serialized_end=22258 - _globals['_CSVSINKEXECNODE']._serialized_start=22261 - _globals['_CSVSINKEXECNODE']._serialized_end=22463 - _globals['_PARQUETSINK']._serialized_start=22465 - _globals['_PARQUETSINK']._serialized_end=22522 - _globals['_PARQUETSINKEXECNODE']._serialized_start=22525 - _globals['_PARQUETSINKEXECNODE']._serialized_end=22735 - _globals['_PHYSICALEXTENSIONNODE']._serialized_start=22737 - _globals['_PHYSICALEXTENSIONNODE']._serialized_end=22820 - _globals['_PHYSICALEXPRNODE']._serialized_start=22823 - _globals['_PHYSICALEXPRNODE']._serialized_end=23847 - _globals['_PHYSICALSCALARUDFNODE']._serialized_start=23849 - _globals['_PHYSICALSCALARUDFNODE']._serialized_end=23974 - _globals['_PHYSICALAGGREGATEEXPRNODE']._serialized_start=23977 - _globals['_PHYSICALAGGREGATEEXPRNODE']._serialized_end=24237 - _globals['_PHYSICALWINDOWEXPRNODE']._serialized_start=24240 - _globals['_PHYSICALWINDOWEXPRNODE']._serialized_end=24612 - _globals['_PHYSICALISNULL']._serialized_start=24614 - _globals['_PHYSICALISNULL']._serialized_end=24674 - _globals['_PHYSICALISNOTNULL']._serialized_start=24676 - _globals['_PHYSICALISNOTNULL']._serialized_end=24739 - _globals['_PHYSICALNOT']._serialized_start=24741 - _globals['_PHYSICALNOT']._serialized_end=24798 - _globals['_PHYSICALALIASNODE']._serialized_start=24800 - _globals['_PHYSICALALIASNODE']._serialized_end=24878 - _globals['_PHYSICALBINARYEXPRNODE']._serialized_start=24880 - _globals['_PHYSICALBINARYEXPRNODE']._serialized_end=24998 - _globals['_PHYSICALDATETIMEINTERVALEXPRNODE']._serialized_start=25001 - _globals['_PHYSICALDATETIMEINTERVALEXPRNODE']._serialized_end=25129 - _globals['_PHYSICALLIKEEXPRNODE']._serialized_start=25132 - _globals['_PHYSICALLIKEEXPRNODE']._serialized_end=25288 - _globals['_PHYSICALSORTEXPRNODE']._serialized_start=25290 - _globals['_PHYSICALSORTEXPRNODE']._serialized_end=25390 - _globals['_PHYSICALWHENTHEN']._serialized_start=25392 - _globals['_PHYSICALWHENTHEN']._serialized_end=25508 - _globals['_PHYSICALINLISTNODE']._serialized_start=25510 - _globals['_PHYSICALINLISTNODE']._serialized_end=25635 - _globals['_PHYSICALCASENODE']._serialized_start=25638 - _globals['_PHYSICALCASENODE']._serialized_end=25803 - _globals['_PHYSICALSCALARFUNCTIONNODE']._serialized_start=25806 - _globals['_PHYSICALSCALARFUNCTIONNODE']._serialized_end=25977 - _globals['_PHYSICALTRYCASTNODE']._serialized_start=25979 - _globals['_PHYSICALTRYCASTNODE']._serialized_end=26087 - _globals['_PHYSICALCASTNODE']._serialized_start=26089 - _globals['_PHYSICALCASTNODE']._serialized_end=26194 - _globals['_PHYSICALNEGATIVENODE']._serialized_start=26196 - _globals['_PHYSICALNEGATIVENODE']._serialized_end=26262 - _globals['_FILTEREXECNODE']._serialized_start=26265 - _globals['_FILTEREXECNODE']._serialized_end=26406 - _globals['_FILEGROUP']._serialized_start=26408 - _globals['_FILEGROUP']._serialized_end=26463 - _globals['_SCANLIMIT']._serialized_start=26465 - _globals['_SCANLIMIT']._serialized_end=26491 - _globals['_PHYSICALSORTEXPRNODECOLLECTION']._serialized_start=26493 - _globals['_PHYSICALSORTEXPRNODECOLLECTION']._serialized_end=26593 - _globals['_FILESCANEXECCONF']._serialized_start=26596 - _globals['_FILESCANEXECCONF']._serialized_end=26927 - _globals['_PARQUETSCANEXECNODE']._serialized_start=26929 - _globals['_PARQUETSCANEXECNODE']._serialized_end=27054 - _globals['_CSVSCANEXECNODE']._serialized_start=27057 - _globals['_CSVSCANEXECNODE']._serialized_end=27214 - _globals['_AVROSCANEXECNODE']._serialized_start=27216 - _globals['_AVROSCANEXECNODE']._serialized_end=27283 - _globals['_HASHJOINEXECNODE']._serialized_start=27286 - _globals['_HASHJOINEXECNODE']._serialized_end=27583 - _globals['_SYMMETRICHASHJOINEXECNODE']._serialized_start=27586 - _globals['_SYMMETRICHASHJOINEXECNODE']._serialized_end=28017 - _globals['_INTERLEAVEEXECNODE']._serialized_start=28019 - _globals['_INTERLEAVEEXECNODE']._serialized_end=28085 - _globals['_UNIONEXECNODE']._serialized_start=28087 - _globals['_UNIONEXECNODE']._serialized_end=28148 - _globals['_EXPLAINEXECNODE']._serialized_start=28150 - _globals['_EXPLAINEXECNODE']._serialized_end=28276 - _globals['_ANALYZEEXECNODE']._serialized_start=28279 - _globals['_ANALYZEEXECNODE']._serialized_end=28419 - _globals['_CROSSJOINEXECNODE']._serialized_start=28421 - _globals['_CROSSJOINEXECNODE']._serialized_end=28529 - _globals['_PHYSICALCOLUMN']._serialized_start=28531 - _globals['_PHYSICALCOLUMN']._serialized_end=28576 - _globals['_JOINON']._serialized_start=28578 - _globals['_JOINON']._serialized_end=28675 - _globals['_EMPTYEXECNODE']._serialized_start=28677 - _globals['_EMPTYEXECNODE']._serialized_end=28728 - _globals['_PLACEHOLDERROWEXECNODE']._serialized_start=28730 - _globals['_PLACEHOLDERROWEXECNODE']._serialized_end=28790 - _globals['_PROJECTIONEXECNODE']._serialized_start=28793 - _globals['_PROJECTIONEXECNODE']._serialized_end=28921 - _globals['_PARTIALLYSORTEDINPUTORDERMODE']._serialized_start=28923 - _globals['_PARTIALLYSORTEDINPUTORDERMODE']._serialized_end=28971 - _globals['_WINDOWAGGEXECNODE']._serialized_start=28974 - _globals['_WINDOWAGGEXECNODE']._serialized_end=29328 - _globals['_MAYBEFILTER']._serialized_start=29330 - _globals['_MAYBEFILTER']._serialized_end=29387 - _globals['_MAYBEPHYSICALSORTEXPRS']._serialized_start=29389 - _globals['_MAYBEPHYSICALSORTEXPRS']._serialized_end=29466 - _globals['_AGGREGATEEXECNODE']._serialized_start=29469 - _globals['_AGGREGATEEXECNODE']._serialized_end=29875 - _globals['_GLOBALLIMITEXECNODE']._serialized_start=29877 - _globals['_GLOBALLIMITEXECNODE']._serialized_end=29972 - _globals['_LOCALLIMITEXECNODE']._serialized_start=29974 - _globals['_LOCALLIMITEXECNODE']._serialized_end=30054 - _globals['_SORTEXECNODE']._serialized_start=30057 - _globals['_SORTEXECNODE']._serialized_end=30206 - _globals['_SORTPRESERVINGMERGEEXECNODE']._serialized_start=30209 - _globals['_SORTPRESERVINGMERGEEXECNODE']._serialized_end=30342 - _globals['_NESTEDLOOPJOINEXECNODE']._serialized_start=30345 - _globals['_NESTEDLOOPJOINEXECNODE']._serialized_end=30539 - _globals['_COALESCEBATCHESEXECNODE']._serialized_start=30541 - _globals['_COALESCEBATCHESEXECNODE']._serialized_end=30638 - _globals['_COALESCEPARTITIONSEXECNODE']._serialized_start=30640 - _globals['_COALESCEPARTITIONSEXECNODE']._serialized_end=30713 - _globals['_PHYSICALHASHREPARTITION']._serialized_start=30715 - _globals['_PHYSICALHASHREPARTITION']._serialized_end=30814 - _globals['_REPARTITIONEXECNODE']._serialized_start=30817 - _globals['_REPARTITIONEXECNODE']._serialized_end=30998 - _globals['_JOINFILTER']._serialized_start=31001 - _globals['_JOINFILTER']._serialized_end=31148 - _globals['_COLUMNINDEX']._serialized_start=31150 - _globals['_COLUMNINDEX']._serialized_end=31214 - _globals['_PARTITIONEDFILE']._serialized_start=31217 - _globals['_PARTITIONEDFILE']._serialized_end=31377 - _globals['_FILERANGE']._serialized_start=31379 - _globals['_FILERANGE']._serialized_end=31418 - _globals['_PARTITIONSTATS']._serialized_start=31420 - _globals['_PARTITIONSTATS']._serialized_end=31541 - _globals['_PRECISION']._serialized_start=31543 - _globals['_PRECISION']._serialized_end=31643 - _globals['_STATISTICS']._serialized_start=31646 - _globals['_STATISTICS']._serialized_end=31794 - _globals['_COLUMNSTATS']._serialized_start=31797 - _globals['_COLUMNSTATS']._serialized_end=31984 - _globals['_NAMEDSTRUCTFIELDEXPR']._serialized_start=31986 - _globals['_NAMEDSTRUCTFIELDEXPR']._serialized_end=32047 - _globals['_LISTINDEXEXPR']._serialized_start=32049 - _globals['_LISTINDEXEXPR']._serialized_end=32107 - _globals['_LISTRANGEEXPR']._serialized_start=32110 - _globals['_LISTRANGEEXPR']._serialized_end=32260 - _globals['_PHYSICALGETINDEXEDFIELDEXPRNODE']._serialized_start=32263 - _globals['_PHYSICALGETINDEXEDFIELDEXPRNODE']._serialized_end=32525 -# @@protoc_insertion_point(module_scope) diff --git a/vegafusion-python/vegafusion/runtime.py b/vegafusion-python/vegafusion/runtime.py index f9e78007..ae63ae41 100644 --- a/vegafusion-python/vegafusion/runtime.py +++ b/vegafusion-python/vegafusion/runtime.py @@ -4,7 +4,7 @@ import psutil from .connection import SqlConnection -from .dataset import SqlDataset, DataFrameDataset +from .dataset import SqlDataset from .datasource import PandasDatasource, DfiDatasource, PyArrowDatasource from .local_tz import get_local_tz @@ -203,8 +203,6 @@ def _import_or_register_inline_datasets(self, inline_datasets=None): for name, value in inline_datasets.items(): if isinstance(value, SqlDataset): imported_inline_datasets[name] = value - elif isinstance(value, DataFrameDataset): - imported_inline_datasets[name] = value elif pd is not None and isinstance(value, pd.DataFrame): if self._connection is not None: try: diff --git a/vegafusion-runtime/Cargo.toml b/vegafusion-runtime/Cargo.toml index df9680be..c1d488a9 100644 --- a/vegafusion-runtime/Cargo.toml +++ b/vegafusion-runtime/Cargo.toml @@ -111,6 +111,9 @@ workspace = true [dependencies.datafusion-functions-nested] workspace = true +[dependencies.datafusion-functions-window] +workspace = true + [dependencies.tokio] workspace = true features = ["macros", "rt-multi-thread", "fs"] diff --git a/vegafusion-runtime/benches/spec_benchmarks.rs b/vegafusion-runtime/benches/spec_benchmarks.rs index 72a8c917..789a05be 100644 --- a/vegafusion-runtime/benches/spec_benchmarks.rs +++ b/vegafusion-runtime/benches/spec_benchmarks.rs @@ -34,15 +34,6 @@ fn load_updates(spec_name: &str) -> Vec { } } -async fn eval_spec_sequence_from_files(spec_name: &str) { - // Load spec - let full_spec = load_spec(spec_name); - - // Load updates - let full_updates = load_updates(spec_name); - eval_spec_sequence(full_spec, full_updates).await -} - async fn eval_spec_get_variable(full_spec: ChartSpec, var: &ScopedVariable) -> QueryResult { let tz_config = TzConfig { local_tz: "America/New_York".to_string(), diff --git a/vegafusion-runtime/src/data/tasks.rs b/vegafusion-runtime/src/data/tasks.rs index 6b104f7c..6e8983a9 100644 --- a/vegafusion-runtime/src/data/tasks.rs +++ b/vegafusion-runtime/src/data/tasks.rs @@ -14,7 +14,7 @@ use tokio::io::AsyncReadExt; use crate::data::dataset::VegaFusionDataset; use crate::task_graph::timezone::RuntimeTzConfig; -use crate::transform::pipeline::{remove_order_col, TransformPipelineUtils}; +use crate::transform::pipeline::TransformPipelineUtils; use vegafusion_common::data::scalar::{ScalarValue, ScalarValueHelpers}; use vegafusion_common::error::{Result, ResultWithContext, ToExternalError, VegaFusionError}; @@ -186,8 +186,7 @@ async fn eval_sql_df( pipeline.eval_sql(sql_df, config).await? } else { // No transforms, just remove any ordering column - let sql_df = remove_order_col(sql_df).await?; - (sql_df.collect().await?, Vec::new()) + (sql_df.collect().await?.without_ordering()?, Vec::new()) }; let table_value = TaskValue::Table(transformed_df); diff --git a/vegafusion-runtime/src/task_graph/runtime.rs b/vegafusion-runtime/src/task_graph/runtime.rs index ce5d01e5..26edad1f 100644 --- a/vegafusion-runtime/src/task_graph/runtime.rs +++ b/vegafusion-runtime/src/task_graph/runtime.rs @@ -195,8 +195,7 @@ impl VegaFusionRuntime { let request = QueryRequest::decode(request_bytes).unwrap(); let response_msg = self.query_request_message(request).await?; - let mut buf: Vec = Vec::new(); - buf.reserve(response_msg.encoded_len()); + let mut buf: Vec = Vec::with_capacity(response_msg.encoded_len()); response_msg .encode(&mut buf) .external("Failed to encode response")?; @@ -1027,9 +1026,14 @@ impl ChartState { .cloned() .collect(); + let cloned_task_graph = task_graph.clone(); + + // Drop the MutexGuard before await call to avoid warning + drop(task_graph); + let response_task_values = runtime .query_request( - Arc::new(task_graph.clone()), + Arc::new(cloned_task_graph), indices.as_slice(), &self.inline_datasets, ) diff --git a/vegafusion-runtime/src/transform/bin.rs b/vegafusion-runtime/src/transform/bin.rs index 55ee6708..372c81a7 100644 --- a/vegafusion-runtime/src/transform/bin.rs +++ b/vegafusion-runtime/src/transform/bin.rs @@ -4,6 +4,7 @@ use crate::expression::compiler::utils::ExprHelpers; use crate::transform::TransformTrait; use async_trait::async_trait; +use datafusion_expr::expr::WildcardOptions; use datafusion_expr::lit; use datafusion_common::scalar::ScalarValue; @@ -54,7 +55,13 @@ impl TransformTrait for Bin { floor((numeric_field.clone().sub(lit(start)).div(lit(step))).add(lit(1.0e-14))) .alias(bin_index_name); let sql_df = sql_df - .select(vec![Expr::Wildcard { qualifier: None }, bin_index]) + .select(vec![ + Expr::Wildcard { + qualifier: None, + options: WildcardOptions::default(), + }, + bin_index, + ]) .await?; // Add column with bin start diff --git a/vegafusion-runtime/src/transform/collect.rs b/vegafusion-runtime/src/transform/collect.rs index c948fb42..90861e97 100644 --- a/vegafusion-runtime/src/transform/collect.rs +++ b/vegafusion-runtime/src/transform/collect.rs @@ -2,6 +2,7 @@ use crate::expression::compiler::config::CompilationConfig; use crate::transform::TransformTrait; use datafusion_expr::{expr, Expr, WindowFunctionDefinition}; +use datafusion_functions_window::row_number::RowNumber; use sqlparser::ast::NullTreatment; use std::sync::Arc; @@ -9,7 +10,7 @@ use vegafusion_core::error::{Result, ResultWithContext}; use vegafusion_core::proto::gen::transforms::{Collect, SortOrder}; use async_trait::async_trait; -use datafusion_expr::{BuiltInWindowFunction, WindowFrame}; +use datafusion_expr::WindowFrame; use vegafusion_common::column::{flat_col, unescaped_col}; use vegafusion_common::data::ORDER_COL; use vegafusion_core::task_graph::task_value::TaskValue; @@ -30,11 +31,11 @@ impl TransformTrait for Collect { .zip(&self.order) .filter_map(|(field, order)| { if dataframe.schema().column_with_name(&field).is_some() { - Some(Expr::Sort(expr::Sort { - expr: Box::new(unescaped_col(&field)), - asc: *order == SortOrder::Ascending as i32, - nulls_first: *order == SortOrder::Ascending as i32, - })) + let sort_expr = unescaped_col(&field).sort( + *order == SortOrder::Ascending as i32, + *order == SortOrder::Ascending as i32, + ); + Some(sort_expr) } else { None } @@ -45,7 +46,7 @@ impl TransformTrait for Collect { // criteria. This column becomes the new ORDER_COL, which will be sorted at the end of // the pipeline. let order_col = Expr::WindowFunction(expr::WindowFunction { - fun: WindowFunctionDefinition::BuiltInWindowFunction(BuiltInWindowFunction::RowNumber), + fun: WindowFunctionDefinition::WindowUDF(Arc::new(RowNumber::new().into())), args: vec![], partition_by: vec![], order_by: sort_exprs, diff --git a/vegafusion-runtime/src/transform/identifier.rs b/vegafusion-runtime/src/transform/identifier.rs index 4877fc62..9ecc7121 100644 --- a/vegafusion-runtime/src/transform/identifier.rs +++ b/vegafusion-runtime/src/transform/identifier.rs @@ -2,7 +2,9 @@ use crate::expression::compiler::config::CompilationConfig; use crate::transform::TransformTrait; use async_trait::async_trait; -use datafusion_expr::{expr, BuiltInWindowFunction, Expr, WindowFrame, WindowFunctionDefinition}; +use datafusion_expr::expr::WildcardOptions; +use datafusion_expr::{expr, Expr, WindowFrame, WindowFunctionDefinition}; +use datafusion_functions_window::row_number::RowNumber; use sqlparser::ast::NullTreatment; use std::sync::Arc; use vegafusion_common::column::flat_col; @@ -21,21 +23,27 @@ impl TransformTrait for Identifier { ) -> Result<(Arc, Vec)> { // Add row number column with the desired name, sorted by the input order column let row_number_expr = Expr::WindowFunction(expr::WindowFunction { - fun: WindowFunctionDefinition::BuiltInWindowFunction(BuiltInWindowFunction::RowNumber), + fun: WindowFunctionDefinition::WindowUDF(Arc::new(RowNumber::new().into())), args: Vec::new(), partition_by: Vec::new(), - order_by: vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col(ORDER_COL)), + order_by: vec![expr::Sort { + expr: flat_col(ORDER_COL), asc: true, nulls_first: false, - })], + }], window_frame: WindowFrame::new(Some(true)), null_treatment: Some(NullTreatment::IgnoreNulls), }) .alias(&self.r#as); let result = dataframe - .select(vec![Expr::Wildcard { qualifier: None }, row_number_expr]) + .select(vec![ + Expr::Wildcard { + qualifier: None, + options: WildcardOptions::default(), + }, + row_number_expr, + ]) .await?; Ok((result, Default::default())) diff --git a/vegafusion-runtime/src/transform/pipeline.rs b/vegafusion-runtime/src/transform/pipeline.rs index 4167dc27..b81837cc 100644 --- a/vegafusion-runtime/src/transform/pipeline.rs +++ b/vegafusion-runtime/src/transform/pipeline.rs @@ -5,7 +5,7 @@ use itertools::Itertools; use std::collections::HashMap; use async_trait::async_trait; -use datafusion_expr::{expr, lit, Expr}; +use datafusion_expr::expr; use std::sync::Arc; use vegafusion_common::column::flat_col; use vegafusion_common::data::table::VegaFusionTable; @@ -89,19 +89,16 @@ impl TransformPipelineUtils for TransformPipeline { // Sort by ordering column at the end result_sql_df = result_sql_df .sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col(ORDER_COL)), + vec![expr::Sort { + expr: flat_col(ORDER_COL), asc: true, nulls_first: false, - })], + }], None, ) .await?; - // Remove ordering column - result_sql_df = remove_order_col(result_sql_df).await?; - - let table = result_sql_df.collect().await?; + let table = result_sql_df.collect().await?.without_ordering()?; // Sort result signal value by signal name let (_, signals_values): (Vec<_>, Vec<_>) = result_outputs @@ -112,25 +109,3 @@ impl TransformPipelineUtils for TransformPipeline { Ok((table, signals_values)) } } - -pub async fn remove_order_col(result_sql_df: Arc) -> Result> { - let mut selection = result_sql_df - .schema() - .fields - .iter() - .filter_map(|field| { - if field.name() == ORDER_COL { - None - } else { - Some(flat_col(field.name())) - } - }) - .collect::>(); - - // Add arbitrary column so that SELECT succeeds - if selection.is_empty() { - selection.push(lit(0).alias("_empty")) - } - - result_sql_df.select(selection).await -} diff --git a/vegafusion-runtime/src/transform/pivot.rs b/vegafusion-runtime/src/transform/pivot.rs index 2e608c73..9dd357c0 100644 --- a/vegafusion-runtime/src/transform/pivot.rs +++ b/vegafusion-runtime/src/transform/pivot.rs @@ -2,7 +2,7 @@ use crate::expression::compiler::config::CompilationConfig; use crate::transform::aggregate::make_agg_expr_for_col_expr; use crate::transform::TransformTrait; use async_trait::async_trait; -use datafusion_expr::{expr::Sort, lit, when, Expr}; +use datafusion_expr::{lit, when}; use datafusion_functions_aggregate::expr_fn::min; use std::sync::Arc; use vegafusion_common::arrow::array::StringArray; @@ -120,14 +120,7 @@ async fn extract_sorted_pivot_values( }; let sorted_query = agg_query - .sort( - vec![Expr::Sort(Sort { - expr: Box::new(unescaped_col(&tx.field)), - asc: true, - nulls_first: false, - })], - limit, - ) + .sort(vec![unescaped_col(&tx.field).sort(true, false)], limit) .await?; let pivot_result = sorted_query.collect().await?; diff --git a/vegafusion-runtime/src/transform/stack.rs b/vegafusion-runtime/src/transform/stack.rs index 630d9570..0c1a9707 100644 --- a/vegafusion-runtime/src/transform/stack.rs +++ b/vegafusion-runtime/src/transform/stack.rs @@ -1,7 +1,7 @@ use crate::expression::compiler::config::CompilationConfig; use crate::transform::TransformTrait; use async_trait::async_trait; -use datafusion_expr::{expr, Expr}; +use datafusion_expr::expr; use std::sync::Arc; use vegafusion_common::column::{flat_col, unescaped_col}; use vegafusion_common::data::ORDER_COL; @@ -29,21 +29,19 @@ impl TransformTrait for Stack { .sort_fields .iter() .zip(&self.sort) - .map(|(field, order)| { - Expr::Sort(expr::Sort { - expr: Box::new(unescaped_col(field)), - asc: *order == SortOrder::Ascending as i32, - nulls_first: *order == SortOrder::Ascending as i32, - }) + .map(|(field, order)| expr::Sort { + expr: unescaped_col(field), + asc: *order == SortOrder::Ascending as i32, + nulls_first: *order == SortOrder::Ascending as i32, }) .collect(); // Order by input row ordering last - order_by.push(Expr::Sort(expr::Sort { - expr: Box::new(flat_col(ORDER_COL)), + order_by.push(expr::Sort { + expr: flat_col(ORDER_COL), asc: true, nulls_first: true, - })); + }); let offset = StackOffset::try_from(self.offset).expect("Failed to convert stack offset"); let mode = match offset { diff --git a/vegafusion-runtime/src/transform/window.rs b/vegafusion-runtime/src/transform/window.rs index 4dc81c9e..15f46249 100644 --- a/vegafusion-runtime/src/transform/window.rs +++ b/vegafusion-runtime/src/transform/window.rs @@ -19,6 +19,7 @@ use datafusion_functions_aggregate::average::avg_udaf; use datafusion_functions_aggregate::min_max::{max_udaf, min_udaf}; use datafusion_functions_aggregate::stddev::{stddev_pop_udaf, stddev_udaf}; use datafusion_functions_aggregate::sum::sum_udaf; +use datafusion_functions_window::row_number::RowNumber; use vegafusion_common::column::{flat_col, unescaped_col}; use vegafusion_common::data::ORDER_COL; use vegafusion_common::datatypes::to_numeric; @@ -37,12 +38,10 @@ impl TransformTrait for Window { .sort_fields .iter() .zip(&self.sort) - .map(|(field, order)| { - Expr::Sort(expr::Sort { - expr: Box::new(unescaped_col(field)), - asc: *order == SortOrder::Ascending as i32, - nulls_first: *order == SortOrder::Ascending as i32, - }) + .map(|(field, order)| expr::Sort { + expr: unescaped_col(field), + asc: *order == SortOrder::Ascending as i32, + nulls_first: *order == SortOrder::Ascending as i32, }) .collect(); @@ -55,11 +54,11 @@ impl TransformTrait for Window { if order_by.is_empty() { // Order by input row if no ordering specified - order_by.push(Expr::Sort(expr::Sort { - expr: Box::new(flat_col(ORDER_COL)), + order_by.push(expr::Sort { + expr: flat_col(ORDER_COL), asc: true, nulls_first: true, - })); + }); }; let partition_by: Vec<_> = self @@ -167,30 +166,55 @@ impl TransformTrait for Window { let _param = self.params.get(i); let (window_fn, args) = match op { - WindowOp::RowNumber => (BuiltInWindowFunction::RowNumber, Vec::new()), - WindowOp::Rank => (BuiltInWindowFunction::Rank, Vec::new()), - WindowOp::DenseRank => (BuiltInWindowFunction::DenseRank, Vec::new()), - WindowOp::PercentileRank => { - (BuiltInWindowFunction::PercentRank, vec![]) - } - WindowOp::CumeDist => (BuiltInWindowFunction::CumeDist, vec![]), + WindowOp::RowNumber => ( + WindowFunctionDefinition::WindowUDF(Arc::new( + RowNumber::new().into(), + )), + Vec::new(), + ), + WindowOp::Rank => ( + WindowFunctionDefinition::BuiltInWindowFunction( + BuiltInWindowFunction::Rank, + ), + Vec::new(), + ), + WindowOp::DenseRank => ( + WindowFunctionDefinition::BuiltInWindowFunction( + BuiltInWindowFunction::DenseRank, + ), + Vec::new(), + ), + WindowOp::PercentileRank => ( + WindowFunctionDefinition::BuiltInWindowFunction( + BuiltInWindowFunction::PercentRank, + ), + vec![], + ), + WindowOp::CumeDist => ( + WindowFunctionDefinition::BuiltInWindowFunction( + BuiltInWindowFunction::CumeDist, + ), + vec![], + ), WindowOp::FirstValue => ( - BuiltInWindowFunction::FirstValue, + WindowFunctionDefinition::BuiltInWindowFunction( + BuiltInWindowFunction::FirstValue, + ), + vec![unescaped_col(field)], + ), + WindowOp::LastValue => ( + WindowFunctionDefinition::BuiltInWindowFunction( + BuiltInWindowFunction::LastValue, + ), vec![unescaped_col(field)], ), - WindowOp::LastValue => { - (BuiltInWindowFunction::LastValue, vec![unescaped_col(field)]) - } _ => { return Err(VegaFusionError::compilation(format!( "Unsupported window function: {op:?}" ))) } }; - ( - WindowFunctionDefinition::BuiltInWindowFunction(window_fn), - args, - ) + (window_fn, args) } }; diff --git a/vegafusion-runtime/tests/test_pre_transform_values.rs b/vegafusion-runtime/tests/test_pre_transform_values.rs index 721691f0..f9ffa628 100644 --- a/vegafusion-runtime/tests/test_pre_transform_values.rs +++ b/vegafusion-runtime/tests/test_pre_transform_values.rs @@ -342,8 +342,8 @@ mod tests { +---------------------+---------------------+---------+---------+---------------+-------------+ | yearmonth_date | yearmonth_date_end | weather | __count | __count_start | __count_end | +---------------------+---------------------+---------+---------+---------------+-------------+ -| 2013-11-01T00:00:00 | 2013-12-01T00:00:00 | rain | 15 | 12.0 | 27 | -| 2014-01-01T00:00:00 | 2014-02-01T00:00:00 | sun | 16 | 0.0 | 16 | +| 2013-11-01T00:00:00 | 2013-12-01T00:00:00 | rain | 15 | 12.0 | 27.0 | +| 2014-01-01T00:00:00 | 2014-02-01T00:00:00 | sun | 16 | 0.0 | 16.0 | +---------------------+---------------------+---------+---------+---------------+-------------+"; assert_eq!(click_selected.pretty_format(None).unwrap(), expected); @@ -355,16 +355,16 @@ mod tests { +---------------------+---------------------+---------+---------+---------------+-------------+ | yearmonth_date | yearmonth_date_end | weather | __count | __count_start | __count_end | +---------------------+---------------------+---------+---------+---------------+-------------+ -| 2013-11-01T00:00:00 | 2013-12-01T00:00:00 | sun | 12 | 0.0 | 12 | -| 2013-11-01T00:00:00 | 2013-12-01T00:00:00 | rain | 15 | 12.0 | 27 | -| 2013-11-01T00:00:00 | 2013-12-01T00:00:00 | fog | 2 | 27.0 | 29 | -| 2013-11-01T00:00:00 | 2013-12-01T00:00:00 | drizzle | 1 | 29.0 | 30 | -| 2013-12-01T00:00:00 | 2014-01-01T00:00:00 | sun | 17 | 0.0 | 17 | -| 2013-12-01T00:00:00 | 2014-01-01T00:00:00 | snow | 1 | 17.0 | 18 | -| 2013-12-01T00:00:00 | 2014-01-01T00:00:00 | rain | 13 | 18.0 | 31 | -| 2014-01-01T00:00:00 | 2014-02-01T00:00:00 | sun | 16 | 0.0 | 16 | -| 2014-01-01T00:00:00 | 2014-02-01T00:00:00 | rain | 13 | 16.0 | 29 | -| 2014-01-01T00:00:00 | 2014-02-01T00:00:00 | fog | 2 | 29.0 | 31 | +| 2013-11-01T00:00:00 | 2013-12-01T00:00:00 | sun | 12 | 0.0 | 12.0 | +| 2013-11-01T00:00:00 | 2013-12-01T00:00:00 | rain | 15 | 12.0 | 27.0 | +| 2013-11-01T00:00:00 | 2013-12-01T00:00:00 | fog | 2 | 27.0 | 29.0 | +| 2013-11-01T00:00:00 | 2013-12-01T00:00:00 | drizzle | 1 | 29.0 | 30.0 | +| 2013-12-01T00:00:00 | 2014-01-01T00:00:00 | sun | 17 | 0.0 | 17.0 | +| 2013-12-01T00:00:00 | 2014-01-01T00:00:00 | snow | 1 | 17.0 | 18.0 | +| 2013-12-01T00:00:00 | 2014-01-01T00:00:00 | rain | 13 | 18.0 | 31.0 | +| 2014-01-01T00:00:00 | 2014-02-01T00:00:00 | sun | 16 | 0.0 | 16.0 | +| 2014-01-01T00:00:00 | 2014-02-01T00:00:00 | rain | 13 | 16.0 | 29.0 | +| 2014-01-01T00:00:00 | 2014-02-01T00:00:00 | fog | 2 | 29.0 | 31.0 | +---------------------+---------------------+---------+---------+---------------+-------------+"; assert_eq!(drag_selected.pretty_format(None).unwrap(), expected); } diff --git a/vegafusion-runtime/tests/test_selection.rs b/vegafusion-runtime/tests/test_selection.rs index b0cdeea1..92320c7d 100644 --- a/vegafusion-runtime/tests/test_selection.rs +++ b/vegafusion-runtime/tests/test_selection.rs @@ -12,7 +12,7 @@ use vegafusion_core::spec::transform::TransformSpec; use vegafusion_runtime::expression::compiler::config::CompilationConfig; use vegafusion_runtime::task_graph::timezone::RuntimeTzConfig; -fn make_brush_r(ranges: &Vec>, typ: &str) -> VegaFusionTable { +fn make_brush_r(ranges: &[Vec<(&str, &str, [f64; 2])>], typ: &str) -> VegaFusionTable { let mut rows: Vec = Vec::new(); for (i, row_ranges) in ranges.iter().enumerate() { let mut field_elements: Vec = Vec::new(); diff --git a/vegafusion-runtime/tests/util/equality.rs b/vegafusion-runtime/tests/util/equality.rs index cafa777c..0aee09e7 100644 --- a/vegafusion-runtime/tests/util/equality.rs +++ b/vegafusion-runtime/tests/util/equality.rs @@ -1,7 +1,7 @@ use std::collections::{HashMap, HashSet}; use datafusion_common::ScalarValue; -use datafusion_expr::{expr, Expr}; +use datafusion_expr::expr; use std::sync::Arc; use vegafusion_common::arrow::array::{ArrayRef, StructArray}; use vegafusion_common::arrow::record_batch::RecordBatch; @@ -99,11 +99,11 @@ pub fn assert_tables_equal( if f.name() == ORDER_COL { None } else { - Some(Expr::Sort(expr::Sort { - expr: Box::new(flat_col(f.name())), + Some(expr::Sort { + expr: flat_col(f.name()), asc: false, nulls_first: false, - })) + }) } }) .collect(); diff --git a/vegafusion-sql/Cargo.toml b/vegafusion-sql/Cargo.toml index 169193b0..7dcad8e0 100644 --- a/vegafusion-sql/Cargo.toml +++ b/vegafusion-sql/Cargo.toml @@ -59,7 +59,6 @@ optional = true [dependencies.arrow] workspace = true -default-features = false features = ["ipc"] [dependencies.datafusion-common] @@ -74,6 +73,9 @@ workspace = true [dependencies.datafusion-functions-aggregate] workspace = true +[dependencies.datafusion-functions-window] +workspace = true + [dependencies.datafusion] workspace = true optional = true diff --git a/vegafusion-sql/src/compile/expr.rs b/vegafusion-sql/src/compile/expr.rs index c1b3a537..4eb38bec 100644 --- a/vegafusion-sql/src/compile/expr.rs +++ b/vegafusion-sql/src/compile/expr.rs @@ -292,10 +292,6 @@ impl ToSqlExpr for Expr { } }) } - Expr::Sort { .. } => { - // Sort expressions need to be handled at a higher level - Err(VegaFusionError::internal("Sort cannot be converted to SQL")) - } Expr::ScalarFunction(fun) => { let fun_name = match fun.name().to_ascii_lowercase().as_str() { "power" => "pow".to_string(), @@ -371,11 +367,11 @@ impl ToSqlExpr for Expr { })); } UnorderedRowNumberMode::OrderByConstant => { - vec![Expr::Sort(Sort { - expr: Box::new(lit(1)), + vec![Sort { + expr: lit(1), asc: false, nulls_first: false, - })] + }] } _ => order_by.clone(), } diff --git a/vegafusion-sql/src/compile/function_arg.rs b/vegafusion-sql/src/compile/function_arg.rs index d4040e29..60c33d39 100644 --- a/vegafusion-sql/src/compile/function_arg.rs +++ b/vegafusion-sql/src/compile/function_arg.rs @@ -20,9 +20,13 @@ impl ToSqlFunctionArg for Expr { schema: &DFSchema, ) -> Result { Ok(match self { - Expr::Wildcard { qualifier: None } => SqlFunctionArgExpr::Wildcard, + Expr::Wildcard { + qualifier: None, + options: _, + } => SqlFunctionArgExpr::Wildcard, Expr::Wildcard { qualifier: Some(qualifier), + options: _, } => SqlFunctionArgExpr::QualifiedWildcard(ObjectName( qualifier .to_vec() diff --git a/vegafusion-sql/src/compile/order.rs b/vegafusion-sql/src/compile/order.rs index 152a60fe..fa808859 100644 --- a/vegafusion-sql/src/compile/order.rs +++ b/vegafusion-sql/src/compile/order.rs @@ -1,7 +1,7 @@ use crate::compile::expr::ToSqlExpr; use crate::dialect::Dialect; use datafusion_common::DFSchema; -use datafusion_expr::{expr::Sort, Expr}; +use datafusion_expr::SortExpr; use sqlparser::ast::OrderByExpr as SqlOrderByExpr; use vegafusion_common::error::{Result, ResultWithContext, VegaFusionError}; @@ -9,42 +9,34 @@ pub trait ToSqlOrderByExpr { fn to_sql_order(&self, dialect: &Dialect, schema: &DFSchema) -> Result; } -impl ToSqlOrderByExpr for Expr { +impl ToSqlOrderByExpr for SortExpr { fn to_sql_order(&self, dialect: &Dialect, schema: &DFSchema) -> Result { - match self { - Expr::Sort(Sort { - expr, - asc, - nulls_first, - }) => { - let nulls_first = if dialect.supports_null_ordering { - // Be explicit about null ordering - Some(*nulls_first) - } else { - // If null ordering is not supported, then don't specify it as long the as default - // behavior matches what's specified. - if (*asc && *nulls_first) || (!*asc && !*nulls_first) { - None - } else { - return Err(VegaFusionError::sql_not_supported( - "Dialect does not support NULL ordering", - )); - } - }; - - Ok(SqlOrderByExpr { - expr: expr.to_sql(dialect, schema).with_context(|| { - format!("Expression cannot be used as order by expression: {expr:?}") - })?, - asc: Some(*asc), - nulls_first, - with_fill: None, - }) + let nulls_first = if dialect.supports_null_ordering { + // Be explicit about null ordering + Some(self.nulls_first) + } else { + // If null ordering is not supported, then don't specify it as long the as default + // behavior matches what's specified. + if (self.asc && self.nulls_first) || (!self.asc && !self.nulls_first) { + None + } else { + return Err(VegaFusionError::sql_not_supported( + "Dialect does not support NULL ordering", + )); } - _ => Err(VegaFusionError::internal( - "Only Sort expressions may be converted to OrderByExpr AST nodes", - )), - } + }; + + Ok(SqlOrderByExpr { + expr: self.expr.to_sql(dialect, schema).with_context(|| { + format!( + "Expression cannot be used as order by expression: {expr:?}", + expr = self.expr + ) + })?, + asc: Some(self.asc), + nulls_first, + with_fill: None, + }) } } @@ -52,28 +44,20 @@ impl ToSqlOrderByExpr for Expr { mod tests { use crate::compile::order::ToSqlOrderByExpr; use datafusion_common::DFSchema; - use datafusion_expr::{expr, Expr}; + use datafusion_expr::expr; use vegafusion_common::column::flat_col; fn schema() -> DFSchema { DFSchema::empty() } - #[test] - pub fn test_non_sort_expr() { - let sort_expr = flat_col("a"); - sort_expr - .to_sql_order(&Default::default(), &schema()) - .unwrap_err(); - } - #[test] pub fn test_sort_by_col() { - let sort_expr = Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + let sort_expr = expr::Sort { + expr: flat_col("a"), asc: false, nulls_first: false, - }); + }; let sort_sql = sort_expr .to_sql_order(&Default::default(), &schema()) diff --git a/vegafusion-sql/src/compile/select.rs b/vegafusion-sql/src/compile/select.rs index 1517998f..1a640a9e 100644 --- a/vegafusion-sql/src/compile/select.rs +++ b/vegafusion-sql/src/compile/select.rs @@ -21,9 +21,13 @@ impl ToSqlSelectItem for Expr { quote_style: Some(dialect.quote_style), }, }, - Expr::Wildcard { qualifier: None } => SqlSelectItem::Wildcard(Default::default()), + Expr::Wildcard { + qualifier: None, + options: _, + } => SqlSelectItem::Wildcard(Default::default()), Expr::Wildcard { qualifier: Some(qualifier), + options: _, } => SqlSelectItem::QualifiedWildcard( ObjectName(vec![Ident { value: qualifier.to_string(), @@ -41,6 +45,7 @@ mod tests { use crate::compile::select::ToSqlSelectItem; use crate::dialect::Dialect; use datafusion_common::DFSchema; + use datafusion_expr::expr::WildcardOptions; use datafusion_expr::{lit, Expr}; use std::ops::Add; use vegafusion_common::column::flat_col; @@ -51,7 +56,10 @@ mod tests { #[test] pub fn test_select_wildcard() { - let expr = Expr::Wildcard { qualifier: None }; + let expr = Expr::Wildcard { + qualifier: None, + options: WildcardOptions::default(), + }; let sql_expr = expr .to_sql_select(&Dialect::datafusion(), &schema()) .unwrap(); diff --git a/vegafusion-sql/src/connection/datafusion_py_datasource.rs b/vegafusion-sql/src/connection/datafusion_py_datasource.rs index 496bdbef..2db32aea 100644 --- a/vegafusion-sql/src/connection/datafusion_py_datasource.rs +++ b/vegafusion-sql/src/connection/datafusion_py_datasource.rs @@ -19,7 +19,7 @@ use vegafusion_common::data::table::VegaFusionTable; #[derive(Debug, Clone)] pub struct PyDatasource { - py_datasource: PyObject, + py_datasource: Arc, schema: SchemaRef, } @@ -29,7 +29,7 @@ impl PyDatasource { let table_schema_obj = py_datasource.call_method0(py, "schema")?; let schema = Arc::new(Schema::from_pyarrow_bound(table_schema_obj.bind(py))?); Ok(Self { - py_datasource, + py_datasource: Arc::new(py_datasource), schema, }) }) diff --git a/vegafusion-sql/src/dataframe/mod.rs b/vegafusion-sql/src/dataframe/mod.rs index 9a5519ef..e6b987b1 100644 --- a/vegafusion-sql/src/dataframe/mod.rs +++ b/vegafusion-sql/src/dataframe/mod.rs @@ -8,11 +8,12 @@ use arrow::record_batch::RecordBatch; use async_trait::async_trait; use datafusion_common::{Column, DFSchema, ScalarValue, TableReference}; use datafusion_expr::{ - expr, is_null, lit, when, BuiltInWindowFunction, Expr, ExprSchemable, WindowFrame, - WindowFunctionDefinition, + expr, is_null, lit, when, Expr, ExprSchemable, SortExpr, WindowFrame, WindowFunctionDefinition, }; use datafusion_functions::expr_fn::{abs, coalesce}; +use datafusion_functions_window::row_number::RowNumber; +use datafusion_expr::expr::WildcardOptions; use datafusion_functions_aggregate::min_max::{max, min}; use datafusion_functions_aggregate::sum::sum_udaf; use sqlparser::ast::{ @@ -101,7 +102,7 @@ impl DataFrame for SqlDataFrame { .and_then(pre_process_column_types) } - async fn sort(&self, exprs: Vec, limit: Option) -> Result> { + async fn sort(&self, exprs: Vec, limit: Option) -> Result> { fallback_operation!(self, sort, _sort, exprs, limit) } @@ -146,7 +147,7 @@ impl DataFrame for SqlDataFrame { async fn stack( &self, field: &str, - orderby: Vec, + orderby: Vec, groupby: &[String], start_field: &str, stop_field: &str, @@ -474,7 +475,7 @@ impl SqlDataFrame { .unwrap() } - async fn _sort(&self, exprs: Vec, limit: Option) -> Result> { + async fn _sort(&self, exprs: Vec, limit: Option) -> Result> { let mut query = self.make_select_star(); let sql_exprs = exprs .iter() @@ -589,7 +590,7 @@ impl SqlDataFrame { let inner_name = format!("{}_inner", self.parent_name()); let new_col_names = aggr_expr .iter() - .map(|col| Ok(col.display_name()?)) + .map(|col| Ok(col.schema_name().to_string())) .collect::>>()?; // Build csv str of input columns @@ -614,9 +615,9 @@ impl SqlDataFrame { } else { None }, - name: col.display_name()?, + name: col.schema_name().to_string(), }) - .alias(col.display_name()?); + .alias(col.schema_name().to_string()); Ok(col .to_sql_select(self.dialect(), &self.schema_df()?)? .to_string()) @@ -846,22 +847,20 @@ impl SqlDataFrame { // 2. field index let field_order_col = format!("{order_field}_field"); let order_col = Expr::WindowFunction(expr::WindowFunction { - fun: WindowFunctionDefinition::BuiltInWindowFunction( - BuiltInWindowFunction::RowNumber, - ), + fun: WindowFunctionDefinition::WindowUDF(Arc::new(RowNumber::new().into())), args: vec![], partition_by: vec![], order_by: vec![ - Expr::Sort(expr::Sort { - expr: Box::new(flat_col(order_field)), + expr::Sort { + expr: flat_col(order_field), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col(&field_order_col)), + }, + expr::Sort { + expr: flat_col(&field_order_col), asc: true, nulls_first: true, - }), + }, ], window_frame: WindowFrame::new(Some(true)), null_treatment: Some(NullTreatment::IgnoreNulls), @@ -894,7 +893,7 @@ impl SqlDataFrame { async fn _stack( &self, field: &str, - orderby: Vec, + orderby: Vec, groupby: &[String], start_field: &str, stop_field: &str, @@ -937,7 +936,13 @@ impl SqlDataFrame { // then union the results. This is required to make sure stacks do not overlap. Negative // values stack in the negative direction and positive values stack in the positive // direction. - let schema_exprs = vec![Expr::Wildcard { qualifier: None }, window_expr]; + let schema_exprs = vec![ + Expr::Wildcard { + qualifier: None, + options: WildcardOptions::default(), + }, + window_expr, + ]; let new_schema = make_new_schema_from_exprs( self.schema.as_ref(), schema_exprs.as_slice(), @@ -982,7 +987,10 @@ impl SqlDataFrame { let stack_col_name = "__stack"; let dataframe = self .select(vec![ - Expr::Wildcard { qualifier: None }, + Expr::Wildcard { + qualifier: None, + options: WildcardOptions::default(), + }, numeric_field.alias(stack_col_name), ]) .await?; @@ -1008,7 +1016,13 @@ impl SqlDataFrame { .to_string(); // Add __total column with total or total per partition - let schema_exprs = vec![Expr::Wildcard { qualifier: None }, total_agg]; + let schema_exprs = vec![ + Expr::Wildcard { + qualifier: None, + options: WildcardOptions::default(), + }, + total_agg, + ]; let new_schema = make_new_schema_from_exprs( &dataframe.schema(), schema_exprs.as_slice(), @@ -1033,7 +1047,7 @@ impl SqlDataFrame { dataframe.chain_query_str( &format!( - "SELECT * FROM {parent} INNER JOIN \ + "SELECT {parent}.*, __total FROM {parent} INNER JOIN \ (SELECT {partition_by_csv}, {total_agg_str} from {parent} GROUP BY {partition_by_csv}) as __inner \ USING ({partition_by_csv})", parent = dataframe.parent_name(), @@ -1059,7 +1073,13 @@ impl SqlDataFrame { // Perform selection to add new field value let dataframe = dataframe - .select(vec![Expr::Wildcard { qualifier: None }, window_expr]) + .select(vec![ + Expr::Wildcard { + qualifier: None, + options: WildcardOptions::default(), + }, + window_expr, + ]) .await?; // Build final_selection @@ -1083,7 +1103,13 @@ impl SqlDataFrame { .to_string(); // Compute new schema - let schema_exprs = vec![Expr::Wildcard { qualifier: None }, max_total]; + let schema_exprs = vec![ + Expr::Wildcard { + qualifier: None, + options: WildcardOptions::default(), + }, + max_total, + ]; let new_schema = make_new_schema_from_exprs( &dataframe.schema(), schema_exprs.as_slice(), @@ -1155,7 +1181,7 @@ impl SqlDataFrame { let schema = self.schema(); // Store the schema in a variable let (_, field_field) = schema .column_with_name(field) - .with_context(|| format!("No field named {}", field.to_string()))?; + .with_context(|| format!("No field named {}", field))?; let field_type = field_field.data_type(); if groupby.is_empty() { @@ -1170,7 +1196,7 @@ impl SqlDataFrame { Ok(if col_name == field { coalesce(vec![ flat_col(field), - lit(value.clone()).cast_to(&field_type, &self.schema_df()?)?, + lit(value.clone()).cast_to(field_type, &self.schema_df()?)?, ]) .alias(col_name) } else { @@ -1214,7 +1240,7 @@ impl SqlDataFrame { Ok(if col_name == field { coalesce(vec![ flat_col(field), - lit(value.clone()).cast_to(&field_type, &self.schema_df()?)?, + lit(value.clone()).cast_to(field_type, &self.schema_df()?)?, ]) .alias(col_name) } else { @@ -1232,7 +1258,7 @@ impl SqlDataFrame { let expr = if col_name == field { coalesce(vec![ flat_col(field), - lit(value.clone()).cast_to(&field_type, &self.schema_df()?)?, + lit(value.clone()).cast_to(field_type, &self.schema_df()?)?, ]) .alias(col_name) } else if col_name == key { @@ -1307,56 +1333,54 @@ impl SqlDataFrame { let order_by = if self.dialect().supports_null_ordering { vec![ // Sort first by the original row order, pushing imputed rows to the end - Expr::Sort(expr::Sort { - expr: Box::new(flat_col(order_field)), + expr::Sort { + expr: flat_col(order_field), asc: true, nulls_first: false, - }), + }, // Sort imputed rows by first row that resides group // then by first row that matches a key - Expr::Sort(expr::Sort { - expr: Box::new(flat_col(&format!("{order_field}_groups"))), + expr::Sort { + expr: flat_col(&format!("{order_field}_groups")), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col(&format!("{order_field}_key"))), + }, + expr::Sort { + expr: flat_col(&format!("{order_field}_key")), asc: true, nulls_first: true, - }), + }, ] } else { vec![ // Sort first by the original row order, pushing imputed rows to the end - Expr::Sort(expr::Sort { - expr: Box::new(is_null(flat_col(order_field))), + expr::Sort { + expr: is_null(flat_col(order_field)), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col(order_field)), + }, + expr::Sort { + expr: flat_col(order_field), asc: true, nulls_first: true, - }), + }, // Sort imputed rows by first row that resides group // then by first row that matches a key - Expr::Sort(expr::Sort { - expr: Box::new(flat_col(&format!("{order_field}_groups"))), + expr::Sort { + expr: flat_col(&format!("{order_field}_groups")), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col(&format!("{order_field}_key"))), + }, + expr::Sort { + expr: flat_col(&format!("{order_field}_key")), asc: true, nulls_first: true, - }), + }, ] }; let order_col = Expr::WindowFunction(expr::WindowFunction { - fun: WindowFunctionDefinition::BuiltInWindowFunction( - BuiltInWindowFunction::RowNumber, - ), + fun: WindowFunctionDefinition::WindowUDF(Arc::new(RowNumber::new().into())), args: vec![], partition_by: vec![], order_by, @@ -1420,7 +1444,7 @@ fn make_new_schema_from_exprs( // Add field for expression let schema_df = DFSchema::try_from(schema.clone())?; let dtype = expr.get_type(&schema_df)?; - let name = expr.display_name()?; + let name = expr.schema_name().to_string(); fields.push(Field::new(name, dtype, true)); } } diff --git a/vegafusion-sql/src/dialect/transforms/date_part_tz.rs b/vegafusion-sql/src/dialect/transforms/date_part_tz.rs index 59488a1b..a3f94628 100644 --- a/vegafusion-sql/src/dialect/transforms/date_part_tz.rs +++ b/vegafusion-sql/src/dialect/transforms/date_part_tz.rs @@ -4,7 +4,7 @@ use crate::dialect::{Dialect, FunctionTransformer}; use datafusion_common::DFSchema; use datafusion_expr::Expr; use sqlparser::ast::{ - DateTimeField as SqlDateTimeField, Expr as SqlExpr, Function as SqlFunction, + DateTimeField as SqlDateTimeField, Expr as SqlExpr, ExtractSyntax, Function as SqlFunction, FunctionArg as SqlFunctionArg, FunctionArgExpr as SqlFunctionArgExpr, FunctionArgumentList, FunctionArguments, Ident as SqlIdent, ObjectName as SqlObjectName, Value as SqlValue, }; @@ -146,6 +146,7 @@ impl FunctionTransformer for DatePartTzWithExtractAndAtTimezoneTransformer { let field = part_to_date_time_field(&part)?; Ok(SqlExpr::Extract { field, + syntax: ExtractSyntax::From, expr: Box::new(timestamp_in_tz), }) } @@ -328,6 +329,7 @@ impl FunctionTransformer for DatePartTzMySqlTransformer { let field = part_to_date_time_field(&part)?; Ok(SqlExpr::Extract { field, + syntax: ExtractSyntax::From, expr: Box::new(timestamp_in_tz), }) } diff --git a/vegafusion-sql/src/dialect/transforms/utc_timestamp_to_epoch_ms.rs b/vegafusion-sql/src/dialect/transforms/utc_timestamp_to_epoch_ms.rs index 98b4614f..dab8257c 100644 --- a/vegafusion-sql/src/dialect/transforms/utc_timestamp_to_epoch_ms.rs +++ b/vegafusion-sql/src/dialect/transforms/utc_timestamp_to_epoch_ms.rs @@ -4,8 +4,9 @@ use datafusion_common::DFSchema; use datafusion_expr::Expr; use sqlparser::ast::{ BinaryOperator as SqlBinaryOperator, DateTimeField as SqlDateTimeField, Expr as SqlExpr, - Function as SqlFunction, FunctionArg as SqlFunctionArg, FunctionArgExpr as SqlFunctionArgExpr, - FunctionArgumentList, FunctionArguments, Ident, ObjectName as SqlObjectName, Value as SqlValue, + ExtractSyntax, Function as SqlFunction, FunctionArg as SqlFunctionArg, + FunctionArgExpr as SqlFunctionArgExpr, FunctionArgumentList, FunctionArguments, Ident, + ObjectName as SqlObjectName, Value as SqlValue, }; use std::sync::Arc; use vegafusion_common::error::{Result, VegaFusionError}; @@ -194,6 +195,7 @@ impl FunctionTransformer for UtcTimestampToEpochMsPostgresTransform { let extract_expr = SqlExpr::Extract { field: SqlDateTimeField::Epoch, + syntax: ExtractSyntax::From, expr: Box::new(ts_expr), }; diff --git a/vegafusion-sql/tests/expected/fold.toml b/vegafusion-sql/tests/expected/fold.toml index f3e5e791..a4044e99 100644 --- a/vegafusion-sql/tests/expected/fold.toml +++ b/vegafusion-sql/tests/expected/fold.toml @@ -74,75 +74,34 @@ result = ''' [ordered_fold] athena = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 'USA', 10, 20), (2, 'Canada', 7, 26)) AS "_values" ("_order", "country", "gold", "silver")), \ -values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), \ -values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) \ -SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 'USA', 10, 20), (2, 'Canada', 7, 26)) AS "_values" ("_order", "country", "gold", "silver")), values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST """ bigquery = """ -WITH \ -values0 AS (SELECT 1 AS `_order`, 'USA' AS `country`, 10 AS `gold`, 20 AS `silver` UNION ALL SELECT 2 AS `_order`, 'Canada' AS `country`, 7 AS `gold`, 26 AS `silver`), \ -values1 AS (SELECT `_order`, `country`, `gold`, `silver`, `key`, `value`, `_order_field` FROM (SELECT `_order`, `country`, `gold`, `silver`, 'gold' AS `key`, `gold` AS `value`, 0 AS `_order_field` FROM values0 UNION ALL SELECT `_order`, `country`, `gold`, `silver`, 'silver' AS `key`, `silver` AS `value`, 1 AS `_order_field` FROM values0 UNION ALL SELECT `_order`, `country`, `gold`, `silver`, 'bogus' AS `key`, NULL AS `value`, 2 AS `_order_field` FROM values0) AS _union), \ -values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC NULLS FIRST, `_order_field` ASC NULLS FIRST) AS `_order`, `country`, `gold`, `silver`, `key`, `value` FROM values1) \ -SELECT * FROM values2 ORDER BY `_order` ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS `_order`, 'USA' AS `country`, 10 AS `gold`, 20 AS `silver` UNION ALL SELECT 2 AS `_order`, 'Canada' AS `country`, 7 AS `gold`, 26 AS `silver`), values1 AS (SELECT `_order`, `country`, `gold`, `silver`, `key`, `value`, `_order_field` FROM (SELECT `_order`, `country`, `gold`, `silver`, 'gold' AS `key`, `gold` AS `value`, 0 AS `_order_field` FROM values0 UNION ALL SELECT `_order`, `country`, `gold`, `silver`, 'silver' AS `key`, `silver` AS `value`, 1 AS `_order_field` FROM values0 UNION ALL SELECT `_order`, `country`, `gold`, `silver`, 'bogus' AS `key`, NULL AS `value`, 2 AS `_order_field` FROM values0) AS _union), values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC NULLS FIRST, `_order_field` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_order`, `country`, `gold`, `silver`, `key`, `value` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC NULLS FIRST """ clickhouse = """ -WITH \ -values0 AS (SELECT 1 AS "_order", 'USA' AS "country", 10 AS "gold", 20 AS "silver" UNION ALL SELECT 2 AS "_order", 'Canada' AS "country", 7 AS "gold", 26 AS "silver"), \ -values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), \ -values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) \ -SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS "_order", 'USA' AS "country", 10 AS "gold", 20 AS "silver" UNION ALL SELECT 2 AS "_order", 'Canada' AS "country", 7 AS "gold", 26 AS "silver"), values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST """ databricks = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 'USA', 10, 20), (2, 'Canada', 7, 26)) AS `_values` (`_order`, `country`, `gold`, `silver`)), \ -values1 AS (SELECT `_order`, `country`, `gold`, `silver`, `key`, `value`, `_order_field` FROM (SELECT `_order`, `country`, `gold`, `silver`, 'gold' AS `key`, `gold` AS `value`, 0 AS `_order_field` FROM values0 UNION ALL SELECT `_order`, `country`, `gold`, `silver`, 'silver' AS `key`, `silver` AS `value`, 1 AS `_order_field` FROM values0 UNION ALL SELECT `_order`, `country`, `gold`, `silver`, 'bogus' AS `key`, NULL AS `value`, 2 AS `_order_field` FROM values0) AS _union), \ -values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC NULLS FIRST, `_order_field` ASC NULLS FIRST) AS `_order`, `country`, `gold`, `silver`, `key`, `value` FROM values1) \ -SELECT * FROM values2 ORDER BY `_order` ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 'USA', 10, 20), (2, 'Canada', 7, 26)) AS `_values` (`_order`, `country`, `gold`, `silver`)), values1 AS (SELECT `_order`, `country`, `gold`, `silver`, `key`, `value`, `_order_field` FROM (SELECT `_order`, `country`, `gold`, `silver`, 'gold' AS `key`, `gold` AS `value`, 0 AS `_order_field` FROM values0 UNION ALL SELECT `_order`, `country`, `gold`, `silver`, 'silver' AS `key`, `silver` AS `value`, 1 AS `_order_field` FROM values0 UNION ALL SELECT `_order`, `country`, `gold`, `silver`, 'bogus' AS `key`, NULL AS `value`, 2 AS `_order_field` FROM values0) AS _union), values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC NULLS FIRST, `_order_field` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_order`, `country`, `gold`, `silver`, `key`, `value` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC NULLS FIRST """ datafusion = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 'USA', 10, 20), (2, 'Canada', 7, 26)) AS "_values" ("_order", "country", "gold", "silver")), \ -values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), \ -values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) \ -SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 'USA', 10, 20), (2, 'Canada', 7, 26)) AS "_values" ("_order", "country", "gold", "silver")), values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST """ duckdb = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 'USA', 10, 20), (2, 'Canada', 7, 26)) AS "_values" ("_order", "country", "gold", "silver")), \ -values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), \ -values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) \ -SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 'USA', 10, 20), (2, 'Canada', 7, 26)) AS "_values" ("_order", "country", "gold", "silver")), values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST """ mysql = """ -WITH \ -values0 AS (SELECT * FROM (VALUES ROW(1, 'USA', 10, 20), ROW(2, 'Canada', 7, 26)) AS `_values` (`_order`, `country`, `gold`, `silver`)), \ -values1 AS (SELECT `_order`, `country`, `gold`, `silver`, `key`, `value`, `_order_field` FROM (SELECT `_order`, `country`, `gold`, `silver`, 'gold' AS `key`, `gold` AS `value`, 0 AS `_order_field` FROM values0 UNION ALL SELECT `_order`, `country`, `gold`, `silver`, 'silver' AS `key`, `silver` AS `value`, 1 AS `_order_field` FROM values0 UNION ALL SELECT `_order`, `country`, `gold`, `silver`, 'bogus' AS `key`, NULL AS `value`, 2 AS `_order_field` FROM values0) AS _union), \ -values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC, `_order_field` ASC) AS `_order`, `country`, `gold`, `silver`, `key`, `value` FROM values1) \ -SELECT * FROM values2 ORDER BY `_order` ASC - +WITH values0 AS (SELECT * FROM (VALUES ROW(1, 'USA', 10, 20), ROW(2, 'Canada', 7, 26)) AS `_values` (`_order`, `country`, `gold`, `silver`)), values1 AS (SELECT `_order`, `country`, `gold`, `silver`, `key`, `value`, `_order_field` FROM (SELECT `_order`, `country`, `gold`, `silver`, 'gold' AS `key`, `gold` AS `value`, 0 AS `_order_field` FROM values0 UNION ALL SELECT `_order`, `country`, `gold`, `silver`, 'silver' AS `key`, `silver` AS `value`, 1 AS `_order_field` FROM values0 UNION ALL SELECT `_order`, `country`, `gold`, `silver`, 'bogus' AS `key`, NULL AS `value`, 2 AS `_order_field` FROM values0) AS _union), values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC, `_order_field` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_order`, `country`, `gold`, `silver`, `key`, `value` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC """ postgres = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 'USA', 10, 20), (2, 'Canada', 7, 26)) AS "_values" ("_order", "country", "gold", "silver")), \ -values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), \ -values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) \ -SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 'USA', 10, 20), (2, 'Canada', 7, 26)) AS "_values" ("_order", "country", "gold", "silver")), values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST """ redshift = """ -WITH \ -values0 AS (SELECT 1 AS "_order", 'USA' AS "country", 10 AS "gold", 20 AS "silver" UNION ALL SELECT 2 AS "_order", 'Canada' AS "country", 7 AS "gold", 26 AS "silver"), \ -values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), \ -values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) \ -SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS "_order", 'USA' AS "country", 10 AS "gold", 20 AS "silver" UNION ALL SELECT 2 AS "_order", 'Canada' AS "country", 7 AS "gold", 26 AS "silver"), values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST """ snowflake = """ -WITH \ -values0 AS (SELECT "COLUMN1" AS "_order", "COLUMN2" AS "country", "COLUMN3" AS "gold", "COLUMN4" AS "silver" FROM (VALUES (1, 'USA', 10, 20), (2, 'Canada', 7, 26))), \ -values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), \ -values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) \ -SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT "COLUMN1" AS "_order", "COLUMN2" AS "country", "COLUMN3" AS "gold", "COLUMN4" AS "silver" FROM (VALUES (1, 'USA', 10, 20), (2, 'Canada', 7, 26))), values1 AS (SELECT "_order", "country", "gold", "silver", "key", "value", "_order_field" FROM (SELECT "_order", "country", "gold", "silver", 'gold' AS "key", "gold" AS "value", 0 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'silver' AS "key", "silver" AS "value", 1 AS "_order_field" FROM values0 UNION ALL SELECT "_order", "country", "gold", "silver", 'bogus' AS "key", NULL AS "value", 2 AS "_order_field" FROM values0) AS _union), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS FIRST, "_order_field" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "country", "gold", "silver", "key", "value" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST """ result = ''' +--------+---------+------+--------+--------+-------+ @@ -155,4 +114,4 @@ result = ''' | 5 | Canada | 7 | 26 | silver | 26 | | 6 | Canada | 7 | 26 | bogus | | +--------+---------+------+--------+--------+-------+ -''' +''' \ No newline at end of file diff --git a/vegafusion-sql/tests/expected/impute.toml b/vegafusion-sql/tests/expected/impute.toml index 3fe5b7de..d53c3fd9 100644 --- a/vegafusion-sql/tests/expected/impute.toml +++ b/vegafusion-sql/tests/expected/impute.toml @@ -198,34 +198,44 @@ result = ''' [ordered_one_group] athena = """ -WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ bigquery = """ -WITH values0 AS (SELECT 1 AS `_order`, 0 AS `a`, 28 AS `b`, 0 AS `c`, -1 AS `d` UNION ALL SELECT 2 AS `_order`, 0 AS `a`, 91 AS `b`, 1 AS `c`, -1 AS `d` UNION ALL SELECT 3 AS `_order`, 1 AS `a`, 43 AS `b`, 0 AS `c`, -2 AS `d` UNION ALL SELECT 4 AS `_order`, NULL AS `a`, 55 AS `b`, 1 AS `c`, -2 AS `d` UNION ALL SELECT 5 AS `_order`, 3 AS `a`, 19 AS `b`, 0 AS `c`, -3 AS `d` UNION ALL SELECT 6 AS `_order`, 2 AS `a`, 81 AS `b`, 0 AS `c`, -3 AS `d` UNION ALL SELECT 7 AS `_order`, 2 AS `a`, 53 AS `b`, 1 AS `c`, -4 AS `d`), values1 AS (SELECT `_order`, `a`, coalesce(`b`, CAST(-1 AS INT)) AS `b`, `c`, `d`, `_order_key`, `_order_groups` FROM (SELECT `a`, min(`_order`) AS `_order_key` FROM values0 WHERE `a` IS NOT NULL GROUP BY `a`) AS _key CROSS JOIN (SELECT `c`, min(`_order`) AS `_order_groups` FROM values0 GROUP BY `c`) AS _groups LEFT JOIN values0 USING(`a`, `c`)), values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC NULLS LAST, `_order_groups` ASC NULLS FIRST, `_order_key` ASC NULLS FIRST) AS `_order`, `a`, `b`, `c`, `d` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS `_order`, 0 AS `a`, 28 AS `b`, 0 AS `c`, -1 AS `d` UNION ALL SELECT 2 AS `_order`, 0 AS `a`, 91 AS `b`, 1 AS `c`, -1 AS `d` UNION ALL SELECT 3 AS `_order`, 1 AS `a`, 43 AS `b`, 0 AS `c`, -2 AS `d` UNION ALL SELECT 4 AS `_order`, NULL AS `a`, 55 AS `b`, 1 AS `c`, -2 AS `d` UNION ALL SELECT 5 AS `_order`, 3 AS `a`, 19 AS `b`, 0 AS `c`, -3 AS `d` UNION ALL SELECT 6 AS `_order`, 2 AS `a`, 81 AS `b`, 0 AS `c`, -3 AS `d` UNION ALL SELECT 7 AS `_order`, 2 AS `a`, 53 AS `b`, 1 AS `c`, -4 AS `d`), values1 AS (SELECT `_order`, `a`, coalesce(`b`, CAST(-1 AS INT)) AS `b`, `c`, `d`, `_order_key`, `_order_groups` FROM (SELECT `a`, min(`_order`) AS `_order_key` FROM values0 WHERE `a` IS NOT NULL GROUP BY `a`) AS _key CROSS JOIN (SELECT `c`, min(`_order`) AS `_order_groups` FROM values0 GROUP BY `c`) AS _groups LEFT JOIN values0 USING(`a`, `c`)), values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC NULLS LAST, `_order_groups` ASC NULLS FIRST, `_order_key` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_order`, `a`, `b`, `c`, `d` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC NULLS FIRST + """ clickhouse = """ -WITH values0 AS (SELECT 1 AS "_order", 0 AS "a", 28 AS "b", 0 AS "c", -1 AS "d" UNION ALL SELECT 2 AS "_order", 0 AS "a", 91 AS "b", 1 AS "c", -1 AS "d" UNION ALL SELECT 3 AS "_order", 1 AS "a", 43 AS "b", 0 AS "c", -2 AS "d" UNION ALL SELECT 4 AS "_order", NULL AS "a", 55 AS "b", 1 AS "c", -2 AS "d" UNION ALL SELECT 5 AS "_order", 3 AS "a", 19 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 6 AS "_order", 2 AS "a", 81 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 7 AS "_order", 2 AS "a", 53 AS "b", 1 AS "c", -4 AS "d"), values1 AS (SELECT "_order", "_key"."a" AS "a", coalesce("b", CASE WHEN -1 IS NOT NULL THEN CAST(-1 AS BIGINT) ELSE NULL END) AS "b", "_groups"."c" AS "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS "_order", 0 AS "a", 28 AS "b", 0 AS "c", -1 AS "d" UNION ALL SELECT 2 AS "_order", 0 AS "a", 91 AS "b", 1 AS "c", -1 AS "d" UNION ALL SELECT 3 AS "_order", 1 AS "a", 43 AS "b", 0 AS "c", -2 AS "d" UNION ALL SELECT 4 AS "_order", NULL AS "a", 55 AS "b", 1 AS "c", -2 AS "d" UNION ALL SELECT 5 AS "_order", 3 AS "a", 19 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 6 AS "_order", 2 AS "a", 81 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 7 AS "_order", 2 AS "a", 53 AS "b", 1 AS "c", -4 AS "d"), values1 AS (SELECT "_order", "_key"."a" AS "a", coalesce("b", CASE WHEN -1 IS NOT NULL THEN CAST(-1 AS BIGINT) ELSE NULL END) AS "b", "_groups"."c" AS "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ databricks = """ -WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS `_values` (`_order`, `a`, `b`, `c`, `d`)), values1 AS (SELECT `_order`, `a`, coalesce(`b`, CAST(-1 AS BIGINT)) AS `b`, `c`, `d`, `_order_key`, `_order_groups` FROM (SELECT `a`, min(`_order`) AS `_order_key` FROM values0 WHERE `a` IS NOT NULL GROUP BY `a`) AS _key CROSS JOIN (SELECT `c`, min(`_order`) AS `_order_groups` FROM values0 GROUP BY `c`) AS _groups LEFT JOIN values0 USING(`a`, `c`)), values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC NULLS LAST, `_order_groups` ASC NULLS FIRST, `_order_key` ASC NULLS FIRST) AS `_order`, `a`, `b`, `c`, `d` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS `_values` (`_order`, `a`, `b`, `c`, `d`)), values1 AS (SELECT `_order`, `a`, coalesce(`b`, CAST(-1 AS BIGINT)) AS `b`, `c`, `d`, `_order_key`, `_order_groups` FROM (SELECT `a`, min(`_order`) AS `_order_key` FROM values0 WHERE `a` IS NOT NULL GROUP BY `a`) AS _key CROSS JOIN (SELECT `c`, min(`_order`) AS `_order_groups` FROM values0 GROUP BY `c`) AS _groups LEFT JOIN values0 USING(`a`, `c`)), values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC NULLS LAST, `_order_groups` ASC NULLS FIRST, `_order_key` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_order`, `a`, `b`, `c`, `d` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC NULLS FIRST + """ datafusion = """ WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ duckdb = """ -WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ mysql = """ -WITH values0 AS (SELECT * FROM (VALUES ROW(1, 0, 28, 0, -1), ROW(2, 0, 91, 1, -1), ROW(3, 1, 43, 0, -2), ROW(4, NULL, 55, 1, -2), ROW(5, 3, 19, 0, -3), ROW(6, 2, 81, 0, -3), ROW(7, 2, 53, 1, -4)) AS `_values` (`_order`, `a`, `b`, `c`, `d`)), values1 AS (SELECT `_order`, `a`, coalesce(`b`, CAST(-1 AS SIGNED)) AS `b`, `c`, `d`, `_order_key`, `_order_groups` FROM (SELECT `a`, min(`_order`) AS `_order_key` FROM values0 WHERE `a` IS NOT NULL GROUP BY `a`) AS _key CROSS JOIN (SELECT `c`, min(`_order`) AS `_order_groups` FROM values0 GROUP BY `c`) AS _groups LEFT JOIN values0 USING(`a`, `c`)), values2 AS (SELECT row_number() OVER (ORDER BY `_order` IS NULL ASC, `_order` ASC, `_order_groups` ASC, `_order_key` ASC) AS `_order`, `a`, `b`, `c`, `d` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC +WITH values0 AS (SELECT * FROM (VALUES ROW(1, 0, 28, 0, -1), ROW(2, 0, 91, 1, -1), ROW(3, 1, 43, 0, -2), ROW(4, NULL, 55, 1, -2), ROW(5, 3, 19, 0, -3), ROW(6, 2, 81, 0, -3), ROW(7, 2, 53, 1, -4)) AS `_values` (`_order`, `a`, `b`, `c`, `d`)), values1 AS (SELECT `_order`, `a`, coalesce(`b`, CAST(-1 AS SIGNED)) AS `b`, `c`, `d`, `_order_key`, `_order_groups` FROM (SELECT `a`, min(`_order`) AS `_order_key` FROM values0 WHERE `a` IS NOT NULL GROUP BY `a`) AS _key CROSS JOIN (SELECT `c`, min(`_order`) AS `_order_groups` FROM values0 GROUP BY `c`) AS _groups LEFT JOIN values0 USING(`a`, `c`)), values2 AS (SELECT row_number() OVER (ORDER BY `_order` IS NULL ASC, `_order` ASC, `_order_groups` ASC, `_order_key` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_order`, `a`, `b`, `c`, `d` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC + """ postgres = """ -WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ redshift = """ -WITH values0 AS (SELECT 1 AS "_order", 0 AS "a", 28 AS "b", 0 AS "c", -1 AS "d" UNION ALL SELECT 2 AS "_order", 0 AS "a", 91 AS "b", 1 AS "c", -1 AS "d" UNION ALL SELECT 3 AS "_order", 1 AS "a", 43 AS "b", 0 AS "c", -2 AS "d" UNION ALL SELECT 4 AS "_order", NULL AS "a", 55 AS "b", 1 AS "c", -2 AS "d" UNION ALL SELECT 5 AS "_order", 3 AS "a", 19 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 6 AS "_order", 2 AS "a", 81 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 7 AS "_order", 2 AS "a", 53 AS "b", 1 AS "c", -4 AS "d"), values1 AS (SELECT "_order", "a", coalesce("b", CASE WHEN -1 IS NOT NULL THEN CAST(-1 AS BIGINT) ELSE NULL END) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS "_order", 0 AS "a", 28 AS "b", 0 AS "c", -1 AS "d" UNION ALL SELECT 2 AS "_order", 0 AS "a", 91 AS "b", 1 AS "c", -1 AS "d" UNION ALL SELECT 3 AS "_order", 1 AS "a", 43 AS "b", 0 AS "c", -2 AS "d" UNION ALL SELECT 4 AS "_order", NULL AS "a", 55 AS "b", 1 AS "c", -2 AS "d" UNION ALL SELECT 5 AS "_order", 3 AS "a", 19 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 6 AS "_order", 2 AS "a", 81 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 7 AS "_order", 2 AS "a", 53 AS "b", 1 AS "c", -4 AS "d"), values1 AS (SELECT "_order", "a", coalesce("b", CASE WHEN -1 IS NOT NULL THEN CAST(-1 AS BIGINT) ELSE NULL END) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ snowflake = """ -WITH values0 AS (SELECT "COLUMN1" AS "_order", "COLUMN2" AS "a", "COLUMN3" AS "b", "COLUMN4" AS "c", "COLUMN5" AS "d" FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4))), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT "COLUMN1" AS "_order", "COLUMN2" AS "a", "COLUMN3" AS "b", "COLUMN4" AS "c", "COLUMN5" AS "d" FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4))), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", min("_order") AS "_order_groups" FROM values0 GROUP BY "c") AS _groups LEFT JOIN values0 USING("a", "c")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ result = ''' +--------+---+----+---+----+ @@ -244,34 +254,43 @@ result = ''' [ordered_two_groups] athena = """ -WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ bigquery = """ -WITH values0 AS (SELECT 1 AS `_order`, 0 AS `a`, 28 AS `b`, 0 AS `c`, -1 AS `d` UNION ALL SELECT 2 AS `_order`, 0 AS `a`, 91 AS `b`, 1 AS `c`, -1 AS `d` UNION ALL SELECT 3 AS `_order`, 1 AS `a`, 43 AS `b`, 0 AS `c`, -2 AS `d` UNION ALL SELECT 4 AS `_order`, NULL AS `a`, 55 AS `b`, 1 AS `c`, -2 AS `d` UNION ALL SELECT 5 AS `_order`, 3 AS `a`, 19 AS `b`, 0 AS `c`, -3 AS `d` UNION ALL SELECT 6 AS `_order`, 2 AS `a`, 81 AS `b`, 0 AS `c`, -3 AS `d` UNION ALL SELECT 7 AS `_order`, 2 AS `a`, 53 AS `b`, 1 AS `c`, -4 AS `d`), values1 AS (SELECT `_order`, `a`, coalesce(`b`, CAST(-1 AS INT)) AS `b`, `c`, `d`, `_order_key`, `_order_groups` FROM (SELECT `a`, min(`_order`) AS `_order_key` FROM values0 WHERE `a` IS NOT NULL GROUP BY `a`) AS _key CROSS JOIN (SELECT `c`, `d`, min(`_order`) AS `_order_groups` FROM values0 GROUP BY `c`, `d`) AS _groups LEFT JOIN values0 USING(`a`, `c`, `d`)), values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC NULLS LAST, `_order_groups` ASC NULLS FIRST, `_order_key` ASC NULLS FIRST) AS `_order`, `a`, `b`, `c`, `d` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS `_order`, 0 AS `a`, 28 AS `b`, 0 AS `c`, -1 AS `d` UNION ALL SELECT 2 AS `_order`, 0 AS `a`, 91 AS `b`, 1 AS `c`, -1 AS `d` UNION ALL SELECT 3 AS `_order`, 1 AS `a`, 43 AS `b`, 0 AS `c`, -2 AS `d` UNION ALL SELECT 4 AS `_order`, NULL AS `a`, 55 AS `b`, 1 AS `c`, -2 AS `d` UNION ALL SELECT 5 AS `_order`, 3 AS `a`, 19 AS `b`, 0 AS `c`, -3 AS `d` UNION ALL SELECT 6 AS `_order`, 2 AS `a`, 81 AS `b`, 0 AS `c`, -3 AS `d` UNION ALL SELECT 7 AS `_order`, 2 AS `a`, 53 AS `b`, 1 AS `c`, -4 AS `d`), values1 AS (SELECT `_order`, `a`, coalesce(`b`, CAST(-1 AS INT)) AS `b`, `c`, `d`, `_order_key`, `_order_groups` FROM (SELECT `a`, min(`_order`) AS `_order_key` FROM values0 WHERE `a` IS NOT NULL GROUP BY `a`) AS _key CROSS JOIN (SELECT `c`, `d`, min(`_order`) AS `_order_groups` FROM values0 GROUP BY `c`, `d`) AS _groups LEFT JOIN values0 USING(`a`, `c`, `d`)), values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC NULLS LAST, `_order_groups` ASC NULLS FIRST, `_order_key` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_order`, `a`, `b`, `c`, `d` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC NULLS FIRST + """ clickhouse = """ -WITH values0 AS (SELECT 1 AS "_order", 0 AS "a", 28 AS "b", 0 AS "c", -1 AS "d" UNION ALL SELECT 2 AS "_order", 0 AS "a", 91 AS "b", 1 AS "c", -1 AS "d" UNION ALL SELECT 3 AS "_order", 1 AS "a", 43 AS "b", 0 AS "c", -2 AS "d" UNION ALL SELECT 4 AS "_order", NULL AS "a", 55 AS "b", 1 AS "c", -2 AS "d" UNION ALL SELECT 5 AS "_order", 3 AS "a", 19 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 6 AS "_order", 2 AS "a", 81 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 7 AS "_order", 2 AS "a", 53 AS "b", 1 AS "c", -4 AS "d"), values1 AS (SELECT "_order", "_key"."a" AS "a", coalesce("b", CASE WHEN -1 IS NOT NULL THEN CAST(-1 AS BIGINT) ELSE NULL END) AS "b", "_groups"."c" AS "c", "_groups"."d" AS "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS "_order", 0 AS "a", 28 AS "b", 0 AS "c", -1 AS "d" UNION ALL SELECT 2 AS "_order", 0 AS "a", 91 AS "b", 1 AS "c", -1 AS "d" UNION ALL SELECT 3 AS "_order", 1 AS "a", 43 AS "b", 0 AS "c", -2 AS "d" UNION ALL SELECT 4 AS "_order", NULL AS "a", 55 AS "b", 1 AS "c", -2 AS "d" UNION ALL SELECT 5 AS "_order", 3 AS "a", 19 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 6 AS "_order", 2 AS "a", 81 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 7 AS "_order", 2 AS "a", 53 AS "b", 1 AS "c", -4 AS "d"), values1 AS (SELECT "_order", "_key"."a" AS "a", coalesce("b", CASE WHEN -1 IS NOT NULL THEN CAST(-1 AS BIGINT) ELSE NULL END) AS "b", "_groups"."c" AS "c", "_groups"."d" AS "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ databricks = """ -WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS `_values` (`_order`, `a`, `b`, `c`, `d`)), values1 AS (SELECT `_order`, `a`, coalesce(`b`, CAST(-1 AS BIGINT)) AS `b`, `c`, `d`, `_order_key`, `_order_groups` FROM (SELECT `a`, min(`_order`) AS `_order_key` FROM values0 WHERE `a` IS NOT NULL GROUP BY `a`) AS _key CROSS JOIN (SELECT `c`, `d`, min(`_order`) AS `_order_groups` FROM values0 GROUP BY `c`, `d`) AS _groups LEFT JOIN values0 USING(`a`, `c`, `d`)), values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC NULLS LAST, `_order_groups` ASC NULLS FIRST, `_order_key` ASC NULLS FIRST) AS `_order`, `a`, `b`, `c`, `d` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS `_values` (`_order`, `a`, `b`, `c`, `d`)), values1 AS (SELECT `_order`, `a`, coalesce(`b`, CAST(-1 AS BIGINT)) AS `b`, `c`, `d`, `_order_key`, `_order_groups` FROM (SELECT `a`, min(`_order`) AS `_order_key` FROM values0 WHERE `a` IS NOT NULL GROUP BY `a`) AS _key CROSS JOIN (SELECT `c`, `d`, min(`_order`) AS `_order_groups` FROM values0 GROUP BY `c`, `d`) AS _groups LEFT JOIN values0 USING(`a`, `c`, `d`)), values2 AS (SELECT row_number() OVER (ORDER BY `_order` ASC NULLS LAST, `_order_groups` ASC NULLS FIRST, `_order_key` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_order`, `a`, `b`, `c`, `d` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC NULLS FIRST + """ datafusion = """ WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ duckdb = """ -WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ mysql = """ -WITH values0 AS (SELECT * FROM (VALUES ROW(1, 0, 28, 0, -1), ROW(2, 0, 91, 1, -1), ROW(3, 1, 43, 0, -2), ROW(4, NULL, 55, 1, -2), ROW(5, 3, 19, 0, -3), ROW(6, 2, 81, 0, -3), ROW(7, 2, 53, 1, -4)) AS `_values` (`_order`, `a`, `b`, `c`, `d`)), values1 AS (SELECT `_order`, `a`, coalesce(`b`, CAST(-1 AS SIGNED)) AS `b`, `c`, `d`, `_order_key`, `_order_groups` FROM (SELECT `a`, min(`_order`) AS `_order_key` FROM values0 WHERE `a` IS NOT NULL GROUP BY `a`) AS _key CROSS JOIN (SELECT `c`, `d`, min(`_order`) AS `_order_groups` FROM values0 GROUP BY `c`, `d`) AS _groups LEFT JOIN values0 USING(`a`, `c`, `d`)), values2 AS (SELECT row_number() OVER (ORDER BY `_order` IS NULL ASC, `_order` ASC, `_order_groups` ASC, `_order_key` ASC) AS `_order`, `a`, `b`, `c`, `d` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC +WITH values0 AS (SELECT * FROM (VALUES ROW(1, 0, 28, 0, -1), ROW(2, 0, 91, 1, -1), ROW(3, 1, 43, 0, -2), ROW(4, NULL, 55, 1, -2), ROW(5, 3, 19, 0, -3), ROW(6, 2, 81, 0, -3), ROW(7, 2, 53, 1, -4)) AS `_values` (`_order`, `a`, `b`, `c`, `d`)), values1 AS (SELECT `_order`, `a`, coalesce(`b`, CAST(-1 AS SIGNED)) AS `b`, `c`, `d`, `_order_key`, `_order_groups` FROM (SELECT `a`, min(`_order`) AS `_order_key` FROM values0 WHERE `a` IS NOT NULL GROUP BY `a`) AS _key CROSS JOIN (SELECT `c`, `d`, min(`_order`) AS `_order_groups` FROM values0 GROUP BY `c`, `d`) AS _groups LEFT JOIN values0 USING(`a`, `c`, `d`)), values2 AS (SELECT row_number() OVER (ORDER BY `_order` IS NULL ASC, `_order` ASC, `_order_groups` ASC, `_order_key` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_order`, `a`, `b`, `c`, `d` FROM values1) SELECT * FROM values2 ORDER BY `_order` ASC """ postgres = """ -WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4)) AS "_values" ("_order", "a", "b", "c", "d")), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ redshift = """ -WITH values0 AS (SELECT 1 AS "_order", 0 AS "a", 28 AS "b", 0 AS "c", -1 AS "d" UNION ALL SELECT 2 AS "_order", 0 AS "a", 91 AS "b", 1 AS "c", -1 AS "d" UNION ALL SELECT 3 AS "_order", 1 AS "a", 43 AS "b", 0 AS "c", -2 AS "d" UNION ALL SELECT 4 AS "_order", NULL AS "a", 55 AS "b", 1 AS "c", -2 AS "d" UNION ALL SELECT 5 AS "_order", 3 AS "a", 19 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 6 AS "_order", 2 AS "a", 81 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 7 AS "_order", 2 AS "a", 53 AS "b", 1 AS "c", -4 AS "d"), values1 AS (SELECT "_order", "a", coalesce("b", CASE WHEN -1 IS NOT NULL THEN CAST(-1 AS BIGINT) ELSE NULL END) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS "_order", 0 AS "a", 28 AS "b", 0 AS "c", -1 AS "d" UNION ALL SELECT 2 AS "_order", 0 AS "a", 91 AS "b", 1 AS "c", -1 AS "d" UNION ALL SELECT 3 AS "_order", 1 AS "a", 43 AS "b", 0 AS "c", -2 AS "d" UNION ALL SELECT 4 AS "_order", NULL AS "a", 55 AS "b", 1 AS "c", -2 AS "d" UNION ALL SELECT 5 AS "_order", 3 AS "a", 19 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 6 AS "_order", 2 AS "a", 81 AS "b", 0 AS "c", -3 AS "d" UNION ALL SELECT 7 AS "_order", 2 AS "a", 53 AS "b", 1 AS "c", -4 AS "d"), values1 AS (SELECT "_order", "a", coalesce("b", CASE WHEN -1 IS NOT NULL THEN CAST(-1 AS BIGINT) ELSE NULL END) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ snowflake = """ -WITH values0 AS (SELECT "COLUMN1" AS "_order", "COLUMN2" AS "a", "COLUMN3" AS "b", "COLUMN4" AS "c", "COLUMN5" AS "d" FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4))), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST +WITH values0 AS (SELECT "COLUMN1" AS "_order", "COLUMN2" AS "a", "COLUMN3" AS "b", "COLUMN4" AS "c", "COLUMN5" AS "d" FROM (VALUES (1, 0, 28, 0, -1), (2, 0, 91, 1, -1), (3, 1, 43, 0, -2), (4, NULL, 55, 1, -2), (5, 3, 19, 0, -3), (6, 2, 81, 0, -3), (7, 2, 53, 1, -4))), values1 AS (SELECT "_order", "a", coalesce("b", CAST(-1 AS BIGINT)) AS "b", "c", "d", "_order_key", "_order_groups" FROM (SELECT "a", min("_order") AS "_order_key" FROM values0 WHERE "a" IS NOT NULL GROUP BY "a") AS _key CROSS JOIN (SELECT "c", "d", min("_order") AS "_order_groups" FROM values0 GROUP BY "c", "d") AS _groups LEFT JOIN values0 USING("a", "c", "d")), values2 AS (SELECT row_number() OVER (ORDER BY "_order" ASC NULLS LAST, "_order_groups" ASC NULLS FIRST, "_order_key" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_order", "a", "b", "c", "d" FROM values1) SELECT * FROM values2 ORDER BY "_order" ASC NULLS FIRST + """ result = ''' +--------+---+----+---+----+ diff --git a/vegafusion-sql/tests/expected/select_window.toml b/vegafusion-sql/tests/expected/select_window.toml index 62027c58..38811e91 100644 --- a/vegafusion-sql/tests/expected/select_window.toml +++ b/vegafusion-sql/tests/expected/select_window.toml @@ -205,55 +205,34 @@ result = ''' [simple_window_fns] athena = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), \ -values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ bigquery = """ -WITH \ -values0 AS (SELECT 1 AS `a`, 2 AS `b`, 'A' AS `c` UNION ALL SELECT 3 AS `a`, 4 AS `b`, 'BB' AS `c` UNION ALL SELECT 5 AS `a`, 6 AS `b`, 'A' AS `c` UNION ALL SELECT 7 AS `a`, 8 AS `b`, 'BB' AS `c` UNION ALL SELECT 9 AS `a`, 10 AS `b`, 'A' AS `c`), \ -values1 AS (SELECT `a`, `b`, `c`, row_number() OVER (ORDER BY `a` ASC NULLS FIRST) AS `row_num`, rank() OVER (PARTITION BY `c` ORDER BY `a` ASC NULLS FIRST) AS `rank`, dense_rank() OVER (ORDER BY `a` ASC NULLS FIRST) AS `d_rank`, first_value(`b`) OVER (PARTITION BY `c` ORDER BY `a` ASC NULLS FIRST) AS `first`, last_value(`b`) OVER (ORDER BY `a` ASC NULLS FIRST) AS `last` FROM values0) SELECT * FROM values1 ORDER BY `a` ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS `a`, 2 AS `b`, 'A' AS `c` UNION ALL SELECT 3 AS `a`, 4 AS `b`, 'BB' AS `c` UNION ALL SELECT 5 AS `a`, 6 AS `b`, 'A' AS `c` UNION ALL SELECT 7 AS `a`, 8 AS `b`, 'BB' AS `c` UNION ALL SELECT 9 AS `a`, 10 AS `b`, 'A' AS `c`), values1 AS (SELECT `a`, `b`, `c`, row_number() OVER (ORDER BY `a` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `row_num`, rank() OVER (PARTITION BY `c` ORDER BY `a` ASC NULLS FIRST) AS `rank`, dense_rank() OVER (ORDER BY `a` ASC NULLS FIRST) AS `d_rank`, first_value(`b`) OVER (PARTITION BY `c` ORDER BY `a` ASC NULLS FIRST) AS `first`, last_value(`b`) OVER (ORDER BY `a` ASC NULLS FIRST) AS `last` FROM values0) SELECT * FROM values1 ORDER BY `a` ASC NULLS FIRST """ clickhouse = """ -WITH \ -values0 AS (SELECT 1 AS "a", 2 AS "b", 'A' AS "c" UNION ALL SELECT 3 AS "a", 4 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 6 AS "b", 'A' AS "c" UNION ALL SELECT 7 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 10 AS "b", 'A' AS "c"), \ -values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS "a", 2 AS "b", 'A' AS "c" UNION ALL SELECT 3 AS "a", 4 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 6 AS "b", 'A' AS "c" UNION ALL SELECT 7 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 10 AS "b", 'A' AS "c"), values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ databricks = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS `_values` (`a`, `b`, `c`)), \ -values1 AS (SELECT `a`, `b`, `c`, row_number() OVER (ORDER BY `a` ASC NULLS FIRST) AS `row_num`, rank() OVER (PARTITION BY `c` ORDER BY `a` ASC NULLS FIRST) AS `rank`, dense_rank() OVER (ORDER BY `a` ASC NULLS FIRST) AS `d_rank`, first_value(`b`) OVER (PARTITION BY `c` ORDER BY `a` ASC NULLS FIRST) AS `first`, last_value(`b`) OVER (ORDER BY `a` ASC NULLS FIRST) AS `last` FROM values0) SELECT * FROM values1 ORDER BY `a` ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS `_values` (`a`, `b`, `c`)), values1 AS (SELECT `a`, `b`, `c`, row_number() OVER (ORDER BY `a` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `row_num`, rank() OVER (PARTITION BY `c` ORDER BY `a` ASC NULLS FIRST) AS `rank`, dense_rank() OVER (ORDER BY `a` ASC NULLS FIRST) AS `d_rank`, first_value(`b`) OVER (PARTITION BY `c` ORDER BY `a` ASC NULLS FIRST) AS `first`, last_value(`b`) OVER (ORDER BY `a` ASC NULLS FIRST) AS `last` FROM values0) SELECT * FROM values1 ORDER BY `a` ASC NULLS FIRST """ datafusion = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), \ -values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) \ -SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ duckdb = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), \ -values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ mysql = """ -WITH \ -values0 AS (SELECT * FROM (VALUES ROW(1, 2, 'A'), ROW(3, 4, 'BB'), ROW(5, 6, 'A'), ROW(7, 8, 'BB'), ROW(9, 10, 'A')) AS `_values` (`a`, `b`, `c`)), \ -values1 AS (SELECT `a`, `b`, `c`, row_number() OVER (ORDER BY `a` ASC) AS `row_num`, rank() OVER (PARTITION BY `c` ORDER BY `a` ASC) AS `rank`, dense_rank() OVER (ORDER BY `a` ASC) AS `d_rank`, first_value(`b`) OVER (PARTITION BY `c` ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `first`, last_value(`b`) OVER (ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `last` FROM values0) SELECT * FROM values1 ORDER BY `a` ASC +WITH values0 AS (SELECT * FROM (VALUES ROW(1, 2, 'A'), ROW(3, 4, 'BB'), ROW(5, 6, 'A'), ROW(7, 8, 'BB'), ROW(9, 10, 'A')) AS `_values` (`a`, `b`, `c`)), values1 AS (SELECT `a`, `b`, `c`, row_number() OVER (ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `row_num`, rank() OVER (PARTITION BY `c` ORDER BY `a` ASC) AS `rank`, dense_rank() OVER (ORDER BY `a` ASC) AS `d_rank`, first_value(`b`) OVER (PARTITION BY `c` ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `first`, last_value(`b`) OVER (ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `last` FROM values0) SELECT * FROM values1 ORDER BY `a` ASC """ postgres = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), \ -values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ redshift = """ -WITH \ -values0 AS (SELECT 1 AS "a", 2 AS "b", 'A' AS "c" UNION ALL SELECT 3 AS "a", 4 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 6 AS "b", 'A' AS "c" UNION ALL SELECT 7 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 10 AS "b", 'A' AS "c"), \ -values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS "a", 2 AS "b", 'A' AS "c" UNION ALL SELECT 3 AS "a", 4 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 6 AS "b", 'A' AS "c" UNION ALL SELECT 7 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 10 AS "b", 'A' AS "c"), values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ snowflake = """ -WITH \ -values0 AS (SELECT "COLUMN1" AS "a", "COLUMN2" AS "b", "COLUMN3" AS "c" FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A'))), \ -values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST +WITH values0 AS (SELECT "COLUMN1" AS "a", "COLUMN2" AS "b", "COLUMN3" AS "c" FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A'))), values1 AS (SELECT "a", "b", "c", row_number() OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num", rank() OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST) AS "rank", dense_rank() OVER (ORDER BY "a" ASC NULLS FIRST) AS "d_rank", first_value("b") OVER (PARTITION BY "c" ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "first", last_value("b") OVER (ORDER BY "a" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "last" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ result = ''' +---+----+----+---------+------+--------+-------+------+ @@ -337,31 +316,31 @@ result = ''' [row_number_no_order] athena = """ -WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), values1 AS (SELECT "a", "b", "c", row_number() OVER () AS "row_num" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), values1 AS (SELECT "a", "b", "c", row_number() OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ bigquery = """ -WITH values0 AS (SELECT 1 AS `a`, 2 AS `b`, 'A' AS `c` UNION ALL SELECT 3 AS `a`, 4 AS `b`, 'BB' AS `c` UNION ALL SELECT 5 AS `a`, 6 AS `b`, 'A' AS `c` UNION ALL SELECT 7 AS `a`, 8 AS `b`, 'BB' AS `c` UNION ALL SELECT 9 AS `a`, 10 AS `b`, 'A' AS `c`), values1 AS (SELECT `a`, `b`, `c`, row_number() OVER () AS `row_num` FROM values0) SELECT * FROM values1 ORDER BY `a` ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS `a`, 2 AS `b`, 'A' AS `c` UNION ALL SELECT 3 AS `a`, 4 AS `b`, 'BB' AS `c` UNION ALL SELECT 5 AS `a`, 6 AS `b`, 'A' AS `c` UNION ALL SELECT 7 AS `a`, 8 AS `b`, 'BB' AS `c` UNION ALL SELECT 9 AS `a`, 10 AS `b`, 'A' AS `c`), values1 AS (SELECT `a`, `b`, `c`, row_number() OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `row_num` FROM values0) SELECT * FROM values1 ORDER BY `a` ASC NULLS FIRST """ clickhouse = """ -WITH values0 AS (SELECT 1 AS "a", 2 AS "b", 'A' AS "c" UNION ALL SELECT 3 AS "a", 4 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 6 AS "b", 'A' AS "c" UNION ALL SELECT 7 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 10 AS "b", 'A' AS "c"), values1 AS (SELECT "a", "b", "c", row_number() OVER () AS "row_num" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS "a", 2 AS "b", 'A' AS "c" UNION ALL SELECT 3 AS "a", 4 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 6 AS "b", 'A' AS "c" UNION ALL SELECT 7 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 10 AS "b", 'A' AS "c"), values1 AS (SELECT "a", "b", "c", row_number() OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ databricks = """ -WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS `_values` (`a`, `b`, `c`)), values1 AS (SELECT `a`, `b`, `c`, row_number() OVER (ORDER BY 1 DESC NULLS LAST) AS `row_num` FROM values0) SELECT * FROM values1 ORDER BY `a` ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS `_values` (`a`, `b`, `c`)), values1 AS (SELECT `a`, `b`, `c`, row_number() OVER (ORDER BY 1 DESC NULLS LAST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `row_num` FROM values0) SELECT * FROM values1 ORDER BY `a` ASC NULLS FIRST """ datafusion = """ WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), values1 AS (SELECT "a", "b", "c", row_number() OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ duckdb = """ -WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), values1 AS (SELECT "a", "b", "c", row_number() OVER () AS "row_num" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), values1 AS (SELECT "a", "b", "c", row_number() OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ mysql = """ -WITH values0 AS (SELECT * FROM (VALUES ROW(1, 2, 'A'), ROW(3, 4, 'BB'), ROW(5, 6, 'A'), ROW(7, 8, 'BB'), ROW(9, 10, 'A')) AS `_values` (`a`, `b`, `c`)), values1 AS (SELECT `a`, `b`, `c`, row_number() OVER () AS `row_num` FROM values0) SELECT * FROM values1 ORDER BY `a` ASC +WITH values0 AS (SELECT * FROM (VALUES ROW(1, 2, 'A'), ROW(3, 4, 'BB'), ROW(5, 6, 'A'), ROW(7, 8, 'BB'), ROW(9, 10, 'A')) AS `_values` (`a`, `b`, `c`)), values1 AS (SELECT `a`, `b`, `c`, row_number() OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `row_num` FROM values0) SELECT * FROM values1 ORDER BY `a` ASC """ postgres = """ -WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), values1 AS (SELECT "a", "b", "c", row_number() OVER () AS "row_num" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A')) AS "_values" ("a", "b", "c")), values1 AS (SELECT "a", "b", "c", row_number() OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ redshift = """ -WITH values0 AS (SELECT 1 AS "a", 2 AS "b", 'A' AS "c" UNION ALL SELECT 3 AS "a", 4 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 6 AS "b", 'A' AS "c" UNION ALL SELECT 7 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 10 AS "b", 'A' AS "c"), values1 AS (SELECT "a", "b", "c", row_number() OVER () AS "row_num" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS "a", 2 AS "b", 'A' AS "c" UNION ALL SELECT 3 AS "a", 4 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 6 AS "b", 'A' AS "c" UNION ALL SELECT 7 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 10 AS "b", 'A' AS "c"), values1 AS (SELECT "a", "b", "c", row_number() OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "row_num" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST """ snowflake = """ WITH values0 AS (SELECT "COLUMN1" AS "a", "COLUMN2" AS "b", "COLUMN3" AS "c" FROM (VALUES (1, 2, 'A'), (3, 4, 'BB'), (5, 6, 'A'), (7, 8, 'BB'), (9, 10, 'A'))), values1 AS (SELECT "a", "b", "c", seq8() AS "row_num" FROM values0) SELECT * FROM values1 ORDER BY "a" ASC NULLS FIRST diff --git a/vegafusion-sql/tests/expected/stack.toml b/vegafusion-sql/tests/expected/stack.toml index 426d5476..daa5e545 100644 --- a/vegafusion-sql/tests/expected/stack.toml +++ b/vegafusion-sql/tests/expected/stack.toml @@ -70,119 +70,49 @@ values2 AS (SELECT "a", "b", "c", ("end" - coalesce("a", 0.0)) AS "start", "end" SELECT * FROM values2 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST """ result = ''' -+-----+---+----+-------+-----+ -| a | b | c | start | end | -+-----+---+----+-------+-----+ -| -11 | 4 | A | 0.0 | -11 | -| 5 | 7 | A | 0.0 | 5 | -| 1 | 9 | A | 5.0 | 6 | -| -3 | 8 | BB | -7.0 | -10 | -| -7 | 6 | BB | 0.0 | -7 | -| 13 | 3 | BB | 0.0 | 13 | -| 9 | 5 | BB | 13.0 | 22 | -+-----+---+----+-------+-----+ ++-----+---+----+-------+-------+ +| a | b | c | start | end | ++-----+---+----+-------+-------+ +| -11 | 4 | A | 0.0 | -11.0 | +| 5 | 7 | A | 0.0 | 5.0 | +| 1 | 9 | A | 5.0 | 6.0 | +| -3 | 8 | BB | -7.0 | -10.0 | +| -7 | 6 | BB | 0.0 | -7.0 | +| 13 | 3 | BB | 0.0 | 13.0 | +| 9 | 5 | BB | 13.0 | 22.0 | ++-----+---+----+-------+-------+ ''' [mode_center] athena = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), \ -values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) \ -SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST """ bigquery = """ -WITH \ -values0 AS (SELECT 1 AS `a`, 9 AS `b`, 'A' AS `c` UNION ALL SELECT -3 AS `a`, 8 AS `b`, 'BB' AS `c` UNION ALL SELECT 5 AS `a`, 7 AS `b`, 'A' AS `c` UNION ALL SELECT -7 AS `a`, 6 AS `b`, 'BB' AS `c` UNION ALL SELECT 9 AS `a`, 5 AS `b`, 'BB' AS `c` UNION ALL SELECT -11 AS `a`, 4 AS `b`, 'A' AS `c` UNION ALL SELECT 13 AS `a`, 3 AS `b`, 'BB' AS `c`), \ -values1 AS (SELECT *, abs(coalesce(`a`, 0.0)) AS `__stack` FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT `c`, sum(`__stack`) AS `__total` FROM values1 GROUP BY `c`) AS __inner USING(`c`)), \ -values3 AS (SELECT *, sum(`__stack`) OVER (PARTITION BY `c` ORDER BY `b` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_cumulative` FROM values2), \ -values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max(`__total`) AS `__max_total` FROM values3) AS _cross), \ -values5 AS (SELECT `a`, `b`, `c`, ((`_cumulative` + ((`__max_total` - `__total`) / 2.0)) - `__stack`) AS `start`, (`_cumulative` + ((`__max_total` - `__total`) / 2.0)) AS `end` FROM values4) \ -SELECT * FROM values5 ORDER BY `c` ASC NULLS FIRST, `end` ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS `a`, 9 AS `b`, 'A' AS `c` UNION ALL SELECT -3 AS `a`, 8 AS `b`, 'BB' AS `c` UNION ALL SELECT 5 AS `a`, 7 AS `b`, 'A' AS `c` UNION ALL SELECT -7 AS `a`, 6 AS `b`, 'BB' AS `c` UNION ALL SELECT 9 AS `a`, 5 AS `b`, 'BB' AS `c` UNION ALL SELECT -11 AS `a`, 4 AS `b`, 'A' AS `c` UNION ALL SELECT 13 AS `a`, 3 AS `b`, 'BB' AS `c`), values1 AS (SELECT *, abs(coalesce(`a`, 0.0)) AS `__stack` FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT `c`, sum(`__stack`) AS `__total` FROM values1 GROUP BY `c`) AS __inner USING(`c`)), values3 AS (SELECT *, sum(`__stack`) OVER (PARTITION BY `c` ORDER BY `b` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_cumulative` FROM values2), values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max(`__total`) AS `__max_total` FROM values3) AS _cross), values5 AS (SELECT `a`, `b`, `c`, ((`_cumulative` + ((`__max_total` - `__total`) / 2.0)) - `__stack`) AS `start`, (`_cumulative` + ((`__max_total` - `__total`) / 2.0)) AS `end` FROM values4) SELECT * FROM values5 ORDER BY `c` ASC NULLS FIRST, `end` ASC NULLS FIRST """ clickhouse = """ -WITH \ -values0 AS (SELECT 1 AS "a", 9 AS "b", 'A' AS "c" UNION ALL SELECT -3 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 7 AS "b", 'A' AS "c" UNION ALL SELECT -7 AS "a", 6 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 5 AS "b", 'BB' AS "c" UNION ALL SELECT -11 AS "a", 4 AS "b", 'A' AS "c" UNION ALL SELECT 13 AS "a", 3 AS "b", 'BB' AS "c"), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), \ -values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) \ -SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS "a", 9 AS "b", 'A' AS "c" UNION ALL SELECT -3 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 7 AS "b", 'A' AS "c" UNION ALL SELECT -7 AS "a", 6 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 5 AS "b", 'BB' AS "c" UNION ALL SELECT -11 AS "a", 4 AS "b", 'A' AS "c" UNION ALL SELECT 13 AS "a", 3 AS "b", 'BB' AS "c"), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST """ databricks = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS `_values` (`a`, `b`, `c`)), \ -values1 AS (SELECT *, abs(coalesce(`a`, 0.0)) AS `__stack` FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT `c`, sum(`__stack`) AS `__total` FROM values1 GROUP BY `c`) AS __inner USING(`c`)), \ -values3 AS (SELECT *, sum(`__stack`) OVER (PARTITION BY `c` ORDER BY `b` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_cumulative` FROM values2), \ -values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max(`__total`) AS `__max_total` FROM values3) AS _cross), \ -values5 AS (SELECT `a`, `b`, `c`, ((`_cumulative` + ((`__max_total` - `__total`) / 2.0)) - `__stack`) AS `start`, (`_cumulative` + ((`__max_total` - `__total`) / 2.0)) AS `end` FROM values4) \ -SELECT * FROM values5 ORDER BY `c` ASC NULLS FIRST, `end` ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS `_values` (`a`, `b`, `c`)), values1 AS (SELECT *, abs(coalesce(`a`, 0.0)) AS `__stack` FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT `c`, sum(`__stack`) AS `__total` FROM values1 GROUP BY `c`) AS __inner USING(`c`)), values3 AS (SELECT *, sum(`__stack`) OVER (PARTITION BY `c` ORDER BY `b` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_cumulative` FROM values2), values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max(`__total`) AS `__max_total` FROM values3) AS _cross), values5 AS (SELECT `a`, `b`, `c`, ((`_cumulative` + ((`__max_total` - `__total`) / 2.0)) - `__stack`) AS `start`, (`_cumulative` + ((`__max_total` - `__total`) / 2.0)) AS `end` FROM values4) SELECT * FROM values5 ORDER BY `c` ASC NULLS FIRST, `end` ASC NULLS FIRST """ datafusion = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), \ -values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) \ -SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST """ duckdb = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), \ -values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) \ -SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST """ mysql = """ -WITH \ -values0 AS (SELECT * FROM (VALUES ROW(1, 9, 'A'), ROW(-3, 8, 'BB'), ROW(5, 7, 'A'), ROW(-7, 6, 'BB'), ROW(9, 5, 'BB'), ROW(-11, 4, 'A'), ROW(13, 3, 'BB')) AS `_values` (`a`, `b`, `c`)), \ -values1 AS (SELECT *, abs(coalesce(`a`, 0.0)) AS `__stack` FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT `c`, sum(`__stack`) AS `__total` FROM values1 GROUP BY `c`) AS __inner USING(`c`)), \ -values3 AS (SELECT *, sum(`__stack`) OVER (PARTITION BY `c` ORDER BY `b` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_cumulative` FROM values2), \ -values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max(`__total`) AS `__max_total` FROM values3) AS _cross), \ -values5 AS (SELECT `a`, `b`, `c`, ((`_cumulative` + ((`__max_total` - `__total`) / 2.0)) - `__stack`) AS `start`, (`_cumulative` + ((`__max_total` - `__total`) / 2.0)) AS `end` FROM values4) \ -SELECT * FROM values5 ORDER BY `c` ASC, `end` ASC +WITH values0 AS (SELECT * FROM (VALUES ROW(1, 9, 'A'), ROW(-3, 8, 'BB'), ROW(5, 7, 'A'), ROW(-7, 6, 'BB'), ROW(9, 5, 'BB'), ROW(-11, 4, 'A'), ROW(13, 3, 'BB')) AS `_values` (`a`, `b`, `c`)), values1 AS (SELECT *, abs(coalesce(`a`, 0.0)) AS `__stack` FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT `c`, sum(`__stack`) AS `__total` FROM values1 GROUP BY `c`) AS __inner USING(`c`)), values3 AS (SELECT *, sum(`__stack`) OVER (PARTITION BY `c` ORDER BY `b` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_cumulative` FROM values2), values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max(`__total`) AS `__max_total` FROM values3) AS _cross), values5 AS (SELECT `a`, `b`, `c`, ((`_cumulative` + ((`__max_total` - `__total`) / 2.0)) - `__stack`) AS `start`, (`_cumulative` + ((`__max_total` - `__total`) / 2.0)) AS `end` FROM values4) SELECT * FROM values5 ORDER BY `c` ASC, `end` ASC """ postgres = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), \ -values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) \ -SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST +WITH values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST """ redshift = """ -WITH \ -values0 AS (SELECT 1 AS "a", 9 AS "b", 'A' AS "c" UNION ALL SELECT -3 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 7 AS "b", 'A' AS "c" UNION ALL SELECT -7 AS "a", 6 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 5 AS "b", 'BB' AS "c" UNION ALL SELECT -11 AS "a", 4 AS "b", 'A' AS "c" UNION ALL SELECT 13 AS "a", 3 AS "b", 'BB' AS "c"), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), \ -values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) \ -SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST +WITH values0 AS (SELECT 1 AS "a", 9 AS "b", 'A' AS "c" UNION ALL SELECT -3 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 7 AS "b", 'A' AS "c" UNION ALL SELECT -7 AS "a", 6 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 5 AS "b", 'BB' AS "c" UNION ALL SELECT -11 AS "a", 4 AS "b", 'A' AS "c" UNION ALL SELECT 13 AS "a", 3 AS "b", 'BB' AS "c"), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST """ snowflake = """ -WITH \ -values0 AS (SELECT "COLUMN1" AS "a", "COLUMN2" AS "b", "COLUMN3" AS "c" FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB'))), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), \ -values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) \ -SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST +WITH values0 AS (SELECT "COLUMN1" AS "a", "COLUMN2" AS "b", "COLUMN3" AS "c" FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB'))), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT * FROM values3 CROSS JOIN (SELECT max("__total") AS "__max_total" FROM values3) AS _cross), values5 AS (SELECT "a", "b", "c", (("_cumulative" + (("__max_total" - "__total") / 2.0)) - "__stack") AS "start", ("_cumulative" + (("__max_total" - "__total") / 2.0)) AS "end" FROM values4) SELECT * FROM values5 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST """ result = ''' +-----+---+----+-------+------+ @@ -200,104 +130,34 @@ result = ''' [mode_normalized] athena = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), \ -values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST) \ -SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5 +WITH values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST), values6 AS (SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5) SELECT * FROM values6 ORDER BY "c" ASC NULLS FIRST """ bigquery = """ -WITH \ -values0 AS (SELECT 1 AS `a`, 9 AS `b`, 'A' AS `c` UNION ALL SELECT -3 AS `a`, 8 AS `b`, 'BB' AS `c` UNION ALL SELECT 5 AS `a`, 7 AS `b`, 'A' AS `c` UNION ALL SELECT -7 AS `a`, 6 AS `b`, 'BB' AS `c` UNION ALL SELECT 9 AS `a`, 5 AS `b`, 'BB' AS `c` UNION ALL SELECT -11 AS `a`, 4 AS `b`, 'A' AS `c` UNION ALL SELECT 13 AS `a`, 3 AS `b`, 'BB' AS `c`), \ -values1 AS (SELECT *, abs(coalesce(`a`, 0.0)) AS `__stack` FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT `c`, sum(`__stack`) AS `__total` FROM values1 GROUP BY `c`) AS __inner USING(`c`)), \ -values3 AS (SELECT *, sum(`__stack`) OVER (PARTITION BY `c` ORDER BY `b` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_cumulative` FROM values2), \ -values4 AS (SELECT `a`, `b`, `c`, CASE WHEN (`__total` = 0.0) THEN 0.0 ELSE ((`_cumulative` - `__stack`) / `__total`) END AS `start`, CASE WHEN (`__total` = 0.0) THEN 0.0 ELSE (`_cumulative` / `__total`) END AS `end` FROM values3), \ -values5 AS (SELECT * FROM values4 ORDER BY `c` ASC NULLS FIRST, `end` ASC NULLS FIRST) \ -SELECT `a`, `b`, `c`, (round((`start` * 100)) / 100) AS `trunc_start`, (round((`end` * 100)) / 100) AS `trunc_end` FROM values5 +WITH values0 AS (SELECT 1 AS `a`, 9 AS `b`, 'A' AS `c` UNION ALL SELECT -3 AS `a`, 8 AS `b`, 'BB' AS `c` UNION ALL SELECT 5 AS `a`, 7 AS `b`, 'A' AS `c` UNION ALL SELECT -7 AS `a`, 6 AS `b`, 'BB' AS `c` UNION ALL SELECT 9 AS `a`, 5 AS `b`, 'BB' AS `c` UNION ALL SELECT -11 AS `a`, 4 AS `b`, 'A' AS `c` UNION ALL SELECT 13 AS `a`, 3 AS `b`, 'BB' AS `c`), values1 AS (SELECT *, abs(coalesce(`a`, 0.0)) AS `__stack` FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT `c`, sum(`__stack`) AS `__total` FROM values1 GROUP BY `c`) AS __inner USING(`c`)), values3 AS (SELECT *, sum(`__stack`) OVER (PARTITION BY `c` ORDER BY `b` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_cumulative` FROM values2), values4 AS (SELECT `a`, `b`, `c`, CASE WHEN (`__total` = 0.0) THEN 0.0 ELSE ((`_cumulative` - `__stack`) / `__total`) END AS `start`, CASE WHEN (`__total` = 0.0) THEN 0.0 ELSE (`_cumulative` / `__total`) END AS `end` FROM values3), values5 AS (SELECT * FROM values4 ORDER BY `c` ASC NULLS FIRST, `end` ASC NULLS FIRST), values6 AS (SELECT `a`, `b`, `c`, (round((`start` * 100)) / 100) AS `trunc_start`, (round((`end` * 100)) / 100) AS `trunc_end` FROM values5) SELECT * FROM values6 ORDER BY `c` ASC NULLS FIRST """ clickhouse = """ -WITH \ -values0 AS (SELECT 1 AS "a", 9 AS "b", 'A' AS "c" UNION ALL SELECT -3 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 7 AS "b", 'A' AS "c" UNION ALL SELECT -7 AS "a", 6 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 5 AS "b", 'BB' AS "c" UNION ALL SELECT -11 AS "a", 4 AS "b", 'A' AS "c" UNION ALL SELECT 13 AS "a", 3 AS "b", 'BB' AS "c"), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), \ -values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST) \ -SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5 +WITH values0 AS (SELECT 1 AS "a", 9 AS "b", 'A' AS "c" UNION ALL SELECT -3 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 7 AS "b", 'A' AS "c" UNION ALL SELECT -7 AS "a", 6 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 5 AS "b", 'BB' AS "c" UNION ALL SELECT -11 AS "a", 4 AS "b", 'A' AS "c" UNION ALL SELECT 13 AS "a", 3 AS "b", 'BB' AS "c"), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST), values6 AS (SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5) SELECT * FROM values6 ORDER BY "c" ASC NULLS FIRST """ databricks = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS `_values` (`a`, `b`, `c`)), \ -values1 AS (SELECT *, abs(coalesce(`a`, 0.0)) AS `__stack` FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT `c`, sum(`__stack`) AS `__total` FROM values1 GROUP BY `c`) AS __inner USING(`c`)), \ -values3 AS (SELECT *, sum(`__stack`) OVER (PARTITION BY `c` ORDER BY `b` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_cumulative` FROM values2), \ -values4 AS (SELECT `a`, `b`, `c`, CASE WHEN (`__total` = 0.0) THEN 0.0 ELSE ((`_cumulative` - `__stack`) / `__total`) END AS `start`, CASE WHEN (`__total` = 0.0) THEN 0.0 ELSE (`_cumulative` / `__total`) END AS `end` FROM values3), \ -values5 AS (SELECT * FROM values4 ORDER BY `c` ASC NULLS FIRST, `end` ASC NULLS FIRST) \ -SELECT `a`, `b`, `c`, (round((`start` * 100)) / 100) AS `trunc_start`, (round((`end` * 100)) / 100) AS `trunc_end` FROM values5 +WITH values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS `_values` (`a`, `b`, `c`)), values1 AS (SELECT *, abs(coalesce(`a`, 0.0)) AS `__stack` FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT `c`, sum(`__stack`) AS `__total` FROM values1 GROUP BY `c`) AS __inner USING(`c`)), values3 AS (SELECT *, sum(`__stack`) OVER (PARTITION BY `c` ORDER BY `b` ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_cumulative` FROM values2), values4 AS (SELECT `a`, `b`, `c`, CASE WHEN (`__total` = 0.0) THEN 0.0 ELSE ((`_cumulative` - `__stack`) / `__total`) END AS `start`, CASE WHEN (`__total` = 0.0) THEN 0.0 ELSE (`_cumulative` / `__total`) END AS `end` FROM values3), values5 AS (SELECT * FROM values4 ORDER BY `c` ASC NULLS FIRST, `end` ASC NULLS FIRST), values6 AS (SELECT `a`, `b`, `c`, (round((`start` * 100)) / 100) AS `trunc_start`, (round((`end` * 100)) / 100) AS `trunc_end` FROM values5) SELECT * FROM values6 ORDER BY `c` ASC NULLS FIRST """ datafusion = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), \ -values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST) \ -SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5 +WITH values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST), values6 AS (SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5) SELECT * FROM values6 ORDER BY "c" ASC NULLS FIRST """ duckdb = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), \ -values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST) \ -SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5 +WITH values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST), values6 AS (SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5) SELECT * FROM values6 ORDER BY "c" ASC NULLS FIRST """ mysql = """ -WITH \ -values0 AS (SELECT * FROM (VALUES ROW(1, 9, 'A'), ROW(-3, 8, 'BB'), ROW(5, 7, 'A'), ROW(-7, 6, 'BB'), ROW(9, 5, 'BB'), ROW(-11, 4, 'A'), ROW(13, 3, 'BB')) AS `_values` (`a`, `b`, `c`)), \ -values1 AS (SELECT *, abs(coalesce(`a`, 0.0)) AS `__stack` FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT `c`, sum(`__stack`) AS `__total` FROM values1 GROUP BY `c`) AS __inner USING(`c`)), \ -values3 AS (SELECT *, sum(`__stack`) OVER (PARTITION BY `c` ORDER BY `b` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_cumulative` FROM values2), \ -values4 AS (SELECT `a`, `b`, `c`, CASE WHEN (`__total` = 0.0) THEN 0.0 ELSE ((`_cumulative` - `__stack`) / `__total`) END AS `start`, CASE WHEN (`__total` = 0.0) THEN 0.0 ELSE (`_cumulative` / `__total`) END AS `end` FROM values3), \ -values5 AS (SELECT * FROM values4 ORDER BY `c` ASC, `end` ASC) \ -SELECT `a`, `b`, `c`, (round((`start` * 100)) / 100) AS `trunc_start`, (round((`end` * 100)) / 100) AS `trunc_end` FROM values5 +WITH values0 AS (SELECT * FROM (VALUES ROW(1, 9, 'A'), ROW(-3, 8, 'BB'), ROW(5, 7, 'A'), ROW(-7, 6, 'BB'), ROW(9, 5, 'BB'), ROW(-11, 4, 'A'), ROW(13, 3, 'BB')) AS `_values` (`a`, `b`, `c`)), values1 AS (SELECT *, abs(coalesce(`a`, 0.0)) AS `__stack` FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT `c`, sum(`__stack`) AS `__total` FROM values1 GROUP BY `c`) AS __inner USING(`c`)), values3 AS (SELECT *, sum(`__stack`) OVER (PARTITION BY `c` ORDER BY `b` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS `_cumulative` FROM values2), values4 AS (SELECT `a`, `b`, `c`, CASE WHEN (`__total` = 0.0) THEN 0.0 ELSE ((`_cumulative` - `__stack`) / `__total`) END AS `start`, CASE WHEN (`__total` = 0.0) THEN 0.0 ELSE (`_cumulative` / `__total`) END AS `end` FROM values3), values5 AS (SELECT * FROM values4 ORDER BY `c` ASC, `end` ASC), values6 AS (SELECT `a`, `b`, `c`, (round((`start` * 100)) / 100) AS `trunc_start`, (round((`end` * 100)) / 100) AS `trunc_end` FROM values5) SELECT * FROM values6 ORDER BY `c` ASC """ postgres = """ -WITH \ -values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), \ -values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST) \ -SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5 +WITH values0 AS (SELECT * FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB')) AS "_values" ("a", "b", "c")), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST), values6 AS (SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5) SELECT * FROM values6 ORDER BY "c" ASC NULLS FIRST """ redshift = """ -WITH \ -values0 AS (SELECT 1 AS "a", 9 AS "b", 'A' AS "c" UNION ALL SELECT -3 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 7 AS "b", 'A' AS "c" UNION ALL SELECT -7 AS "a", 6 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 5 AS "b", 'BB' AS "c" UNION ALL SELECT -11 AS "a", 4 AS "b", 'A' AS "c" UNION ALL SELECT 13 AS "a", 3 AS "b", 'BB' AS "c"), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), \ -values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST) \ -SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5 +WITH values0 AS (SELECT 1 AS "a", 9 AS "b", 'A' AS "c" UNION ALL SELECT -3 AS "a", 8 AS "b", 'BB' AS "c" UNION ALL SELECT 5 AS "a", 7 AS "b", 'A' AS "c" UNION ALL SELECT -7 AS "a", 6 AS "b", 'BB' AS "c" UNION ALL SELECT 9 AS "a", 5 AS "b", 'BB' AS "c" UNION ALL SELECT -11 AS "a", 4 AS "b", 'A' AS "c" UNION ALL SELECT 13 AS "a", 3 AS "b", 'BB' AS "c"), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST), values6 AS (SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5) SELECT * FROM values6 ORDER BY "c" ASC NULLS FIRST """ snowflake = """ -WITH \ -values0 AS (SELECT "COLUMN1" AS "a", "COLUMN2" AS "b", "COLUMN3" AS "c" FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB'))), \ -values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), \ -values2 AS (SELECT * FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), \ -values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), \ -values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), \ -values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST) \ -SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5 +WITH values0 AS (SELECT "COLUMN1" AS "a", "COLUMN2" AS "b", "COLUMN3" AS "c" FROM (VALUES (1, 9, 'A'), (-3, 8, 'BB'), (5, 7, 'A'), (-7, 6, 'BB'), (9, 5, 'BB'), (-11, 4, 'A'), (13, 3, 'BB'))), values1 AS (SELECT *, abs(coalesce("a", 0.0)) AS "__stack" FROM values0), values2 AS (SELECT values1.*, __total FROM values1 JOIN (SELECT "c", sum("__stack") AS "__total" FROM values1 GROUP BY "c") AS __inner USING("c")), values3 AS (SELECT *, sum("__stack") OVER (PARTITION BY "c" ORDER BY "b" ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "_cumulative" FROM values2), values4 AS (SELECT "a", "b", "c", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE (("_cumulative" - "__stack") / "__total") END AS "start", CASE WHEN ("__total" = 0.0) THEN 0.0 ELSE ("_cumulative" / "__total") END AS "end" FROM values3), values5 AS (SELECT * FROM values4 ORDER BY "c" ASC NULLS FIRST, "end" ASC NULLS FIRST), values6 AS (SELECT "a", "b", "c", (round(("start" * 100)) / 100) AS "trunc_start", (round(("end" * 100)) / 100) AS "trunc_end" FROM values5) SELECT * FROM values6 ORDER BY "c" ASC NULLS FIRST """ result = ''' +-----+---+----+-------------+-----------+ diff --git a/vegafusion-sql/tests/test_aggregate.rs b/vegafusion-sql/tests/test_aggregate.rs index f9f61f0e..b1080473 100644 --- a/vegafusion-sql/tests/test_aggregate.rs +++ b/vegafusion-sql/tests/test_aggregate.rs @@ -50,11 +50,11 @@ mod test_simple_aggs { .unwrap(); let df_result = df .sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("b")), + vec![expr::Sort { + expr: flat_col("b"), asc: true, nulls_first: true, - })], + }], None, ) .await; @@ -205,11 +205,11 @@ mod test_variance_aggs { .await; let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("b")), + vec![expr::Sort { + expr: flat_col("b"), asc: true, nulls_first: true, - })], + }], None, ) .await diff --git a/vegafusion-sql/tests/test_filter.rs b/vegafusion-sql/tests/test_filter.rs index ad90271a..ffdf7ad7 100644 --- a/vegafusion-sql/tests/test_filter.rs +++ b/vegafusion-sql/tests/test_filter.rs @@ -2,7 +2,7 @@ extern crate lazy_static; mod utils; -use datafusion_expr::{expr, lit, Expr}; +use datafusion_expr::{expr, lit}; use rstest::rstest; use rstest_reuse::{self, *}; use serde_json::json; @@ -41,11 +41,11 @@ mod test_simple_gte { .unwrap(); let df_result = df .sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await; diff --git a/vegafusion-sql/tests/test_fold.rs b/vegafusion-sql/tests/test_fold.rs index a3f17234..7648bcf4 100644 --- a/vegafusion-sql/tests/test_fold.rs +++ b/vegafusion-sql/tests/test_fold.rs @@ -2,7 +2,7 @@ extern crate lazy_static; mod utils; -use datafusion_expr::{expr, Expr}; +use datafusion_expr::expr; use rstest::rstest; use rstest_reuse::{self, *}; use serde_json::json; @@ -43,16 +43,16 @@ mod test_simple_fold { let df_result = if let Ok(df) = df_result { df.sort( vec![ - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("country")), + expr::Sort { + expr: flat_col("country"), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("key")), + }, + expr::Sort { + expr: flat_col("key"), asc: true, nulls_first: true, - }), + }, ], None, ) @@ -100,11 +100,11 @@ mod test_ordered_fold { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("_order")), + vec![expr::Sort { + expr: flat_col("_order"), asc: true, nulls_first: true, - })], + }], None, ) .await diff --git a/vegafusion-sql/tests/test_impute.rs b/vegafusion-sql/tests/test_impute.rs index ff45300c..8172ed48 100644 --- a/vegafusion-sql/tests/test_impute.rs +++ b/vegafusion-sql/tests/test_impute.rs @@ -3,7 +3,7 @@ extern crate lazy_static; mod utils; use datafusion_common::ScalarValue; -use datafusion_expr::{expr, Expr}; +use datafusion_expr::expr; use rstest::rstest; use rstest_reuse::{self, *}; use serde_json::json; @@ -60,16 +60,16 @@ mod test_unordered_no_groups { let df_result = if let Ok(df) = df_result { df.sort( vec![ - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("b")), + }, + expr::Sort { + expr: flat_col("b"), asc: true, nulls_first: true, - }), + }, ], None, ) @@ -110,16 +110,16 @@ mod test_unordered_one_group { let df_result = if let Ok(df) = df_result { df.sort( vec![ - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("b")), + }, + expr::Sort { + expr: flat_col("b"), asc: true, nulls_first: true, - }), + }, ], None, ) @@ -166,26 +166,26 @@ mod test_unordered_two_groups { let df_result = if let Ok(df) = df_result { df.sort( vec![ - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("b")), + }, + expr::Sort { + expr: flat_col("b"), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("c")), + }, + expr::Sort { + expr: flat_col("c"), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("d")), + }, + expr::Sort { + expr: flat_col("d"), asc: true, nulls_first: true, - }), + }, ], None, ) @@ -225,11 +225,11 @@ mod test_ordered_no_groups { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("_order")), + vec![expr::Sort { + expr: flat_col("_order"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -274,11 +274,11 @@ mod test_ordered_one_group { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("_order")), + vec![expr::Sort { + expr: flat_col("_order"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -323,11 +323,11 @@ mod test_ordered_two_groups { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("_order")), + vec![expr::Sort { + expr: flat_col("_order"), asc: true, nulls_first: true, - })], + }], None, ) .await diff --git a/vegafusion-sql/tests/test_joinaggregate.rs b/vegafusion-sql/tests/test_joinaggregate.rs index 033e7e77..fa2c516d 100644 --- a/vegafusion-sql/tests/test_joinaggregate.rs +++ b/vegafusion-sql/tests/test_joinaggregate.rs @@ -2,7 +2,7 @@ extern crate lazy_static; mod utils; -use datafusion_expr::{expr, Expr}; +use datafusion_expr::expr; use rstest::rstest; use rstest_reuse::{self, *}; use serde_json::json; @@ -49,11 +49,11 @@ mod test_simple_aggs { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -114,11 +114,11 @@ mod test_simple_aggs_no_grouping { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await diff --git a/vegafusion-sql/tests/test_select.rs b/vegafusion-sql/tests/test_select.rs index de44cd15..af3b5f90 100644 --- a/vegafusion-sql/tests/test_select.rs +++ b/vegafusion-sql/tests/test_select.rs @@ -56,11 +56,11 @@ mod test_numeric_operators { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -84,7 +84,7 @@ mod test_numeric_operators { #[cfg(test)] mod test_logical_operators { use crate::*; - use datafusion_expr::{expr, lit, Expr}; + use datafusion_expr::{expr, lit}; use vegafusion_common::column::flat_col; #[apply(dialect_names)] @@ -119,11 +119,11 @@ mod test_logical_operators { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("i")), + vec![expr::Sort { + expr: flat_col("i"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -188,11 +188,11 @@ mod test_between { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -211,7 +211,7 @@ mod test_between { mod test_cast_numeric { use crate::*; use arrow::datatypes::DataType; - use datafusion_expr::{cast, expr, Expr}; + use datafusion_expr::{cast, expr}; use vegafusion_common::column::flat_col; #[apply(dialect_names)] @@ -243,11 +243,11 @@ mod test_cast_numeric { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -266,7 +266,7 @@ mod test_cast_numeric { mod test_try_cast_numeric { use crate::*; use arrow::datatypes::DataType; - use datafusion_expr::{expr, try_cast, Expr}; + use datafusion_expr::{expr, try_cast}; use vegafusion_common::column::flat_col; #[apply(dialect_names)] @@ -298,11 +298,11 @@ mod test_try_cast_numeric { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -327,7 +327,7 @@ mod test_try_cast_numeric { mod test_cast_string { use crate::*; use arrow::datatypes::DataType; - use datafusion_expr::{cast, expr, Expr}; + use datafusion_expr::{cast, expr}; use vegafusion_common::column::flat_col; #[apply(dialect_names)] @@ -354,11 +354,11 @@ mod test_cast_string { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -377,7 +377,7 @@ mod test_cast_string { mod test_try_cast_string { use crate::*; use arrow::datatypes::DataType; - use datafusion_expr::{expr, try_cast, Expr}; + use datafusion_expr::{expr, try_cast}; use vegafusion_common::column::flat_col; #[apply(dialect_names)] @@ -404,11 +404,11 @@ mod test_try_cast_string { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -432,7 +432,7 @@ mod test_try_cast_string { #[cfg(test)] mod test_non_finite_numbers { use crate::*; - use datafusion_expr::{expr, lit, Expr}; + use datafusion_expr::{expr, lit}; use vegafusion_common::column::flat_col; #[apply(dialect_names)] @@ -457,11 +457,11 @@ mod test_non_finite_numbers { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -485,7 +485,7 @@ mod test_non_finite_numbers { #[cfg(test)] mod test_scalar_math_functions { use crate::*; - use datafusion_expr::{expr, Expr}; + use datafusion_expr::expr; use datafusion_functions::math::expr_fn::{abs, acos, asin, tan}; use vegafusion_common::column::flat_col; @@ -534,11 +534,11 @@ mod test_scalar_math_functions { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -616,11 +616,11 @@ mod test_is_finite { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -672,11 +672,11 @@ mod test_str_to_utc_timestamp { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -761,11 +761,11 @@ mod test_date_part_tz { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -850,11 +850,11 @@ mod test_date_trunc_tz { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -947,11 +947,11 @@ mod test_make_timestamp_tz { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -1007,11 +1007,11 @@ mod test_epoch_to_utc_timestamp { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -1085,11 +1085,11 @@ mod test_utc_timestamp_to_epoch_ms { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -1173,11 +1173,11 @@ mod test_date_add_tz { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -1257,11 +1257,11 @@ mod test_utc_timestamp_to_str { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -1330,11 +1330,11 @@ mod test_date_to_utc_timestamp { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -1405,11 +1405,11 @@ mod test_timestamp_to_utc_timestamp { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await @@ -1433,7 +1433,7 @@ mod test_timestamp_to_utc_timestamp { #[cfg(test)] mod test_string_ops { use crate::*; - use datafusion_expr::{expr, lit, Expr}; + use datafusion_expr::{expr, lit}; use datafusion_functions::string::expr_fn::{concat, lower, upper}; use vegafusion_common::column::flat_col; @@ -1467,11 +1467,11 @@ mod test_string_ops { let df_result = if let Ok(df) = df_result { df.sort( - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })], + }], None, ) .await diff --git a/vegafusion-sql/tests/test_sort.rs b/vegafusion-sql/tests/test_sort.rs index cb6ad83a..8be05a36 100644 --- a/vegafusion-sql/tests/test_sort.rs +++ b/vegafusion-sql/tests/test_sort.rs @@ -2,7 +2,7 @@ extern crate lazy_static; mod utils; -use datafusion_expr::{expr, Expr}; +use datafusion_expr::expr; use rstest::rstest; use rstest_reuse::{self, *}; use serde_json::json; @@ -37,16 +37,16 @@ mod test_default_null_ordering { let df_result = df .sort( vec![ - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + expr::Sort { + expr: flat_col("a"), asc: false, nulls_first: false, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("c")), + }, + expr::Sort { + expr: flat_col("c"), asc: true, nulls_first: true, - }), + }, ], None, ) @@ -89,16 +89,16 @@ mod test_custom_null_ordering { let sort_res = df .sort( vec![ - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + expr::Sort { + expr: flat_col("a"), asc: false, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("c")), + }, + expr::Sort { + expr: flat_col("c"), asc: true, nulls_first: false, - }), + }, ], None, ) @@ -139,16 +139,16 @@ mod test_order_with_limit { let df_result = df .sort( vec![ - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("c")), + expr::Sort { + expr: flat_col("c"), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("b")), + }, + expr::Sort { + expr: flat_col("b"), asc: true, nulls_first: true, - }), + }, ], Some(4), ) diff --git a/vegafusion-sql/tests/test_stack.rs b/vegafusion-sql/tests/test_stack.rs index 513459c3..396432ee 100644 --- a/vegafusion-sql/tests/test_stack.rs +++ b/vegafusion-sql/tests/test_stack.rs @@ -2,7 +2,7 @@ extern crate lazy_static; mod utils; -use datafusion_expr::{expr, lit, Expr}; +use datafusion_expr::{expr, lit}; use rstest::rstest; use rstest_reuse::{self, *}; use serde_json::json; @@ -36,11 +36,11 @@ async fn make_stack_for_mode( ) -> Result> { df.stack( "a", - vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("b")), + vec![expr::Sort { + expr: flat_col("b"), asc: true, nulls_first: true, - })], + }], &["c".to_string()], "start", "end", @@ -50,16 +50,16 @@ async fn make_stack_for_mode( .unwrap() .sort( vec![ - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("c")), + expr::Sort { + expr: flat_col("c"), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(flat_col("end")), + }, + expr::Sort { + expr: flat_col("end"), asc: true, nulls_first: true, - }), + }, ], None, ) @@ -126,7 +126,18 @@ mod test_mode_normalized { .div(lit(100)) .alias("trunc_end"), ]) + .await + .unwrap() + .sort( + vec![expr::Sort { + expr: flat_col("c"), + asc: true, + nulls_first: true, + }], + None, + ) .await; + check_dataframe_query( df_result, "stack", diff --git a/vegafusion-sql/tests/test_window.rs b/vegafusion-sql/tests/test_window.rs index 401c71f4..e6d5ab33 100644 --- a/vegafusion-sql/tests/test_window.rs +++ b/vegafusion-sql/tests/test_window.rs @@ -40,11 +40,11 @@ mod test_simple_aggs_unbounded { .unwrap(); let df = SqlDataFrame::from_values(&table, conn, Default::default()).unwrap(); - let order_by = vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + let order_by = vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })]; + }]; let window_frame = WindowFrame::new(Some(true)); let df_result = df .select(vec![ @@ -144,11 +144,11 @@ mod test_simple_aggs_unbounded_groups { .unwrap(); let df = SqlDataFrame::from_values(&table, conn, Default::default()).unwrap(); - let order_by = vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + let order_by = vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })]; + }]; let window_frame = WindowFrame::new_bounds( WindowFrameUnits::Groups, WindowFrameBound::Preceding(ScalarValue::Null), @@ -253,11 +253,11 @@ mod test_simple_aggs_bounded { .unwrap(); let df = SqlDataFrame::from_values(&table, conn, Default::default()).unwrap(); - let order_by = vec![Expr::Sort(expr::Sort { - expr: Box::new(flat_col("a")), + let order_by = vec![expr::Sort { + expr: flat_col("a"), asc: true, nulls_first: true, - })]; + }]; let window_frame = WindowFrame::new_bounds( WindowFrameUnits::Rows, WindowFrameBound::Preceding(ScalarValue::from(1)), @@ -361,11 +361,11 @@ mod test_simple_aggs_bounded_groups { .unwrap(); let df = SqlDataFrame::from_values(&table, conn, Default::default()).unwrap(); - let order_by = vec![Expr::Sort(expr::Sort { - expr: Box::new(col("a")), + let order_by = vec![expr::Sort { + expr: col("a"), asc: true, nulls_first: true, - })]; + }]; let window_frame = WindowFrame::new_bounds( WindowFrameUnits::Groups, WindowFrameBound::Preceding(ScalarValue::from(1)), @@ -427,16 +427,16 @@ mod test_simple_aggs_bounded_groups { let df_result = if let Ok(df) = df_result { df.sort( vec![ - Expr::Sort(expr::Sort { - expr: Box::new(col("a")), + expr::Sort { + expr: col("a"), asc: true, nulls_first: true, - }), - Expr::Sort(expr::Sort { - expr: Box::new(col("b")), + }, + expr::Sort { + expr: col("b"), asc: true, nulls_first: true, - }), + }, ], None, ) @@ -465,6 +465,9 @@ mod test_simple_window_fns { #[apply(dialect_names)] async fn test(dialect_name: &str) { + use std::sync::Arc; + + use datafusion_functions_window::row_number::RowNumber; use sqlparser::ast::NullTreatment; println!("{dialect_name}"); @@ -480,11 +483,11 @@ mod test_simple_window_fns { .unwrap(); let df = SqlDataFrame::from_values(&table, conn, Default::default()).unwrap(); - let order_by = vec![Expr::Sort(expr::Sort { - expr: Box::new(col("a")), + let order_by = vec![expr::Sort { + expr: col("a"), asc: true, nulls_first: true, - })]; + }]; let window_frame = WindowFrame::new(Some(true)); let df_result = df .select(vec![ @@ -492,9 +495,7 @@ mod test_simple_window_fns { col("b"), col("c"), Expr::WindowFunction(expr::WindowFunction { - fun: WindowFunctionDefinition::BuiltInWindowFunction( - BuiltInWindowFunction::RowNumber, - ), + fun: WindowFunctionDefinition::WindowUDF(Arc::new(RowNumber::new().into())), args: vec![], partition_by: vec![], order_by: order_by.clone(), @@ -590,11 +591,11 @@ mod test_advanced_window_fns { .unwrap(); let df = SqlDataFrame::from_values(&table, conn, Default::default()).unwrap(); - let order_by = vec![Expr::Sort(expr::Sort { - expr: Box::new(col("a")), + let order_by = vec![expr::Sort { + expr: col("a"), asc: true, nulls_first: true, - })]; + }]; let window_frame = WindowFrame::new(Some(true)); let df_result = df .select(vec![ @@ -685,6 +686,9 @@ mod test_unordered_row_number { #[apply(dialect_names)] async fn test(dialect_name: &str) { + use std::sync::Arc; + + use datafusion_functions_window::row_number::RowNumber; use sqlparser::ast::NullTreatment; println!("{dialect_name}"); @@ -700,11 +704,11 @@ mod test_unordered_row_number { .unwrap(); let df = SqlDataFrame::from_values(&table, conn, Default::default()).unwrap(); - let order_by = vec![Expr::Sort(expr::Sort { - expr: Box::new(col("a")), + let order_by = vec![expr::Sort { + expr: col("a"), asc: true, nulls_first: true, - })]; + }]; let window_frame = WindowFrame::new(Some(true)); let df_result = df .select(vec![ @@ -712,9 +716,7 @@ mod test_unordered_row_number { col("b"), col("c"), Expr::WindowFunction(expr::WindowFunction { - fun: WindowFunctionDefinition::BuiltInWindowFunction( - BuiltInWindowFunction::RowNumber, - ), + fun: WindowFunctionDefinition::WindowUDF(Arc::new(RowNumber::new().into())), args: vec![], partition_by: vec![], order_by: vec![], diff --git a/vegafusion-wasm/package-lock.json b/vegafusion-wasm/package-lock.json index 9e329f18..bdd2fd39 100644 --- a/vegafusion-wasm/package-lock.json +++ b/vegafusion-wasm/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "vegafusion-wasm", - "version": "1.6.4-rc1", + "version": "1.6.9", "license": "BSD-3-Clause", "dependencies": { "bootstrap": "^5.1.3", @@ -1344,4 +1344,4 @@ } } } -} \ No newline at end of file +} diff --git a/vegafusion-wasm/src/lib.rs b/vegafusion-wasm/src/lib.rs index 1e1c20b7..dc8b9c24 100644 --- a/vegafusion-wasm/src/lib.rs +++ b/vegafusion-wasm/src/lib.rs @@ -9,7 +9,8 @@ use wasm_bindgen::prelude::*; use js_sys::Promise; use std::collections::{HashMap, HashSet}; -use std::sync::{Arc, Mutex}; +use std::rc::Rc; +use std::sync::Mutex; use vegafusion_common::data::table::VegaFusionTable; use vegafusion_core::planning::stitch::CommPlan; @@ -46,14 +47,14 @@ extern "C" { #[wasm_bindgen] #[derive(Clone)] pub struct MsgReceiver { - spec: Arc, - server_spec: Arc, + spec: Rc, + server_spec: Rc, comm_plan: CommPlan, - send_msg_fn: Arc, - task_graph: Arc>, - task_graph_mapping: Arc>, - server_to_client_value_indices: Arc>, - view: Arc, + send_msg_fn: Rc, + task_graph: Rc>, + task_graph_mapping: Rc>, + server_to_client_value_indices: Rc>, + view: Rc, verbose: bool, debounce_wait: f64, debounce_max_wait: Option, @@ -77,7 +78,7 @@ impl MsgReceiver { let task_graph_mapping = task_graph.build_mapping(); - let server_to_client_value_indices: Arc> = Arc::new( + let server_to_client_value_indices: Rc> = Rc::new( comm_plan .server_to_client .iter() @@ -101,14 +102,14 @@ impl MsgReceiver { setup_tooltip(&view); let this = Self { - spec: Arc::new(spec), - server_spec: Arc::new(server_spec), + spec: Rc::new(spec), + server_spec: Rc::new(server_spec), comm_plan, - task_graph: Arc::new(Mutex::new(task_graph)), - task_graph_mapping: Arc::new(task_graph_mapping), - send_msg_fn: Arc::new(send_msg_fn), + task_graph: Rc::new(Mutex::new(task_graph)), + task_graph_mapping: Rc::new(task_graph_mapping), + send_msg_fn: Rc::new(send_msg_fn), server_to_client_value_indices, - view: Arc::new(view), + view: Rc::new(view), verbose, debounce_wait, debounce_max_wait, @@ -345,8 +346,7 @@ impl MsgReceiver { } fn send_request(&self, send_msg_fn: &js_sys::Function, request_msg: QueryRequest) { - let mut buf: Vec = Vec::new(); - buf.reserve(request_msg.encoded_len()); + let mut buf: Vec = Vec::with_capacity(request_msg.encoded_len()); request_msg.encode(&mut buf).unwrap(); let context =