| 393 | |
| 394 | /// Represents a set of hash partitions to be handed off to the probe side. |
| 395 | struct HashPartitions { |
| 396 | HashPartitions() { Reset(); } |
| 397 | HashPartitions(int level, |
| 398 | const std::vector<std::unique_ptr<PhjBuilderPartition>>* hash_partitions, |
| 399 | bool non_empty_build) |
| 400 | : level(level), |
| 401 | hash_partitions(hash_partitions), |
| 402 | non_empty_build(non_empty_build) {} |
| 403 | |
| 404 | void Reset() { |
| 405 | level = -1; |
| 406 | hash_partitions = nullptr; |
| 407 | non_empty_build = false; |
| 408 | } |
| 409 | |
| 410 | // The partitioning level of this set of partitions. -1 indicates that this is |
| 411 | // invalid. |
| 412 | int level; |
| 413 | |
| 414 | // The current set of hash partitions. Always contains PARTITION_FANOUT partitions. |
| 415 | // The partitions may be in-memory, spilled, or closed. Valid until |
| 416 | // DoneProbingHashPartitions() is called. |
| 417 | const std::vector<std::unique_ptr<PhjBuilderPartition>>* hash_partitions; |
| 418 | |
| 419 | // True iff the build side had at least one row in a partition. |
| 420 | bool non_empty_build; |
| 421 | }; |
| 422 | |
| 423 | /// Get hash partitions and reservation for the initial partitioning of the probe |
| 424 | /// side. Only valid to call once per PartitionedHashJoinNode when in state |
no outgoing calls
no test coverage detected