Introduce Materialization class and optimize pipeline operations.#44
Merged
gustavofreze merged 2 commits intomainfrom Apr 16, 2026
Merged
Introduce Materialization class and optimize pipeline operations.#44gustavofreze merged 2 commits intomainfrom
gustavofreze merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces a Materialization cache for eager pipelines to support deferred evaluation and reuse of computed results across terminal calls, while updating docs and tests to reflect the intended “fused pass” execution model.
Changes:
- Added
Internal\Materializationand refactoredEagerPipelineto rely on it for cached terminal access. - Expanded/adjusted complexity and evaluation-strategy documentation (
Collectible,Pipeline, README). - Added test coverage for multi-predicate filtering and reducing over chained operations (eager + lazy).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/LazyCollectionTest.php | Adds tests for multiple filter predicates and reduce over chained ops (lazy). |
| tests/EagerCollectionTest.php | Adds tests for multiple filter predicates and reduce over chained ops (eager). |
| src/Internal/Pipeline.php | Updates complexity documentation for pipeline operations. |
| src/Internal/Operations/Transforming/Segment.php | Inlines trailing-buffer slicing logic (removes private helper). |
| src/Internal/Operations/Transforming/Filter.php | Simplifies predicate compilation logic. |
| src/Internal/Materialization.php | New cached materialization helper for eager evaluation. |
| src/Internal/EagerPipeline.php | Refactors eager pipeline to use Materialization. |
| src/Collection.php | Routes some terminal operations directly through pipeline->process(); simplifies iterator. |
| src/Collectible.php | Updates interface docs with revised complexity/evaluation model. |
| composer.json | Updates dev dependency PHPUnit version. |
| README.md | Reformats docs and updates evaluation strategy explanation. |
| Makefile | Adds show-outdated target and includes it in help output. |
gustavofreze
added a commit
that referenced
this pull request
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.