fix: extractors no longer mutate user-provided Schem - #2556
Merged
Conversation
- clone Schema at withSchema() reception in all 16 schema-receiving extractors - clone per extract() run and per stream before extending with _input_file_uri/partition columns - fixes caller schema pollution, extractor-lifetime pollution and cross-stream partition leaks (#2536 regression) - regression tests with mixed partitioned/non-partitioned fixtures per adapter
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 1.x #2556 +/- ##
============================================
- Coverage 86.41% 86.41% -0.01%
Complexity 23487 23487
============================================
Files 1800 1800
Lines 71314 71260 -54
============================================
- Hits 61628 61581 -47
+ Misses 9686 9679 -7 🚀 New features to boost your workflow:
|
- all Schema/Definition mutators return a new instance; both are final readonly - revert extractor Schema clones, redundant under immutability - native hydrator: use setMetadata() return value instead of mutating a clone - assign mutator results in DatabaseTableSchemaCommand and PhpRowHydrator - replace clone ADR with schema-immutability, add upgrading entry
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.
Change Log
Added
flow-php/etl- Schema Immutability ADRFixed
flow-php/etl- extractors no longer pollute a user-provided schemaflow-php/etl- partition columns no longer leak between streamsflow-php/etl-Rows::schema()no longer corrupts the first row's schemaflow-php/flow-php-ext- native hydrator no longer drops per-value metadataflow-php/cli---db-columnfiltering inflow:db:schemaChanged
flow-php/etl-SchemaandSchema\Definitionare immutable, mutators return a new instanceflow-php/etl-adapter-csv,-excel,-json,-xml- explicit schema no longer projects partition columns awayRemoved
Deprecated
Security