From 980be3c3d9d5562d5b7f190f963042835351da85 Mon Sep 17 00:00:00 2001 From: Geoffrey Yu Date: Mon, 23 Sep 2024 11:42:36 -0400 Subject: [PATCH] Clean up: Remove sandbox experimental code --- .gitmodules | 3 - sandbox/qe/Cargo.lock | 2893 --------------------- sandbox/qe/Cargo.toml | 35 - sandbox/qe/RadixSpline | 1 - sandbox/qe/RadixSplineLib/radixspline.cpp | 27 - sandbox/qe/RadixSplineLib/radixspline.h | 18 - sandbox/qe/build_bindings.rs | 86 - sandbox/qe/redshift.py | 254 -- sandbox/qe/src/bin/bench_q3.rs | 201 -- sandbox/qe/src/bin/bench_tpch.rs | 250 -- sandbox/qe/src/bin/repl.rs | 219 -- sandbox/qe/src/datafusion_state.rs | 48 - sandbox/qe/src/dataset_gen/emps_depts.rs | 93 - sandbox/qe/src/dataset_gen/mod.rs | 39 - sandbox/qe/src/dataset_gen/tpch.rs | 11 - sandbox/qe/src/lib.rs | 226 -- sandbox/qe/src/ops/filter.rs | 165 -- sandbox/qe/src/ops/mod.rs | 5 - sandbox/qe/src/ops/tap.rs | 69 - sandbox/qe/src/radixspline.rs | 50 - sandbox/qe/src/rewrite.rs | 155 -- sandbox/qe/test.csv | 6 - sandbox/qe/test2.parquet | Bin 810 -> 0 bytes sandbox/qe/tpch-every.sh | 9 - sandbox/qe/tpch-individual.sh | 28 - sandbox/qe/tpch-setup.sh | 34 - sandbox/qe/tpch/column_to_binary.py | 21 - sandbox/qe/tpch/csv_to_parquet.py | 23 - sandbox/qe/tpch/headers.json | 17 - sandbox/qe/tpch/load_tpch.sql | 102 - sandbox/qe/tpch/queries/1.sql | 26 - sandbox/qe/tpch/queries/10.sql | 35 - sandbox/qe/tpch/queries/11.sql | 31 - sandbox/qe/tpch/queries/12.sql | 32 - sandbox/qe/tpch/queries/13.sql | 24 - sandbox/qe/tpch/queries/14.sql | 17 - sandbox/qe/tpch/queries/15.sql | 35 - sandbox/qe/tpch/queries/16.sql | 34 - sandbox/qe/tpch/queries/17.sql | 16 - sandbox/qe/tpch/queries/18.sql | 36 - sandbox/qe/tpch/queries/19.sql | 39 - sandbox/qe/tpch/queries/2.sql | 47 - sandbox/qe/tpch/queries/20.sql | 47 - sandbox/qe/tpch/queries/21.sql | 43 - sandbox/qe/tpch/queries/22.sql | 41 - sandbox/qe/tpch/queries/3.sql | 26 - sandbox/qe/tpch/queries/4.sql | 26 - sandbox/qe/tpch/queries/5.sql | 29 - sandbox/qe/tpch/queries/6.sql | 13 - sandbox/qe/tpch/queries/7.sql | 43 - sandbox/qe/tpch/queries/8.sql | 41 - sandbox/qe/tpch/queries/9.sql | 36 - sandbox/qe/tpch/queries/combined.sql | 719 ----- sandbox/qe/tpch/status.txt | 0 sandbox/qe/tpch/tbl_to_csv.py | 32 - 55 files changed, 6556 deletions(-) delete mode 100644 sandbox/qe/Cargo.lock delete mode 100644 sandbox/qe/Cargo.toml delete mode 160000 sandbox/qe/RadixSpline delete mode 100644 sandbox/qe/RadixSplineLib/radixspline.cpp delete mode 100644 sandbox/qe/RadixSplineLib/radixspline.h delete mode 100644 sandbox/qe/build_bindings.rs delete mode 100644 sandbox/qe/redshift.py delete mode 100644 sandbox/qe/src/bin/bench_q3.rs delete mode 100644 sandbox/qe/src/bin/bench_tpch.rs delete mode 100644 sandbox/qe/src/bin/repl.rs delete mode 100644 sandbox/qe/src/datafusion_state.rs delete mode 100644 sandbox/qe/src/dataset_gen/emps_depts.rs delete mode 100644 sandbox/qe/src/dataset_gen/mod.rs delete mode 100644 sandbox/qe/src/dataset_gen/tpch.rs delete mode 100644 sandbox/qe/src/lib.rs delete mode 100644 sandbox/qe/src/ops/filter.rs delete mode 100644 sandbox/qe/src/ops/mod.rs delete mode 100644 sandbox/qe/src/ops/tap.rs delete mode 100644 sandbox/qe/src/radixspline.rs delete mode 100644 sandbox/qe/src/rewrite.rs delete mode 100644 sandbox/qe/test.csv delete mode 100644 sandbox/qe/test2.parquet delete mode 100755 sandbox/qe/tpch-every.sh delete mode 100755 sandbox/qe/tpch-individual.sh delete mode 100755 sandbox/qe/tpch-setup.sh delete mode 100644 sandbox/qe/tpch/column_to_binary.py delete mode 100644 sandbox/qe/tpch/csv_to_parquet.py delete mode 100644 sandbox/qe/tpch/headers.json delete mode 100644 sandbox/qe/tpch/load_tpch.sql delete mode 100644 sandbox/qe/tpch/queries/1.sql delete mode 100644 sandbox/qe/tpch/queries/10.sql delete mode 100644 sandbox/qe/tpch/queries/11.sql delete mode 100644 sandbox/qe/tpch/queries/12.sql delete mode 100644 sandbox/qe/tpch/queries/13.sql delete mode 100644 sandbox/qe/tpch/queries/14.sql delete mode 100644 sandbox/qe/tpch/queries/15.sql delete mode 100644 sandbox/qe/tpch/queries/16.sql delete mode 100644 sandbox/qe/tpch/queries/17.sql delete mode 100644 sandbox/qe/tpch/queries/18.sql delete mode 100644 sandbox/qe/tpch/queries/19.sql delete mode 100644 sandbox/qe/tpch/queries/2.sql delete mode 100644 sandbox/qe/tpch/queries/20.sql delete mode 100644 sandbox/qe/tpch/queries/21.sql delete mode 100644 sandbox/qe/tpch/queries/22.sql delete mode 100644 sandbox/qe/tpch/queries/3.sql delete mode 100644 sandbox/qe/tpch/queries/4.sql delete mode 100644 sandbox/qe/tpch/queries/5.sql delete mode 100644 sandbox/qe/tpch/queries/6.sql delete mode 100644 sandbox/qe/tpch/queries/7.sql delete mode 100644 sandbox/qe/tpch/queries/8.sql delete mode 100644 sandbox/qe/tpch/queries/9.sql delete mode 100644 sandbox/qe/tpch/queries/combined.sql delete mode 100644 sandbox/qe/tpch/status.txt delete mode 100644 sandbox/qe/tpch/tbl_to_csv.py diff --git a/.gitmodules b/.gitmodules index 1d0f7f1c..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "sandbox/qe/RadixSpline"] - path = sandbox/qe/RadixSpline - url = https://github.com/learnedsystems/RadixSpline diff --git a/sandbox/qe/Cargo.lock b/sandbox/qe/Cargo.lock deleted file mode 100644 index 01aea2eb..00000000 --- a/sandbox/qe/Cargo.lock +++ /dev/null @@ -1,2893 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d713b3834d76b85304d4d525563c1276e2e30dc97cc67bfb4585a4a29fc2c89f" -dependencies = [ - "cfg-if", - "const-random", - "getrandom", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "allocator-api2" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" - -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "arrow" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa285343fba4d829d49985bdc541e3789cf6000ed0e84be7c039438df4a4e78c" -dependencies = [ - "arrow-arith", - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-csv", - "arrow-data", - "arrow-ipc", - "arrow-json", - "arrow-ord", - "arrow-row", - "arrow-schema", - "arrow-select", - "arrow-string", -] - -[[package]] -name = "arrow-arith" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "753abd0a5290c1bcade7c6623a556f7d1659c5f4148b140b5b63ce7bd1a45705" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "chrono", - "half", - "num", -] - -[[package]] -name = "arrow-array" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d390feeb7f21b78ec997a4081a025baef1e2e0d6069e181939b61864c9779609" -dependencies = [ - "ahash", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "chrono", - "chrono-tz", - "half", - "hashbrown", - "num", -] - -[[package]] -name = "arrow-buffer" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69615b061701bcdffbc62756bc7e85c827d5290b472b580c972ebbbf690f5aa4" -dependencies = [ - "bytes", - "half", - "num", -] - -[[package]] -name = "arrow-cast" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e448e5dd2f4113bf5b74a1f26531708f5edcacc77335b7066f9398f4bcf4cdef" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select", - "base64", - "chrono", - "comfy-table", - "half", - "lexical-core", - "num", -] - -[[package]] -name = "arrow-csv" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46af72211f0712612f5b18325530b9ad1bfbdc87290d5fbfd32a7da128983781" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-data", - "arrow-schema", - "chrono", - "csv", - "csv-core", - "lazy_static", - "lexical-core", - "regex", -] - -[[package]] -name = "arrow-data" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67d644b91a162f3ad3135ce1184d0a31c28b816a581e08f29e8e9277a574c64e" -dependencies = [ - "arrow-buffer", - "arrow-schema", - "half", - "num", -] - -[[package]] -name = "arrow-ipc" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03dea5e79b48de6c2e04f03f62b0afea7105be7b77d134f6c5414868feefb80d" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-data", - "arrow-schema", - "flatbuffers", - "lz4_flex", -] - -[[package]] -name = "arrow-json" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8950719280397a47d37ac01492e3506a8a724b3fb81001900b866637a829ee0f" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-data", - "arrow-schema", - "chrono", - "half", - "indexmap", - "lexical-core", - "num", - "serde", - "serde_json", -] - -[[package]] -name = "arrow-ord" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed9630979034077982d8e74a942b7ac228f33dd93a93b615b4d02ad60c260be" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select", - "half", - "num", -] - -[[package]] -name = "arrow-row" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007035e17ae09c4e8993e4cb8b5b96edf0afb927cd38e2dff27189b274d83dcf" -dependencies = [ - "ahash", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "half", - "hashbrown", -] - -[[package]] -name = "arrow-schema" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ff3e9c01f7cd169379d269f926892d0e622a704960350d09d331be3ec9e0029" - -[[package]] -name = "arrow-select" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce20973c1912de6514348e064829e50947e35977bb9d7fb637dc99ea9ffd78c" -dependencies = [ - "ahash", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "num", -] - -[[package]] -name = "arrow-string" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f3b37f2aeece31a2636d1b037dabb69ef590e03bdc7eb68519b51ec86932a7" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select", - "num", - "regex", - "regex-syntax", -] - -[[package]] -name = "async-compression" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" -dependencies = [ - "bzip2", - "flate2", - "futures-core", - "futures-io", - "memchr", - "pin-project-lite", - "tokio", - "xz2", - "zstd", - "zstd-safe", -] - -[[package]] -name = "async-trait" -version = "0.1.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "bindgen" -version = "0.69.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" -dependencies = [ - "bitflags 2.4.2", - "cexpr", - "clang-sys", - "itertools", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.50", - "which", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" - -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest", -] - -[[package]] -name = "blake3" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "brad_qe" -version = "0.1.0" -dependencies = [ - "arrow", - "bindgen", - "cc", - "clap", - "csv", - "cty", - "datafusion", - "futures", - "rand", - "rustyline", - "tokio", -] - -[[package]] -name = "brotli" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "bumpalo" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b1be7772ee4501dba05acbe66bb1e8760f6a6c474a36035631638e4415f130" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" - -[[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "cc" -version = "1.0.96" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" -dependencies = [ - "jobserver", - "libc", - "once_cell", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "windows-targets 0.52.0", -] - -[[package]] -name = "chrono-tz" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" -dependencies = [ - "chrono", - "chrono-tz-build", - "phf", -] - -[[package]] -name = "chrono-tz-build" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" -dependencies = [ - "parse-zoneinfo", - "phf", - "phf_codegen", -] - -[[package]] -name = "clang-sys" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "4.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "clap_lex" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" - -[[package]] -name = "clipboard-win" -version = "4.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" -dependencies = [ - "error-code", - "str-buf", - "winapi", -] - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "comfy-table" -version = "7.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" -dependencies = [ - "strum 0.25.0", - "strum_macros 0.25.3", - "unicode-width", -] - -[[package]] -name = "const-random" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" -dependencies = [ - "const-random-macro", -] - -[[package]] -name = "const-random-macro" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -dependencies = [ - "getrandom", - "once_cell", - "tiny-keccak", -] - -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "csv" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" -dependencies = [ - "memchr", -] - -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown", - "lock_api", - "once_cell", - "parking_lot_core", -] - -[[package]] -name = "datafusion" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b360b692bf6c6d6e6b6dbaf41a3be0020daeceac0f406aed54c75331e50dbb" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "arrow-ipc", - "arrow-schema", - "async-compression", - "async-trait", - "bytes", - "bzip2", - "chrono", - "dashmap", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "datafusion-functions", - "datafusion-functions-array", - "datafusion-optimizer", - "datafusion-physical-expr", - "datafusion-physical-plan", - "datafusion-sql", - "flate2", - "futures", - "glob", - "half", - "hashbrown", - "indexmap", - "itertools", - "log", - "num_cpus", - "object_store", - "parking_lot", - "parquet", - "pin-project-lite", - "rand", - "sqlparser", - "tempfile", - "tokio", - "tokio-util", - "url", - "uuid", - "xz2", - "zstd", -] - -[[package]] -name = "datafusion-common" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37f343ccc298f440e25aa38ff82678291a7acc24061c7370ba6c0ff5cc811412" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "arrow-buffer", - "arrow-schema", - "chrono", - "half", - "libc", - "num_cpus", - "object_store", - "parquet", - "sqlparser", -] - -[[package]] -name = "datafusion-execution" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9c93043081487e335399a21ebf8295626367a647ac5cb87d41d18afad7d0f7" -dependencies = [ - "arrow", - "chrono", - "dashmap", - "datafusion-common", - "datafusion-expr", - "futures", - "hashbrown", - "log", - "object_store", - "parking_lot", - "rand", - "tempfile", - "url", -] - -[[package]] -name = "datafusion-expr" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e204d89909e678846b6a95f156aafc1ee5b36cb6c9e37ec2e1449b078a38c818" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "datafusion-common", - "paste", - "sqlparser", - "strum 0.26.1", - "strum_macros 0.26.1", -] - -[[package]] -name = "datafusion-functions" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98f1c73f7801b2b8ba2297b3ad78ffcf6c1fc6b8171f502987eb9ad5cb244ee7" -dependencies = [ - "arrow", - "base64", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "hex", - "log", -] - -[[package]] -name = "datafusion-functions-array" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d16a0ddf2c991526f6ffe2f47a72c6da0b7354d6c32411dd20631fe2e38937" -dependencies = [ - "arrow", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "log", - "paste", -] - -[[package]] -name = "datafusion-optimizer" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ae27e07bf1f04d327be5c2a293470879801ab5535204dc3b16b062fda195496" -dependencies = [ - "arrow", - "async-trait", - "chrono", - "datafusion-common", - "datafusion-expr", - "datafusion-physical-expr", - "hashbrown", - "itertools", - "log", - "regex-syntax", -] - -[[package]] -name = "datafusion-physical-expr" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dde620cd9ef76a3bca9c754fb68854bd2349c49f55baf97e08001f9e967f6d6b" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "arrow-buffer", - "arrow-ord", - "arrow-schema", - "arrow-string", - "base64", - "blake2", - "blake3", - "chrono", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "half", - "hashbrown", - "hex", - "indexmap", - "itertools", - "log", - "md-5", - "paste", - "petgraph", - "rand", - "regex", - "sha2", - "unicode-segmentation", - "uuid", -] - -[[package]] -name = "datafusion-physical-plan" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a4c75fba9ea99d64b2246cbd2fcae2e6fc973e6616b1015237a616036506dd4" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "arrow-buffer", - "arrow-schema", - "async-trait", - "chrono", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr", - "futures", - "half", - "hashbrown", - "indexmap", - "itertools", - "log", - "once_cell", - "parking_lot", - "pin-project-lite", - "rand", - "tokio", - "uuid", -] - -[[package]] -name = "datafusion-sql" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21474a95c3a62d113599d21b439fa15091b538bac06bd20be0bb2e7d22903c09" -dependencies = [ - "arrow", - "arrow-schema", - "datafusion-common", - "datafusion-expr", - "log", - "sqlparser", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", - "subtle", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - -[[package]] -name = "either" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" - -[[package]] -name = "endian-type" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "error-code" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" -dependencies = [ - "libc", - "str-buf", -] - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "fd-lock" -version = "3.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5" -dependencies = [ - "cfg-if", - "rustix", - "windows-sys 0.48.0", -] - -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - -[[package]] -name = "flatbuffers" -version = "23.5.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dac53e22462d78c16d64a1cd22371b54cc3fe94aa15e7886a2fa6e5d1ab8640" -dependencies = [ - "bitflags 1.3.2", - "rustc_version", -] - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-executor" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "half" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" -dependencies = [ - "cfg-if", - "crunchy", - "num-traits", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -dependencies = [ - "ahash", - "allocator-api2", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "integer-encoding" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "jobserver" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "lexical-core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" -dependencies = [ - "lexical-parse-float", - "lexical-parse-integer", - "lexical-util", - "lexical-write-float", - "lexical-write-integer", -] - -[[package]] -name = "lexical-parse-float" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" -dependencies = [ - "lexical-parse-integer", - "lexical-util", - "static_assertions", -] - -[[package]] -name = "lexical-parse-integer" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" -dependencies = [ - "lexical-util", - "static_assertions", -] - -[[package]] -name = "lexical-util" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" -dependencies = [ - "static_assertions", -] - -[[package]] -name = "lexical-write-float" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" -dependencies = [ - "lexical-util", - "lexical-write-integer", - "static_assertions", -] - -[[package]] -name = "lexical-write-integer" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" -dependencies = [ - "lexical-util", - "static_assertions", -] - -[[package]] -name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "libloading" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" -dependencies = [ - "cfg-if", - "windows-targets 0.52.0", -] - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "libredox" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" -dependencies = [ - "bitflags 2.4.2", - "libc", - "redox_syscall", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "lz4_flex" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912b45c753ff5f7f5208307e8ace7d2a2e30d024e26d3509f3dce546c044ce15" -dependencies = [ - "twox-hash", -] - -[[package]] -name = "lzma-sys" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest", -] - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "nibble_vec" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" -dependencies = [ - "smallvec", -] - -[[package]] -name = "nix" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "libc", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "object_store" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d139f545f64630e2e3688fd9f81c470888ab01edeb72d13b4e86c566f1130000" -dependencies = [ - "async-trait", - "bytes", - "chrono", - "futures", - "humantime", - "itertools", - "parking_lot", - "percent-encoding", - "snafu", - "tokio", - "tracing", - "url", - "walkdir", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "ordered-float" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" -dependencies = [ - "num-traits", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.48.5", -] - -[[package]] -name = "parquet" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "547b92ebf0c1177e3892f44c8f79757ee62e678d564a9834189725f2c5b7a750" -dependencies = [ - "ahash", - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-data", - "arrow-ipc", - "arrow-schema", - "arrow-select", - "base64", - "brotli", - "bytes", - "chrono", - "flate2", - "futures", - "half", - "hashbrown", - "lz4_flex", - "num", - "num-bigint", - "object_store", - "paste", - "seq-macro", - "snap", - "thrift", - "tokio", - "twox-hash", - "zstd", -] - -[[package]] -name = "parse-zoneinfo" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" -dependencies = [ - "regex", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "petgraph" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" -dependencies = [ - "fixedbitset", - "indexmap", -] - -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_codegen" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" -dependencies = [ - "phf_generator", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared", - "rand", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "prettyplease" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" -dependencies = [ - "proc-macro2", - "syn 2.0.50", -] - -[[package]] -name = "proc-macro2" -version = "1.0.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radix_trie" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" -dependencies = [ - "endian-type", - "nibble_vec", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" -dependencies = [ - "getrandom", - "libredox", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "rustyline" -version = "10.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e83c32c3f3c33b08496e0d1df9ea8c64d39adb8eb36a1ebb1440c690697aef" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "clipboard-win", - "dirs-next", - "fd-lock", - "libc", - "log", - "memchr", - "nix", - "radix_trie", - "scopeguard", - "unicode-segmentation", - "unicode-width", - "utf8parse", - "winapi", -] - -[[package]] -name = "ryu" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "semver" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" - -[[package]] -name = "seq-macro" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" - -[[package]] -name = "serde" -version = "1.0.197" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.197" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "serde_json" -version = "1.0.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" - -[[package]] -name = "snafu" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" -dependencies = [ - "doc-comment", - "snafu-derive", -] - -[[package]] -name = "snafu-derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "snap" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" - -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "sqlparser" -version = "0.43.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f95c4bae5aba7cd30bd506f7140026ade63cff5afd778af8854026f9606bf5d4" -dependencies = [ - "log", - "sqlparser_derive", -] - -[[package]] -name = "sqlparser_derive" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b2e185515564f15375f593fb966b5718bc624ba77fe49fa4616ad619690554" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "str-buf" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.50", -] - -[[package]] -name = "strum_macros" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.50", -] - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "thiserror" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "thrift" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09" -dependencies = [ - "byteorder", - "integer-encoding", - "ordered-float", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - -[[package]] -name = "twox-hash" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "static_assertions", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" - -[[package]] -name = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "uuid" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" -dependencies = [ - "getrandom", -] - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "walkdir" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.50", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" - -[[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", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - -[[package]] -name = "xz2" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2" -dependencies = [ - "lzma-sys", -] - -[[package]] -name = "zerocopy" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "zstd" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/sandbox/qe/Cargo.toml b/sandbox/qe/Cargo.toml deleted file mode 100644 index f02fdada..00000000 --- a/sandbox/qe/Cargo.toml +++ /dev/null @@ -1,35 +0,0 @@ -[package] -name = "brad_qe" -version = "0.1.0" -edition = "2021" -# NOTE: This currently does not work. (C++ standard library linking error) -# build = "build.rs" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -tokio = { version = "*", features = ["full"] } -clap = { version = "*", features = ["derive"] } -datafusion = "36.0.0" -futures = "0.3.21" -arrow = "50.0.0" -rustyline = "10.0.0" -rand = { version = "0.8.5", features = ["small_rng"] } -csv = "1.3.0" -cty = "0.2.2" - -[build-dependencies] -bindgen = "0.69.4" -cc = "1.0.96" - -[[bin]] -name = "bench_q3" -path = "src/bin/bench_q3.rs" - -[[bin]] -name = "brad_qe_repl" -path = "src/bin/repl.rs" - -# [[bin]] -# name = "test_radixspline" -# path = "src/bin/test_radixspline.rs" diff --git a/sandbox/qe/RadixSpline b/sandbox/qe/RadixSpline deleted file mode 160000 index ab96aa59..00000000 --- a/sandbox/qe/RadixSpline +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ab96aa59d429e7423beba2350bdcdf88952df282 diff --git a/sandbox/qe/RadixSplineLib/radixspline.cpp b/sandbox/qe/RadixSplineLib/radixspline.cpp deleted file mode 100644 index 38b55492..00000000 --- a/sandbox/qe/RadixSplineLib/radixspline.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "radixspline.h" - -void* build(const uint64_t* ks, uint64_t size) { - RSData* rs = new RSData; - rs->keys = std::vector(size); - memcpy(rs->keys.data(), ks, size * sizeof(uint64_t)); - uint64_t min = rs->keys.front(); - uint64_t max = rs->keys.back(); - rs::Builder rsb(min, max); - for (const auto& key : rs->keys) rsb.AddKey(key); - rs::RadixSpline rso = rsb.Finalize(); - rs->rspline = rso; - return (void*)rs; -} - -bool lookup(void* ptr, uint64_t key) { - RSData* rs = (RSData*) ptr; - rs::SearchBound bound = rs->rspline.GetSearchBound(key); - auto start = begin(rs->keys) + bound.begin, last = begin(rs->keys) + bound.end; - auto iter = std::lower_bound(start, last, key); - return iter != rs->keys.end() && *iter == key; -} - -void clear(void* ptr) { - RSData* rs = (RSData*) ptr; - delete rs; -} diff --git a/sandbox/qe/RadixSplineLib/radixspline.h b/sandbox/qe/RadixSplineLib/radixspline.h deleted file mode 100644 index e5b6b6c9..00000000 --- a/sandbox/qe/RadixSplineLib/radixspline.h +++ /dev/null @@ -1,18 +0,0 @@ -#include "../RadixSpline/include/rs/builder.h" -#include - - -struct RSData { - std::vector keys; - rs::RadixSpline rspline; -}; - -extern "C" { - - int32_t add(int32_t a, int32_t b); - void* build(const uint64_t* ks, uint64_t size); - - bool lookup(void* ptr, uint64_t key); - - void clear(void* ptr); -} diff --git a/sandbox/qe/build_bindings.rs b/sandbox/qe/build_bindings.rs deleted file mode 100644 index 2b422f74..00000000 --- a/sandbox/qe/build_bindings.rs +++ /dev/null @@ -1,86 +0,0 @@ -use std::env; -use std::path::PathBuf; - -// NOTE: This file should be named `build.rs` once it is working. - -fn main() { - // This is the directory where the `c` library is located. - let libdir_path = PathBuf::from("RadixSplineLib") - // Canonicalize the path as `rustc-link-search` requires an absolute - // path. - .canonicalize() - .expect("cannot canonicalize path"); - - // This is the path to the `c` headers file. - let headers_path = libdir_path.join("radixspline.h"); - let headers_path_str = headers_path.to_str().expect("Path is not a valid string"); - - // This is the path to the intermediate object file for our library. - let obj_path = libdir_path.join("radixspline.o"); - // This is the path to the static library file. - let lib_path = libdir_path.join("libradixspline.a"); - - // Run `clang` to compile the `radixspline.cpp` file into a `radixspline.o` object file. - // Unwrap if it is not possible to spawn the process. - if !std::process::Command::new("clang++") - .arg("-c") - .arg("-o") - .arg(&obj_path) - .arg(libdir_path.join("radixspline.cpp")) - .output() - .expect("could not spawn `clang`") - .status - .success() - { - // Panic if the command was not successful. - panic!("could not compile object file"); - } - - // Run `ar` to generate the `libradixspline.a` file from the `radixspline.o` file. - // Unwrap if it is not possible to spawn the process. - if !std::process::Command::new("ar") - .arg("rcus") - .arg(lib_path) - .arg(obj_path) - .output() - .expect("could not spawn `ar`") - .status - .success() - { - // Panic if the command was not successful. - panic!("could not emit library file"); - } - - // Tell cargo to look for shared libraries in the specified directory - println!("cargo:rustc-link-search=native={}", libdir_path.to_str().unwrap()); - - // Tell cargo to tell rustc to link our `radixspline` library. Cargo will - // automatically know it must look for a `libradixspline.a` file. - println!("cargo:rustc-link-lib=radixspline"); - println!("cargo:rustc-link-lib=stdc++"); - - // The bindgen::Builder is the main entry point - // to bindgen, and lets you build up options for - // the resulting bindings. - let bindings = bindgen::Builder::default() - .opaque_type("^(std::.*)$") - .allowlist_function("build") - .allowlist_function("lookup") - .allowlist_function("clear") - // The input header we would like to generate - // bindings for. - .header(headers_path_str) - // Tell cargo to invalidate the built crate whenever any of the - // included header files changed. - .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) - // Finish the builder and generate the bindings. - .generate() - // Unwrap the Result and panic on failure. - .expect("Unable to generate bindings"); - - // Write the bindings to the $OUT_DIR/bindings.rs file. - let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("bindings.rs"); - bindings - .write_to_file(out_path) - .expect("Couldn't write bindings!"); -} diff --git a/sandbox/qe/redshift.py b/sandbox/qe/redshift.py deleted file mode 100644 index a7426230..00000000 --- a/sandbox/qe/redshift.py +++ /dev/null @@ -1,254 +0,0 @@ -import argparse -import os -import redshift_connector -import time - - -def init(cs): - cs.execute( - """ - CREATE TABLE IF NOT EXISTS "nation" ( - "n_nationkey" INT, - "n_name" CHAR(25), - "n_regionkey" INT, - "n_comment" VARCHAR(152), - PRIMARY KEY ("n_nationkey")); - """ - ) - - cs.execute( - """ - CREATE TABLE IF NOT EXISTS "region" ( - "r_regionkey" INT, - "r_name" CHAR(25), - "r_comment" VARCHAR(152), - PRIMARY KEY ("r_regionkey")); - """ - ) - - cs.execute( - """ - CREATE TABLE IF NOT EXISTS "supplier" ( - "s_suppkey" INT, - "s_name" CHAR(25), - "s_address" VARCHAR(40), - "s_nationkey" INT, - "s_phone" CHAR(15), - "s_acctbal" DECIMAL(15,2), - "s_comment" VARCHAR(101), - PRIMARY KEY ("s_suppkey")); - """ - ) - - cs.execute( - """ - CREATE TABLE IF NOT EXISTS "customer" ( - "c_custkey" INT, - "c_name" VARCHAR(25), - "c_address" VARCHAR(40), - "c_nationkey" INT, - "c_phone" CHAR(15), - "c_acctbal" DECIMAL(15,2), - "c_mktsegment" CHAR(10), - "c_comment" VARCHAR(117), - PRIMARY KEY ("c_custkey")); - """ - ) - - cs.execute( - """ - CREATE TABLE IF NOT EXISTS "part" ( - "p_partkey" INT, - "p_name" VARCHAR(55), - "p_mfgr" CHAR(25), - "p_brand" CHAR(10), - "p_type" VARCHAR(25), - "p_size" INT, - "p_container" CHAR(10), - "p_retailprice" DECIMAL(15,2) , - "p_comment" VARCHAR(23) , - PRIMARY KEY ("p_partkey")); - """ - ) - - cs.execute( - """ - CREATE TABLE IF NOT EXISTS "partsupp" ( - "ps_partkey" INT, - "ps_suppkey" INT, - "ps_availqty" INT, - "ps_supplycost" DECIMAL(15,2), - "ps_comment" VARCHAR(199), - PRIMARY KEY ("ps_partkey", "ps_suppkey")); - """ - ) - - cs.execute( - """ - CREATE TABLE IF NOT EXISTS "orders" ( - "o_orderkey" INT, - "o_custkey" INT, - "o_orderstatus" CHAR(1), - "o_totalprice" DECIMAL(15,2), - "o_orderdate" DATE, - "o_orderpriority" CHAR(15), - "o_clerk" CHAR(15), - "o_shippriority" INT, - "o_comment" VARCHAR(79), - PRIMARY KEY ("o_orderkey")); - """ - ) - - cs.execute( - """ - CREATE TABLE IF NOT EXISTS "lineitem"( - "l_orderkey" INT, - "l_partkey" INT, - "l_suppkey" INT, - "l_linenumber" INT, - "l_quantity" DECIMAL(15,2), - "l_extendedprice" DECIMAL(15,2), - "l_discount" DECIMAL(15,2), - "l_tax" DECIMAL(15,2), - "l_returnflag" CHAR(1), - "l_linestatus" CHAR(1), - "l_shipdate" DATE, - "l_commitdate" DATE, - "l_receiptdate" DATE, - "l_shipinstruct" CHAR(25), - "l_shipmode" CHAR(10), - "l_comment" VARCHAR(44) - ); - """ - ) - cs.execute( - """ - COPY nation - FROM 's3://geoffxy-research/shared/sf1/nation.csv' - IAM_ROLE 'arn:aws:iam::498725316081:role/service-role/AmazonRedshift-CommandsAccessRole-20230606T052021' - CSV - IGNOREHEADER 1; - """ - ) - cs.execute( - """ - COPY region - FROM 's3://geoffxy-research/shared/sf1/region.csv' - IAM_ROLE 'arn:aws:iam::498725316081:role/service-role/AmazonRedshift-CommandsAccessRole-20230606T052021' - CSV - IGNOREHEADER 1; - """ - ) - cs.execute( - """ - COPY supplier - FROM 's3://geoffxy-research/shared/sf1/supplier.csv' - IAM_ROLE 'arn:aws:iam::498725316081:role/service-role/AmazonRedshift-CommandsAccessRole-20230606T052021' - CSV - IGNOREHEADER 1; - """ - ) - cs.execute( - """ - COPY customer - FROM 's3://geoffxy-research/shared/sf1/customer.csv' - IAM_ROLE 'arn:aws:iam::498725316081:role/service-role/AmazonRedshift-CommandsAccessRole-20230606T052021' - CSV - IGNOREHEADER 1; - """ - ) - cs.execute( - """ - COPY part - FROM 's3://geoffxy-research/shared/sf1/part.csv' - IAM_ROLE 'arn:aws:iam::498725316081:role/service-role/AmazonRedshift-CommandsAccessRole-20230606T052021' - CSV - IGNOREHEADER 1; - """ - ) - cs.execute( - """ - COPY partsupp - FROM 's3://geoffxy-research/shared/sf1/partsupp.csv' - IAM_ROLE 'arn:aws:iam::498725316081:role/service-role/AmazonRedshift-CommandsAccessRole-20230606T052021' - CSV - IGNOREHEADER 1; - """ - ) - cs.execute( - """ - COPY orders - FROM 's3://geoffxy-research/shared/sf1/orders.csv' - IAM_ROLE 'arn:aws:iam::498725316081:role/service-role/AmazonRedshift-CommandsAccessRole-20230606T052021' - CSV - IGNOREHEADER 1; - """ - ) - cs.execute( - """ - COPY lineitem - FROM 's3://geoffxy-research/shared/sf1/lineitem.csv' - IAM_ROLE 'arn:aws:iam::498725316081:role/service-role/AmazonRedshift-CommandsAccessRole-20230606T052021' - CSV - IGNOREHEADER 1; - """ - ) - - -def time_query(cs, query_dir, i): - query_path = os.path.join(query_dir, f"{i}.sql") - if not os.path.exists(query_path): - print(f"File {query_path} does not exist.") - return - - with open(query_path, "r") as file: - query = file.read() - start_time = time.time() - cs.execute(query) - end_time = time.time() - elapsed_time = end_time - start_time - print(f"Query in file {i}.sql took {elapsed_time:.4f} seconds to execute.") - - -def run(cs): - # Where TPC-H queries are located - query_dir = "/spinning/axing/queries" - - for i in range(1, 23): - time_query(cs, query_dir, i) - - -if __name__ == "__main__": - parser = argparse.ArgumentParser( - description='Benchmark TPC-H on Redshift. takes in a argument "init"|"run"' - ) - parser.add_argument( - "task", - choices=["init", "run"], - help="init on first time running, run to run the benchmark", - ) - - args = parser.parse_args() - - conn = redshift_connector.connect( - host="redshift-axing.cv1pkocptzr2.us-east-1.redshift.amazonaws.com", - database="tpch", - port=5439, - user="awsuser", - password="axingUROP2024", - ) - - conn.rollback() - conn.autocommit = True - conn.run("VACUUM") - - cs = conn.cursor() - - cs.execute("SET enable_result_cache_for_session TO OFF") - - if args.task == "init": - init(cs) - elif args.task == "run": - run(cs) - else: - print(f"Unknown task: {args.task}") diff --git a/sandbox/qe/src/bin/bench_q3.rs b/sandbox/qe/src/bin/bench_q3.rs deleted file mode 100644 index 10fd3c93..00000000 --- a/sandbox/qe/src/bin/bench_q3.rs +++ /dev/null @@ -1,201 +0,0 @@ -use arrow::util::pretty; -use brad_qe::DB; -use brad_qe::rewrite::inject_tap; -use clap::Parser; -use datafusion::error::DataFusionError; -use datafusion::execution::options::CsvReadOptions; -use datafusion::physical_plan::displayable; -use datafusion::physical_plan::ExecutionPlan; -use datafusion::physical_plan::filter::FilterExec; -use std::fs; -use std::io; -use std::path::PathBuf; -use std::time::{Duration, Instant}; -use std::sync::Arc; - -#[derive(Parser)] -struct CliArgs { - /// Path to a directory containing TPC-H files in text format. - #[clap(long)] - tpch_txt_dir: PathBuf, - - /// Data delimiter used in the data files. - /// Default value is `b'|'` - #[clap(long)] - delimiter: Option, - - /// Action to take. - #[clap(long)] - action: Option, - - // Number of times to run the experiment. - #[clap(long)] - repetitions: Option, -} - -fn get_files(data_dir: &PathBuf) -> Vec { - if let Ok(entries) = fs::read_dir(data_dir) { - let files: Vec = entries - .filter_map(|entry| { - if let Ok(entry) = entry { - Some(entry.path()) - } else { - None - } - }) - .collect(); - files - } else { - vec![] - } -} - -async fn run_query_and_print_results( - db: &DB, - query: &str, - debug: bool, - skip_execution: bool, -) -> Result<(), DataFusionError> { - let query = query.to_string(); - if debug { - let logical_plan = db.to_logical_plan(&query).await?; - eprintln!("{:#?}", logical_plan); - - let physical_plan = db.to_physical_plan(&query).await?; - let dpp = displayable(physical_plan.as_ref()); - eprintln!("\n{}", dpp.indent(false)); - } - if !skip_execution { - let start = Instant::now(); - let results = db.execute(&query).await?; - let elapsed_time = start.elapsed(); - pretty::print_batches(&results)?; - eprintln!("Ran for {:.2?}", elapsed_time); - } - Ok(()) -} - -async fn run_timed_query(db: &DB, query: &String) -> Result { - let start = Instant::now(); - db.execute(query).await?; - Ok(start.elapsed()) -} - -async fn load_data(db: &DB, args: &CliArgs) -> Result<(), DataFusionError> { - let files = get_files(&args.tpch_txt_dir); - eprintln!("Detected data files:"); - for f in &files { - eprintln!("{}", f.display()); - } - - eprintln!("\nLoading data..."); - let delim = args.delimiter.unwrap_or(b'|'); - let csv_options = CsvReadOptions::new() - .has_header(true) - .delimiter(delim) - .file_extension(".tbl"); - db.register_csvs_as_memtables(files, Some(csv_options), true) - .await?; - eprintln!("Done!\n"); - Ok(()) -} - -const QUERY_3: &str = " -SELECT - l_orderkey, - SUM(l_extendedprice * (1 - l_discount)) AS revenue, - o_orderdate, - o_shippriority -FROM - customer, - orders, - lineitem -WHERE - c_mktsegment = 'BUILDING' - AND c_custkey = o_custkey - AND l_orderkey = o_orderkey - AND o_orderdate < date '1995-03-15' - AND l_shipdate > date '1995-03-15' -GROUP BY - l_orderkey, - o_orderdate, - o_shippriority -ORDER BY - revenue DESC, - o_orderdate -LIMIT 10; -"; - -const QUERY_SIMPLE: &str = - "SELECT o_orderkey FROM orders WHERE o_orderdate < date '1995-03-15' LIMIT 10;"; - -fn qs_inject(node: &Arc) -> bool { - let n = node.clone(); - // Inject just after the deepest `FilterExec`. - n.as_any().downcast_ref::().is_some() -} - -#[tokio::main] -async fn main() -> Result<(), DataFusionError> { - let args = CliArgs::parse(); - let db = DB::new(); - - load_data(&db, &args).await?; - - // Print out tables. - // let tables = db.get_table_names(); - // for t in &tables { - // println!("{}", t); - // if let Some(schema) = db.get_schema_for_table(t) { - // println!("{:#?}", schema); - // } - // } - - match args.action { - Some(ref s) if s == "q3" => { - let repetitions = args.repetitions.unwrap_or(1); - let q3 = String::from(QUERY_3); - let mut writer = csv::Writer::from_writer(io::stdout()); - writer - .write_record(&["action", "run_time_ms"]) - .map_err(|e| DataFusionError::External(Box::new(e)))?; - for _ in 0..repetitions { - let rt = run_timed_query(&db, &q3).await?; - writer - .write_record(&["q3", &rt.as_millis().to_string()]) - .map_err(|e| DataFusionError::External(Box::new(e)))?; - } - writer.flush()?; - } - Some(ref s) if s == "q3_debug" => { - run_query_and_print_results(&db, QUERY_3, true, false).await?; - } - Some(ref s) if s == "qs_debug" => { - run_query_and_print_results(&db, QUERY_SIMPLE, true, false).await?; - } - Some(ref s) if s == "qs_tap" => { - let query = String::from(QUERY_SIMPLE); - let orig_physical_plan = db.to_physical_plan(&query).await?; - let dpp = displayable(orig_physical_plan.as_ref()); - eprintln!("\nOriginal plan\n{}", dpp.indent(false)); - - let new_physical_plan = inject_tap(&orig_physical_plan, qs_inject)?; - if let Some(npp) = new_physical_plan { - let dpp2 = displayable(npp.as_ref()); - eprintln!("\nAltered plan\n{}", dpp2.indent(false)); - - let start = Instant::now(); - let results = db.execute_physical_plan(npp).await?; - let elapsed_time = start.elapsed(); - pretty::print_batches(&results)?; - eprintln!("Ran for {:.2?}", elapsed_time); - - } else { - eprintln!("\nNo modifications."); - } - } - _ => (), - } - - Ok(()) -} diff --git a/sandbox/qe/src/bin/bench_tpch.rs b/sandbox/qe/src/bin/bench_tpch.rs deleted file mode 100644 index 3a22fcd8..00000000 --- a/sandbox/qe/src/bin/bench_tpch.rs +++ /dev/null @@ -1,250 +0,0 @@ -use arrow::util::pretty; -use brad_qe::rewrite::inject_filter; -use brad_qe::DB; -use brad_qe::rewrite::inject_tap; -use clap::Parser; -use datafusion::error::DataFusionError; -use datafusion::execution::options::CsvReadOptions; -use datafusion::physical_plan::displayable; -use datafusion::physical_plan::ExecutionPlan; -use datafusion::physical_plan::filter::FilterExec; -use std::fs; -use std::io; -use std::path::PathBuf; -use std::time::{Duration, Instant}; -use std::sync::Arc; - -#[derive(Parser)] -struct CliArgs { - /// Path to a directory containing TPC-H files in text format. - #[clap(long)] - tpch_txt_dir: PathBuf, - - /// Data delimiter used in the data files. - /// Default value is `b'|'` - #[clap(long)] - delimiter: Option, - - /// Action to take. - #[clap(long)] - action: Option, - - // Number of times to run the experiment. - #[clap(long)] - repetitions: Option, -} - -fn get_files(data_dir: &PathBuf) -> Vec { - if let Ok(entries) = fs::read_dir(data_dir) { - let files: Vec = entries - .filter_map(|entry| { - if let Ok(entry) = entry { - Some(entry.path()) - } else { - None - } - }) - .collect(); - files - } else { - vec![] - } -} - -async fn run_query_and_print_results( - db: &DB, - query: &str, - debug: bool, - skip_execution: bool, -) -> Result<(), DataFusionError> { - let query = query.to_string(); - if debug { - // let logical_plan = db.to_logical_plan(&query).await?; - // eprintln!("{:#?}", logical_plan); - - // let physical_plan = db.to_physical_plan(&query).await?; - // let dpp = displayable(physical_plan.as_ref()); - // eprintln!("\n{}", dpp.indent(false)); - - let start = Instant::now(); - let res = db.execute(&query).await?; - let elapsed_time = start.elapsed(); - pretty::print_batches(&res)?; - println!("(Ran for {:.2?})", elapsed_time); - } - if !skip_execution { - let start = Instant::now(); - let results = db.execute(&query).await?; - let elapsed_time = start.elapsed(); - pretty::print_batches(&results)?; - eprintln!("Ran for {:.2?}", elapsed_time); - } - Ok(()) -} - -async fn run_tpch_queries(db: &DB, repetitions: u32) -> Result<(), DataFusionError> { - let mut writer = csv::Writer::from_writer(io::stdout()); - writer - .write_record(&["query", "run_time_ms"]) - .map_err(|e| DataFusionError::External(Box::new(e)))?; - for q in 1..23 { - let path = format!("./tpch/queries/{q}.sql"); - let query = fs::read_to_string(path)?; - // Discard first run to allow for caching/initialization overhead - run_timed_query(&db, &query).await?; - for _ in 0..repetitions { - let rt = run_timed_query(&db, &query).await?; - writer - .write_record(&[&q.to_string(), &rt.as_millis().to_string()]) - .map_err(|e| DataFusionError::External(Box::new(e)))?; - } - } - writer.flush()?; - Ok(()) -} - -async fn run_timed_query(db: &DB, query: &String) -> Result { - let start = Instant::now(); - db.execute(query).await?; - Ok(start.elapsed()) -} - -async fn load_data(db: &DB, args: &CliArgs) -> Result<(), DataFusionError> { - let files = get_files(&args.tpch_txt_dir); - eprintln!("Detected data files:"); - for f in &files { - eprintln!("{}", f.display()); - } - - eprintln!("\nLoading data..."); - let delim = args.delimiter.unwrap_or(b','); - let csv_options = CsvReadOptions::new() - .has_header(true) - .delimiter(delim) - .file_extension(".csv"); - db.register_csvs_as_memtables(files, Some(csv_options), true) - .await?; - eprintln!("Done!\n"); - Ok(()) -} - -const QUERY_3: &str = " -SELECT - l_orderkey, - SUM(l_extendedprice * (1 - l_discount)) AS revenue, - o_orderdate, - o_shippriority -FROM - customer, - orders, - lineitem -WHERE - c_mktsegment = 'BUILDING' - AND c_custkey = o_custkey - AND l_orderkey = o_orderkey - AND o_orderdate < date '1995-03-15' - AND l_shipdate > date '1995-03-15' -GROUP BY - l_orderkey, - o_orderdate, - o_shippriority -ORDER BY - revenue DESC, - o_orderdate -LIMIT 10; -"; - -const QUERY_SIMPLE: &str = - "SELECT o_orderkey FROM orders WHERE o_orderdate < date '1995-03-15' LIMIT 1;"; - -fn qs_inject(node: &Arc) -> bool { - let n = node.clone(); - // Inject just after the deepest `FilterExec`. - n.as_any().downcast_ref::().is_some() -} - -#[tokio::main] -async fn main() -> Result<(), DataFusionError> { - let args = CliArgs::parse(); - let db = DB::new(); - - load_data(&db, &args).await?; - - match args.action { - Some(ref s) if s == "tpch" => { - let repetitions = args.repetitions.unwrap_or(1); - run_tpch_queries(&db, repetitions).await?; - } - Some(ref s) if s == "q3" => { - let repetitions = args.repetitions.unwrap_or(1); - let q3 = String::from(QUERY_3); - let mut writer = csv::Writer::from_writer(io::stdout()); - writer - .write_record(&["action", "run_time_ms"]) - .map_err(|e| DataFusionError::External(Box::new(e)))?; - for _ in 0..repetitions { - let rt = run_timed_query(&db, &q3).await?; - writer - .write_record(&["q3", &rt.as_millis().to_string()]) - .map_err(|e| DataFusionError::External(Box::new(e)))?; - } - writer.flush()?; - } - Some(ref s) if s == "q3_debug" => { - run_query_and_print_results(&db, QUERY_3, true, false).await?; - } - Some(ref s) if s == "qs_debug" => { - run_query_and_print_results(&db, QUERY_SIMPLE, true, false).await?; - } - Some(ref s) if s == "qs_tap" => { - let query = String::from(QUERY_SIMPLE); - let orig_physical_plan = db.to_physical_plan(&query).await?; - let dpp = displayable(orig_physical_plan.as_ref()); - eprintln!("\nOriginal plan\n{}", dpp.indent(false)); - - let new_physical_plan = inject_tap(&orig_physical_plan, qs_inject)?; - if let Some(npp) = new_physical_plan { - let dpp2 = displayable(npp.as_ref()); - eprintln!("\nAltered plan\n{}", dpp2.indent(false)); - - let start = Instant::now(); - let results = db.execute_physical_plan(npp).await?; - let elapsed_time = start.elapsed(); - pretty::print_batches(&results)?; - eprintln!("Ran for {:.2?}", elapsed_time); - - } else { - eprintln!("\nNo modifications."); - } - } - Some(ref s) if s == "qs_filter" => { - let query = String::from(QUERY_SIMPLE); - let orig_physical_plan = db.to_physical_plan(&query).await?; - let dpp = displayable(orig_physical_plan.as_ref()); - eprintln!("\nOriginal plan\n{}", dpp.indent(false)); - - let new_physical_plan = inject_filter(&orig_physical_plan, qs_inject)?; - if let Some(npp) = new_physical_plan { - let dpp2 = displayable(npp.as_ref()); - eprintln!("\nAltered plan\n{}", dpp2.indent(false)); - - let start = Instant::now(); - let results = db.execute_physical_plan(npp).await?; - let elapsed_time = start.elapsed(); - pretty::print_batches(&results)?; - eprintln!("Ran for {:.2?}", elapsed_time); - } else { - eprintln!("\nNo modifications."); - } - } - Some(ref s) if s == "qs_explain" => { - let query = String::from(QUERY_SIMPLE); - let orig_physical_plan = db.to_physical_plan(&query).await?; - let dpp = displayable(orig_physical_plan.as_ref()); - eprintln!("\nOriginal plan\n{}", dpp.indent(false)); - } - _ => (), - } - - Ok(()) -} diff --git a/sandbox/qe/src/bin/repl.rs b/sandbox/qe/src/bin/repl.rs deleted file mode 100644 index a773d42d..00000000 --- a/sandbox/qe/src/bin/repl.rs +++ /dev/null @@ -1,219 +0,0 @@ -use arrow::util::pretty; -use clap::Parser; -use datafusion::error::DataFusionError; -use brad_qe::DB; -use brad_qe::dataset_gen::DatasetGenerators; -use rustyline::{error::ReadlineError, Editor}; -use std::path::PathBuf; -use std::str::FromStr; -use std::time::Instant; - -const HISTORY_FILE: &str = ".brad_qe_repl_history"; - -enum Command { - Help, - ListTables, - ShowSchema, - RegisterCsv, - RegisterParquet, - RunQuery, - Generate, -} - -impl FromStr for Command { - type Err = (); - fn from_str(candidate: &str) -> Result { - match candidate { - ".help" => Ok(Command::Help), - ".tables" => Ok(Command::ListTables), - ".schema" => Ok(Command::ShowSchema), - ".regcsv" => Ok(Command::RegisterCsv), - ".regparquet" => Ok(Command::RegisterParquet), - ".run" => Ok(Command::RunQuery), - ".generate" => Ok(Command::Generate), - _ => Err(()), - } - } -} - -async fn handle_command(line: &str, db: &mut DB) -> Result<(), DataFusionError> { - let args = line.split(' ').collect::>(); - let command = match Command::from_str(args[0]) { - Ok(cmd) => cmd, - Err(_) => { - println!( - "ERROR: Unrecognized command '{}'. Type .help for help.", - args[0] - ); - return Ok(()); - } - }; - - match command { - Command::Help => { - println!("Available commands:"); - println!(".help\t\t\tPrint this help message."); - println!(".tables\t\t\tList the registered tables."); - println!(".schema \t\tPrint the schema for a table."); - println!(".regcsv \t\tRegister a CSV file as a table."); - println!(".regparquet \tRegister a Parquet file as a table."); - println!(".run \tRun a given query."); - println!(".generate []\tPopulate the DB using a dataset generator."); - println!("Hit Ctrl-D to exit."); - } - - Command::ListTables => { - let tables = db.get_table_names(); - if !tables.is_empty() { - tables - .iter() - .for_each(|table_name| println!("{}", table_name)); - } else { - println!("There are no registered tables."); - } - } - - Command::ShowSchema => { - if args.len() < 2 { - println!("ERROR: Specify a table name when running '.schema'."); - return Ok(()); - } - let table_name = args[1]; - if let Some(schema) = db.get_schema_for_table(table_name).await { - println!("{:#?}", schema); - } else { - println!("ERROR: Table '{}' does not exist.", table_name); - } - } - - Command::RegisterCsv => { - if args.len() < 2 { - println!("ERROR: Specify a file path when running '.regcsv'."); - return Ok(()); - } - let csv_path = args[1]; - let num_added = db.register_csv(PathBuf::from(csv_path)).await?; - println!("Registered {} new table(s).", num_added); - } - - Command::RegisterParquet => { - if args.len() < 2 { - println!("ERROR: Specify a file path when running '.regparquet'."); - return Ok(()); - } - let parquet_path = args[1]; - let num_added = db.register_parquet(PathBuf::from(parquet_path)).await?; - println!("Registered {} new table(s).", num_added); - } - - Command::RunQuery => { - if args.len() < 2 { - println!("ERROR: Need to provide a query."); - return Ok(()); - } - let query = args[1..].join(" "); - let start = Instant::now(); - let res = db.execute(&query).await?; - let elapsed_time = start.elapsed(); - pretty::print_batches(&res)?; - println!("(Ran for {:.2?})", elapsed_time); - } - - Command::Generate => { - if args.len() < 3 { - println!( - "ERROR: Specify a generator name and scale factor when using '.generate'." - ); - return Ok(()); - } - let generator_name = args[1]; - let scale_factor = args[2].parse::(); - let seed = if args.len() >= 4 { - args[3].parse::() - } else { - Ok(42) - }; - let (scale_factor, seed) = match (scale_factor, seed) { - (Ok(sf), Ok(sd)) => (sf, sd), - _ => { - println!("ERROR: The scale factor and seed must be unsigned integers."); - return Ok(()); - } - }; - if let Some(generator) = DatasetGenerators::create_from_name(generator_name) { - let start = Instant::now(); - db.populate_using_generator(generator, scale_factor, seed)?; - let elapsed_time = start.elapsed(); - println!("Done. (Ran for {:.2?})", elapsed_time); - } else { - println!("ERROR: Generator '{}' does not exist.", generator_name); - } - } - }; - - Ok(()) -} - -async fn repl_main(db: &mut DB) -> Result<(), ReadlineError> { - let mut repl = Editor::<()>::new()?; - if let Err(err) = repl.load_history(HISTORY_FILE) { - // Ignore I/O errors. - match err { - ReadlineError::Io(_) => (), - _ => return Err(err), - } - } - loop { - println!(); - let line = repl.readline(">> "); - match line { - Ok(line) => { - repl.add_history_entry(line.as_str()); - if line.starts_with('.') { - if let Err(err) = handle_command(&line, db).await { - println!("ERROR: {:?}", err); - } - } else { - println!("ERROR: SQL statements are not yet supported. Type .help for help."); - } - } - Err(ReadlineError::Interrupted) => { - continue; - } - Err(ReadlineError::Eof) => { - break; - } - Err(err) => return Err(err), - } - } - repl.save_history(HISTORY_FILE)?; - Ok(()) -} - -#[derive(Parser)] -struct CliArgs { - /// Used to specify a data source to register. Each CSV file represents a - /// table. The table name will be its file name (without the .csv - /// extension). Use this flag multiple times to specify multiple CSV files. - #[clap(long)] - csv_file: Vec, -} - -#[tokio::main] -async fn main() -> Result<(), DataFusionError> { - let args = CliArgs::parse(); - println!("BRAD Query Executor REPL"); - println!("Type .help and hit enter for help. Hit Ctrl-D to exit."); - let mut db = DB::new(); - - let num_registered_tables = db.register_csvs(args.csv_file, None).await?; - if num_registered_tables > 0 { - println!("Registered {} table(s).", num_registered_tables); - } - - if let Err(err) = repl_main(&mut db).await { - println!("REPL Error: {:?}", err); - } - - Ok(()) -} diff --git a/sandbox/qe/src/datafusion_state.rs b/sandbox/qe/src/datafusion_state.rs deleted file mode 100644 index 3f0d637f..00000000 --- a/sandbox/qe/src/datafusion_state.rs +++ /dev/null @@ -1,48 +0,0 @@ -use arrow::record_batch::RecordBatch; -use datafusion::catalog::schema::SchemaProvider; -use datafusion::error::DataFusionError; -use datafusion::execution::context::SessionContext; -use datafusion::execution::context::TaskContext; -use datafusion::physical_plan::{self, ExecutionPlan}; -use datafusion::prelude::SessionConfig; -use std::sync::Arc; - -// These constants are implementation details (for use with DataFusion). -const CATALOG_NAME: &str = "brad_qe"; -const SCHEMA_NAME: &str = "public"; - -pub struct DataFusionState { - ctx: SessionContext, -} - -impl DataFusionState { - pub fn new() -> Self { - let config = SessionConfig::new() - .with_default_catalog_and_schema(CATALOG_NAME, SCHEMA_NAME); - Self { - ctx: SessionContext::new_with_config(config), - } - } - - pub fn schema_provider(&self) -> Arc { - self.ctx - .state() - .catalog_list() - .catalog(CATALOG_NAME) - .unwrap() - .schema(SCHEMA_NAME) - .unwrap() - } - - pub fn session_context(&self) -> &SessionContext { - &self.ctx - } - - pub async fn execute_datafusion_plan( - &self, - plan: Arc, - ) -> Result, DataFusionError> { - let task_ctx = Arc::new(TaskContext::from(&self.ctx.state())); - physical_plan::collect(plan, task_ctx).await - } -} diff --git a/sandbox/qe/src/dataset_gen/emps_depts.rs b/sandbox/qe/src/dataset_gen/emps_depts.rs deleted file mode 100644 index 06efcf65..00000000 --- a/sandbox/qe/src/dataset_gen/emps_depts.rs +++ /dev/null @@ -1,93 +0,0 @@ -use super::DatasetGenerator; -use arrow::array::{ArrayRef, GenericStringBuilder, PrimitiveBuilder}; -use arrow::datatypes::{DataType, Field, Int64Type, Schema, SchemaRef}; -use arrow::error::ArrowError; -use arrow::record_batch::RecordBatch; -use rand::rngs::SmallRng; -use rand::Rng; -use rand::SeedableRng; -use std::collections::HashMap; -use std::sync::Arc; - -pub struct EmpsDeptsGenerator { - tables: HashMap, -} - -impl EmpsDeptsGenerator { - pub fn new() -> Self { - // Employees table. - let columns = vec![ - Field::new("e_id", DataType::Int64, false), - Field::new("e_name", DataType::Utf8, false), - // Days since January 1, 1970. - Field::new("e_hire_date", DataType::Int64, false), - Field::new("e_salary", DataType::Int64, false), - Field::new("e_d_id", DataType::Int64, false), - ]; - let emps_table = ("employees".to_string(), Arc::new(Schema::new(columns))); - let tables = vec![emps_table]; - Self { - tables: tables.into_iter().collect(), - } - } - - fn schema_for(&self, table: &str) -> SchemaRef { - self.tables.get(table).unwrap().clone() - } - - fn generate_impl( - &self, - scale_factor: u32, - seed: u32, - ) -> Result)>, ArrowError> { - let num_employees = (scale_factor * 10000) as usize; - let num_depts = scale_factor * 100; - - let emps_schema = self.schema_for("employees"); - let mut prng = SmallRng::seed_from_u64(seed.into()); - - let hire_date_range = 0..((3650 * 6) as i64); - let salary_range = 0..1000_i64; - let d_id_range = 0..(num_depts as i64); - - let mut e_id_builder = PrimitiveBuilder::::with_capacity(num_employees); - let mut e_name_builder = - GenericStringBuilder::::with_capacity(num_employees, num_employees * 12); - let mut e_hire_date_builder = PrimitiveBuilder::::with_capacity(num_employees); - let mut e_salary_builder = PrimitiveBuilder::::with_capacity(num_employees); - let mut e_d_id_builder = PrimitiveBuilder::::with_capacity(num_employees); - - for i in 0..num_employees { - e_id_builder.append_value(i as i64); - e_name_builder.append_value(format!("E{}", i)); - e_hire_date_builder.append_value(prng.gen_range(hire_date_range.clone())); - e_salary_builder.append_value(prng.gen_range(salary_range.clone())); - e_d_id_builder.append_value(prng.gen_range(d_id_range.clone())); - } - - let cols: Vec = vec![ - Arc::new(e_id_builder.finish()), - Arc::new(e_name_builder.finish()), - Arc::new(e_hire_date_builder.finish()), - Arc::new(e_salary_builder.finish()), - Arc::new(e_d_id_builder.finish()), - ]; - - let employees = RecordBatch::try_new(emps_schema, cols)?; - Ok(vec![(String::from("employees"), vec![employees])]) - } -} - -impl DatasetGenerator for EmpsDeptsGenerator { - // employees(e_id INT, e_name TEXT, e_hire_date INT, e_salary INT, e_d_id INT) - fn schemas(&self) -> Vec<(String, SchemaRef)> { - self.tables - .iter() - .map(|(k, v)| (k.clone(), v.clone())) - .collect::>() - } - - fn generate(&self, scale_factor: u32, seed: u32) -> Vec<(String, Vec)> { - self.generate_impl(scale_factor, seed).unwrap() - } -} diff --git a/sandbox/qe/src/dataset_gen/mod.rs b/sandbox/qe/src/dataset_gen/mod.rs deleted file mode 100644 index c050f400..00000000 --- a/sandbox/qe/src/dataset_gen/mod.rs +++ /dev/null @@ -1,39 +0,0 @@ -use arrow::datatypes::SchemaRef; -use arrow::record_batch::RecordBatch; -use std::sync::Arc; - -/// Employees/departments dataset. -/// Also see `cirrus::hardcoded_system_plans::emps_depts`. -mod emps_depts; - -mod tpch; - -pub trait DatasetGenerator { - /// Returns the tables in the dataset. Each tuple in the returned vector - /// contains the table's name and their schema. - fn schemas(&self) -> Vec<(String, SchemaRef)>; - - /// Generate the dataset using the provided scale factor and pseudo-random - /// number generator seed. - fn generate(&self, scale_factor: u32, seed: u32) -> Vec<(String, Vec)>; -} - -/// The dataset generators that have been hardcoded. -pub enum DatasetGenerators { - EmpsDepts, -} - -impl DatasetGenerators { - pub fn create(dataset: DatasetGenerators) -> Arc { - match dataset { - DatasetGenerators::EmpsDepts => Arc::new(emps_depts::EmpsDeptsGenerator::new()), - } - } - - pub fn create_from_name(name: &str) -> Option> { - match name { - "emps_depts" => Some(Self::create(Self::EmpsDepts)), - _ => None, - } - } -} diff --git a/sandbox/qe/src/dataset_gen/tpch.rs b/sandbox/qe/src/dataset_gen/tpch.rs deleted file mode 100644 index ee90f2d9..00000000 --- a/sandbox/qe/src/dataset_gen/tpch.rs +++ /dev/null @@ -1,11 +0,0 @@ -// pub const CUSTOMER_COLS: Vec<&str> = vec![ -// "c_custkey", -// "c_name", -// "c_address", -// "c_nationkey", -// "c_phone", -// "c_acctbal", -// "c_mktsegment", -// "c_comment", -// "c_extra", -// ]; diff --git a/sandbox/qe/src/lib.rs b/sandbox/qe/src/lib.rs deleted file mode 100644 index 44aee2e2..00000000 --- a/sandbox/qe/src/lib.rs +++ /dev/null @@ -1,226 +0,0 @@ -use arrow::datatypes::Schema; -use arrow::record_batch::RecordBatch; -use datafusion::catalog::TableReference; -use datafusion::datasource::memory::MemTable; -use datafusion::error::DataFusionError; -use datafusion::logical_expr::LogicalPlan; -use datafusion::physical_plan::ExecutionPlan; -use datafusion::prelude::*; -use futures::future; -use std::path::PathBuf; -use std::sync::Arc; - -/// Encapsulates DataFusion related state. -mod datafusion_state; - -/// Used to generate datasets kept in memory. -pub mod dataset_gen; -use dataset_gen::DatasetGenerator; - -/// Custom DataFusion physical operators (`ExecutionPlan`s). -pub mod ops; - -/// Utilities for rewriting DataFusion `ExecutionPlan`s. -pub mod rewrite; - -// RadixSpline bindings. Currently not working. -// pub mod radixspline; - -/// Represents an "open" IOHTAP database. Eventually, the DB should run as a -/// daemon process. For now it is just an embedded DB (similar to SQLite). -pub struct DB { - dfusion: Arc, -} - -impl DB { - pub fn new() -> Self { - Self { - dfusion: Arc::new(datafusion_state::DataFusionState::new()), - } - } - - pub async fn register_csv(&self, csv_file: PathBuf) -> Result { - self.register_csvs(vec![csv_file], None).await - } - - pub async fn register_csvs<'a>( - &self, - csv_files: Vec, - options: Option>, - ) -> Result { - let table_paths_and_names = csv_files - .into_iter() - .filter_map(|path| { - let mstr_path = path.to_str(); - let mtable_name = path.file_stem().and_then(|stem| stem.to_str()); - match (mstr_path, mtable_name) { - (Some(str_path), Some(table_name)) => { - Some((str_path.to_string(), table_name.to_string())) - } - _ => None, - } - }) - .collect::>(); - let num_tables = table_paths_and_names.len(); - let inner_options = if let Some(inner) = options { - inner - } else { - CsvReadOptions::new() - }; - future::try_join_all(table_paths_and_names.iter().map(|(str_path, table_name)| { - self.dfusion - .session_context() - .register_csv(table_name, str_path, inner_options.clone()) - })) - .await?; - Ok(num_tables) - } - - pub async fn register_csvs_as_memtables<'a>( - &self, - csv_files: Vec, - options: Option>, - verbose: bool, - ) -> Result { - let table_paths_and_names = csv_files - .into_iter() - .filter_map(|path| { - let mstr_path = path.to_str(); - let mtable_name = path.file_stem().and_then(|stem| stem.to_str()); - match (mstr_path, mtable_name) { - (Some(str_path), Some(table_name)) => { - Some((str_path.to_string(), table_name.to_string())) - } - _ => None, - } - }) - .collect::>(); - let num_tables = table_paths_and_names.len(); - let inner_options = if let Some(inner) = options { - inner - } else { - CsvReadOptions::new() - }; - let ctx = self.dfusion.session_context(); - let schema_provider = self.dfusion.schema_provider(); - for (str_path, table_name) in table_paths_and_names { - if verbose { - eprintln!("Registering {}...", table_name); - } - ctx.register_csv(&table_name, &str_path, inner_options.clone()) - .await?; - let query = format!("SELECT * FROM {}", &table_name); - let records = self.execute(&query).await?; - let schema = schema_provider.table(&table_name).await.unwrap().schema(); - let table_ref = TableReference::bare(&table_name); - ctx.deregister_table(table_ref)?; - - // Re-register it but with Arrow data instead. - let provider = Arc::new(MemTable::try_new(schema, vec![records])?); - schema_provider.register_table(table_name, provider)?; - } - Ok(num_tables) - } - - pub async fn register_parquet(&self, parquet_file: PathBuf) -> Result { - self.register_parquets(vec![parquet_file]).await - } - - pub async fn register_parquets( - &self, - parquet_files: Vec, - ) -> Result { - let table_paths_and_names = parquet_files - .into_iter() - .filter_map(|path| { - let mstr_path = path.to_str(); - let mtable_name = path.file_stem().and_then(|stem| stem.to_str()); - match (mstr_path, mtable_name) { - (Some(str_path), Some(table_name)) => { - Some((str_path.to_string(), table_name.to_string())) - } - _ => None, - } - }) - .collect::>(); - let num_tables = table_paths_and_names.len(); - future::try_join_all(table_paths_and_names.iter().map(|(str_path, table_name)| { - self.dfusion.session_context().register_parquet( - table_name, - str_path, - ParquetReadOptions { - ..Default::default() - }, - ) - })) - .await?; - Ok(num_tables) - } - - pub async fn execute(&self, query: &String) -> Result, DataFusionError> { - let physical_plan = self.to_physical_plan(query).await?; - self.dfusion.execute_datafusion_plan(physical_plan).await - } - - pub async fn to_logical_plan(&self, query: &String) -> Result { - let ctx = self.dfusion.session_context(); - let state = ctx.state(); - state.create_logical_plan(query).await - } - - pub async fn to_physical_plan( - &self, - query: &String, - ) -> Result, DataFusionError> { - let ctx = self.dfusion.session_context(); - let state = ctx.state(); - let logical_plan = state.create_logical_plan(query).await?; - let optimized_plan = state.optimize(&logical_plan)?; - state.create_physical_plan(&optimized_plan).await - } - - pub async fn execute_physical_plan( - &self, - plan: Arc, - ) -> Result, DataFusionError> { - self.dfusion.execute_datafusion_plan(plan).await - } - - /// Populates the database using data generated by the specified generator. - pub fn populate_using_generator( - &mut self, - generator: Arc, - scale_factor: u32, - seed: u32, - ) -> Result<(), DataFusionError> { - let schema_provider = self.dfusion.schema_provider(); - let data = generator.generate(scale_factor, seed); - data.into_iter() - .map(|(name, records)| { - let schema = records.first().unwrap().schema(); - let provider = Arc::new(MemTable::try_new(schema, vec![records])?); - schema_provider.register_table(name, provider)?; - Ok(()) - }) - .collect::, DataFusionError>>()?; - Ok(()) - } - - pub fn get_table_names(&self) -> Vec { - self.dfusion.schema_provider().table_names() - } - - pub async fn get_schema_for_table(&self, table_name: &str) -> Option> { - self.dfusion - .schema_provider() - .table(table_name) - .await - .map(|tbl| tbl.schema()) - } -} - -impl Default for DB { - fn default() -> Self { - Self::new() - } -} diff --git a/sandbox/qe/src/ops/filter.rs b/sandbox/qe/src/ops/filter.rs deleted file mode 100644 index d255ec8d..00000000 --- a/sandbox/qe/src/ops/filter.rs +++ /dev/null @@ -1,165 +0,0 @@ -use arrow::record_batch::RecordBatch; -use arrow::compute::filter_record_batch; -use arrow::datatypes::{DataType, Field, Schema, SchemaRef}; -use datafusion::common::cast::as_boolean_array; -use datafusion::common::DFSchema; -use datafusion::error::DataFusionError; -use datafusion::execution::context::ExecutionProps; -use datafusion::execution::{RecordBatchStream, SendableRecordBatchStream}; -use datafusion::logical_expr::{col, lit}; -use datafusion::physical_plan::{DisplayAs, DisplayFormatType, ExecutionPlan}; -use futures::{Stream, StreamExt}; -use std::pin::Pin; -use std::sync::Arc; -use std::task::{Context, Poll}; -use datafusion::physical_expr::{create_physical_expr, PhysicalExpr}; - -/// Example filter to inject into a physical execution plan -#[derive(Debug)] -pub struct Filter { - child: Arc, -} - -impl Filter { - pub fn new(child: Arc) -> Self { - Filter { child } - } -} - -impl ExecutionPlan for Filter { - fn as_any(&self) -> &dyn std::any::Any { - self - } - - fn schema(&self) -> arrow::datatypes::SchemaRef { - self.child.schema() - } - - fn children(&self) -> Vec> { - vec![self.child.clone()] - } - - fn output_partitioning(&self) -> datafusion::physical_plan::Partitioning { - self.child.output_partitioning() - } - - fn output_ordering(&self) -> Option<&[datafusion::physical_expr::PhysicalSortExpr]> { - self.child.output_ordering() - } - - fn with_new_children( - self: Arc, - children: Vec>, - ) -> Result, DataFusionError> { - if children.len() != 1 { - return Err(DataFusionError::NotImplemented(String::from( - "Cannot tap into multiple child plan nodes.", - ))); - } - Ok(Arc::new(Filter { - child: children.first().unwrap().clone(), - })) - } - - fn execute( - &self, - partition: usize, - context: Arc, - ) -> Result { - // self.child.execute(partition, context) - - // For a logical expression `a = 1`, we can create a physical expression - let expr = col("o_orderkey").eq(lit(1 as i64)); - // To create a PhysicalExpr we need 1. a schema - let schema = Schema::new(vec![Field::new("o_orderkey", DataType::Int64, true)]); - let df_schema = DFSchema::try_from(schema).unwrap(); - // 2. ExecutionProps - let props = ExecutionProps::new(); - // We can now create a PhysicalExpr: - let physical_expr = create_physical_expr(&expr, &df_schema, &props).unwrap(); - Ok(Box::pin(FilterStream { - schema: self.child.schema(), - predicate: physical_expr.clone(), - input: self.child.execute(partition, context)?, - })) - } -} - -impl DisplayAs for Filter { - fn fmt_as(&self, t: DisplayFormatType, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match t { - DisplayFormatType::Default | DisplayFormatType::Verbose => { - write!(f, "TestFilterNode") - } - } - } -} - -struct FilterStream { - /// Output schema, which is the same as the input schema for this operator - schema: SchemaRef, - /// The expression to filter on. This expression must evaluate to a boolean value. - predicate: Arc, - /// The input partition to filter. - input: SendableRecordBatchStream, -} - -pub(crate) fn batch_filter( - batch: &RecordBatch, - predicate: &Arc, -) -> Result { - predicate - .evaluate(batch) - .and_then(|v| v.into_array(batch.num_rows())) - .and_then(|array| { - Ok(as_boolean_array(&array)?) - // apply filter array to record batch - .and_then(|filter_array| Ok(filter_record_batch(batch, filter_array)?)) - }) -} - -impl Stream for FilterStream { - type Item = Result; - - fn poll_next( - mut self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll> { - let poll; - loop { - match self.input.poll_next_unpin(cx) { - Poll::Ready(value) => match value { - Some(Ok(batch)) => { - let filtered_batch = batch_filter(&batch, &self.predicate)?; - // skip entirely filtered batches - if filtered_batch.num_rows() == 0 { - continue; - } - poll = Poll::Ready(Some(Ok(filtered_batch))); - break; - } - _ => { - poll = Poll::Ready(value); - break; - } - }, - Poll::Pending => { - poll = Poll::Pending; - break; - } - } - } - poll - } - - fn size_hint(&self) -> (usize, Option) { - // same number of record batches - self.input.size_hint() - } -} - -impl RecordBatchStream for FilterStream { - fn schema(&self) -> SchemaRef { - self.schema.clone() - } -} \ No newline at end of file diff --git a/sandbox/qe/src/ops/mod.rs b/sandbox/qe/src/ops/mod.rs deleted file mode 100644 index aa67f958..00000000 --- a/sandbox/qe/src/ops/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -mod tap; -pub use tap::Tap; - -mod filter; -pub use filter::Filter; diff --git a/sandbox/qe/src/ops/tap.rs b/sandbox/qe/src/ops/tap.rs deleted file mode 100644 index 193442c9..00000000 --- a/sandbox/qe/src/ops/tap.rs +++ /dev/null @@ -1,69 +0,0 @@ -use datafusion::error::DataFusionError; -use datafusion::physical_plan::{DisplayAs, DisplayFormatType, ExecutionPlan}; -use std::sync::Arc; - -/// "Taps in" to a physical execution plan. -#[derive(Debug)] -pub struct Tap { - child: Arc, -} - -impl Tap { - pub fn new(child: Arc) -> Self { - Tap { child } - } -} - -impl ExecutionPlan for Tap { - fn as_any(&self) -> &dyn std::any::Any { - self - } - - fn children(&self) -> Vec> { - vec![self.child.clone()] - } - - fn output_ordering(&self) -> Option<&[datafusion::physical_expr::PhysicalSortExpr]> { - self.child.output_ordering() - } - - fn output_partitioning(&self) -> datafusion::physical_plan::Partitioning { - self.child.output_partitioning() - } - - fn schema(&self) -> arrow::datatypes::SchemaRef { - self.child.schema() - } - - fn with_new_children( - self: Arc, - children: Vec>, - ) -> Result, DataFusionError> { - if children.len() != 1 { - return Err(DataFusionError::NotImplemented(String::from( - "Cannot tap into multiple child plan nodes.", - ))); - } - Ok(Arc::new(Tap { - child: children.first().unwrap().clone(), - })) - } - - fn execute( - &self, - partition: usize, - context: Arc, - ) -> Result { - self.child.execute(partition, context) - } -} - -impl DisplayAs for Tap { - fn fmt_as(&self, t: DisplayFormatType, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match t { - DisplayFormatType::Default | DisplayFormatType::Verbose => { - write!(f, "Tap") - } - } - } -} diff --git a/sandbox/qe/src/radixspline.rs b/sandbox/qe/src/radixspline.rs deleted file mode 100644 index bee9e69a..00000000 --- a/sandbox/qe/src/radixspline.rs +++ /dev/null @@ -1,50 +0,0 @@ -#![allow(non_upper_case_globals)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] - -include!(concat!(env!("OUT_DIR"), "/bindings.rs")); - -use arrow::{array::{UInt64Array, Array}, record_batch::RecordBatch}; -use std::os::raw::c_void; - -pub struct RadixSpline { - rs_ptr: *mut c_void, -} - -impl RadixSpline { - - pub fn build_simple(data: [u64; 15]) -> RadixSpline { - unsafe { - let rs_ptr = build(data.as_ptr(), 15); - RadixSpline { - rs_ptr, - } - } - } - - pub fn build(record_batch: &RecordBatch, column_index: usize) -> RadixSpline { - let column = record_batch.column(column_index); - let u64_array = column.as_any().downcast_ref::().unwrap(); - - let ptr = u64_array.values().as_ptr(); - let size = column.len() as u64; - unsafe { - let rs_ptr = build(ptr, size); - RadixSpline { - rs_ptr, - } - } - } - - pub fn lookup(&self, key: u64) -> bool { - unsafe { - lookup(self.rs_ptr, key) - } - } - - pub fn clear(&self) { - unsafe { - clear(self.rs_ptr) - } - } -} diff --git a/sandbox/qe/src/rewrite.rs b/sandbox/qe/src/rewrite.rs deleted file mode 100644 index 7cb1284e..00000000 --- a/sandbox/qe/src/rewrite.rs +++ /dev/null @@ -1,155 +0,0 @@ -use crate::ops::Tap; -use crate::ops::Filter; -use datafusion::error::DataFusionError; -use datafusion::physical_plan::ExecutionPlan; -use std::sync::Arc; - -pub type ShouldInject = fn(&Arc) -> bool; - -/// Adds a `Tap` operator into the given `ExecutionPlan` tree based on when -/// `should_inject` returns true. -pub fn inject_tap( - plan: &Arc, - should_inject: ShouldInject, -) -> Result>, DataFusionError> { - // TODO: We should figure out the idiomatic way of rewriting physical - // DataFusion plans. This function implements a manual DFS traversal. - - // Plan node, its parent, and visit count. - let mut stack: Vec<(Arc, Option>, u32)> = - vec![(plan.clone(), None, 0)]; - - let mut is_injecting = false; - let mut injected_plan: Option> = None; - let mut orig_child: Option> = None; - let mut next_parent: Option> = None; - - while stack.len() > 0 { - let (node, parent, visit_count) = stack.pop().unwrap(); - if visit_count == 0 { - // Pre-visit. - stack.push((node.clone(), parent, 1)); - for child in &node.children() { - stack.push((child.clone(), Some(node.clone()), 0)); - } - } else { - // Post-visit. - if !is_injecting { - // Check if we want to inject here. - if should_inject(&node) { - is_injecting = true; - let new_node: Arc = Arc::new(Tap::new(node.clone())); - injected_plan = Some(new_node); - next_parent = parent.map(|p| p.clone()); - orig_child = Some(node.clone()); - } - } else { - let npc = next_parent.clone(); - let occ = orig_child.clone(); - let ipc = injected_plan.clone(); - match (npc, occ, ipc) { - (Some(np), Some(oc), Some(ip)) => { - if !Arc::ptr_eq(&np, &node) { - continue; - } - - let new_children = node - .children() - .iter() - .map(|child| { - if Arc::ptr_eq(child, &oc) { - ip.clone() - } else { - child.clone() - } - }) - .collect::>>(); - let new_node = node.clone().with_new_children(new_children)?; - - // Adjust bookkeeping. - injected_plan = Some(new_node); - orig_child = Some(node); - next_parent = parent; - } - _ => (), - } - } - } - } - - // None indicates the injection did not occur. - Ok(injected_plan) -} - -pub fn inject_filter( - plan: &Arc, - should_inject: ShouldInject, -) -> Result>, DataFusionError> { - // TODO: We should figure out the idiomatic way of rewriting physical - // DataFusion plans. This function implements a manual DFS traversal. - - // Plan node, its parent, and visit count. - let mut stack: Vec<(Arc, Option>, u32)> = - vec![(plan.clone(), None, 0)]; - - let mut is_injecting = false; - let mut injected_plan: Option> = None; - let mut orig_child: Option> = None; - let mut next_parent: Option> = None; - - while stack.len() > 0 { - let (node, parent, visit_count) = stack.pop().unwrap(); - if visit_count == 0 { - // Pre-visit. - stack.push((node.clone(), parent, 1)); - for child in &node.children() { - stack.push((child.clone(), Some(node.clone()), 0)); - } - } else { - // Post-visit. - if !is_injecting { - // Check if we want to inject here. - if should_inject(&node) { - is_injecting = true; - let new_node: Arc = Arc::new(Filter::new(node.clone())); - injected_plan = Some(new_node); - next_parent = parent.map(|p| p.clone()); - orig_child = Some(node.clone()); - } - } else { - let npc = next_parent.clone(); - let occ = orig_child.clone(); - let ipc = injected_plan.clone(); - match (npc, occ, ipc) { - (Some(np), Some(oc), Some(ip)) => { - if !Arc::ptr_eq(&np, &node) { - continue; - } - - let new_children = node - .children() - .iter() - .map(|child| { - if Arc::ptr_eq(child, &oc) { - ip.clone() - } else { - child.clone() - } - }) - .collect::>>(); - let new_node = node.clone().with_new_children(new_children)?; - - // Adjust bookkeeping. - injected_plan = Some(new_node); - orig_child = Some(node); - next_parent = parent; - } - _ => (), - } - } - } - } - - // None indicates the injection did not occur. - Ok(injected_plan) -} diff --git a/sandbox/qe/test.csv b/sandbox/qe/test.csv deleted file mode 100644 index e478105c..00000000 --- a/sandbox/qe/test.csv +++ /dev/null @@ -1,6 +0,0 @@ -hello,world -1,1 -1,10 -3,8 -3,3 -5,9 diff --git a/sandbox/qe/test2.parquet b/sandbox/qe/test2.parquet deleted file mode 100644 index 27fa3ccc9b6e64389a581bcb7682699531a8788a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 810 zcma)5O;5r=5Z#vA)P#$PyXhu9aDfwI2_}97Os1fM8buO=;bK4un4r~GttaBi_^Ukl z6Z{E=v%kQDvrD&_=z%%3Z|1$7H?wJ*&?-_wUFznkiNK_$b7q-j8n&gy2ww`Sw-Ql< zXNk$}g<*d*@+n~^8?$lFD*xZ-uiIkcrqA3IOvNQ7O57qp7+ofA6AkT@#j?gycqVcyVM}m$ddR9Vk`&5 z+u#n*=Uy}?nS8!`Vs8drX74GwO>&?5?DU*_vk!wZ_H5vB_N_4!7qHXNY8|(?rZd~G z`l^Wa2ry2>1LFW-4Qc>~qEsDV#Zwe`p5&#zk?9Z{;rx$K8Y9M!r612I49LZOo==70D1JME{i oCs(Odh|O=i!QDguekBMqkNqIL@^3Q5&4OES$rpa_P5euK04N=ZH~;_u diff --git a/sandbox/qe/tpch-every.sh b/sandbox/qe/tpch-every.sh deleted file mode 100755 index fbb43a6b..00000000 --- a/sandbox/qe/tpch-every.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -cd ~/brad/sandbox/qe -for q in `seq 1 22`; -do - echo "timing query $q"; - timeout --foreground 5m ./tpch-individual.sh $q -# timeout --foreground 30s ./tpch-individual.sh 2; -done; diff --git a/sandbox/qe/tpch-individual.sh b/sandbox/qe/tpch-individual.sh deleted file mode 100755 index 57d00021..00000000 --- a/sandbox/qe/tpch-individual.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# cd ~/TPC-Hv3.0.1/dbgen -# for q in `seq 1 22`;do DSS_QUERY=./queries ./qgen $q > $q.sql;done; -# for i in {1..22}; do cat "${i}.sql" >> q.sql; done -# mv *.sql ~/brad/sandbox/qe/queries/ -# cd ~ - -NUMRUNS=3 - -total_time=0 - -if [ $# -gt 0 ]; then - cd ~ - sleep 10 - docker exec -ti postgres psql -U postgres -d tpch -o /dev/null -c '\i /data/queries/'$1'.sql' | cat - for i in `seq 1 $NUMRUNS`; - do - start=$(date +%s.%N); # Capture the start time with nanoseconds as a decimal - docker exec postgres psql -U postgres -d tpch -o /dev/null -c '\i /data/queries/'$1'.sql' | cat; - end=$(date +%s.%N); # Capture the end time with nanoseconds as a decimal - elapsed=$(awk "BEGIN{print $end - $start}"); # Calculate the total elapsed time in seconds with awk - total_time=$(awk "BEGIN{print $total_time + $elapsed}"); - echo "$1,$elapsed" - done; - average=$(awk "BEGIN{printf \"%.3f\", ($total_time / $NUMRUNS)}") # Calculate the average and format to 3 decimal places - # echo "Average time to run query "$1": "$average" seconds" -fi diff --git a/sandbox/qe/tpch-setup.sh b/sandbox/qe/tpch-setup.sh deleted file mode 100755 index c87f8186..00000000 --- a/sandbox/qe/tpch-setup.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# cd ~/TPC-Hv3.0.1/dbgen -# for q in `seq 1 22`;do DSS_QUERY=./queries ./qgen $q > $q.sql;done; -# for i in {1..22}; do cat "${i}.sql" >> q.sql; done -# mv *.sql ~/brad/sandbox/qe/queries/ -# cd ~ - -if [ $# -gt 0 ]; then - # generate data for specified Scale Factor - cd ~/TPC-Hv3.0.1/dbgen - # ./dbgen -f -s $1 - # mv *.tbl /tmp/tpcdata - # python3 ~/brad/sandbox/qe/tpch/tbl_to_csv.py /tmp/tpcdata - cd - - - # Uncomment if want to save generated info somewhere other than /tmp - # mkdir -p csvsf$1 - # cp /tmp/tpcdata/*.csv csvsf$1 - - docker stop postgres - docker rm postgres - - docker run -v ~/brad/sandbox/qe/tpch:/data -v /tmp/tpcdata:/tpcdata -m 50g --name postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres - - sleep 10 - docker exec -it postgres psql -U postgres -c 'create database tpch;' - docker exec -it postgres psql -U postgres -d 'tpch' -c '\i /data/load_tpch.sql' -fi - - -# time { -# for q in `seq 1 22`;do docker exec -ti postgres psql -U postgres -d tpch -o /dev/null -c '\i /data/queries/'$q'.sql' | cat; done; -# } diff --git a/sandbox/qe/tpch/column_to_binary.py b/sandbox/qe/tpch/column_to_binary.py deleted file mode 100644 index 6006e97a..00000000 --- a/sandbox/qe/tpch/column_to_binary.py +++ /dev/null @@ -1,21 +0,0 @@ -import csv -import struct - - -def process_csv_to_binary(input_csv, output_bin, column_index): - with open(input_csv, "r", newline="") as csvfile: - reader = csv.reader(csvfile, delimiter="|") - data = [ - int(row[column_index]) for row in reader - ] # Extract the column and convert to integers - - with open(output_bin, "wb") as binfile: - # Write the number of items as a 64-bit unsigned integer - binfile.write(struct.pack("= date '1995-01-01' - and o_orderdate < date '1995-01-01' + interval '3' month - and l_returnflag = 'R' - and c_nationkey = n_nationkey -group by - c_custkey, - c_name, - c_acctbal, - c_phone, - n_name, - c_address, - c_comment -order by - revenue desc -limit 1; diff --git a/sandbox/qe/tpch/queries/11.sql b/sandbox/qe/tpch/queries/11.sql deleted file mode 100644 index 3cacf5bb..00000000 --- a/sandbox/qe/tpch/queries/11.sql +++ /dev/null @@ -1,31 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - ps_partkey, - sum(ps_supplycost * ps_availqty) as value -from - partsupp, - supplier, - nation -where - ps_suppkey = s_suppkey - and s_nationkey = n_nationkey - and n_name = 'SAUDI ARABIA' -group by - ps_partkey having - sum(ps_supplycost * ps_availqty) > ( - select - sum(ps_supplycost * ps_availqty) * 0.0001000000 - from - partsupp, - supplier, - nation - where - ps_suppkey = s_suppkey - and s_nationkey = n_nationkey - and n_name = 'SAUDI ARABIA' - ) -order by - value desc -limit 1; diff --git a/sandbox/qe/tpch/queries/12.sql b/sandbox/qe/tpch/queries/12.sql deleted file mode 100644 index 319b7d17..00000000 --- a/sandbox/qe/tpch/queries/12.sql +++ /dev/null @@ -1,32 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - l_shipmode, - sum(case - when o_orderpriority = '1-URGENT' - or o_orderpriority = '2-HIGH' - then 1 - else 0 - end) as high_line_count, - sum(case - when o_orderpriority <> '1-URGENT' - and o_orderpriority <> '2-HIGH' - then 1 - else 0 - end) as low_line_count -from - orders, - lineitem -where - o_orderkey = l_orderkey - and l_shipmode in ('TRUCK', 'AIR') - and l_commitdate < l_receiptdate - and l_shipdate < l_commitdate - and l_receiptdate >= date '1997-01-01' - and l_receiptdate < date '1997-01-01' + interval '1' year -group by - l_shipmode -order by - l_shipmode -limit 1; diff --git a/sandbox/qe/tpch/queries/13.sql b/sandbox/qe/tpch/queries/13.sql deleted file mode 100644 index 9c70773f..00000000 --- a/sandbox/qe/tpch/queries/13.sql +++ /dev/null @@ -1,24 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - c_count, - count(*) as custdist -from - ( - select - c_custkey, - count(o_orderkey) - from - customer left outer join orders on - c_custkey = o_custkey - and o_comment not like '%pending%packages%' - group by - c_custkey - ) as c_orders (c_custkey, c_count) -group by - c_count -order by - custdist desc, - c_count desc -limit 1; diff --git a/sandbox/qe/tpch/queries/14.sql b/sandbox/qe/tpch/queries/14.sql deleted file mode 100644 index a2522e7d..00000000 --- a/sandbox/qe/tpch/queries/14.sql +++ /dev/null @@ -1,17 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - 100.00 * sum(case - when p_type like 'PROMO%' - then l_extendedprice * (1 - l_discount) - else 0 - end) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue -from - lineitem, - part -where - l_partkey = p_partkey - and l_shipdate >= date '1993-11-01' - and l_shipdate < date '1993-11-01' + interval '1' month -limit 1; diff --git a/sandbox/qe/tpch/queries/15.sql b/sandbox/qe/tpch/queries/15.sql deleted file mode 100644 index fbc5fa72..00000000 --- a/sandbox/qe/tpch/queries/15.sql +++ /dev/null @@ -1,35 +0,0 @@ --- using 1472396759 as a seed to the RNG - -with revenue0 as ( - select - l_suppkey AS supplier_no, - sum(l_extendedprice * (1 - l_discount)) AS total_revenue - from - lineitem - where - l_shipdate >= date '1997-05-01' - and l_shipdate < date '1997-05-01' + interval '3' month - group by - l_suppkey -) -select - s_suppkey, - s_name, - s_address, - s_phone, - total_revenue -from - supplier, - revenue0 -where - s_suppkey = supplier_no - and total_revenue = ( - select - max(total_revenue) - from - revenue0 - ) -order by - s_suppkey -limit 1; - diff --git a/sandbox/qe/tpch/queries/16.sql b/sandbox/qe/tpch/queries/16.sql deleted file mode 100644 index 2ad938c7..00000000 --- a/sandbox/qe/tpch/queries/16.sql +++ /dev/null @@ -1,34 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - p_brand, - p_type, - p_size, - count(distinct ps_suppkey) as supplier_cnt -from - partsupp, - part -where - p_partkey = ps_partkey - and p_brand <> 'Brand#53' - and p_type not like 'LARGE ANODIZED%' - and p_size in (45, 37, 43, 7, 18, 13, 22, 12) - and ps_suppkey not in ( - select - s_suppkey - from - supplier - where - s_comment like '%Customer%Complaints%' - ) -group by - p_brand, - p_type, - p_size -order by - supplier_cnt desc, - p_brand, - p_type, - p_size -limit 1; diff --git a/sandbox/qe/tpch/queries/17.sql b/sandbox/qe/tpch/queries/17.sql deleted file mode 100644 index cbc8efb2..00000000 --- a/sandbox/qe/tpch/queries/17.sql +++ /dev/null @@ -1,16 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - sum(l_extendedprice) / 7.0 as avg_yearly -from - lineitem, - part, - (select l_partkey as agg_partkey, 0.2 * avg(l_quantity) as avg_quantity from lineitem group by l_partkey) part_agg -where - p_partkey = l_partkey - and agg_partkey = l_partkey - and p_brand = 'brand#33' - and p_container = 'wrap jar' - and l_quantity < avg_quantity -limit 1; diff --git a/sandbox/qe/tpch/queries/18.sql b/sandbox/qe/tpch/queries/18.sql deleted file mode 100644 index 90c44873..00000000 --- a/sandbox/qe/tpch/queries/18.sql +++ /dev/null @@ -1,36 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - c_name, - c_custkey, - o_orderkey, - o_orderdate, - o_totalprice, - sum(l_quantity) -from - customer, - orders, - lineitem -where - o_orderkey in ( - select - l_orderkey - from - lineitem - group by - l_orderkey having - sum(l_quantity) > 314 - ) - and c_custkey = o_custkey - and o_orderkey = l_orderkey -group by - c_name, - c_custkey, - o_orderkey, - o_orderdate, - o_totalprice -order by - o_totalprice desc, - o_orderdate -limit 1; diff --git a/sandbox/qe/tpch/queries/19.sql b/sandbox/qe/tpch/queries/19.sql deleted file mode 100644 index 20198fd7..00000000 --- a/sandbox/qe/tpch/queries/19.sql +++ /dev/null @@ -1,39 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - sum(l_extendedprice* (1 - l_discount)) as revenue -from - lineitem, - part -where - ( - p_partkey = l_partkey - and p_brand = 'Brand#54' - and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG') - and l_quantity >= 4 and l_quantity <= 4 + 10 - and p_size between 1 and 5 - and l_shipmode in ('AIR', 'AIR REG') - and l_shipinstruct = 'DELIVER IN PERSON' - ) - or - ( - p_partkey = l_partkey - and p_brand = 'Brand#51' - and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK') - and l_quantity >= 11 and l_quantity <= 11 + 10 - and p_size between 1 and 10 - and l_shipmode in ('AIR', 'AIR REG') - and l_shipinstruct = 'DELIVER IN PERSON' - ) - or - ( - p_partkey = l_partkey - and p_brand = 'Brand#21' - and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG') - and l_quantity >= 28 and l_quantity <= 28 + 10 - and p_size between 1 and 15 - and l_shipmode in ('AIR', 'AIR REG') - and l_shipinstruct = 'DELIVER IN PERSON' - ) -limit 1; diff --git a/sandbox/qe/tpch/queries/2.sql b/sandbox/qe/tpch/queries/2.sql deleted file mode 100644 index c6b2f5c7..00000000 --- a/sandbox/qe/tpch/queries/2.sql +++ /dev/null @@ -1,47 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - s_acctbal, - s_name, - n_name, - p_partkey, - p_mfgr, - s_address, - s_phone, - s_comment -from - part, - supplier, - partsupp, - nation, - region -where - p_partkey = ps_partkey - and s_suppkey = ps_suppkey - and p_size = 25 - and p_type like '%STEEL' - and s_nationkey = n_nationkey - and n_regionkey = r_regionkey - and r_name = 'EUROPE' - and ps_supplycost = ( - select - min(ps_supplycost) - from - partsupp, - supplier, - nation, - region - where - p_partkey = ps_partkey - and s_suppkey = ps_suppkey - and s_nationkey = n_nationkey - and n_regionkey = r_regionkey - and r_name = 'EUROPE' - ) -order by - s_acctbal desc, - n_name, - s_name, - p_partkey -LIMIT 100; diff --git a/sandbox/qe/tpch/queries/20.sql b/sandbox/qe/tpch/queries/20.sql deleted file mode 100644 index d89aca2d..00000000 --- a/sandbox/qe/tpch/queries/20.sql +++ /dev/null @@ -1,47 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - s_name, - s_address -from - supplier, - nation -where - s_suppkey in ( - select - ps_suppkey - from - partsupp, - ( - select - l_partkey agg_partkey, - l_suppkey agg_suppkey, - 0.5 * sum(l_quantity) AS agg_quantity - from - lineitem - where - l_shipdate >= date '1997-01-01' - and l_shipdate < date '1997-01-01' + interval '1' year - group by - l_partkey, - l_suppkey - ) agg_lineitem - where - agg_partkey = ps_partkey - and agg_suppkey = ps_suppkey - and ps_partkey in ( - select - p_partkey - from - part - where - p_name like 'powder%' - ) - and ps_availqty > agg_quantity - ) - and s_nationkey = n_nationkey - and n_name = 'ARGENTINA' -order by - s_name -limit 1; diff --git a/sandbox/qe/tpch/queries/21.sql b/sandbox/qe/tpch/queries/21.sql deleted file mode 100644 index 9839c60c..00000000 --- a/sandbox/qe/tpch/queries/21.sql +++ /dev/null @@ -1,43 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - s_name, - count(*) as numwait -from - supplier, - lineitem l1, - orders, - nation -where - s_suppkey = l1.l_suppkey - and o_orderkey = l1.l_orderkey - and o_orderstatus = 'F' - and l1.l_receiptdate > l1.l_commitdate - and exists ( - select - * - from - lineitem l2 - where - l2.l_orderkey = l1.l_orderkey - and l2.l_suppkey <> l1.l_suppkey - ) - and not exists ( - select - * - from - lineitem l3 - where - l3.l_orderkey = l1.l_orderkey - and l3.l_suppkey <> l1.l_suppkey - and l3.l_receiptdate > l3.l_commitdate - ) - and s_nationkey = n_nationkey - and n_name = 'VIETNAM' -group by - s_name -order by - numwait desc, - s_name -limit 1; diff --git a/sandbox/qe/tpch/queries/22.sql b/sandbox/qe/tpch/queries/22.sql deleted file mode 100644 index 49741105..00000000 --- a/sandbox/qe/tpch/queries/22.sql +++ /dev/null @@ -1,41 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - cntrycode, - count(*) as numcust, - sum(c_acctbal) as totacctbal -from - ( - select - substring(c_phone from 1 for 2) as cntrycode, - c_acctbal - from - customer - where - substring(c_phone from 1 for 2) in - ('11', '18', '15', '20', '12', '29', '30') - and c_acctbal > ( - select - avg(c_acctbal) - from - customer - where - c_acctbal > 0.00 - and substring(c_phone from 1 for 2) in - ('11', '18', '15', '20', '12', '29', '30') - ) - and not exists ( - select - * - from - orders - where - o_custkey = c_custkey - ) - ) as custsale -group by - cntrycode -order by - cntrycode -limit 1; diff --git a/sandbox/qe/tpch/queries/3.sql b/sandbox/qe/tpch/queries/3.sql deleted file mode 100644 index 666cea5d..00000000 --- a/sandbox/qe/tpch/queries/3.sql +++ /dev/null @@ -1,26 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - l_orderkey, - sum(l_extendedprice * (1 - l_discount)) as revenue, - o_orderdate, - o_shippriority -from - customer, - orders, - lineitem -where - c_mktsegment = 'HOUSEHOLD' - and c_custkey = o_custkey - and l_orderkey = o_orderkey - and o_orderdate < date '1995-03-21' - and l_shipdate > date '1995-03-21' -group by - l_orderkey, - o_orderdate, - o_shippriority -order by - revenue desc, - o_orderdate -limit 10; diff --git a/sandbox/qe/tpch/queries/4.sql b/sandbox/qe/tpch/queries/4.sql deleted file mode 100644 index 511c933a..00000000 --- a/sandbox/qe/tpch/queries/4.sql +++ /dev/null @@ -1,26 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - o_orderpriority, - count(*) as order_count -from - orders -where - o_orderdate >= date '1996-03-01' - and o_orderdate < date '1996-03-01' + interval '3' month - and exists ( - select - * - from - lineitem - where - l_orderkey = o_orderkey - and l_commitdate < l_receiptdate - ) -group by - o_orderpriority -order by - o_orderpriority -limit 1; - diff --git a/sandbox/qe/tpch/queries/5.sql b/sandbox/qe/tpch/queries/5.sql deleted file mode 100644 index 08e1e1c2..00000000 --- a/sandbox/qe/tpch/queries/5.sql +++ /dev/null @@ -1,29 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - n_name, - sum(l_extendedprice * (1 - l_discount)) as revenue -from - customer, - orders, - lineitem, - supplier, - nation, - region -where - c_custkey = o_custkey - and l_orderkey = o_orderkey - and l_suppkey = s_suppkey - and c_nationkey = s_nationkey - and s_nationkey = n_nationkey - and n_regionkey = r_regionkey - and r_name = 'AMERICA' - and o_orderdate >= date '1995-01-01' - and o_orderdate < date '1995-01-01' + interval '1' year -group by - n_name -order by - revenue desc -limit 1; - diff --git a/sandbox/qe/tpch/queries/6.sql b/sandbox/qe/tpch/queries/6.sql deleted file mode 100644 index 70c1b657..00000000 --- a/sandbox/qe/tpch/queries/6.sql +++ /dev/null @@ -1,13 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - sum(l_extendedprice * l_discount) as revenue -from - lineitem -where - l_shipdate >= date '1995-01-01' - and l_shipdate < date '1995-01-01' + interval '1' year - and l_discount between 0.09 - 0.01 and 0.09 + 0.01 - and l_quantity < 24 -limit 1; diff --git a/sandbox/qe/tpch/queries/7.sql b/sandbox/qe/tpch/queries/7.sql deleted file mode 100644 index 8d95984e..00000000 --- a/sandbox/qe/tpch/queries/7.sql +++ /dev/null @@ -1,43 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - supp_nation, - cust_nation, - l_year, - sum(volume) as revenue -from - ( - select - n1.n_name as supp_nation, - n2.n_name as cust_nation, - extract(year from l_shipdate) as l_year, - l_extendedprice * (1 - l_discount) as volume - from - supplier, - lineitem, - orders, - customer, - nation n1, - nation n2 - where - s_suppkey = l_suppkey - and o_orderkey = l_orderkey - and c_custkey = o_custkey - and s_nationkey = n1.n_nationkey - and c_nationkey = n2.n_nationkey - and ( - (n1.n_name = 'RUSSIA' and n2.n_name = 'INDIA') - or (n1.n_name = 'INDIA' and n2.n_name = 'RUSSIA') - ) - and l_shipdate between date '1995-01-01' and date '1996-12-31' - ) as shipping -group by - supp_nation, - cust_nation, - l_year -order by - supp_nation, - cust_nation, - l_year -limit 1; diff --git a/sandbox/qe/tpch/queries/8.sql b/sandbox/qe/tpch/queries/8.sql deleted file mode 100644 index 25a0bb81..00000000 --- a/sandbox/qe/tpch/queries/8.sql +++ /dev/null @@ -1,41 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - o_year, - sum(case - when nation = 'INDIA' then volume - else 0 - end) / sum(volume) as mkt_share -from - ( - select - extract(year from o_orderdate) as o_year, - l_extendedprice * (1 - l_discount) as volume, - n2.n_name as nation - from - part, - supplier, - lineitem, - orders, - customer, - nation n1, - nation n2, - region - where - p_partkey = l_partkey - and s_suppkey = l_suppkey - and l_orderkey = o_orderkey - and o_custkey = c_custkey - and c_nationkey = n1.n_nationkey - and n1.n_regionkey = r_regionkey - and r_name = 'ASIA' - and s_nationkey = n2.n_nationkey - and o_orderdate between date '1995-01-01' and date '1996-12-31' - and p_type = 'LARGE BRUSHED NICKEL' - ) as all_nations -group by - o_year -order by - o_year -limit 1; diff --git a/sandbox/qe/tpch/queries/9.sql b/sandbox/qe/tpch/queries/9.sql deleted file mode 100644 index a90a8af7..00000000 --- a/sandbox/qe/tpch/queries/9.sql +++ /dev/null @@ -1,36 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - nation, - o_year, - sum(amount) as sum_profit -from - ( - select - n_name as nation, - extract(year from o_orderdate) as o_year, - l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount - from - part, - supplier, - lineitem, - partsupp, - orders, - nation - where - s_suppkey = l_suppkey - and ps_suppkey = l_suppkey - and ps_partkey = l_partkey - and p_partkey = l_partkey - and o_orderkey = l_orderkey - and s_nationkey = n_nationkey - and p_name like '%orchid%' - ) as profit -group by - nation, - o_year -order by - nation, - o_year desc -limit 1; diff --git a/sandbox/qe/tpch/queries/combined.sql b/sandbox/qe/tpch/queries/combined.sql deleted file mode 100644 index 850f85aa..00000000 --- a/sandbox/qe/tpch/queries/combined.sql +++ /dev/null @@ -1,719 +0,0 @@ --- using 1472396759 as a seed to the RNG - - -select - l_returnflag, - l_linestatus, - sum(l_quantity) as sum_qty, - sum(l_extendedprice) as sum_base_price, - sum(l_extendedprice * (1 - l_discount)) as sum_disc_price, - sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, - avg(l_quantity) as avg_qty, - avg(l_extendedprice) as avg_price, - avg(l_discount) as avg_disc, - count(*) as count_order -from - lineitem -where - l_shipdate <= date '1998-12-01' - interval '117' day -group by - l_returnflag, - l_linestatus -order by - l_returnflag, - l_linestatus -limit 1; - --- using 1472396759 as a seed to the RNG - - -select - s_acctbal, - s_name, - n_name, - p_partkey, - p_mfgr, - s_address, - s_phone, - s_comment -from - part, - supplier, - partsupp, - nation, - region -where - p_partkey = ps_partkey - and s_suppkey = ps_suppkey - and p_size = 25 - and p_type like '%STEEL' - and s_nationkey = n_nationkey - and n_regionkey = r_regionkey - and r_name = 'EUROPE' - and ps_supplycost = ( - select - min(ps_supplycost) - from - partsupp, - supplier, - nation, - region - where - p_partkey = ps_partkey - and s_suppkey = ps_suppkey - and s_nationkey = n_nationkey - and n_regionkey = r_regionkey - and r_name = 'EUROPE' - ) -order by - s_acctbal desc, - n_name, - s_name, - p_partkey -LIMIT 100; --- using 1472396759 as a seed to the RNG - - -select - l_orderkey, - sum(l_extendedprice * (1 - l_discount)) as revenue, - o_orderdate, - o_shippriority -from - customer, - orders, - lineitem -where - c_mktsegment = 'HOUSEHOLD' - and c_custkey = o_custkey - and l_orderkey = o_orderkey - and o_orderdate < date '1995-03-21' - and l_shipdate > date '1995-03-21' -group by - l_orderkey, - o_orderdate, - o_shippriority -order by - revenue desc, - o_orderdate -limit 10; --- using 1472396759 as a seed to the RNG - - -select - o_orderpriority, - count(*) as order_count -from - orders -where - o_orderdate >= date '1996-03-01' - and o_orderdate < date '1996-03-01' + interval '3' month - and exists ( - select - * - from - lineitem - where - l_orderkey = o_orderkey - and l_commitdate < l_receiptdate - ) -group by - o_orderpriority -order by - o_orderpriority -limit 1; - --- using 1472396759 as a seed to the RNG - - -select - n_name, - sum(l_extendedprice * (1 - l_discount)) as revenue -from - customer, - orders, - lineitem, - supplier, - nation, - region -where - c_custkey = o_custkey - and l_orderkey = o_orderkey - and l_suppkey = s_suppkey - and c_nationkey = s_nationkey - and s_nationkey = n_nationkey - and n_regionkey = r_regionkey - and r_name = 'AMERICA' - and o_orderdate >= date '1995-01-01' - and o_orderdate < date '1995-01-01' + interval '1' year -group by - n_name -order by - revenue desc -limit 1; - --- using 1472396759 as a seed to the RNG - - -select - sum(l_extendedprice * l_discount) as revenue -from - lineitem -where - l_shipdate >= date '1995-01-01' - and l_shipdate < date '1995-01-01' + interval '1' year - and l_discount between 0.09 - 0.01 and 0.09 + 0.01 - and l_quantity < 24 -limit 1; --- using 1472396759 as a seed to the RNG - - -select - supp_nation, - cust_nation, - l_year, - sum(volume) as revenue -from - ( - select - n1.n_name as supp_nation, - n2.n_name as cust_nation, - extract(year from l_shipdate) as l_year, - l_extendedprice * (1 - l_discount) as volume - from - supplier, - lineitem, - orders, - customer, - nation n1, - nation n2 - where - s_suppkey = l_suppkey - and o_orderkey = l_orderkey - and c_custkey = o_custkey - and s_nationkey = n1.n_nationkey - and c_nationkey = n2.n_nationkey - and ( - (n1.n_name = 'RUSSIA' and n2.n_name = 'INDIA') - or (n1.n_name = 'INDIA' and n2.n_name = 'RUSSIA') - ) - and l_shipdate between date '1995-01-01' and date '1996-12-31' - ) as shipping -group by - supp_nation, - cust_nation, - l_year -order by - supp_nation, - cust_nation, - l_year -limit 1; --- using 1472396759 as a seed to the RNG - - -select - o_year, - sum(case - when nation = 'INDIA' then volume - else 0 - end) / sum(volume) as mkt_share -from - ( - select - extract(year from o_orderdate) as o_year, - l_extendedprice * (1 - l_discount) as volume, - n2.n_name as nation - from - part, - supplier, - lineitem, - orders, - customer, - nation n1, - nation n2, - region - where - p_partkey = l_partkey - and s_suppkey = l_suppkey - and l_orderkey = o_orderkey - and o_custkey = c_custkey - and c_nationkey = n1.n_nationkey - and n1.n_regionkey = r_regionkey - and r_name = 'ASIA' - and s_nationkey = n2.n_nationkey - and o_orderdate between date '1995-01-01' and date '1996-12-31' - and p_type = 'LARGE BRUSHED NICKEL' - ) as all_nations -group by - o_year -order by - o_year -limit 1; --- using 1472396759 as a seed to the RNG - - -select - nation, - o_year, - sum(amount) as sum_profit -from - ( - select - n_name as nation, - extract(year from o_orderdate) as o_year, - l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount - from - part, - supplier, - lineitem, - partsupp, - orders, - nation - where - s_suppkey = l_suppkey - and ps_suppkey = l_suppkey - and ps_partkey = l_partkey - and p_partkey = l_partkey - and o_orderkey = l_orderkey - and s_nationkey = n_nationkey - and p_name like '%orchid%' - ) as profit -group by - nation, - o_year -order by - nation, - o_year desc -limit 1; --- using 1472396759 as a seed to the RNG - - -select - c_custkey, - c_name, - sum(l_extendedprice * (1 - l_discount)) as revenue, - c_acctbal, - n_name, - c_address, - c_phone, - c_comment -from - customer, - orders, - lineitem, - nation -where - c_custkey = o_custkey - and l_orderkey = o_orderkey - and o_orderdate >= date '1995-01-01' - and o_orderdate < date '1995-01-01' + interval '3' month - and l_returnflag = 'R' - and c_nationkey = n_nationkey -group by - c_custkey, - c_name, - c_acctbal, - c_phone, - n_name, - c_address, - c_comment -order by - revenue desc -limit 1; --- using 1472396759 as a seed to the RNG - - -select - ps_partkey, - sum(ps_supplycost * ps_availqty) as value -from - partsupp, - supplier, - nation -where - ps_suppkey = s_suppkey - and s_nationkey = n_nationkey - and n_name = 'SAUDI ARABIA' -group by - ps_partkey having - sum(ps_supplycost * ps_availqty) > ( - select - sum(ps_supplycost * ps_availqty) * 0.0001000000 - from - partsupp, - supplier, - nation - where - ps_suppkey = s_suppkey - and s_nationkey = n_nationkey - and n_name = 'SAUDI ARABIA' - ) -order by - value desc -limit 1; --- using 1472396759 as a seed to the RNG - - -select - l_shipmode, - sum(case - when o_orderpriority = '1-URGENT' - or o_orderpriority = '2-HIGH' - then 1 - else 0 - end) as high_line_count, - sum(case - when o_orderpriority <> '1-URGENT' - and o_orderpriority <> '2-HIGH' - then 1 - else 0 - end) as low_line_count -from - orders, - lineitem -where - o_orderkey = l_orderkey - and l_shipmode in ('TRUCK', 'AIR') - and l_commitdate < l_receiptdate - and l_shipdate < l_commitdate - and l_receiptdate >= date '1997-01-01' - and l_receiptdate < date '1997-01-01' + interval '1' year -group by - l_shipmode -order by - l_shipmode -limit 1; --- using 1472396759 as a seed to the RNG - - -select - c_count, - count(*) as custdist -from - ( - select - c_custkey, - count(o_orderkey) - from - customer left outer join orders on - c_custkey = o_custkey - and o_comment not like '%pending%packages%' - group by - c_custkey - ) as c_orders (c_custkey, c_count) -group by - c_count -order by - custdist desc, - c_count desc -limit 1; --- using 1472396759 as a seed to the RNG - - -select - 100.00 * sum(case - when p_type like 'PROMO%' - then l_extendedprice * (1 - l_discount) - else 0 - end) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue -from - lineitem, - part -where - l_partkey = p_partkey - and l_shipdate >= date '1993-11-01' - and l_shipdate < date '1993-11-01' + interval '1' month -limit 1; --- using 1472396759 as a seed to the RNG - -create view revenue0 (supplier_no, total_revenue) as - select - l_suppkey, - sum(l_extendedprice * (1 - l_discount)) - from - lineitem - where - l_shipdate >= date '1997-05-01' - and l_shipdate < date '1997-05-01' + interval '3' month - group by - l_suppkey; - - -select - s_suppkey, - s_name, - s_address, - s_phone, - total_revenue -from - supplier, - revenue0 -where - s_suppkey = supplier_no - and total_revenue = ( - select - max(total_revenue) - from - revenue0 - ) -order by - s_suppkey; - -drop view revenue0 -limit 1; --- using 1472396759 as a seed to the RNG - - -select - p_brand, - p_type, - p_size, - count(distinct ps_suppkey) as supplier_cnt -from - partsupp, - part -where - p_partkey = ps_partkey - and p_brand <> 'Brand#53' - and p_type not like 'LARGE ANODIZED%' - and p_size in (45, 37, 43, 7, 18, 13, 22, 12) - and ps_suppkey not in ( - select - s_suppkey - from - supplier - where - s_comment like '%Customer%Complaints%' - ) -group by - p_brand, - p_type, - p_size -order by - supplier_cnt desc, - p_brand, - p_type, - p_size -limit 1; --- using 1472396759 as a seed to the RNG - - -select - sum(l_extendedprice) / 7.0 as avg_yearly -from - lineitem, - part, - (select l_partkey as agg_partkey, 0.2 * avg(l_quantity) as avg_quantity from lineitem group by l_partkey) part_agg -where - p_partkey = l_partkey - and agg_partkey = l_partkey - and p_brand = 'brand#33' - and p_container = 'wrap jar' - and l_quantity < avg_quantity -limit 1; --- using 1472396759 as a seed to the RNG - - -select - c_name, - c_custkey, - o_orderkey, - o_orderdate, - o_totalprice, - sum(l_quantity) -from - customer, - orders, - lineitem -where - o_orderkey in ( - select - l_orderkey - from - lineitem - group by - l_orderkey having - sum(l_quantity) > 314 - ) - and c_custkey = o_custkey - and o_orderkey = l_orderkey -group by - c_name, - c_custkey, - o_orderkey, - o_orderdate, - o_totalprice -order by - o_totalprice desc, - o_orderdate -limit 1; --- using 1472396759 as a seed to the RNG - - -select - sum(l_extendedprice* (1 - l_discount)) as revenue -from - lineitem, - part -where - ( - p_partkey = l_partkey - and p_brand = 'Brand#54' - and p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG') - and l_quantity >= 4 and l_quantity <= 4 + 10 - and p_size between 1 and 5 - and l_shipmode in ('AIR', 'AIR REG') - and l_shipinstruct = 'DELIVER IN PERSON' - ) - or - ( - p_partkey = l_partkey - and p_brand = 'Brand#51' - and p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK') - and l_quantity >= 11 and l_quantity <= 11 + 10 - and p_size between 1 and 10 - and l_shipmode in ('AIR', 'AIR REG') - and l_shipinstruct = 'DELIVER IN PERSON' - ) - or - ( - p_partkey = l_partkey - and p_brand = 'Brand#21' - and p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG') - and l_quantity >= 28 and l_quantity <= 28 + 10 - and p_size between 1 and 15 - and l_shipmode in ('AIR', 'AIR REG') - and l_shipinstruct = 'DELIVER IN PERSON' - ) -limit 1; --- using 1472396759 as a seed to the RNG - - -select - s_name, - s_address -from - supplier, - nation -where - s_suppkey in ( - select - ps_suppkey - from - partsupp, - ( - select - l_partkey agg_partkey, - l_suppkey agg_suppkey, - 0.5 * sum(l_quantity) AS agg_quantity - from - lineitem - where - l_shipdate >= date '1997-01-01' - and l_shipdate < date '1997-01-01' + interval '1' year - group by - l_partkey, - l_suppkey - ) agg_lineitem - where - agg_partkey = ps_partkey - and agg_suppkey = ps_suppkey - and ps_partkey in ( - select - p_partkey - from - part - where - p_name like 'powder%' - ) - and ps_availqty > agg_quantity - ) - and s_nationkey = n_nationkey - and n_name = 'ARGENTINA' -order by - s_name -limit 1; --- using 1472396759 as a seed to the RNG - - -select - s_name, - count(*) as numwait -from - supplier, - lineitem l1, - orders, - nation -where - s_suppkey = l1.l_suppkey - and o_orderkey = l1.l_orderkey - and o_orderstatus = 'F' - and l1.l_receiptdate > l1.l_commitdate - and exists ( - select - * - from - lineitem l2 - where - l2.l_orderkey = l1.l_orderkey - and l2.l_suppkey <> l1.l_suppkey - ) - and not exists ( - select - * - from - lineitem l3 - where - l3.l_orderkey = l1.l_orderkey - and l3.l_suppkey <> l1.l_suppkey - and l3.l_receiptdate > l3.l_commitdate - ) - and s_nationkey = n_nationkey - and n_name = 'VIETNAM' -group by - s_name -order by - numwait desc, - s_name -limit 1; --- using 1472396759 as a seed to the RNG - - -select - cntrycode, - count(*) as numcust, - sum(c_acctbal) as totacctbal -from - ( - select - substring(c_phone from 1 for 2) as cntrycode, - c_acctbal - from - customer - where - substring(c_phone from 1 for 2) in - ('11', '18', '15', '20', '12', '29', '30') - and c_acctbal > ( - select - avg(c_acctbal) - from - customer - where - c_acctbal > 0.00 - and substring(c_phone from 1 for 2) in - ('11', '18', '15', '20', '12', '29', '30') - ) - and not exists ( - select - * - from - orders - where - o_custkey = c_custkey - ) - ) as custsale -group by - cntrycode -order by - cntrycode -limit 1; diff --git a/sandbox/qe/tpch/status.txt b/sandbox/qe/tpch/status.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/sandbox/qe/tpch/tbl_to_csv.py b/sandbox/qe/tpch/tbl_to_csv.py deleted file mode 100644 index e43bc0aa..00000000 --- a/sandbox/qe/tpch/tbl_to_csv.py +++ /dev/null @@ -1,32 +0,0 @@ -# import pandas -# df = pandas.read_table('sf1/customer.tbl', sep="|") -# df.to_csv("sf1/customer.csv") - -import json -import sys - - -def converttbldatatocsvformat(filename, header): - csv = open("".join([filename, ".csv"]), "w+") - csv.write(header + "\n") - tbl = open("".join([filename, ".tbl"]), "r") - lines = tbl.readlines() - for line in lines: - line = line[:-2] + line[-1:] # remove trailing delimiter - line = line.replace(",", "N") - line = line.replace("|", ",") - csv.write(line) - tbl.close() - csv.close() - - -# TODO: Need to change this path later -json_file = "/home/axing/brad/sandbox/qe/tpch/headers.json" -if __name__ == "__main__": - # Load the schema definitions from the YAML file - with open(json_file, "r") as f: - schema = json.load(f) - - path = sys.argv[1] - for f in schema.keys(): - converttbldatatocsvformat(path + "/" + f, schema[f])