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

Method ToString

be/src/util/table-printer.cc:76–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76string TablePrinter::ToString(const string& prefix) const {
77 vector<int> output_widths = max_col_widths_;
78 int total_width = 0;
79 for (int i = 0; i < output_widths.size(); ++i) {
80 if (max_output_width_ >= 0) {
81 output_widths[i] = std::min(output_widths[i], max_output_width_);
82 }
83 output_widths[i] += COLUMN_PAD;
84 total_width += output_widths[i];
85 }
86
87 stringstream ss;
88 ss << prefix;
89
90 // Print the labels and line after.
91 PrintRow(&ss, labels_, output_widths);
92 ss << endl;
93
94 // Print line after labels
95 for (int i = 0; i < total_width; ++i) {
96 ss << "-";
97 }
98 ss << endl;
99
100 // Print the rows
101 for (int i = 0; i < rows_.size(); ++i) {
102 PrintRow(&ss, rows_[i], output_widths);
103 if (i != rows_.size() - 1) ss << endl;
104 }
105
106 return ss.str();
107}

Callers 14

DateToStringFunction · 0.45
FromKuduStatusFunction · 0.45
ReadCurrentProcStatMethod · 0.45
ReadCurrentProcNetDevMethod · 0.45
PrintExecSummaryMethod · 0.45
BeginRequestCallbackMethod · 0.45
HandleSpnegoMethod · 0.45
HandleBasicMethod · 0.45
DebugStringMethod · 0.45
read_certFunction · 0.45

Calls 4

minFunction · 0.85
PrintRowFunction · 0.85
sizeMethod · 0.45
strMethod · 0.45

Tested by 2

DateToStringFunction · 0.36
read_certFunction · 0.36