int k;
for(k=0;k<fs->hash_eq.size();++k){
sprintf(tmpstr,"key_var%d",k);
int k;
for(k=0;k<fs->hash_eq.size();++k){
sprintf(tmpstr,"key_var%d",k);
// bloom filter needs to be advanced.
// SET_BF_EMPTY(table,number of bloom filters,bloom filter index,bit index)
// t->bf_size : number of bits in bloom filter
// bloom filter needs to be advanced.
// SET_BF_EMPTY(table,number of bloom filters,bloom filter index,bit index)
// t->bf_size : number of bits in bloom filter
ret += generate_equality_test(lhs_op,rhs_op,hdt);
}
ret += "){\n\t\t\tthe_bucket = bucket;\n";
ret += generate_equality_test(lhs_op,rhs_op,hdt);
}
ret += "){\n\t\t\tthe_bucket = bucket;\n";
for(p=0;p<fs->hash_eq.size();++p){
if(p>0) ret += " && ";
// ret += "t->join_table[bucket1].key_var"+int_to_string(p)+
// " == s_equijoin_"+int_to_string(p);
data_type *hdt = fs->hash_eq[p]->pr->get_right_se()->get_data_type();
for(p=0;p<fs->hash_eq.size();++p){
if(p>0) ret += " && ";
// ret += "t->join_table[bucket1].key_var"+int_to_string(p)+
// " == s_equijoin_"+int_to_string(p);
data_type *hdt = fs->hash_eq[p]->pr->get_right_se()->get_data_type();
string rhs_op = "s_equijoin_"+int_to_string(p);
ret += generate_equality_test(lhs_op,rhs_op,hdt);
}
string rhs_op = "s_equijoin_"+int_to_string(p);
ret += generate_equality_test(lhs_op,rhs_op,hdt);
}
- ret += "){\n\t\t\tthe_bucket = bucket1;\n";
- ret += "\t\t}else{ if(t->join_table[bucket].ts <= t->join_table[bucket1].ts)\n";
- ret+="\t\t\tthe_bucket = bucket;\n\t\t\telse the_bucket=bucket1;\n";
- ret += "\t\t}}\n";
+ ret += "){\n\t\t\t\tthe_bucket = bucket1;\n";
+ ret += "\t\t\t}else{ \n\t\t\t\tif(t->join_table[bucket].ts <= t->join_table[bucket1].ts)\n";
+ ret+="\t\t\t\t\tthe_bucket = bucket;\n\t\t\t\telse\n\t\t\t\t\tthe_bucket=bucket1;\n";
+ ret += "\t\t\t}\n\t\t}\n";
for(p=0;p<fs->hash_eq.size();++p){
data_type *hdt = fs->hash_eq[p]->pr->get_right_se()->get_data_type();
if(hdt->is_buffer_type()){
for(p=0;p<fs->hash_eq.size();++p){
data_type *hdt = fs->hash_eq[p]->pr->get_right_se()->get_data_type();
if(hdt->is_buffer_type()){
for(p=0;p<fs->hash_eq.size();++p){
ret +=
" bucket ^= (("+hash_nums[(i*fs->hash_eq.size()+p)%NRANDS]+" * lfta_"+
for(p=0;p<fs->hash_eq.size();++p){
ret +=
" bucket ^= (("+hash_nums[(i*fs->hash_eq.size()+p)%NRANDS]+" * lfta_"+
// ret += "t->join_table[bucket1].key_var"+int_to_string(p)+
// " == r_equijoin_"+int_to_string(p);
data_type *hdt = fs->hash_eq[p]->pr->get_right_se()->get_data_type();
// ret += "t->join_table[bucket1].key_var"+int_to_string(p)+
// " == r_equijoin_"+int_to_string(p);
data_type *hdt = fs->hash_eq[p]->pr->get_right_se()->get_data_type();
string rhs_op = "s_equijoin_"+int_to_string(p);
ret += generate_equality_test(lhs_op,rhs_op,hdt);
}
string rhs_op = "s_equijoin_"+int_to_string(p);
ret += generate_equality_test(lhs_op,rhs_op,hdt);
}
bool uses_bloom = fjq->use_bloom;
ret += "/*\t\tJoin fields\t*/\n";
for(g=0;g<fjq->hash_eq.size();g++){
bool uses_bloom = fjq->use_bloom;
ret += "/*\t\tJoin fields\t*/\n";
for(g=0;g<fjq->hash_eq.size();g++){
- sprintf(tmpstr,"\t%s s_equijoin_%d, r_equijoin_%d;\n",fjq->hash_eq[g]->pr->get_left_se()->get_data_type()->get_cvar_type().c_str(),g,g);
+ sprintf(tmpstr,"\t%s s_equijoin_%d;\n",fjq->hash_eq[g]->pr->get_right_se()->get_data_type()->get_cvar_type().c_str(),g);
+ ret += tmpstr;
+ sprintf(tmpstr,"\t%s r_equijoin_%d;\n",fjq->hash_eq[g]->pr->get_left_se()->get_data_type()->get_cvar_type().c_str(),g);
"\tunsigned int i=0,j=0,k=0, b, bf_clean = 0, tmp_i, found; \n"
"\tunsigned int bucket, bucket0, bucket1, bucket2;\n"
"\tlong long int curr_fj_ts;\n"
"\tunsigned int i=0,j=0,k=0, b, bf_clean = 0, tmp_i, found; \n"
"\tunsigned int bucket, bucket0, bucket1, bucket2;\n"
"\tlong long int curr_fj_ts;\n"