From 26adda3da583ffc17e2cba0cd8b6c3da65a7a37f Mon Sep 17 00:00:00 2001 From: Seppe Degryse <80254822+Griezn@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:30:49 +0100 Subject: [PATCH] Leafs can now have separate sources. --- include/file_source.h | 4 +- include/generator.h | 5 -- include/query.h | 12 +++++ include/source.h | 5 +- src/file_source.c | 21 ++++---- src/generator.c | 15 ++++-- src/multi_source.c | 4 +- src/query.c | 81 ++++++++++++++--------------- tests/dataTests.cpp | 18 +++---- tests/queryTests.cpp | 117 +++++++++++++++++++++++++++++++----------- 10 files changed, 178 insertions(+), 104 deletions(-) diff --git a/include/file_source.h b/include/file_source.h index 36ef6a6..8c377d7 100644 --- a/include/file_source.h +++ b/include/file_source.h @@ -9,11 +9,9 @@ typedef struct FileSource { source_t source; int fd; - uint32_t index; - uint32_t inc; } file_source_t; -source_t *create_file_source(const char *filename, uint8_t wsize, uint32_t wstep); +source_t *create_file_source(const char *filename); sink_t *create_file_sink(); diff --git a/include/generator.h b/include/generator.h index 059807e..8dda0f7 100644 --- a/include/generator.h +++ b/include/generator.h @@ -5,11 +5,8 @@ #define GENERATOR_H #include "source.h" -#include - typedef struct GeneratorSource { source_t source; - bool has_next; } generator_source_t; source_t *create_generator_source(); @@ -20,8 +17,6 @@ void free_generator_source(source_t *source); void free_generator_sink(sink_t *sink); -#define GENERATOR_SIZE 10 - enum subject { SUBJECT_ALICE, SUBJECT_BOB, diff --git a/include/query.h b/include/query.h index d6b640b..f08ec77 100644 --- a/include/query.h +++ b/include/query.h @@ -25,4 +25,16 @@ typedef struct { void execute_query(const query_t *query, const source_t *source, sink_t *sink); +void join_triple_copy(const data_t *src1, uint32_t index1, + const data_t *src2, uint32_t index2, data_t *dest); + +bool join_check(const data_t *src1, uint32_t index1, + const data_t *src2, uint32_t index2, join_params_t check); + +void triple_copy(const data_t *src, uint32_t index, data_t *dest); + +bool filter_check(const data_t *src, uint32_t index, filter_params_t check); + +bool select_check(const data_t *src, uint32_t index, select_params_t param); + #endif //QUERY_H diff --git a/include/source.h b/include/source.h index e4f7bc0..c415d84 100644 --- a/include/source.h +++ b/include/source.h @@ -5,11 +5,14 @@ #define SOURCE_H #include "data.h" +#include // Created a source to enable other sources than generator e.g. network typedef struct Source { data_t buffer; - data_t* (*get_next)(const struct Source *self); + uint8_t index; + uint8_t calls; + data_t* (*get_next)(const struct Source *self, const uint8_t size, const uint8_t step, const uint8_t calls); } source_t; typedef struct Sink { diff --git a/src/file_source.c b/src/file_source.c index e52dfc6..d1d751d 100644 --- a/src/file_source.c +++ b/src/file_source.c @@ -14,26 +14,29 @@ #include "utils.h" -data_t *get_next_file(const source_t *source) +data_t *get_next_file(const source_t *source, const uint8_t size, const uint8_t step, const uint8_t calls) { file_source_t *fs = (file_source_t*) source; - if (fs->index > fs->source.buffer.size) { + if (fs->source.index + step > fs->source.buffer.size) { return NULL; } data_t *data = malloc(sizeof(data_t)); assert(data); - data->data = fs->source.buffer.data + (fs->index * fs->source.buffer.width); - data->size = min(fs->inc, fs->source.buffer.size - fs->index); + data->data = fs->source.buffer.data + (fs->source.index * fs->source.buffer.width); + data->size = min(size, fs->source.buffer.size - fs->source.index); data->width = source->buffer.width; - fs->index += fs->inc; + if (++fs->source.calls == calls) { + fs->source.index += step; + fs->source.calls = 0; + } return data; } -source_t *create_file_source(const char *filename, uint8_t wsize, uint32_t wstep) +source_t *create_file_source(const char *filename) { file_source_t *fs = malloc(sizeof(file_source_t)); @@ -60,10 +63,8 @@ source_t *create_file_source(const char *filename, uint8_t wsize, uint32_t wstep fs->source.buffer.size = sb.st_size / sizeof(triple_t); fs->source.buffer.width = 1; fs->source.get_next = get_next_file; - fs->index = 0; - fs->inc = wstep; - - (void) wsize; + fs->source.index = 0; + fs->source.calls = 0; return (source_t*) fs; } diff --git a/src/generator.c b/src/generator.c index 3548e74..9be1461 100644 --- a/src/generator.c +++ b/src/generator.c @@ -57,15 +57,19 @@ triple_t triples[] = { #define NUM_TRIPLES (sizeof(triples) / sizeof(triples[0])) -data_t* get_next_generator(const source_t *source) { +data_t* get_next_generator(const source_t *source, const uint8_t size, const uint8_t step, const uint8_t calls) { generator_source_t* generator = (generator_source_t*) source; - if (!generator->has_next) { + if (generator->source.index + size > generator->source.buffer.size) { return NULL; } - generator->has_next = false; data_t *data = malloc(sizeof(data_t)); - *data = generator->source.buffer;; + *data = generator->source.buffer; + + if (++generator->source.calls == calls) { + generator->source.index += step; + generator->source.calls = 0; + } return data; } @@ -76,7 +80,8 @@ source_t *create_generator_source() generator_source_t *source = malloc(sizeof(generator_source_t)); source->source.buffer = (data_t) {triples, NUM_TRIPLES, 1}; source->source.get_next = get_next_generator; - source->has_next = true; + source->source.index = 0; + source->source.calls = 0; return (source_t*) source; } diff --git a/src/multi_source.c b/src/multi_source.c index 2b69eb9..8d0d32e 100644 --- a/src/multi_source.c +++ b/src/multi_source.c @@ -7,7 +7,7 @@ #include -data_t *get_next_multi_source(const source_t *source) +data_t *get_next_multi_source(const source_t *source, const uint8_t size, const uint8_t step, const uint8_t calls) { multi_source_t *ms = (multi_source_t*) source; data_t* datas[ms->num_sources]; @@ -18,7 +18,7 @@ data_t *get_next_multi_source(const source_t *source) // fetch data, set size for (int i = 0; i < ms->num_sources; ++i) { - data_t *next = ms->sources[i]->get_next(ms->sources[i]); + data_t *next = ms->sources[i]->get_next(ms->sources[i], size, step, calls); if (next == NULL) return NULL; diff --git a/src/query.c b/src/query.c index b8d8ce5..18f3fb7 100644 --- a/src/query.c +++ b/src/query.c @@ -3,11 +3,9 @@ // #include "query.h" #include "data.h" -#include "utils.h" #include #include -#include #include @@ -56,20 +54,20 @@ void filter(const data_t *in, data_t *out, const filter_params_t param) /// The window operator creates a copy of the input stream in a newly specified size -/// @param in The input stream /// @param out A selection of the input stream -/// @param param The window parameter containing a size of the window -void window(const data_t *in, data_t *out, const uint32_t param) +/// @param params The window parameter +bool window(data_t *out, const window_params_t params) { - const uint32_t size = min(in->size, param) * in->width; - out->data = malloc(size * sizeof(triple_t)); - assert(out->data); - out->size = in->size; - out->width = in->width; + data_t* data = params.source->get_next(params.source, params.size, params.step, params.calls); - // TODO: FIX LATER - //in->size = in->size - size; - memcpy(out->data, in->data, size * sizeof(triple_t)); + if (data == NULL) { + *params.quit = true; + return false; + } + + *out = *data; + free(data); + return true; } @@ -95,11 +93,12 @@ void select_query(const data_t *in, data_t *out, const select_params_t param) } -void execute_operator(const operator_t *operator_, const data_t *in, data_t *out); +bool execute_operator(const operator_t *operator_, const data_t *in, data_t *out); void *execute_operator_thread(void *arg) { const operator_thread_arg_t *targ = arg; - execute_operator(targ->operator_, targ->in, targ->out); - return NULL; + bool *return_value = malloc(sizeof(bool)); + *return_value = execute_operator(targ->operator_, targ->in, targ->out); + return return_value; } @@ -107,7 +106,7 @@ void *execute_operator_thread(void *arg) { /// @param operator The operator to be executed /// @param in The input stream /// @param out The output stream -void execute_operator(const operator_t *operator, const data_t *in, data_t *out) +bool execute_operator(const operator_t *operator, const data_t *in, data_t *out) { data_t tmpo1 = *in; data_t tmpo2 = {NULL, 0, 1}; @@ -117,20 +116,11 @@ void execute_operator(const operator_t *operator, const data_t *in, data_t *out) assert(operator->left); assert(operator->right); - // Thread arguments - operator_thread_arg_t left_arg = {operator->left, in, &tmpo1}; - operator_thread_arg_t right_arg = {operator->right, in, &tmpo2}; - - // Threads - pthread_t left_thread, right_thread; + bool left_bool = execute_operator(operator->left, in, &tmpo1); + bool right_bool = execute_operator(operator->right, in, &tmpo2); - // Execute left and right operators in parallel - pthread_create(&left_thread, NULL, execute_operator_thread, &left_arg); - pthread_create(&right_thread, NULL, execute_operator_thread, &right_arg); - - // Wait for threads to finish - pthread_join(left_thread, NULL); - pthread_join(right_thread, NULL); + if (!left_bool || !right_bool) + return false; join(&tmpo1, &tmpo2, out, operator->params.join); @@ -139,30 +129,43 @@ void execute_operator(const operator_t *operator, const data_t *in, data_t *out) break; case FILTER: if (operator->left) { - execute_operator(operator->left, in, &tmpo1); + if(!execute_operator(operator->left, in, &tmpo1)) + return false; } filter(&tmpo1, out, operator->params.filter); break; case WINDOW: if (operator->left) { - execute_operator(operator->left, in, &tmpo1); + if(!execute_operator(operator->left, in, &tmpo1)) + return false; } - window(&tmpo1, out, operator->params.window); + if (!window(out, operator->params.window)) + return false; + break; case SELECT: - if (operator->left) - execute_operator(operator->left, in, &tmpo1); + if (operator->left) { + if(!execute_operator(operator->left, in, &tmpo1)) + return false; + } select_query(&tmpo1, out, operator->params.select); break; } + if (tmpo1.data != in->data) { + assert(operator->left); + if (operator->left->type == WINDOW) + return true; + free(tmpo1.data); tmpo1.data = NULL; } + + return true; } @@ -173,12 +176,10 @@ void execute_operator(const operator_t *operator, const data_t *in, data_t *out) void execute_query(const query_t *query, const source_t *source, sink_t *sink) { data_t data = {NULL, 0, 1}; - data_t* next_data = NULL; - while ((next_data = source->get_next(source)) != NULL) { - execute_operator(query->root, next_data, &data); + (void)source; + while (!query->quit) { + execute_operator(query->root, &data, &data); sink->push_next(sink, &data); - free(next_data); - next_data = NULL; } } diff --git a/tests/dataTests.cpp b/tests/dataTests.cpp index e62a5ce..188f177 100644 --- a/tests/dataTests.cpp +++ b/tests/dataTests.cpp @@ -147,13 +147,13 @@ TEST(DataTests, test_filter_check) TEST(DataTests, test_file_source) { source_t *gsource = create_generator_source(); - source_t *fsource = create_file_source("../../tests/triples.bin" ,1, 255); + source_t *fsource = create_file_source("../../tests/triples.bin"); sink_t *gsink = create_generator_sink(); sink_t *fsink = create_generator_sink(); - data_t *next_gdata = gsource->get_next(gsource); - data_t *next_fdata = fsource->get_next(fsource); + data_t *next_gdata = gsource->get_next(gsource, 36, 36, 1); + data_t *next_fdata = fsource->get_next(fsource, 36, 36, 1); gsink->push_next(gsink, next_gdata); fsink->push_next(fsink, next_fdata); @@ -165,7 +165,7 @@ TEST(DataTests, test_file_source) free_generator_source(gsource); free_file_source(fsource); - free(gsink); // not the normal because it is still the array allocated int he lib + free(gsink); // not the normal because it is still the array allocated in the lib free(fsink); // not the normal because buffer is freed in source } @@ -174,13 +174,13 @@ TEST(DataTests, test_file_source_inc) { constexpr uint32_t increment = 12; source_t *gsource = create_generator_source(); - source_t *fsource = create_file_source("../../tests/triples.bin" ,1, increment); + source_t *fsource = create_file_source("../../tests/triples.bin"); sink_t *gsink = create_generator_sink(); sink_t *fsink = create_generator_sink(); - data_t *next_gdata = gsource->get_next(gsource); - data_t *next_fdata = fsource->get_next(fsource); + data_t *next_gdata = gsource->get_next(gsource, increment, increment, 1); + data_t *next_fdata = fsource->get_next(fsource, increment, increment, 1); gsink->push_next(gsink, next_gdata); fsink->push_next(fsink, next_fdata); @@ -188,13 +188,13 @@ TEST(DataTests, test_file_source_inc) ASSERT_TRUE(ARR_EQ(gsink->buffer.data, fsink->buffer.data, increment)); free(next_fdata); - next_fdata = fsource->get_next(fsource); + next_fdata = fsource->get_next(fsource, increment, increment, 1); fsink->push_next(fsink, next_fdata); ASSERT_TRUE(ARR_EQ(gsink->buffer.data + increment, fsink->buffer.data, increment)); free(next_fdata); - next_fdata = fsource->get_next(fsource); + next_fdata = fsource->get_next(fsource, increment, increment,1); fsink->push_next(fsink, next_fdata); ASSERT_TRUE(ARR_EQ(gsink->buffer.data + 2*increment, fsink->buffer.data, increment)); diff --git a/tests/queryTests.cpp b/tests/queryTests.cpp index 379ad55..7a7e195 100644 --- a/tests/queryTests.cpp +++ b/tests/queryTests.cpp @@ -16,6 +16,7 @@ class QueryTestFixture : public ::testing::Test { protected: source_t *gsource = nullptr; sink_t *gsink = nullptr; + query_t gquery = {}; bool skip_teardown = false; void SetUp() override @@ -53,7 +54,7 @@ TEST_F(QueryTestFixture, test_query_join_death_no_children) .right = nullptr, .params = {.join = {.size = 1, .checks = conditions}} }; - query_t query_join = {.root = &join_op}; + query_t query_join = {.root = &join_op, .quit = false}; // Program should abort because .left and .right are NULL ASSERT_DEATH(execute_query(&query_join, gsource, gsink), ""); @@ -69,7 +70,7 @@ TEST_F(QueryTestFixture, test_query_join_death_no_left_child) .right = &join_op, .params = {.join = {.size = 1, .checks = conditions}} }; - query_t query_join = {.root = &join_op}; + query_t query_join = {.root = &join_op, .quit = false}; // Program should abort because .left is NULL ASSERT_DEATH(execute_query(&query_join, gsource, gsink), ""); @@ -85,7 +86,7 @@ TEST_F(QueryTestFixture, test_query_join_death_no_right_child) .right = nullptr, .params = {.join = {.size = 1, .checks = conditions}} }; - query_t query_join = {.root = &join_op}; + query_t query_join = {.root = &join_op, .quit = false}; // Program should abort because .right is NULL ASSERT_DEATH(execute_query(&query_join, gsource, gsink), ""); @@ -99,17 +100,25 @@ bool check_filter(const triple_t in) TEST_F(QueryTestFixture, test_query_filter) { + window_params_t wparams = {36, 36, 1, &gquery.quit, gsource}; + operator_t window_op = { + .type = WINDOW, + .left = nullptr, + .right = nullptr, + .params = {.window = wparams} + }; + filter_check_t conditions[1] = {check_filter}; operator_t filter_op = { .type = FILTER, - .left = nullptr, + .left = &window_op, .right = nullptr, .params = {.filter = {.size = 1, .checks = conditions}} }; - query_t query_filter = {.root = &filter_op}; + gquery = {.root = &filter_op, .quit = false}; - execute_query(&query_filter, gsource, gsink); + execute_query(&gquery, gsource, gsink); triple_t expected[8] = { {SUBJECT_ALICE, PREDICATE_HAS_SKILL, OBJECT_PROGRAMMING}, {SUBJECT_BOB, PREDICATE_HAS_SKILL, OBJECT_DATA_ANALYSIS}, @@ -130,11 +139,19 @@ bool check_filter2(const triple_t in) TEST_F(QueryTestFixture, test_query_filter2) { + window_params_t wparams = {36, 36, 1, &gquery.quit, gsource}; + operator_t window_op = { + .type = WINDOW, + .left = nullptr, + .right = nullptr, + .params = {.window = wparams} + }; + filter_check_t conditions1[1] = {check_filter}; filter_check_t conditions2[1] = {check_filter2}; operator_t filter_op = { .type = FILTER, - .left = nullptr, + .left = &window_op, .right = nullptr, .params = {.filter = {.size = 1, .checks = conditions1}} }; @@ -146,9 +163,9 @@ TEST_F(QueryTestFixture, test_query_filter2) .params = {.filter = {.size = 1, .checks = conditions2}} }; - query_t query_filter = {.root = &filter_op2}; + gquery = {.root = &filter_op2, .quit = false}; - execute_query(&query_filter, gsource, gsink); + execute_query(&gquery, gsource, gsink); triple_t expected[4] = { {SUBJECT_ALICE, PREDICATE_HAS_SKILL, OBJECT_PROGRAMMING}, {SUBJECT_CHARLIE, PREDICATE_HAS_SKILL, OBJECT_PROGRAMMING}, @@ -167,12 +184,20 @@ bool check_filter7(const triple_t in) TEST_F(QueryTestFixture, test_query_filter3) { + window_params_t wparams = {36, 36, 1, &gquery.quit, gsource}; + operator_t window_op = { + .type = WINDOW, + .left = nullptr, + .right = nullptr, + .params = {.window = wparams} + }; + filter_check_t conditions1[1] = {check_filter}; filter_check_t conditions2[1] = {check_filter2}; filter_check_t conditions3[1] = {check_filter7}; operator_t filter_op = { .type = FILTER, - .left = nullptr, + .left = &window_op, .right = nullptr, .params = {.filter = {.size = 1, .checks = conditions1}} }; @@ -191,9 +216,9 @@ TEST_F(QueryTestFixture, test_query_filter3) .params = {.filter = {.size = 1, .checks = conditions3}} }; - query_t query_filter = {.root = &filter_op3}; + gquery = {.root = &filter_op3, .quit = false}; - execute_query(&query_filter, gsource, gsink); + execute_query(&gquery, gsource, gsink); triple_t expected[1] = { {SUBJECT_ALICE, PREDICATE_HAS_SKILL, OBJECT_PROGRAMMING}, }; @@ -201,6 +226,7 @@ TEST_F(QueryTestFixture, test_query_filter3) } +/* TEST_F(QueryTestFixture, test_query_window) { operator_t window_op = { @@ -260,6 +286,7 @@ TEST_F(QueryTestFixture, test_query_window2) }; ASSERT_TRUE(ARR_EQ(gsink->buffer.data, expected, 8)); } +*/ bool check_filter3(const triple_t in) @@ -271,20 +298,28 @@ bool check_filter3(const triple_t in) /// @test Filter to get people who have a skill that is required by a project TEST_F(QueryTestFixture, test_query_join) { + window_params_t wparams = {36, 36, 2, &gquery.quit, gsource}; + operator_t window_op = { + .type = WINDOW, + .left = nullptr, + .right = nullptr, + .params = {.window = wparams} + }; + filter_check_t conditions1[1] = {check_filter}; filter_check_t conditions2[1] = {check_filter3}; join_check_t conditions3[1] = {check_join}; operator_t filter_has_skill = { .type = FILTER, - .left = nullptr, + .left = &window_op, .right = nullptr, .params = {.filter = {.size = 1, .checks = conditions1}} }; operator_t filter_req_skill = { .type = FILTER, - .left = nullptr, + .left = &window_op, .right = nullptr, .params = {.filter = {.size = 1, .checks = conditions2}} }; @@ -296,9 +331,9 @@ TEST_F(QueryTestFixture, test_query_join) .params = {.join = {.size = 1, .checks = conditions3}} }; - query_t query = {.root = &join_op}; + gquery = {.root = &join_op, .quit = false}; - execute_query(&query, gsource, gsink); + execute_query(&gquery, gsource, gsink); triple_t expected[10] = { {SUBJECT_ALICE, PREDICATE_HAS_SKILL, OBJECT_PROGRAMMING}, @@ -322,6 +357,14 @@ TEST_F(QueryTestFixture, test_query_join) TEST_F(QueryTestFixture, test_query_select) { + window_params_t wparams = {36, 36, 2, &gquery.quit, gsource}; + operator_t window_op = { + .type = WINDOW, + .left = nullptr, + .right = nullptr, + .params = {.window = wparams} + }; + filter_check_t conditions1[1] = {check_filter}; filter_check_t conditions2[1] = {check_filter3}; join_check_t conditions3[1] = {check_join}; @@ -329,14 +372,14 @@ TEST_F(QueryTestFixture, test_query_select) operator_t filter_has_skill = { .type = FILTER, - .left = nullptr, + .left = &window_op, .right = nullptr, .params = {.filter = {.size = 1, .checks = conditions1}} }; operator_t filter_req_skill = { .type = FILTER, - .left = nullptr, + .left = &window_op, .right = nullptr, .params = {.filter = {.size = 1, .checks = conditions2}} }; @@ -355,9 +398,9 @@ TEST_F(QueryTestFixture, test_query_select) .params = {.select = {.size = 1, .colums = predicates}} }; - query_t query = {.root = &select_op}; + gquery = {.root = &select_op, .quit = false}; - execute_query(&query, gsource, gsink); + execute_query(&gquery, gsource, gsink); triple_t expected[5] = { {SUBJECT_ALICE, PREDICATE_HAS_SKILL, OBJECT_PROGRAMMING}, @@ -376,6 +419,14 @@ TEST_F(QueryTestFixture, test_query_select) TEST_F(QueryTestFixture, test_query_select2) { + window_params_t wparams = {36, 36, 2, &gquery.quit, gsource}; + operator_t window_op = { + .type = WINDOW, + .left = nullptr, + .right = nullptr, + .params = {.window = wparams} + }; + filter_check_t conditions1[1] = {check_filter}; filter_check_t conditions2[1] = {check_filter3}; join_check_t conditions3[1] = {check_join}; @@ -383,14 +434,14 @@ TEST_F(QueryTestFixture, test_query_select2) operator_t filter_has_skill = { .type = FILTER, - .left = nullptr, + .left = &window_op, .right = nullptr, .params = {.filter = {.size = 1, .checks = conditions1}} }; operator_t filter_req_skill = { .type = FILTER, - .left = nullptr, + .left = &window_op, .right = nullptr, .params = {.filter = {.size = 1, .checks = conditions2}} }; @@ -409,9 +460,9 @@ TEST_F(QueryTestFixture, test_query_select2) .params = {.select = {.size = 2, .colums = predicates}} }; - query_t query = {.root = &select_op}; + gquery = {.root = &select_op, .quit = false}; - execute_query(&query, gsource, gsink); + execute_query(&gquery, gsource, gsink); triple_t expected[10] = { {SUBJECT_ALICE, PREDICATE_HAS_SKILL, OBJECT_PROGRAMMING}, @@ -455,6 +506,14 @@ bool check_filter5(const triple_t in) /// And that are older than 30 TEST_F(QueryTestFixture, test_query_1) { + window_params_t wparams = {36, 36, 3, &gquery.quit, gsource}; + operator_t window_op = { + .type = WINDOW, + .left = nullptr, + .right = nullptr, + .params = {.window = wparams} + }; + filter_check_t conditions1[1] = {check_filter}; filter_check_t conditions2[1] = {check_filter3}; join_check_t conditions3[1] = {check_join}; @@ -464,14 +523,14 @@ TEST_F(QueryTestFixture, test_query_1) operator_t filter_has_skill = { .type = FILTER, - .left = nullptr, + .left = &window_op, .right = nullptr, .params = {.filter = {.size = 1, .checks = conditions1}} }; operator_t filter_req_skill = { .type = FILTER, - .left = nullptr, + .left = &window_op, .right = nullptr, .params = {.filter = {.size = 1, .checks = conditions2}} }; @@ -485,7 +544,7 @@ TEST_F(QueryTestFixture, test_query_1) operator_t filter_has_age = { .type = FILTER, - .left = nullptr, + .left = &window_op, .right = nullptr, .params = {.filter = {.size = 1, .checks = conditions4}} }; @@ -504,9 +563,9 @@ TEST_F(QueryTestFixture, test_query_1) .params = {.filter = {.size = 1, .checks = conditions6}} }; - query_t query = {.root = &filter_older}; + gquery = {.root = &filter_older, .quit = false}; - execute_query(&query, gsource, gsink); + execute_query(&gquery, gsource, gsink); triple_t expected[6] = { {SUBJECT_CHARLIE, PREDICATE_HAS_AGE, 35},