Skip to content

Commit

Permalink
Rename main branch (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
dey4ss authored Feb 12, 2025
1 parent a7cfdd2 commit e6c7df6
Show file tree
Hide file tree
Showing 26 changed files with 173,522 additions and 22 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- main

jobs:
build:
Expand Down Expand Up @@ -41,17 +41,24 @@ jobs:
- name: Make
run: |
make
CFLAGS="-Werror" make
- name: Generate SF 0.01 Data
run: |
mkdir generated_data && cd generated_data
# With skew.
../dbgen -f -s 0.01 -k -b ../dists.dss
diff -r -q ../sample_data_sf-0.01/skewed .
# Without skew.
../dbgen -f -s 0.01 -b ../dists.dss
diff -r -q ../sample_data_sf-0.01/unskewed .
- name: Generate Queries
run: |
mkdir generated_queries && cd generated_queries && ln -s ../queries/*.sql .
# With skew and seed 123.
../qgen -k -s 0.01 -b ../dists.dss -r 123 -l params > /dev/null
../qgen -k -s 0.01 -b ../dists.dss -r 123 -l params_skewed > /dev/null
diff ../sample_params_sf-0.01/params_skewed_seed-123 params_skewed
# Without skew and seed 1234.
../qgen -s 0.01 -b ../dists.dss -r 1234 -l params > /dev/null
../qgen -s 0.01 -b ../dists.dss -r 1234 -l params_unskewed > /dev/null
diff ../sample_params_sf-0.01/params_unskewed_seed-1234 params_unskewed
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ CC ?= gcc
DATABASE= VECTORWISE
MACHINE = LINUX
WORKLOAD = TPCH
# HYRISE: Add -O3, remove -g. Add -Wno-dangling-else.
CFLAGS = -O3 -DDBNAME=\"dss\" -D$(MACHINE) -D$(DATABASE) -D$(WORKLOAD) -DRNG_TEST -D_FILE_OFFSET_BITS=64 -DJCCH_SKEW=1 -Wno-dangling-else
# HYRISE: Add -O3, remove -g. Add -Wno-dangling-else. Remove -DRNG_TEST because it only tracks how often the random
# seeds were accessed.
CFLAGS ?=
CFLAGS += -O3 -DDBNAME=\"dss\" -D$(MACHINE) -D$(DATABASE) -D$(WORKLOAD) -D_FILE_OFFSET_BITS=64 -DJCCH_SKEW=1 -Wno-dangling-else
LDFLAGS = -O3
# The OBJ,EXE and LIB macros will need to be changed for compilation under
# Windows NT
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Build Status](https://github.com/hyrise/jcch-dbgen/actions/workflows/ci.yml/badge.svg?branch=master)
![Build Status](https://github.com/hyrise/jcch-dbgen/actions/workflows/ci.yml/badge.svg?branch=main)
### Note: This fork is adapted for compilation using recent versions of Clang and GCC, which we ensure with a [GitHub action](https://github.com/hyrise/jcch-dbgen/actions).

# JCC-H Data Generator
Expand Down
23 changes: 13 additions & 10 deletions bm_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,20 @@ yes_no(char *prompt)
#pragma warning(default:4127)
#endif
printf("%s [Y/N]: ", prompt);
fgets(reply, 128, stdin);
switch (*reply)
// HYRISE: Add if.
if (fgets(reply, 128, stdin) != NULL)
{
case 'y':
case 'Y':
return (1);
case 'n':
case 'N':
return (0);
default:
printf("Please answer 'yes' or 'no'.\n");
switch (*reply)
{
case 'y':
case 'Y':
return (1);
case 'n':
case 'N':
return (0);
default:
printf("Please answer 'yes' or 'no'.\n");
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions dss.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,9 @@ int dbg_print(int dt, FILE *tgt, void *data, int len, int eol);
#define PR_DATE(tgt, yr, mn, dy) \
sprintf(tgt, "%02d-%02d-19%02d", mn, dy, yr)
#else
// HYRISE: Change format specifier.
// HYRISE: Change format specifier, cast components as char (gcc-13).
#define PR_DATE(tgt, yr, mn, dy) \
sprintf(tgt, "19%02ld-%02ld-%02ld", yr, mn, dy)
sprintf(tgt, "19%02d-%02d-%02d", (char)(yr), (char)(mn), (char)(dy))
#endif /* DATE_FORMAT */

/*
Expand Down
3 changes: 2 additions & 1 deletion rnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ dump_seeds(int tbl)
// HYRISE: Change format specifier.
printf("%d(%lld):\t%lld\n", i, Seed[i].nCalls, Seed[i].value);
#else
printf("%d:\t%ld\n", i, Seed[i].value);
// HYRISE: Change format specifier.
printf("%d:\t%lld\n", i, Seed[i].value);
#endif
return;
}
Expand Down
1,500 changes: 1,500 additions & 0 deletions sample_data_sf-0.01/skewed/customer.tbl

Large diffs are not rendered by default.

60,000 changes: 60,000 additions & 0 deletions sample_data_sf-0.01/skewed/lineitem.tbl

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions sample_data_sf-0.01/skewed/nation.tbl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
0|ALGERIA|0| haggle. carefully final deposits detect slyly agai|
1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon|
2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special |
3|CANADA|1|eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold|
4|EGYPT|4|y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d|
5|ETHIOPIA|0|ven packages wake quickly. regu|
6|FRANCE|3|refully final requests. regular, ironi|
7|GERMANY|3|l platelets. regular accounts x-ray: unusual, regular acco|
8|INDIA|2|ss excuses cajole slyly across the packages. deposits print aroun|
9|INDONESIA|2| slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull|
10|IRAN|4|efully alongside of the slyly final dependencies. |
11|IRAQ|4|nic deposits boost atop the quickly final requests? quickly regula|
12|JAPAN|2|ously. final, express gifts cajole a|
13|JORDAN|4|ic deposits are blithely about the carefully regular pa|
14|KENYA|0| pending excuses haggle furiously deposits. pending, express pinto beans wake fluffily past t|
15|MOROCCO|0|rns. blithely bold courts among the closely regular packages use furiously bold platelets?|
16|MOZAMBIQUE|0|s. ironic, unusual asymptotes wake blithely r|
17|PERU|1|platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun|
18|CHINA|2|c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos|
19|ROMANIA|3|ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account|
20|SAUDI ARABIA|4|ts. silent requests haggle. closely express packages sleep across the blithely|
21|VIETNAM|2|hely enticingly express accounts. even, final |
22|RUSSIA|3| requests against the platelets use never according to the quickly regular pint|
23|UNITED KINGDOM|3|eans boost carefully special requests. accounts are. carefull|
24|UNITED STATES|1|y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be|
Loading

0 comments on commit e6c7df6

Please sign in to comment.