diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2023-07-27 18:21:26 -0400 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2023-07-27 18:21:26 -0400 |
| commit | d6e08e9d8d3ac9b356ac50cee22b41f828160247 (patch) | |
| tree | 2c1f62f6385072e1a824e557693634acc3136cdd /include/shard/WIRS.h | |
| parent | f462921cbc52688fb478c6ac86a891e596fd6053 (diff) | |
| download | dynamic-extension-d6e08e9d8d3ac9b356ac50cee22b41f828160247.tar.gz | |
Expanded query interface
Query interface now enables skipping of delete processing and stopping
query processing when first match is found.
Diffstat (limited to 'include/shard/WIRS.h')
| -rw-r--r-- | include/shard/WIRS.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/shard/WIRS.h b/include/shard/WIRS.h index 1a63092..fafdef0 100644 --- a/include/shard/WIRS.h +++ b/include/shard/WIRS.h @@ -370,6 +370,10 @@ private: template <WeightedRecordInterface R, bool Rejection=true> class WIRSQuery { public: + + constexpr static bool EARLY_ABORT=false; + constexpr static bool SKIP_DELETE_FILTER=false; + static void *get_query_state(WIRS<R> *wirs, void *parms) { auto res = new WIRSState<R>(); decltype(R::key) lower_key = ((wirs_query_parms<R> *) parms)->lower_bound; @@ -440,7 +444,7 @@ public: return state; } - static void process_query_states(void *query_parms, std::vector<void*> shard_states, void *buff_state) { + static void process_query_states(void *query_parms, std::vector<void*> &shard_states, void *buff_state) { auto p = (wirs_query_parms<R> *) query_parms; auto bs = (WIRSBufferState<R> *) buff_state; @@ -549,12 +553,12 @@ public: return result; } - static std::vector<R> merge(std::vector<std::vector<R>> &results, void *parms) { + static std::vector<R> merge(std::vector<std::vector<Wrapped<R>>> &results, void *parms) { std::vector<R> output; for (size_t i=0; i<results.size(); i++) { for (size_t j=0; j<results[i].size(); j++) { - output.emplace_back(results[i][j]); + output.emplace_back(results[i][j].rec); } } |