| 59 | } |
| 60 | |
| 61 | void DumpTExecReq(const TExecRequest& exec_request, const char* dump_type, |
| 62 | const TUniqueId& query_id) { |
| 63 | if (FLAGS_dump_exec_request_path.empty()) return; |
| 64 | int depth = 0; |
| 65 | std::stringstream tmpstr; |
| 66 | string fn(Substitute("$0/TExecRequest-$1.$2", FLAGS_dump_exec_request_path, |
| 67 | dump_type, PrintId(query_id, "-"))); |
| 68 | std::ofstream ofs(fn); |
| 69 | tmpstr << exec_request; |
| 70 | std::string s = tmpstr.str(); |
| 71 | const char *p = s.c_str(); |
| 72 | const int len = s.length(); |
| 73 | for (int i = 0; i < len; ++i) { |
| 74 | const char ch = p[i]; |
| 75 | ofs << ch; |
| 76 | if (ch == '(') { |
| 77 | depth++; |
| 78 | } else if (ch == ')' && depth > 0) { |
| 79 | depth--; |
| 80 | } else if (ch == ',') { |
| 81 | } else { |
| 82 | continue; |
| 83 | } |
| 84 | ofs << '\n' << std::setw(depth) << " "; |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | Status QueryDriver::DoFrontendPlanning(const TQueryCtx& query_ctx, bool use_request) { |
| 89 | // Takes the TQueryCtx and calls into the frontend to initialize the TExecRequest for |
no test coverage detected