pub fn convert_bulk_part(
part: BulkPart,
region_metadata: &RegionMetadataRef,
primary_key_codec: Arc<dyn PrimaryKeyCodec>,
schema: SchemaRef,
store_primary_key_columns: bool,
) -> Result<Option<BulkPart>>Expand description
Converts an unordered BulkPart with raw tags or encoded primary keys into a BulkPart
with the same format as produced by BulkPartConverter.
This function takes a BulkPart where:
- Raw primary key columns are stored individually and encoded with the destination codec
- Sparse destinations also accept encoded keys in a
__primary_keycolumn - The batch may not be sorted
And produces a BulkPart where:
- Primary key columns are optionally stored (depending on
store_primary_key_columnsand encoding) - An encoded
__primary_keydictionary column is present - The batch is sorted by (primary_key, timestamp, sequence desc)
§Arguments
part- The inputBulkPartto convertregion_metadata- Region metadata containing schema informationprimary_key_codec- Codec for encoding primary keysschema- Target schema for the output batchstore_primary_key_columns- If true and encoding is not sparse, stores individual primary key columns
§Returns
Returns None if the input part has no rows, otherwise returns a new BulkPart with
encoded primary keys and sorted data.