Skip to content

Commit

Permalink
feat: add gendata command in bendsql
Browse files Browse the repository at this point in the history
  • Loading branch information
sundy-li committed Feb 18, 2025
1 parent 5eded45 commit 43893f4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 33 deletions.
5 changes: 4 additions & 1 deletion cli/src/gendata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ impl Session {
let mut results = vec![];
let schema = Arc::new(gendata_schema());

for f in std::fs::read_dir(&temp_dir)? {
let mut entries: Vec<_> = std::fs::read_dir(&temp_dir)?.collect();
entries.sort_by_key(|e| e.as_ref().unwrap().path());

for f in entries {
let f = f?;
let path = f.path();

Expand Down
64 changes: 32 additions & 32 deletions cli/tests/http/07-gendata.result
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
==========TPCH=========
customer OK 130089
lineitem OK 2551994
partsupp OK 437252
nation OK 2195
orders OK 598190
part OK 77400
supplier OK 10653
region OK 1018
customer OK 130089
lineitem OK 2551994
nation OK 2195
orders OK 598190
part OK 77400
partsupp OK 437252
region OK 1018
supplier OK 10653
==========TPCDS=========
catalog_page OK 700539
call_center OK 4369
catalog_returns OK 112529
catalog_sales OK 1078967
customer OK 80877
customer_address OK 24973
customer_demographics OK 98639
date_dim OK 1890294
reason OK 541
promotion OK 2904
household_demographics OK 33841
inventory OK 79538
item OK 28494
income_band OK 661
store_returns OK 177652
ship_mode OK 1739
store OK 4071
time_dim OK 1174643
store_sales OK 1431704
warehouse OK 1986
web_page OK 1823
web_site OK 4028
web_returns OK 57448
web_sales OK 523896
call_center OK 4369
catalog_page OK 700539
catalog_returns OK 112529
catalog_sales OK 1078967
customer OK 80877
customer_address OK 24973
customer_demographics OK 98639
date_dim OK 1890294
household_demographics OK 33841
income_band OK 661
inventory OK 79538
item OK 28494
promotion OK 2904
reason OK 541
ship_mode OK 1739
store OK 4071
store_returns OK 177652
store_sales OK 1431704
time_dim OK 1174643
warehouse OK 1986
web_page OK 1823
web_returns OK 57448
web_sales OK 523896
web_site OK 4028

0 comments on commit 43893f4

Please sign in to comment.