+ for(int q=0;q<str->query_plan.size();++q){
+ qp_node *qp = str->query_plan[q];
+ if(qp==NULL)
+ continue; // there can be blanks
+
+ fprintf(schema_summary_output,"-----\n");
+ fprintf(schema_summary_output,"%s\n",qp->node_name.c_str());
+
+ table_def *sch = qp->get_fields();
+
+ vector<field_entry *> flds = sch->get_fields();
+ int f;
+ for(f=0;f<flds.size();++f){
+ if(f>0) fprintf(schema_summary_output,"|");
+ fprintf(schema_summary_output,"%s",flds[f]->get_name().c_str());
+ }
+ fprintf(schema_summary_output,"\n");
+ for(f=0;f<flds.size();++f){
+ if(f>0) fprintf(schema_summary_output,"|");
+ fprintf(schema_summary_output,"%s",flds[f]->get_type().c_str());
+ }
+ fprintf(schema_summary_output,"\n");
+
+ map<std::string, std::string> defines = qp->get_definitions();
+ string comment = "";
+ if(defines.count("comment")>0){
+ comment = defines["comment"];
+ }
+ fprintf(schema_summary_output,"%s\n",comment.c_str());
+
+ vector<tablevar_t *> input_tables = qp->get_input_tbls();
+ for(int t=0; t<input_tables.size(); ++t){
+ if(t>0) fprintf(schema_summary_output,"|");
+ string machine = input_tables[t]->get_machine();
+ string iface = input_tables[t]->get_interface();
+ string schema = input_tables[t]->get_schema_name();
+ if(machine!=""){
+ fprintf(schema_summary_output,"%s.",machine.c_str());
+ }
+ if(iface!=""){
+ fprintf(schema_summary_output,"%s.",iface.c_str());
+ }else{
+ if(machine!="") fprintf(schema_summary_output,".");
+ }
+ fprintf(schema_summary_output,"%s",schema.c_str());
+ }
+
+ fprintf(schema_summary_output,"\n");
+ }
+
+
+
+/*
+ fprintf(schema_summary_output,"-----\n");