Skip to content

Array empty type - #2593

Merged
norberttech merged 5 commits into
1.xfrom
array-empty-type
Aug 12, 2026
Merged

Array empty type#2593
norberttech merged 5 commits into
1.xfrom
array-empty-type

Conversation

@norberttech

Copy link
Copy Markdown
Member

Change Log


Added

  • flow-php/types - array{} empty array type with type_empty_array() DSL function
  • flow-php/etl - array<mixed> and array{} project onto json at any schema depth

Fixed

  • flow-php/etl-adapter-parquet - nested json and uuid values round-trip through parquet encode and decode
  • flow-php/arrow-ext - nested uuid values read as canonical strings, map writes throw exceptions instead of aborting the process
  • flow-php/etl - Floe inferred schema preserves first batch nullability instead of making every column nullable
  • flow-php/types - array type detection never returns a type that rejects its own input

Changed

  • flow-php/etl-adapter-json - to_json()/to_json_lines() write list/map/structure/array entries as nested JSON instead of escaped strings

Removed

Deprecated

Security

- add EmptyArrayType with type_empty_array() DSL, detected for [] at
every depth
- keep list/map/structure detection byte-identical for all other inputs
- treat array{} like array<mixed> in type comparability
- project array{} onto json wherever an ETL Definition is built, column
and nested
- ParquetEncoder converts json/uuid leaves at any depth via
schema-driven ValueConverters, not just top-level columns
- arrow-ext reader returns canonical uuid strings for nested
struct/list/map leaves
- arrow-ext writer keeps extension metadata on map key/value fields,
fixing a process abort on map<string, uuid|json> writes
- writer schema mismatches now raise exceptions instead of panicking
- TypeProjection maps ArrayType to json, matching the array{} rule
- UnionTypeNormalizer collapsed to TypeProjection::union() delegation
- to_floe() no longer widens every inferred column to nullable; the
footer schema is the first batch's union, so non-nullable declarations
survive a round-trip
- to_json()/to_json_lines() emit list/map/structure/array entries as
nested JSON instead of escaped strings, normalizing nested
datetime/interval/uuid/json/enum leaves
…ejects its own input

- scalar values mixed with arrays no longer count as homogeneous
lists/maps; they detect as array<mixed>
- valueType() widens to array<mixed> instead of dropping types by order
([] still keeps a list/map element type)
@norberttech norberttech added this to the 0.43.0 milestone Aug 12, 2026
@datadog-official

datadog-official Bot commented Aug 12, 2026

Copy link
Copy Markdown

Pipelines

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 95e3abb | Docs | Datadog PR Page | Give us feedback!

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.03846% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.44%. Comparing base (41f8017) to head (95e3abb).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##                1.x    #2593      +/-   ##
============================================
+ Coverage     86.40%   86.44%   +0.04%     
- Complexity    23286    23916     +630     
============================================
  Files          1826     1833       +7     
  Lines         72160    72314     +154     
============================================
+ Hits          62349    62512     +163     
+ Misses         9811     9802       -9     
Components Coverage Δ
etl 91.19% <100.00%> (+0.02%) ⬆️
cli 89.40% <ø> (ø)
lib-array-dot 81.44% <ø> (ø)
lib-azure-sdk 64.44% <ø> (ø)
lib-doctrine-dbal-bulk 93.61% <ø> (ø)
lib-filesystem 86.67% <ø> (ø)
lib-types 92.12% <100.00%> (+0.29%) ⬆️
lib-parquet 70.33% <ø> (+0.09%) ⬆️
lib-parquet-viewer 82.26% <ø> (ø)
lib-snappy 89.82% <ø> (+0.44%) ⬆️
lib-dremel 0.00% <ø> (ø)
lib-postgresql 87.74% <ø> (ø)
lib-telemetry 86.64% <ø> (ø)
bridge-filesystem-async-aws 92.74% <ø> (ø)
bridge-filesystem-azure 90.45% <ø> (ø)
bridge-monolog-http 96.82% <ø> (ø)
bridge-monolog-telemetry 94.79% <ø> (ø)
bridge-openapi-specification 92.07% <ø> (ø)
symfony-http-foundation 78.57% <ø> (ø)
bridge-psr18-telemetry 100.00% <ø> (ø)
bridge-psr3-telemetry 98.95% <ø> (ø)
bridge-psr7-telemetry 100.00% <ø> (ø)
bridge-telemetry-otlp 90.11% <ø> (ø)
bridge-symfony-http-foundation-telemetry 92.85% <ø> (ø)
bridge-symfony-filesystem-bundle 91.85% <ø> (ø)
bridge-symfony-filesystem-cache 98.18% <ø> (ø)
bridge-symfony-postgresql-bundle 93.57% <ø> (ø)
bridge-symfony-postgresql-cache 94.41% <ø> (ø)
bridge-symfony-postgresql-messenger 98.80% <ø> (ø)
bridge-symfony-postgresql-session 93.65% <ø> (ø)
bridge-symfony-telemetry-bundle 90.72% <ø> (ø)
adapter-chartjs 84.05% <ø> (ø)
adapter-csv 89.46% <ø> (ø)
adapter-doctrine 90.75% <ø> (ø)
adapter-google-sheet 91.56% <ø> (ø)
adapter-http 75.79% <ø> (ø)
adapter-json 87.65% <88.88%> (-0.01%) ⬇️
adapter-logger 50.00% <ø> (ø)
adapter-parquet 90.40% <100.00%> (+1.54%) ⬆️
adapter-text 92.59% <ø> (ø)
adapter-xml 84.45% <ø> (ø)
adapter-avro 0.00% <ø> (ø)
adapter-excel 87.20% <ø> (ø)
adapter-postgresql 90.84% <ø> (ø)
adapter-seal 83.61% <ø> (ø)
bridge-phpunit-postgresql 75.30% <ø> (ø)
bridge-phpunit-telemetry 87.36% <ø> (ø)
bridge-phpstan-types 0.00% <ø> (ø)
bridge-postgresql-valinor 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@norberttech
norberttech merged commit f0eea16 into 1.x Aug 12, 2026
91 of 131 checks passed
@norberttech
norberttech deleted the array-empty-type branch August 12, 2026 18:49
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant