-
Notifications
You must be signed in to change notification settings - Fork 0
Dev #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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
BatchandCompressJoinwithBufferCountandBufferWhilefor more modular buffer management - Introduces
BufferandItemmodels to represent buffered data - Extends
Flattenoperator to optionally preserve keys from nested iterables - Adds
flushfunction 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.
There was a problem hiding this 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.
src/RunOpenCode/Component/Dataset/tests/Operator/BufferWhileTest.php
Outdated
Show resolved
Hide resolved
Proposal for buffer operators Fixing copilot suggestions Increase number of mysql connection attempts
No description provided.