Skip to content

Commit

Permalink
Fixed executioner metadata reading + altered run to generate the input
Browse files Browse the repository at this point in the history
  • Loading branch information
billsioros committed Dec 8, 2018
1 parent fe8ed4f commit 1b2cb3d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
29 changes: 29 additions & 0 deletions igenerate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

function confirm
{
if [ -e "$1" ]
then
read -p "Are you sure you want to overwrite \"$1\": " answer
if [[ "$answer" != [yY] ]] && [[ "$answer" != [yY][eE][sS] ]]
then
exit 1
fi
fi
}

if [ "$#" -lt 3 ]
then
echo "Usage: $(basename "$0") <WORKLOAD> <OUT> <RELATIONS>"
exit 1
fi

queries=$(cat "$1"); shift

out="$1"; shift

relations=$(for file in "$*"; do echo "$(realpath $file)"; done | rev | sort -n -k1.2 | rev)

input=$(echo -e "$relations\nDone\n$queries")

confirm "$out"; echo "$input" > "$out"
22 changes: 0 additions & 22 deletions run.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/executioner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void RHJ::Executioner::createMetadata()
{
const tuple_key_t index = j * meta[i].rowSize;

tuple_payload_t * const mapping = &(reinterpret_cast<tuple_payload_t*>(meta[i].mapping)[index]);
tuple_payload_t * const mapping = &(reinterpret_cast<tuple_payload_t*>(mapping_clone)[index]);

meta[i].columns[j] = mapping;
}
Expand Down

0 comments on commit 1b2cb3d

Please sign in to comment.