Skip to content

Conversation

@ryzhyk
Copy link
Contributor

@ryzhyk ryzhyk commented Jan 2, 2026

ryzhyk added 2 commits January 1, 2026 11:00
In preparation for adding support for parallel encoding, wrap the batch passed
to `Encoder::encode` in `Arc`, so it can later be cloned and sent to multiple
workers.

Signed-off-by: Leonid Ryzhyk <[email protected]>
Extend trait SerBatchReader two support parallel encoders:
- SerBatchReader::partition_keys - partitions the batch into approximately equal sized chunks.
- SerCursor::seek_key_exact - can be used to move the cursor to the start of a partition.
- SerCursor::key() - can be used to compare the current key under the cursor with the end
  of the partition to stop iteration.

Signed-off-by: Leonid Ryzhyk <[email protected]>
@ryzhyk ryzhyk added the connectors Issues related to the adapters/connectors crate label Jan 2, 2026
All batches are now Send and Sync, so we eliminate the SyncSerBatchReader trait
and add Send + Sync bounds to SerBatchReader.

Signed-off-by: Leonid Ryzhyk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connectors Issues related to the adapters/connectors crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants