Skip to content

Conversation

@norberttech
Copy link
Member

Change Log

Added

  • Type::isCompatible(self $type): bool - method

Fixed

Changed

  • Improve readability of schema validation exception

Removed

Deprecated

Security


Description

Resolves: #1528

Before schema validation exception was only dumping both schema's as an ascii list.
This PR improves the readability by explaining which columns are missing, which are extra and which are mismatched (different types, incompatible).

@github-actions
Copy link
Contributor

github-actions bot commented Mar 14, 2025

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    | 3   | 4.859mb +0.21%  | 559.298ms -0.04% | ±1.02% +43.89% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.932mb +0.30%  | 1.077s +1.18%    | ±0.20% -19.30% |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 86.386mb +0.09% | 906.503ms -0.08% | ±0.12% -63.95% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.590mb +0.23%  | 36.238ms -3.22%  | ±1.03% +0.82%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.564mb +0.23%  | 615.012ms +3.01% | ±0.35% -36.55% |
+-----------------------+-------------------+------+-----+-----------------+------------------+----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+---------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev        |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+---------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 127.386mb +0.01% | 74.280ms +0.49% | ±1.29% -4.82% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+---------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev         |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 64.059mb +0.02%  | 105.764ms +1.10% | ±0.96% +27.18% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 84.406mb +0.02%  | 97.945ms +1.20%  | ±0.28% -43.49% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 161.258mb +0.01% | 20.926s +0.57%   | ±0.20% -70.13% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 18.121mb +0.06%  | 31.485ms +1.22%  | ±0.42% -80.22% |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
Building Blocks
+-------------------+----------------------------+------+-----+------------------+------------------+------------------+
| benchmark         | subject                    | revs | its | mem_peak         | mode             | rstdev           |
+-------------------+----------------------------+------+-----+------------------+------------------+------------------+
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 43.902mb +0.02%  | 367.833ms +0.18% | ±0.73% +30.34%   |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 11.712mb +0.08%  | 75.961ms +2.92%  | ±0.73% +0.52%    |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 106.005mb +0.01% | 466.789ms +0.41% | ±0.61% -39.92%   |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.195mb +0.02%  | 237.233ms -1.08% | ±1.36% -36.71%   |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.717mb +0.09%  | 52.971ms +1.72%  | ±1.17% -30.28%   |
| RowsBench         | bench_chunk_10_on_10k      | 2    | 3   | 97.048mb +0.01%  | 3.855ms -6.99%   | ±2.49% +308.56%  |
| RowsBench         | bench_diff_left_1k_on_10k  | 2    | 3   | 114.338mb +0.01% | 186.088ms -0.05% | ±0.49% -19.49%   |
| RowsBench         | bench_diff_right_1k_on_10k | 2    | 3   | 97.058mb +0.01%  | 19.177ms +3.09%  | ±1.37% +341.09%  |
| RowsBench         | bench_drop_1k_on_10k       | 2    | 3   | 97.923mb +0.01%  | 2.009ms +1.94%   | ±3.09% +40.94%   |
| RowsBench         | bench_drop_right_1k_on_10k | 2    | 3   | 97.923mb +0.01%  | 1.902ms -8.76%   | ±1.49% -39.09%   |
| RowsBench         | bench_entries_on_10k       | 2    | 3   | 96.084mb +0.01%  | 5.919ms +13.25%  | ±0.98% -64.13%   |
| RowsBench         | bench_filter_on_10k        | 2    | 3   | 96.613mb +0.01%  | 17.057ms +1.74%  | ±1.01% +4504.01% |
| RowsBench         | bench_find_on_10k          | 2    | 3   | 96.613mb +0.01%  | 16.705ms -2.37%  | ±0.85% -48.56%   |
| RowsBench         | bench_find_one_on_10k      | 10   | 3   | 95.304mb +0.01%  | 1.900μs -5.00%   | ±0.00% +0.00%    |
| RowsBench         | bench_first_on_10k         | 10   | 3   | 95.304mb +0.01%  | 0.400μs 0.00%    | ±0.00% 0.00%     |
| RowsBench         | bench_flat_map_on_1k       | 2    | 3   | 104.522mb +0.01% | 16.685ms +6.07%  | ±3.76% +18.76%   |
| RowsBench         | bench_map_on_10k           | 2    | 3   | 134.589mb +0.01% | 77.583ms +3.70%  | ±0.88% +100.01%  |
| RowsBench         | bench_merge_1k_on_10k      | 2    | 3   | 97.133mb +0.01%  | 2.071ms +10.93%  | ±2.54% +92.74%   |
| RowsBench         | bench_partition_by_on_10k  | 2    | 3   | 100.503mb +0.01% | 66.810ms +0.77%  | ±0.38% -27.81%   |
| RowsBench         | bench_remove_on_10k        | 2    | 3   | 98.185mb +0.01%  | 4.652ms +8.40%   | ±2.85% +3.02%    |
| RowsBench         | bench_sort_asc_on_1k       | 2    | 3   | 95.600mb +0.01%  | 46.587ms +5.46%  | ±2.03% +186.01%  |
| RowsBench         | bench_sort_by_on_1k        | 2    | 3   | 95.601mb +0.01%  | 46.511ms +5.93%  | ±2.74% +45.90%   |
| RowsBench         | bench_sort_desc_on_1k      | 2    | 3   | 95.600mb +0.01%  | 45.632ms +5.60%  | ±2.44% +104.05%  |
| RowsBench         | bench_sort_entries_on_1k   | 2    | 3   | 97.745mb +0.01%  | 8.847ms +7.91%   | ±0.58% -31.47%   |
| RowsBench         | bench_sort_on_1k           | 2    | 3   | 95.494mb +0.01%  | 30.879ms +3.25%  | ±1.86% -29.12%   |
| RowsBench         | bench_take_1k_on_10k       | 10   | 3   | 95.304mb +0.01%  | 14.600μs +0.26%  | ±1.12% -56.95%   |
| RowsBench         | bench_take_right_1k_on_10k | 10   | 3   | 95.304mb +0.01%  | 17.188μs +0.64%  | ±1.51% -43.71%   |
| RowsBench         | bench_unique_on_1k         | 2    | 3   | 114.339mb +0.01% | 188.198ms +1.65% | ±1.84% +626.21%  |
+-------------------+----------------------------+------+-----+------------------+------------------+------------------+

