MCPcopy Index your code
hub / github.com/apache/orc / TEST

Function TEST

tools/test/TestFileStatistics.cc:27–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include "wrap/gtest-wrapper.h"
26
27TEST(TestFileStatistics, testNormal) {
28 const std::string pgm = findProgram("tools/src/orc-statistics");
29 const std::string file = findExample("orc_index_int_string.orc");
30 const std::string expected = "File " + file +
31 " has 3 columns\n"
32 "*** Column 0 ***\n"
33 "Column has 6000 values and has null value: yes\n"
34 "\n"
35 "*** Column 1 ***\n"
36 "Data type: Integer\n"
37 "Values: 6000\n"
38 "Has null: yes\n"
39 "Minimum: 1\n"
40 "Maximum: 6000\n"
41 "Sum: 18003000\n"
42 "\n"
43 "*** Column 2 ***\n"
44 "Data type: String\n"
45 "Values: 6000\n"
46 "Has null: yes\n"
47 "Minimum: 1000\n"
48 "Maximum: 9a\n"
49 "Total length: 23892\n"
50 "\n"
51 "File " +
52 file +
53 " has 1 stripes\n"
54 "*** Stripe 0 ***\n"
55 "\n"
56 "--- Column 0 ---\n"
57 "Column has 6000 values and has null value: yes\n"
58 "\n"
59 "--- Column 1 ---\n"
60 "Data type: Integer\n"
61 "Values: 6000\n"
62 "Has null: yes\n"
63 "Minimum: 1\n"
64 "Maximum: 6000\n"
65 "Sum: 18003000\n"
66 "\n"
67 "--- Column 2 ---\n"
68 "Data type: String\n"
69 "Values: 6000\n"
70 "Has null: yes\n"
71 "Minimum: 1000\n"
72 "Maximum: 9a\n"
73 "Total length: 23892\n\n";
74
75 std::string output;
76 std::string error;
77
78 EXPECT_EQ(0, runProgram({pgm, file}, output, error));
79 EXPECT_EQ(expected, output);
80 EXPECT_EQ("", error);
81}
82
83TEST(TestFileStatistics, testOptions) {
84 const std::string pgm = findProgram("tools/src/orc-statistics");

Callers

nothing calls this directly

Calls 3

findProgramFunction · 0.85
findExampleFunction · 0.85
runProgramFunction · 0.85

Tested by

no test coverage detected