databendlabs / databend

𝗗𝗮𝘁𝗮, 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀 & 𝗔𝗜. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
https://docs.databend.com
Other
7.72k stars 734 forks source link

bug: tpcds load_data.sh typo #11138

Closed l1t1 closed 1 year ago

l1t1 commented 1 year ago

Search before asking

Version

https://github.com/datafuselabs/databend/tree/main/benchmark/tpcds

What's Wrong?

the env.sh in the file should be shell_env.sh

How to Reproduce?

open the file and search env.sh

Are you willing to submit PR?

RinChanNOWWW commented 1 year ago

Thank you!

l1t1 commented 1 year ago

a typo in readme.md After that, you can load data to Datbend: should be After that, you can load data to Databend:

RinChanNOWWW commented 1 year ago

I will fix them along with a new feature PR.

l1t1 commented 1 year ago

the last step run error on v 1.1.12

root@localhost:/data/data/com.termux/files/home# mkdir tpcds
root@localhost:/data/data/com.termux/files/home# da/bin/databend-sqllogictests --handlers mysql --database tpcds --run_dir tpcds --bench
MySQL client starts to run with: SqlLogicTestArgs { dir: Some("tpcds"), file: None, skipped_dir: None, handlers: Some(["mysql"]), suites: "tests/sqllogictests/suites", complete: false, no_fail_fast: false, parallel: 1, enable_sandbox: false, debug: false, bench: true, database: "tpcds" }
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', tests/sqllogictests/src/main.rs:109:42
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
root@localhost:/data/data/com.termux/files/home# ps -ef|grep databend
u0_a200   1138 13518  0 Jun17 /proc/13430/fd/2 00:00:00 grep --color=auto databend
u0_a200  15929     1  0 Jun17 pts/0    00:00:13 bin/databend-meta --config-file=configs/databend-meta.toml
u0_a200  15969     1  3 Jun17 pts/0    00:01:21 bin/databend-query --config-file=configs/databend-query.toml
root@localhost:/data/data/com.termux/files/home# mysql -uroot -h0.0.0.0 -P3307
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.26-v1.1.12-nightly-f808049433399554ac2c5c67e10cdd1d1210ac3a(rust-1.70.0-nightly-2023-04-20T16:07:59.578834104Z) 0

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]> use tpcds;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MySQL [tpcds]> show tables;
+------------------------+
| tables_in_tpcds        |
+------------------------+
| call_center            |
| catalog_page           |
| catalog_returns        |
| catalog_sales          |
| customer               |
| customer_address       |
| customer_demographics  |
| date_dim               |
| household_demographics |
| income_band            |
| inventory              |
| item                   |
| promotion              |
| reason                 |
| ship_mode              |
| store                  |
| store_returns          |
| store_sales            |
| time_dim               |
| warehouse              |
| web_page               |
| web_returns            |
| web_sales              |
| web_site               |
+------------------------+
24 rows in set (0.052 sec)
RinChanNOWWW commented 1 year ago

Hello @l1t1 ,

databend-sqllogictests will search test files in suites to run, and the default suites directory is tests/sqllogictests/suites. If you want to customize suites path, you can use -u/--suites. For example:

databend-sqllogictests --handlers mysql --database tpcds --bench --suites tpcds # there should be SQLs under directory tpcds.

You can get more information about databend-sqllogictests by:

databend-sqllogictests -h

Usage: databend-sqllogictests [OPTIONS]

Options:
  -d, --run_dir <DIR>           Run sqllogictests in specific directory, the arg is optional
  -f, --run_file <FILE>         Run sqllogictests in specific test file, the arg is optional
  -s, --skip_dir <SKIPPED_DIR>  Skip sqllogictests in specific directory, the arg is optional
  -l, --handlers <HANDLERS>     Choose handlers to run tests, support mysql, http, clickhouse handler, the arg is optional. If use multiple handlers, please use ',' to split them
  -u, --suites <SUITES>         The tests to be run will come from under suits [default: tests/sqllogictests/suites]
  -c, --complete                The arg is used to enable auto complete mode
      --no-fail-fast            The arg is used to cancel fast fail
  -p, --parallel <PARALLEL>     The arg is used to set parallel number [default: 1]
      --enable_sandbox          The arg is used to enable sandbox_tenant
      --debug                   The arg is used to enable debug mode which would print some debug messages
      --bench                   The arg is used to run benchmark instead of test
      --database <DATABASE>     Specify the database to connnect, the default database is 'default' [default: default]
  -h, --help                    Print help
l1t1 commented 1 year ago

so I need download the testsuites-v1.1.12-nightly.tar.gz and unzip it?

l1t1 commented 1 year ago

no error message, but reports

root@localhost:/data/data/com.termux/files/home/da# tar xf testsuites-v1.1.11-nightly.tar.gz
root@localhost:/data/data/com.termux/files/home/da# ls suites
base  crdb  debug  duckdb  management  mode  query  tpcds  tpch  ydb
root@localhost:/data/data/com.termux/files/home/da# ls suites/tpcds
queries.test
tpcds -f suites/tpcds/queries.test --bench -u suites
MySQL client starts to run with: SqlLogicTestArgs { dir: None, file: Some("suites/tpcds/queries.test"), skipped_dir: None, handlers: Some(["mysql"]), suites: "suites", complete: false, no_fail_fast: false, parallel: 1, enable_sandbox: false, debug: false, bench: true, database: "tpcds" }
Run all tests[0] using 20 ms
l1t1 commented 1 year ago

it works. thanks. https://segmentfault.com/a/1190000042369960

root@localhost:/data/data/com.termux/files/home/da# bin/databend-sqllogictests --handlers mysql --database tpcds -d tpcds --bench -u suites -c                                                                      MySQL client starts to run with: SqlLogicTestArgs { dir: Some("tpcds"), file: None, skipped_dir: None, handlers: Some(["mysql"]), suites: "suites", complete: true, no_fail_fast: false, parallel: 1, enable_sandbox: false, debug: false, bench: true, database: "tpcds" }
164.593229ms
486.964062ms
126.864063ms
2.482940103s
791.341666ms
670.821354ms