Types structure compatibility - #2586
Merged
Merged
Conversation
…chema matchin - infer string-keyed arrays as structures, never maps - compare optional elements and allow_extra in type equality - match() now accepts exactly what StructureType::isValid() accepts - merge structures, lists and maps instead of collapsing to json - widen conflicting elements to string, promoting numerics losslessly - reject optional structure elements in parquet, seal and xml writers
…dated valu - unify implementations on `@template-covariant T` = the represented value, deriving element/key/value with `value-of<T>` / `key-of<T>` - return concrete classes from every `type_*` DSL function except the polymorphic `type_from_array()` - re-narrow `assert()`/`cast()` returns widened by implementations - build structures through `type_structure()` instead of `new StructureType()` - guard `type_structure()` shape inference with StructureShapeInference
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 1.x #2586 +/- ##
============================================
+ Coverage 86.29% 86.33% +0.04%
- Complexity 23241 23745 +504
============================================
Files 1819 1821 +2
Lines 71940 72002 +62
============================================
+ Hits 62079 62163 +84
+ Misses 9861 9839 -22 🚀 New features to boost your workflow:
|
…nt of the environment
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.
Resolves: #xxx
Change Log
Added
flow-php/etl-ElementCompatibilityfor structure element matchingflow-php/etl-TypeMergemerges structures, lists and maps instead of collapsing to jsonflow-php/types-StructureShapeInferencefixture guardingtype_structure()shape inferenceFixed
flow-php/types- string-keyed arrays infer as structures, never mapsflow-php/types- type equality compares optional elements andallow_extraflow-php/types-assert()andcast()no longer widen the return declared byTypeflow-php/etl-match()accepts exactly whatStructureType::isValid()acceptsflow-php/etl-adapter-parquet- optional structure elements are rejected instead of silently writtenflow-php/etl-adapter-seal- optional structure elements are rejected instead of silently writtenflow-php/etl-adapter-xml- optional structure elements are rejected instead of silently writtenChanged
flow-php/types- aTypeimplementation's generic parameter is now the value it representsflow-php/types-type_*()return their concrete class instead ofType, excepttype_from_array()flow-php/types-MapTypetakes one generic parameter instead of twoflow-php/etl- conflicting structure elements widen to string, promoting numerics losslesslyRemoved
Deprecated
Security