Skip to content

Conversation

@TheCelavi
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the dataset streaming functionality by replacing the Batch and CompressJoin operators with more flexible BufferCount and BufferWhile operators. It introduces new Buffer and Item model classes to encapsulate buffered data, enhances the Flatten operator with key preservation support, and adds a flush utility for exhausting iterators.

  • Replaces Batch and CompressJoin with BufferCount and BufferWhile for more modular buffer management
  • Introduces Buffer and Item models to represent buffered data
  • Extends Flatten operator to optionally preserve keys from nested iterables
  • Adds flush function and method for iterating through streams without collecting results

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/RunOpenCode/Component/Dataset/src/Model/Buffer.php New model class representing a buffer of key-value pairs with helper methods for accessing items
src/RunOpenCode/Component/Dataset/src/Model/Item.php New immutable model class representing a single key-value pair with ArrayAccess support
src/RunOpenCode/Component/Dataset/src/Operator/BufferCount.php New operator that buffers items up to a specified count
src/RunOpenCode/Component/Dataset/src/Operator/BufferWhile.php New operator that buffers items while a predicate condition is satisfied
src/RunOpenCode/Component/Dataset/src/Operator/Batch.php Removed in favor of BufferCount operator
src/RunOpenCode/Component/Dataset/src/Operator/CompressJoin.php Removed in favor of BufferWhile operator
src/RunOpenCode/Component/Dataset/src/Operator/Flatten.php Enhanced to support preserving keys from nested iterables
src/RunOpenCode/Component/Dataset/src/functions.php Replaced batch/compress_join functions with buffer_count/buffer_while, updated flatten to support key preservation, and added flush function
src/RunOpenCode/Component/Dataset/src/Stream.php Updated method signatures to use new buffer operators, added flush method, and moved finalize method for alphabetical ordering
src/RunOpenCode/Component/Dataset/tests/StreamTest.php Updated tests to use new buffer operators instead of removed batch/compressJoin methods
src/RunOpenCode/Component/Dataset/tests/Operator/FlattenTest.php Added test for key preservation feature
src/RunOpenCode/Component/Dataset/tests/Operator/BufferCountTest.php New test file for BufferCount operator
src/RunOpenCode/Component/Dataset/tests/Operator/BufferWhileTest.php New test file for BufferWhile operator
src/RunOpenCode/Component/Dataset/tests/Operator/BatchTest.php Removed along with Batch operator
src/RunOpenCode/Component/Dataset/tests/Operator/CompressJoinTest.php Removed along with CompressJoin operator
src/RunOpenCode/Component/Dataset/src/Collector/IterableCollector.php Trailing whitespace cleanup
src/RunOpenCode/Component/Dataset/composer.json Added new contributor to authors list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Proposal for buffer operators
Fixing copilot suggestions
Increase number of mysql connection attempts
@TheCelavi TheCelavi merged commit 0a5d816 into master Dec 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants