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

Function DoTestGetBatchSpacedRoundtrip

cpp/src/arrow/util/rle_encoding_test.cc:1321–1438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1319
1320template <typename T>
1321void DoTestGetBatchSpacedRoundtrip() {
1322 using Data = DataTestRleBitPacked<T>;
1323 using ArrowType = typename Data::ArrowType;
1324 using ArrayType = typename TypeTraits<ArrowType>::ArrayType;
1325 using RandomPart = typename Data::RandomPart;
1326 using NullPart = typename Data::NullPart;
1327 using RepeatPart = typename Data::RepeatPart;
1328
1329 std::vector<Data> test_cases = {
1330 {
1331 {RandomPart{/* max=*/1, /* size=*/400, /* null_proba= */ 0.1}},
1332 /* bit_width= */ 1,
1333 },
1334 {
1335 {
1336 RandomPart{/* max=*/7, /* size=*/1037, /* null_proba= */ 0.0},
1337 NullPart{/* size= */ 1153},
1338 RandomPart{/* max=*/7, /* size=*/800, /* null_proba= */ 0.5},
1339 },
1340 /* bit_width= */ 3,
1341 },
1342 {
1343 {
1344 NullPart{/* size= */ 80},
1345 RandomPart{/* max=*/static_cast<T>(1023), /* size=*/800,
1346 /* null_proba= */ 0.01},
1347 NullPart{/* size= */ 1023},
1348 },
1349 /* bit_width= */ 11,
1350 },
1351 {
1352 {RepeatPart{/* value=*/13, /* size=*/1024, /* null_proba= */ 0.01}},
1353 /* bit_width= */ 10,
1354 },
1355 {
1356 {
1357 NullPart{/* size= */ 1024},
1358 RepeatPart{/* value=*/static_cast<T>(10000), /* size=*/1025,
1359 /* null_proba= */ 0.1},
1360 NullPart{/* size= */ 77},
1361 },
1362 /* bit_width= */ 23,
1363 },
1364 {
1365 {
1366 RepeatPart{/* value=*/13, /* size=*/1023, /* null_proba= */ 0.0},
1367 NullPart{/* size= */ 1153},
1368 RepeatPart{/* value=*/72, /* size=*/1799, /* null_proba= */ 0.5},
1369 },
1370 /* bit_width= */ 10,
1371 },
1372 {
1373 {
1374 RandomPart{/* max=*/1, /* size=*/1013, /* null_proba= */ 0.01},
1375 NullPart{/* size=*/8},
1376 RepeatPart{1, /* size= */ 256, /* null_proba= */ 0.1},
1377 NullPart{/* size=*/128},
1378 RepeatPart{0, /* size= */ 256, /* null_proba= */ 0.0},

Callers

nothing calls this directly

Calls 4

Float32Method · 0.45
MakeArrayMethod · 0.45
SliceMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected