class xf::database::gqe::JoinConfig¶
#include "gqe_join_config.hpp"
Overview¶
Methods¶
JoinConfig¶
JoinConfig ( Table a, std::string filter_a, Table b, std::string filter_b, std::string join_str, std::initializer_list <std::string> evals, std::initializer_list <std::initializer_list <int>> evals_const, Table c, std::string output_str, int join_Type = INNER_JOIN, bool part_tag = false )
construct of JoinConfig .
The class generate join configure bits by column names,
Input filter_a/filter_b like “19940101<=o_orderdate && o_orderdate<19950101”, o_orderdate and o_orderdate must be exsisted colunm names in table a/b when no filter conditions, input “”
Input all evaluation expressions/evaluation constants in initializer_list, each expression most contains four columns and four constants (use c1,c2,c3,c4 as notations) column names and constants are positional, that is the column name must be left operands, so you can input “-l_extendedprice + c1”, but not “c1-l_extendedprice” complete evals and evals_const examples: “-l_extendedprice * (l_discount + 1)”: {“-l_extendedprice * (l_discount + c1)”} {{0,1}} “-l_extendedprice * (l_discount + 1) * l_tax”: {“-l_extendedprice * (l_discount + c1) * l_tax”} {{0,1,0}}
Input join conditions like “left_join_key_0=right_join_key_0” when use dual key join, use comma as seperator, “left_join_key_0=right_join_key_0,left_join_key_1=right_join_key_1”
Output strings are like “output_c0 = tab_a_col/tab_b_col”, when contains several columns, use comma as seperator
Usage:
JoinConfig jcmd(tab_a, "19940101<=o_orderdate && o_orderdate<19950101",
tab_b, "",
"o_orderkey = l_orderkey",
{"-l_extendedprice * (l_discount + c1)"}, {{0,1}},
tab_c, "c1=l_orderkey, c2 = eval0");
Parameters:
a | left table |
filter_a | filter condition of left table |
b | right table |
filter_b | filter condition of right table |
join_str | join condition(s) |
evals | eval expressions list |
evals_const | eval expression constant list |
c | result table |
output_str | output column mapping |
join_type | INNER_JOIN(default) | SEMI_JOIN | ANTI_JOIN. |
part_tag | if use partition kernel |
getJoinConfigBits¶
ap_uint <512>* getJoinConfigBits () const
return join config bits.
Returns:
join config bits
getPartConfigBits¶
ap_uint <512>* getPartConfigBits () const
return part config bits.
Returns:
partition config bits
getScanSwShuf1¶
std::vector <std::vector <int8_t>> getScanSwShuf1 () const
software shuffle list.
Returns:
software shuffle array to adjust the kernel input
getScanSwShuf2¶
std::vector <std::vector <int8_t>> getScanSwShuf2 () const
software shuffle list.
Returns:
join software shuffle array in partition+join solution
getIfFilterL¶
bool getIfFilterL () const
return if left table in case has filter condition.
Returns:
if left table in case has filter condition