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

Function DoTestGetBatchSpacedRoundtrip

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

Source from the content-addressed store, hash-verified

1171
1172template <typename T>
1173void DoTestGetBatchSpacedRoundtrip() {
1174 using Data = DataTestRleBitPacked<T>;
1175 using ArrowType = typename Data::ArrowType;
1176 using RandomPart = typename Data::RandomPart;
1177 using NullPart = typename Data::NullPart;
1178 using RepeatPart = typename Data::RepeatPart;
1179
1180 std::vector<Data> test_cases = {
1181 {
1182 {RandomPart{/* max=*/1, /* size=*/400, /* null_proba= */ 0.1}},
1183 /* bit_width= */ 1,
1184 },
1185 {
1186 {
1187 RandomPart{/* max=*/7, /* size=*/1037, /* null_proba= */ 0.0},
1188 NullPart{/* size= */ 1153},
1189 RandomPart{/* max=*/7, /* size=*/800, /* null_proba= */ 0.5},
1190 },
1191 /* bit_width= */ 3,
1192 },
1193 {
1194 {
1195 NullPart{/* size= */ 80},
1196 RandomPart{/* max=*/static_cast<T>(1023), /* size=*/800,
1197 /* null_proba= */ 0.01},
1198 NullPart{/* size= */ 1023},
1199 },
1200 /* bit_width= */ 11,
1201 },
1202 {
1203 {RepeatPart{/* value=*/13, /* size=*/1024, /* null_proba= */ 0.01}},
1204 /* bit_width= */ 10,
1205 },
1206 {
1207 {
1208 NullPart{/* size= */ 1024},
1209 RepeatPart{/* value=*/static_cast<T>(10000), /* size=*/1025,
1210 /* null_proba= */ 0.1},
1211 NullPart{/* size= */ 77},
1212 },
1213 /* bit_width= */ 23,
1214 },
1215 {
1216 {
1217 RepeatPart{/* value=*/13, /* size=*/1023, /* null_proba= */ 0.0},
1218 NullPart{/* size= */ 1153},
1219 RepeatPart{/* value=*/72, /* size=*/1799, /* null_proba= */ 0.5},
1220 },
1221 /* bit_width= */ 10,
1222 },
1223 {
1224 {
1225 RandomPart{/* max=*/1, /* size=*/1013, /* null_proba= */ 0.01},
1226 NullPart{/* size=*/8},
1227 RepeatPart{1, /* size= */ 256, /* null_proba= */ 0.1},
1228 NullPart{/* size=*/128},
1229 RepeatPart{0, /* size= */ 256, /* null_proba= */ 0.0},
1230 NullPart{/* size=*/15},

Callers

nothing calls this directly

Calls 3

Float32Method · 0.45
MakeArrayMethod · 0.45
SliceMethod · 0.45

Tested by

no test coverage detected