MCPcopy Create free account
hub / github.com/apache/arrow / CheckError

Function CheckError

cpp/src/arrow/acero/pivot_longer_node_test.cc:80–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void CheckError(const PivotLongerNodeOptions& options, const std::string& message,
81 StatusCode code = StatusCode::Invalid) {
82 std::shared_ptr<Table> input = gen::Gen({gen::Step(), gen::Random(boolean())})
83 ->FailOnError()
84 ->Table(/*rows_per_chunk=*/1, /*num_chunks=*/1);
85
86 Declaration plan = Declaration::Sequence({
87 {"table_source", TableSourceNodeOptions(std::move(input))},
88 {"pivot_longer", options},
89 });
90
91 ASSERT_THAT(DeclarationToStatus(std::move(plan)),
92 Raises(code, testing::HasSubstr(message)));
93}
94
95TEST(PivotLongerNode, Error) {
96 PivotLongerNodeOptions options;

Callers 1

TESTFunction · 0.85

Calls 8

StepFunction · 0.85
TableSourceNodeOptionsFunction · 0.85
DeclarationToStatusFunction · 0.85
RaisesFunction · 0.85
FailOnErrorMethod · 0.80
GenFunction · 0.50
RandomFunction · 0.50
TableMethod · 0.45

Tested by

no test coverage detected