@codecov
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

Attention: Patch coverage is 54.92958% with 64 lines in your changes missing coverage. Please review.

Project coverage is 83.01%. Comparing base (fd7f2e6) to head (e00c7cb).
Report is 3 commits behind head on 1.x.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x    #1529      +/-   ##
==========================================
- Coverage   83.26%   83.01%   -0.26%     
==========================================
  Files         687      687              
  Lines       18635    18742     +107     
==========================================
+ Hits        15517    15559      +42     
- Misses       3118     3183      +65     
Components Coverage Δ
etl 86.02% <54.92%> (-0.65%) ⬇️
cli 84.35% <ø> (ø)
lib-array-dot 94.53% <ø> (ø)
lib-azure-sdk 62.56% <ø> (ø)
lib-doctrine-dbal-bulk 90.11% <ø> (ø)
lib-filesystem 78.02% <ø> (ø)
lib-parquet 84.33% <ø> (ø)
lib-parquet-viewer 82.02% <ø> (ø)
lib-snappy 90.69% <ø> (ø)
bridge-filesystem-async-aws 90.38% <ø> (ø)
bridge-filesystem-azure 89.92% <ø> (ø)
bridge-monolog-http 96.38% <ø> (ø)
symfony-http-foundation 74.41% <ø> (ø)
adapter-chartjs 86.45% <ø> (ø)
adapter-csv 89.57% <ø> (ø)
adapter-doctrine 89.14% <ø> (ø)
adapter-elasticsearch 97.19% <ø> (ø)
adapter-google-sheet 78.04% <ø> (ø)
adapter-http 59.15% <ø> (ø)
adapter-json 90.62% <ø> (ø)
adapter-logger 53.84% <ø> (ø)
adapter-meilisearch 97.75% <ø> (ø)
adapter-parquet 80.85% <ø> (ø)
adapter-text 84.44% <ø> (ø)
adapter-xml 83.15% <ø> (ø)
🚀 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 01b8b6a into flow-php:1.x Mar 14, 2025
31 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Schema Mismatch Exception

1 participant