MCPcopy Create free account
hub / github.com/apache/impala / DumpTExecReq

Function DumpTExecReq

be/src/runtime/query-driver.cc:61–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void 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
88Status QueryDriver::DoFrontendPlanning(const TQueryCtx& query_ctx, bool use_request) {
89 // Takes the TQueryCtx and calls into the frontend to initialize the TExecRequest for

Callers 2

DoFrontendPlanningMethod · 0.85
SetExternalPlanMethod · 0.85

Calls 5

SubstituteFunction · 0.85
PrintIdFunction · 0.85
emptyMethod · 0.45
strMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected