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

Method CheckSlice

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

Source from the content-addressed store, hash-verified

76 }
77
78 void CheckSlice(std::shared_ptr<RecordBatch> batch, int start, int size) {
79 batch = batch->Slice(start, size);
80 ASSERT_OK_AND_ASSIGN(auto table, Table::FromRecordBatches({batch}));
81
82 DoWrite(*table);
83 std::shared_ptr<Table> result;
84 ASSERT_OK(reader_->Read(&result));
85 ASSERT_OK(result->ValidateFull());
86 if (table->num_rows() > 0) {
87 AssertTablesEqual(*table, *result);
88 } else {
89 ASSERT_EQ(0, result->num_rows());
90 ASSERT_TRUE(result->schema()->Equals(*table->schema()));
91 }
92 }
93
94 void CheckSlices(std::shared_ptr<RecordBatch> batch) {
95 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