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

Function TEST_P

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

Source from the content-addressed store, hash-verified

171}
172
173TEST_P(TestFeather, ReadIndicesOrNames) {
174 std::shared_ptr<RecordBatch> batch1;
175 ASSERT_OK(ipc::test::MakeIntRecordBatch(&batch1));
176
177 ASSERT_OK_AND_ASSIGN(auto table, Table::FromRecordBatches({batch1}));
178
179 DoWrite(*table);
180
181 // int32 type is at the column f4 of the result of MakeIntRecordBatch
182 auto expected = Table::Make(schema({field("f4", int32())}), {batch1->column(4)});
183
184 std::shared_ptr<Table> result1, result2;
185
186 std::vector<int> indices = {4};
187 ASSERT_OK(reader_->Read(indices, &result1));
188 AssertTablesEqual(*expected, *result1);
189
190 std::vector<std::string> names = {"f4"};
191 ASSERT_OK(reader_->Read(names, &result2));
192 AssertTablesEqual(*expected, *result2);
193}
194
195TEST_P(TestFeather, EmptyTable) {
196 std::vector<std::shared_ptr<ChunkedArray>> columns;

Callers

nothing calls this directly

Calls 15

MakeIntRecordBatchFunction · 0.85
AssertTablesEqualFunction · 0.85
CheckRoundtripFunction · 0.85
MakeFloat3264BatchFunction · 0.85
MakeDictionaryFlatFunction · 0.85
ArrayFromJSONFunction · 0.85
MakeNullRecordBatchFunction · 0.85
AssertArraysEqualFunction · 0.85
MakeIntBatchSizedFunction · 0.85
MakeFloat3264BatchSizedFunction · 0.85
MakeBooleanBatchSizedFunction · 0.85

Tested by

no test coverage detected