| 1296 | |
| 1297 | template <class T> |
| 1298 | void CppAggregatesFx<T>::validate_tiles_read_var(Query& query) { |
| 1299 | // Validate the number of tiles read. |
| 1300 | auto stats = query.stats(); |
| 1301 | |
| 1302 | uint64_t num_tiles_read = get_stat("num_tiles_read", stats); |
| 1303 | uint64_t expected_num_tiles_read; |
| 1304 | if (dense_) { |
| 1305 | // Dense has 5 tiles. If we request data or have a query condition or set |
| 1306 | // ranges, we'll read all of them. |
| 1307 | if (request_data_ || set_qc_ || set_ranges_) { |
| 1308 | expected_num_tiles_read = 5; |
| 1309 | } else { |
| 1310 | // One space tile has two result tiles, we'll have to read them. |
| 1311 | expected_num_tiles_read = 2; |
| 1312 | } |
| 1313 | } else { |
| 1314 | // Sparse has 4 tiles * 3 (2 dims/1 attr). One of them will be filtered |
| 1315 | // out when we set ranges. |
| 1316 | if (request_data_) { |
| 1317 | // We request data so everything is read. With ranges we read 3 tiles, |
| 1318 | // without 4. 2 dims, 1 attr, means we have to multiply by 3. |
| 1319 | if (set_ranges_) { |
| 1320 | expected_num_tiles_read = 9; |
| 1321 | } else { |
| 1322 | expected_num_tiles_read = 12; |
| 1323 | } |
| 1324 | } else { |
| 1325 | if (set_ranges_) { |
| 1326 | // To process ranges, we read 3 tiles * 2 dims at a minimum. For the |
| 1327 | // attribute, the array with duplicates can process one tile with the |
| 1328 | // fragment metadata, which is not the case for the array with no |
| 1329 | // duplicates. |
| 1330 | if (allow_dups_) { |
| 1331 | expected_num_tiles_read = 8; |
| 1332 | } else { |
| 1333 | expected_num_tiles_read = 9; |
| 1334 | } |
| 1335 | } else { |
| 1336 | // No ranges, the array with no duplicates can do it all with only |
| 1337 | // fragment metadata. The array with no duplicates cannot because the |
| 1338 | // cell slab structure never includes a full tile. It needs to read all |
| 1339 | // coordinate tiles and all attribute tiles. |
| 1340 | if (allow_dups_) { |
| 1341 | expected_num_tiles_read = 0; |
| 1342 | } else { |
| 1343 | expected_num_tiles_read = 12; |
| 1344 | } |
| 1345 | } |
| 1346 | } |
| 1347 | } |
| 1348 | |
| 1349 | CHECK(num_tiles_read == expected_num_tiles_read); |
| 1350 | } |
| 1351 | |
| 1352 | template <class T> |
| 1353 | void CppAggregatesFx<T>::validate_tiles_read_null_count_var(Query& query) { |
no test coverage detected