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

Function ValidateTakeXA

cpp/src/arrow/compute/kernels/vector_selection_test.cc:1418–1452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1416
1417template <typename ValuesType>
1418void ValidateTakeXA(const std::shared_ptr<Array>& values,
1419 const std::shared_ptr<Array>& indices) {
1420 ASSERT_OK_AND_ASSIGN(auto taken, TakeAAA(*values, *indices));
1421 ValidateOutput(taken);
1422 ASSERT_EQ(indices->length(), taken->length());
1423 switch (indices->type_id()) {
1424 case Type::INT8:
1425 ValidateTakeXAImpl<ValuesType, Int8Type>(values, indices, taken);
1426 break;
1427 case Type::INT16:
1428 ValidateTakeXAImpl<ValuesType, Int16Type>(values, indices, taken);
1429 break;
1430 case Type::INT32:
1431 ValidateTakeXAImpl<ValuesType, Int32Type>(values, indices, taken);
1432 break;
1433 case Type::INT64:
1434 ValidateTakeXAImpl<ValuesType, Int64Type>(values, indices, taken);
1435 break;
1436 case Type::UINT8:
1437 ValidateTakeXAImpl<ValuesType, UInt8Type>(values, indices, taken);
1438 break;
1439 case Type::UINT16:
1440 ValidateTakeXAImpl<ValuesType, UInt16Type>(values, indices, taken);
1441 break;
1442 case Type::UINT32:
1443 ValidateTakeXAImpl<ValuesType, UInt32Type>(values, indices, taken);
1444 break;
1445 case Type::UINT64:
1446 ValidateTakeXAImpl<ValuesType, UInt64Type>(values, indices, taken);
1447 break;
1448 default:
1449 FAIL() << "Invalid index type";
1450 break;
1451 }
1452}
1453
1454// ----
1455

Callers

nothing calls this directly

Calls 3

ValidateOutputFunction · 0.85
lengthMethod · 0.45
type_idMethod · 0.45

Tested by

no test coverage detected