Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 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,9 +41,14 @@ jobs:

- name: Make
run: |
make
CFLAGS="-Werror" make

- name: Generate SF 0.01 Data
run: |
mkdir generated_data && cd generated_data
../dbgen -f -s 0.01 -T a -b ../dists.dss
diff ../sample_data_sf-0.01/customer.tbl customer.tbl
diff ../sample_data_sf-0.01/date.tbl date.tbl
diff ../sample_data_sf-0.01/lineorder.tbl lineorder.tbl
diff ../sample_data_sf-0.01/part.tbl part.tbl
diff ../sample_data_sf-0.01/supplier.tbl supplier.tbl
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/ssb-dbgen/actions/workflows/ci.yml/badge.svg?branch=master)
![Build Status](https://github.com/hyrise/ssb-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/ssb-dbgen/actions).

# SSB Data Generator
Expand Down
3 changes: 2 additions & 1 deletion bm_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ long weight,
FILE *
tbl_open(int tbl, char *mode)
{
char prompt[256];
// HYRISE: increase prompt so `sprintf` does not cause overflows (for gcc-13).
char prompt[512];
char fullpath[256];
FILE *f;
struct stat fstats;
Expand Down
4 changes: 2 additions & 2 deletions dss.h
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,10 @@ int dbg_print(int dt, FILE *tgt, void *data, int len, int eol);
#define PR_STRT(fp) /* any line prep for a record goes here */
#define PR_END(fp) fprintf(fp, "\n") /* finish the record here */

// HYRISE: Change format specifier.
// HYRISE: Change format specifier and cast input to char to avoid overflows in the target buffer (gcc-13).
#ifdef SSBM
#define PR_DATE(tgt, yr, mn, dy) \
sprintf(tgt, "19%02ld%02ld%02ld", yr, mn, dy)
sprintf(tgt, "19%02hhd%02hhd%02hhd", (char)(yr), (char)(mn), (char)(dy))
#else
#ifdef MDY_DATE
#define PR_DATE(tgt, yr, mn, dy) \
Expand Down
3 changes: 2 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ WORKLOAD =SSBM
# add -EDTERABYTE if orderkey will execeed 32 bits (SF >= 300)
# and make the appropriate change in gen_schema() of runit.sh
# HYRISE: Change -O to -O3. Add -Wno-dangling-else, -Wno-int-to-void-pointer-cast, and -Wno-void-pointer-to-int-cast because they are all over the codebase.
CFLAGS = -O3 -DDBNAME=\"dss\" -D$(MACHINE) -D$(DATABASE) -D$(WORKLOAD) -Wno-dangling-else -Wno-int-to-void-pointer-cast -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
CFLAGS ?=
CFLAGS += -O3 -DDBNAME=\"dss\" -D$(MACHINE) -D$(DATABASE) -D$(WORKLOAD) -Wno-dangling-else -Wno-int-to-void-pointer-cast -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
LDFLAGS = -O3
# The OBJ,EXE and LIB macros will need to be changed for compilation under
# Windows NT
Expand Down
300 changes: 300 additions & 0 deletions sample_data_sf-0.01/customer.tbl

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions sample_data_sf-0.01/date.tbl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
19920101|January 1, 1992|Thursday|January|1992|199201|Jan1992|5|1|1|1|1|Winter|0|1|1|1|
19920102|January 2, 1992|Friday|January|1992|199201|Jan1992|6|2|2|1|1|Winter|0|1|0|1|
19920103|January 3, 1992|Saturday|January|1992|199201|Jan1992|7|3|3|1|1|Winter|1|1|0|0|
19920104|January 4, 1992|Sunday|January|1992|199201|Jan1992|1|4|4|1|1|Winter|0|1|0|0|
19920105|January 5, 1992|Monday|January|1992|199201|Jan1992|2|5|5|1|1|Winter|0|1|0|1|
19920106|January 6, 1992|Tuesday|January|1992|199201|Jan1992|3|6|6|1|1|Winter|0|1|0|1|
19920107|January 7, 1992|Wednesday|January|1992|199201|Jan1992|4|7|7|1|2|Winter|0|1|0|1|
19920108|January 8, 1992|Thursday|January|1992|199201|Jan1992|5|8|8|1|2|Winter|0|1|0|1|
19920109|January 9, 1992|Friday|January|1992|199201|Jan1992|6|9|9|1|2|Winter|0|1|0|1|
19920110|January 10, 1992|Saturday|January|1992|199201|Jan1992|7|10|10|1|2|Winter|1|1|0|0|
19920111|January 11, 1992|Sunday|January|1992|199201|Jan1992|1|11|11|1|2|Winter|0|1|0|0|
19920112|January 12, 1992|Monday|January|1992|199201|Jan1992|2|12|12|1|2|Winter|0|1|0|1|
19920113|January 13, 1992|Tuesday|January|1992|199201|Jan1992|3|13|13|1|2|Winter|0|1|0|1|
19920114|January 14, 1992|Wednesday|January|1992|199201|Jan1992|4|14|14|1|3|Winter|0|1|0|1|
19920115|January 15, 1992|Thursday|January|1992|199201|Jan1992|5|15|15|1|3|Winter|0|1|0|1|
19920116|January 16, 1992|Friday|January|1992|199201|Jan1992|6|16|16|1|3|Winter|0|1|0|1|
19920117|January 17, 1992|Saturday|January|1992|199201|Jan1992|7|17|17|1|3|Winter|1|1|0|0|
19920118|January 18, 1992|Sunday|January|1992|199201|Jan1992|1|18|18|1|3|Winter|0|1|0|0|
19920119|January 19, 1992|Monday|January|1992|199201|Jan1992|2|19|19|1|3|Winter|0|1|0|1|
19920120|January 20, 1992|Tuesday|January|1992|199201|Jan1992|3|20|20|1|3|Winter|0|1|0|1|
19920121|January 21, 1992|Wednesday|January|1992|199201|Jan1992|4|21|21|1|4|Winter|0|1|0|1|
19920122|January 22, 1992|Thursday|January|1992|199201|Jan1992|5|22|22|1|4|Winter|0|1|0|1|
19920123|January 23, 1992|Friday|January|1992|199201|Jan1992|6|23|23|1|4|Winter|0|1|0|1|
19920124|January 24, 1992|Saturday|January|1992|199201|Jan1992|7|24|24|1|4|Winter|1|1|0|0|
19920125|January 25, 1992|Sunday|January|1992|199201|Jan1992|1|25|25|1|4|Winter|0|1|0|0|
Loading