X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fftacmp%2Fquery_plan.cc;fp=src%2Fftacmp%2Fquery_plan.cc;h=718e7be452581ac7ed1aa4d68a32d803a3168c40;hb=7210c67dde90098460d1f0922deeb810be521673;hp=c84edb97782b4b483b7ea56c01a3626fd7741461;hpb=cc56def24d5d4a66ce0880f782ac465fca799289;p=com%2Fgs-lite.git diff --git a/src/ftacmp/query_plan.cc b/src/ftacmp/query_plan.cc index c84edb9..718e7be 100644 --- a/src/ftacmp/query_plan.cc +++ b/src/ftacmp/query_plan.cc @@ -103,11 +103,11 @@ mrg_qpn::mrg_qpn(filter_join_qpn *spx, std::string n_name, std::vector create_query_nodes(query_summary_class *qs,table_list *Schema){ @@ -5139,6 +5139,57 @@ table_def *join_eq_hash_qpn::get_fields(){ } +//----------------------------------------------------------------- +// get output "keys" +// This is a guess about the set of fields which are a key +// Use as metadata output, e.g. in qtree.xml + + + +// refs to GB attribtues are keys, if a SE is not a GB colref +// but refers to a GB colref (outside of an aggregation) +// then set partial_keys to true +vector sgah_qpn::get_tbl_keys(vector &partial_keys){ + vector keys; + + set gref_set; + for(int i=0; ise->is_gb()){ + keys.push_back(select_list[s]->name); + }else{ + if(contains_gb_se(select_list[s]->se, gref_set)){ + partial_keys.push_back(select_list[s]->name); + } + } + } + return keys; +} + +vector rsgah_qpn::get_tbl_keys(vector &partial_keys){ + vector keys; + + set gref_set; + for(int i=0; ise->is_gb()){ + keys.push_back(select_list[s]->name); + }else{ + if(contains_gb_se(select_list[s]->se, gref_set)){ + partial_keys.push_back(select_list[s]->name); + } + } + } + return keys; +} + + + + //----------------------------------------------------------------- // get output tables