Order-based partitioning scheme for sorted/range-partitioned data. More...
#include <channel_metadata.hpp>
Public Member Functions | |
| OrderScheme ()=default | |
| Default constructor. Produces an invalid (empty) scheme. | |
| OrderScheme (std::vector< OrderKey > keys, std::shared_ptr< TableChunk > boundaries, bool strict_boundaries=false) | |
| Construct a validated OrderScheme. More... | |
| OrderScheme | with_keys (std::vector< OrderKey > new_keys) const |
| Return a new OrderScheme with updated key column indices, sharing boundaries. More... | |
| bool | boundaries_aligned_with (OrderScheme const &other, rapidsmpf::BufferResource const &br) const |
| Check whether boundary values are aligned with another scheme. More... | |
Public Attributes | |
| std::vector< OrderKey > | keys |
| Sort keys (column, order, null_order per entry). | |
| std::shared_ptr< TableChunk > | boundaries |
| bool | strict_boundaries {false} |
See struct-level note on strict_boundaries semantics. | |
Order-based partitioning scheme for sorted/range-partitioned data.
Data is partitioned by value ranges based on predetermined boundaries. For N partitions, there are N-1 boundary rows:
keys[i] is the i-th sort column; ordering is lexicographic by keys[0], then keys[1], and so on.
When boundaries is set, its columns must align with keys (same count and compatible dtypes). Mismatched dtypes are a usage error.
strict_boundaries: when true, every row in a chunk belongs to a single partition's half-open key range (partition keys do not straddle chunk interiors). When false, a chunk may contain keys spanning multiple partitions.
Definition at line 80 of file channel_metadata.hpp.
| rapidsmpf::streaming::OrderScheme::OrderScheme | ( | std::vector< OrderKey > | keys, |
| std::shared_ptr< TableChunk > | boundaries, | ||
| bool | strict_boundaries = false |
||
| ) |
Construct a validated OrderScheme.
| keys | Non-empty sort keys; size must equal boundaries->shape().second. |
| boundaries | Non-null, device-resident boundary table (N-1 rows for N partitions). Accepts a unique_ptr<TableChunk> via implicit conversion. |
| strict_boundaries | See struct-level doc. Defaults to false. |
| std::invalid_argument | if keys is empty, boundaries is null or not device-resident, or keys.size() != boundaries->shape().second. |
| bool rapidsmpf::streaming::OrderScheme::boundaries_aligned_with | ( | OrderScheme const & | other, |
| rapidsmpf::BufferResource const & | br | ||
| ) | const |
Check whether boundary values are aligned with another scheme.
| other | The OrderScheme to compare against. |
| br | Buffer resource used for temporary allocations during comparison. |
| OrderScheme rapidsmpf::streaming::OrderScheme::with_keys | ( | std::vector< OrderKey > | new_keys | ) | const |
Return a new OrderScheme with updated key column indices, sharing boundaries.
The new key count must match the existing boundary column count.
| new_keys | Replacement sort keys; size must equal boundaries->shape().second. |
new_keys and the same boundaries and strict_boundaries. | std::invalid_argument | if new_keys is empty or size mismatches boundaries. |
| std::shared_ptr<TableChunk> rapidsmpf::streaming::OrderScheme::boundaries |
N-1 boundary rows for N partitions.
Definition at line 82 of file channel_metadata.hpp.