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

Method CheckSlice

cpp/src/arrow/ipc/feather_test.cc:82–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 }
81
82 void CheckSlice(std::shared_ptr<RecordBatch> batch, int start, int size) {
83 batch = batch->Slice(start, size);
84 ASSERT_OK_AND_ASSIGN(auto table, Table::FromRecordBatches({batch}));
85
86 DoWrite(*table);
87 std::shared_ptr<Table> result;
88 ASSERT_OK(reader_->Read(&result));
89 ASSERT_OK(result->ValidateFull());
90 if (table->num_rows() > 0) {
91 AssertTablesEqual(*table, *result);
92 } else {
93 ASSERT_EQ(0, result->num_rows());
94 ASSERT_TRUE(result->schema()->Equals(*table->schema()));
95 }
96 }
97
98 void CheckSlices(std::shared_ptr<RecordBatch> batch) {
99 std::vector<int> starts = {0, 1, 300, 301, 302, 303, 304, 305, 306, 307};

Callers

nothing calls this directly

Calls 7

AssertTablesEqualFunction · 0.85
SliceMethod · 0.45
ReadMethod · 0.45
ValidateFullMethod · 0.45
num_rowsMethod · 0.45
EqualsMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected