Skip to content

Conversation

@norberttech
Copy link
Member

Resolves: #xxx

Change Log


Added

  • Added normalize() and fromArray() methods to PostgreSQL Explain Plan classes (Cost, Timing, Buffers, PlanNode, Plan, ExplainConfig) for serialization/deserialization support
  • Added PHPStan type aliases (PlanNodeShape, TimingShape, BuffersShape) for improved type documentation

Changed

  • Optimized PostgreSqlCursorExtractor to break cursor loop early when fetched rows are less than fetch size, avoiding unnecessary database round-trips

- added: normalize() and fromArray() methods to PostgreSQL Explain Plan
classes (Cost, Timing, Buffers, PlanNode, Plan, ExplainConfig) for
serialization/deserialization support
- added: PHPStan type aliases (PlanNodeShape, TimingShape, BuffersShape)
for improved type documentation
- changed: Optimized PostgreSqlCursorExtractor to break cursor loop
early when fetched rows are less than fetch size, avoiding unnecessary
database round-trips
@norberttech norberttech added this to the 0.31.0 milestone Jan 8, 2026
@norberttech norberttech moved this from Todo to In Progress in Roadmap Jan 8, 2026
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 96.75325% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.33%. Comparing base (29c4ba7) to head (fffd2e3).
⚠️ Report is 3 commits behind head on 1.x.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x    #2136      +/-   ##
==========================================
+ Coverage   82.99%   83.33%   +0.33%     
==========================================
  Files        1178     1178              
  Lines       42007    42158     +151     
==========================================
+ Hits        34865    35132     +267     
+ Misses       7142     7026     -116     
Components Coverage Δ
etl 90.55% <ø> (+0.89%) ⬆️
cli 85.76% <ø> (ø)
lib-array-dot 95.00% <ø> (ø)
lib-azure-sdk 60.01% <ø> (ø)
lib-doctrine-dbal-bulk 95.16% <ø> (ø)
lib-filesystem 80.44% <ø> (ø)
lib-types 88.98% <ø> (+1.51%) ⬆️
lib-parquet 68.25% <ø> (ø)
lib-parquet-viewer 83.04% <ø> (ø)
lib-snappy 90.18% <ø> (ø)
bridge-filesystem-async-aws 90.95% <ø> (ø)
bridge-filesystem-azure 89.38% <ø> (ø)
bridge-monolog-http 96.89% <ø> (ø)
bridge-openapi-specification 91.50% <ø> (ø)
symfony-http-foundation 74.11% <ø> (ø)
adapter-chartjs 86.33% <ø> (ø)
adapter-csv 89.30% <ø> (ø)
adapter-doctrine 92.00% <ø> (ø)
adapter-elasticsearch 97.02% <ø> (ø)
adapter-google-sheet 97.05% <ø> (ø)
adapter-http 65.94% <ø> (ø)
adapter-json 89.69% <ø> (ø)
adapter-logger 83.33% <ø> (ø)
adapter-meilisearch 97.77% <ø> (ø)
adapter-parquet 79.92% <ø> (ø)
adapter-text 86.84% <ø> (ø)
adapter-xml 82.66% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

Flow PHP - Benchmarks

Results of the benchmarks from this PR are compared with the results from 1.x branch.

Extractors
+--------------------------+--------------------------------+------+-----+-----------------+-------------------+--------------------+
| benchmark                | subject                        | revs | its | mem_peak        | mode              | rstdev             |
+--------------------------+--------------------------------+------+-----+-----------------+-------------------+--------------------+
| CSVExtractorBench        | bench_extract_10k              | 1    | 2   | 6.011mb +0.00%  | 304.460ms -11.30% | ±1.30% -63.31%     |
| DbalExtractorBench       | bench_extract_10k_keyset       | 1    | 2   | 41.613mb -0.06% | 224.064ms -11.85% | ±1.51% -37.56%     |
| DbalExtractorBench       | bench_extract_10k_limit_offset | 1    | 2   | 41.607mb +0.00% | 196.481ms -6.72%  | ±0.50% -62.89%     |
| ExcelExtractorBench      | bench_extract_10k_ods          | 1    | 2   | 67.142mb +0.00% | 872.083ms -12.12% | ±0.89% -35.01%     |
| ExcelExtractorBench      | bench_extract_10k_xlsx         | 1    | 2   | 67.940mb +0.00% | 1.460s -10.41%    | ±1.38% +749864.36% |
| JsonExtractorBench       | bench_extract_10k              | 1    | 2   | 6.671mb +0.00%  | 986.846ms -14.83% | ±0.37% +1095.24%   |
| ParquetExtractorBench    | bench_extract_10k              | 1    | 2   | 11.857mb -0.71% | 8.189s -34.27%    | ±0.31% -61.26%     |
| PostgreSqlExtractorBench | bench_extract_10k_cursor       | 1    | 2   | 43.296mb -0.01% | 238.454ms -10.34% | ±2.50% +41.81%     |
| PostgreSqlExtractorBench | bench_extract_10k_keyset       | 1    | 2   | 43.306mb -0.02% | 408.316ms -8.53%  | ±1.00% +6.16%      |
| PostgreSqlExtractorBench | bench_extract_10k_limit_offset | 1    | 2   | 43.293mb -0.03% | 347.624ms -16.77% | ±2.10% +2825.31%   |
| TextExtractorBench       | bench_extract_10k              | 1    | 2   | 6.002mb +0.00%  | 53.521ms -8.52%   | ±0.15% +1172.76%   |
| XmlExtractorBench        | bench_extract_10k              | 1    | 2   | 6.022mb +0.00%  | 592.195ms -10.87% | ±0.74% +347.93%    |
+--------------------------+--------------------------------+------+-----+-----------------+-------------------+--------------------+
Transformers
+---------------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| benchmark                       | subject                  | revs | its | mem_peak         | mode            | rstdev          |
+---------------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| RenameEntryTransformerBench     | bench_transform_10k_rows | 1    | 2   | 182.066mb +0.00% | 89.545ms -0.83% | ±1.72% +86.72%  |
| RenameEachEntryTransformerBench | bench_transform_10k_rows | 1    | 2   | 26.801mb +0.00%  | 73.347ms -5.11% | ±0.14% +181.02% |
+---------------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
Loaders
+-----------------------+---------------------+------+-----+------------------+-------------------+------------------+
| benchmark             | subject             | revs | its | mem_peak         | mode              | rstdev           |
+-----------------------+---------------------+------+-----+------------------+-------------------+------------------+
| CSVLoaderBench        | bench_load_10k      | 1    | 2   | 102.107mb -0.01% | 85.110ms -23.98%  | ±0.89% +98.18%   |
| DbalLoaderBench       | bench_load_10k      | 1    | 2   | 108.490mb +0.01% | 436.302ms +2.76%  | ±1.26% -41.14%   |
| ExcelLoaderBench      | bench_load_10k_ods  | 1    | 2   | 102.563mb -0.03% | 209.825ms -22.09% | ±1.09% +1314.37% |
| ExcelLoaderBench      | bench_load_10k_xlsx | 1    | 2   | 102.744mb -0.01% | 216.911ms -20.46% | ±0.18% -8.03%    |
| JsonLoaderBench       | bench_load_10k      | 1    | 2   | 102.112mb -0.02% | 72.898ms -25.31%  | ±1.28% +8.27%    |
| ParquetLoaderBench    | bench_load_10k      | 1    | 2   | 137.539mb -5.44% | 1.876s -24.62%    | ±0.11% -82.18%   |
| PostgreSqlLoaderBench | bench_load_10k      | 1    | 2   | 110.186mb +0.00% | 385.237ms -1.52%  | ±6.37% +5673.15% |
| TextLoaderBench       | bench_load_10k      | 1    | 2   | 107.296mb -0.04% | 22.075ms -33.54%  | ±0.26% -64.41%   |
+-----------------------+---------------------+------+-----+------------------+-------------------+------------------+
Building Blocks
+-------------------+-----------------------------------+------+-----+------------------+--------------------+-----------------+
| benchmark         | subject                           | revs | its | mem_peak         | mode               | rstdev          |
+-------------------+-----------------------------------+------+-----+------------------+--------------------+-----------------+
| EntryFactoryBench | bench_entry_factory               | 1    | 2   | 127.837mb +0.00% | 533.551ms -6.77%   | ±1.20% +32.75%  |
| EntryFactoryBench | bench_entry_factory               | 1    | 2   | 67.018mb +0.00%  | 264.767ms -9.42%   | ±0.77% +80.55%  |
| EntryFactoryBench | bench_entry_factory               | 1    | 2   | 18.106mb +0.00%  | 60.532ms -6.76%    | ±0.72% +949.58% |
| RowsBench         | bench_chunk_1_000_on_10k          | 1    | 2   | 111.019mb +0.02% | 330.000μs +30.43%  | ±1.21% -23.33%  |
| RowsBench         | bench_diff_left_100_on_1k         | 1    | 2   | 110.963mb +0.01% | 67.548ms -20.41%   | ±0.05% -92.76%  |
| RowsBench         | bench_diff_right_100_on_1k        | 1    | 2   | 110.848mb +0.02% | 64.624ms -12.16%   | ±1.85% +85.31%  |
| RowsBench         | bench_drop_100_on_1k              | 1    | 2   | 110.833mb -0.00% | 24.000μs +45.45%   | ±4.17% +37.50%  |
| RowsBench         | bench_drop_right_10_on_1k         | 1    | 2   | 110.800mb -0.00% | 25.000μs +51.52%   | ±0.00% -100.00% |
| RowsBench         | bench_entries_on_1k               | 1    | 2   | 110.794mb -0.01% | 110.500μs +5.74%   | ±1.36% -43.26%  |
| RowsBench         | bench_filter_on_1k                | 1    | 2   | 110.782mb -0.00% | 785.477μs +176.10% | ±1.46% -35.92%  |
| RowsBench         | bench_find_on_1k                  | 1    | 2   | 110.772mb -0.01% | 567.975μs +85.33%  | ±2.29% -48.04%  |
| RowsBench         | bench_find_one_on_1k              | 1    | 2   | 110.771mb +0.01% | 618.020μs +105.67% | ±1.62% -35.17%  |
| RowsBench         | bench_first_on_1k                 | 1    | 2   | 110.810mb -0.05% | 3.000μs 0.00%      | ±0.00% 0.00%    |
| RowsBench         | bench_merge_100_on_1k             | 1    | 2   | 110.768mb +0.04% | 19.000μs +46.15%   | ±0.00% 0.00%    |
| RowsBench         | bench_partition_by_on_1k          | 1    | 2   | 110.871mb +0.01% | 1.702ms +11.58%    | ±0.53% -76.62%  |
| RowsBench         | bench_schema_on_1k_identical_rows | 1    | 2   | 118.349mb -0.00% | 184.138ms -16.27%  | ±0.06% -85.75%  |
| RowsBench         | bench_sort_asc_on_1k              | 1    | 2   | 110.832mb -0.01% | 4.901ms -1.48%     | ±2.88% +64.48%  |
| RowsBench         | bench_sort_by_on_1k               | 1    | 2   | 110.856mb -0.02% | 4.661ms -6.27%     | ±0.34% +113.39% |
| RowsBench         | bench_sort_desc_on_1k             | 1    | 2   | 110.845mb -0.02% | 4.861ms -5.99%     | ±0.27% -88.43%  |
| RowsBench         | bench_sort_entries_on_1k          | 1    | 2   | 111.660mb -0.00% | 4.999ms -1.23%     | ±1.20% +2.96%   |
| RowsBench         | bench_unique_on_1k                | 1    | 2   | 110.931mb -0.02% | 347.703ms -23.79%  | ±0.49% +135.78% |
| TypeDetectorBench | bench_type_detector               | 1    | 2   | 43.537mb +0.00%  | 301.322ms -9.69%   | ±0.44% -32.72%  |
| TypeDetectorBench | bench_type_detector               | 1    | 2   | 12.595mb +0.00%  | 60.294ms -10.09%   | ±0.05% -94.22%  |
+-------------------+-----------------------------------+------+-----+------------------+--------------------+-----------------+
Parquet Library
+--------------------+---------------------------------+------+-----+------------------+-------------------+------------------+
| benchmark          | subject                         | revs | its | mem_peak         | mode              | rstdev           |
+--------------------+---------------------------------+------+-----+------------------+-------------------+------------------+
| ParquetWriterBench | bench_write_batch               | 1    | 2   | 12.707mb -12.70% | 166.611ms -26.58% | ±0.23% +1.45%    |
| ParquetWriterBench | bench_write_gzip                | 1    | 2   | 11.367mb +0.02%  | 194.481ms -11.16% | ±2.14% +2511.81% |
| ParquetWriterBench | bench_write_row_by_row          | 1    | 2   | 12.707mb -12.70% | 168.525ms -25.78% | ±1.15% +340.57%  |
| ParquetWriterBench | bench_write_snappy              | 1    | 2   | 12.707mb -12.70% | 181.220ms -19.35% | ±8.42% +2235.19% |
| ParquetWriterBench | bench_write_uncompressed        | 1    | 2   | 11.091mb +0.02%  | 165.333ms -14.65% | ±0.38% -68.77%   |
| ParquetReaderBench | bench_page_headers              | 1    | 2   | 7.900mb +0.00%   | 1.588s -17.16%    | ±0.08% -97.48%   |
| ParquetReaderBench | bench_read_metadata             | 1    | 2   | 6.529mb +0.00%   | 7.296ms -12.05%   | ±1.53% +34.87%   |
| ParquetReaderBench | bench_read_schema               | 1    | 2   | 6.529mb +0.00%   | 7.776ms -5.12%    | ±4.66% +380.54%  |
| ParquetReaderBench | bench_read_values_all_columns   | 1    | 2   | 10.105mb -0.18%  | 4.709s -39.22%    | ±1.58% +2509.40% |
| ParquetReaderBench | bench_read_values_single_column | 1    | 2   | 7.402mb -0.25%   | 198.893ms -55.45% | ±0.38% -22.96%   |
| ParquetReaderBench | bench_read_values_with_limit    | 1    | 2   | 7.930mb -0.39%   | 16.864ms -27.75%  | ±2.43% +1218.24% |
+--------------------+---------------------------------+------+-----+------------------+-------------------+------------------+

@norberttech norberttech merged commit 7e1c755 into 1.x Jan 8, 2026
21 checks passed
@norberttech norberttech deleted the query-plan-normalize branch January 8, 2026 17:59
@github-project-automation github-project-automation bot moved this from In Progress to Done in Roadmap Jan 8, 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.

2 participants