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

Function TEST

be/src/util/summary-util-test.cc:73–111  ·  view source on GitHub ↗

Constructs a simple exec summary and ensures the text table is generated correctly for that exec summary.

Source from the content-addressed store, hash-verified

71// Constructs a simple exec summary and ensures the text table is generated correctly for
72// that exec summary.
73TEST(PrintTableTest, HappyPath) {
74 TExecSummary input;
75
76 TPlanNodeExecSummary node = buildPlanNode(-1, 0, "F01:ROOT", "", 1, 1,
77 false, buildExecStats(-1, 4194304, -1));
78 node.exec_stats.push_back(buildExecStats(857074, 4202496, -1));
79 node.__isset.exec_stats = true;
80 input.nodes.push_back(node);
81
82 node = buildPlanNode(1, 0, "01:EXCHANGE", "UNPARTITIONED", 1, 0,
83 true, buildExecStats(-1, 16384, 7));
84 node.exec_stats.push_back(buildExecStats(269934, 90112, 99));
85 node.__isset.exec_stats = true;
86 input.nodes.push_back(node);
87
88 node = buildPlanNode(-1, 1, "F00:EXCHANGE SENDER", "", 3, 1,
89 false, buildExecStats(-1, 98304, -1));
90 node.exec_stats.push_back(buildExecStats(338449, 6862, -1));
91 node.exec_stats.push_back(buildExecStats(333098, 8139, -1));
92 node.exec_stats.push_back(buildExecStats(325971, 8139, -1));
93 node.__isset.exec_stats = true;
94 input.nodes.push_back(node);
95
96 node = buildPlanNode(0, 1, "00:SCAN HDFS",
97 "default.test_query_log_beeswax_1707938440", 3, 0, false,
98 buildExecStats(-1, 67108864, 7));
99 node.exec_stats.push_back(buildExecStats(1331010710, 368640, 39));
100 node.exec_stats.push_back(buildExecStats(1326558546, 279552, 30));
101 node.exec_stats.push_back(buildExecStats(1327758097, 283648, 30));
102 node.__isset.exec_stats = true;
103 input.nodes.push_back(node);
104
105 input.__isset.nodes = true;
106 input.exch_to_sender_map.emplace(1, 2);
107 input.__isset.exch_to_sender_map = true;
108
109 string actual = PrintExecSummary(input);
110 EXPECT_EQ(expected_str, actual);
111}
112
113} // namespace impala

Callers

nothing calls this directly

Calls 4

buildPlanNodeFunction · 0.85
buildExecStatsFunction · 0.85
PrintExecSummaryFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected