8000 Added intersection type by norberttech · Pull Request #1684 · flow-php/flow · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added intersection type #1684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 27, 2025
Merged

Added intersection type #1684

merged 4 commits into from
May 27, 2025

Conversation

norberttech
Copy link
Member

Resolves: #1683

Change Log


Added

  • type_intersection

Fixed

Changed

Removed

Deprecated

Security

@norberttech norberttech linked an issue May 26, 2025 that may be closed by this pull request
@norberttech norberttech removed this from Roadmap May 26, 2025
Copy link
Contributor
github-actions bot commented May 26, 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.777mb +0.08%  | 418.039ms +0.56% | ±0.63% +321.36% |
| ExcelExtractorBench   | bench_extract_10k_ods  | 1    | 3   | 65.489mb +0.01% | 1.054s +1.13%    | ±0.34% -68.39%  |
| ExcelExtractorBench   | bench_extract_10k_xlsx | 1    | 3   | 67.535mb +0.01% | 1.679s -0.75%    | ±0.90% -2.92%   |
| JsonExtractorBench    | bench_extract_10k      | 1    | 3   | 5.021mb +0.07%  | 1.281s -0.83%    | ±0.54% -10.14%  |
| ParquetExtractorBench | bench_extract_10k      | 1    | 3   | 86.323mb +0.00% | 915.557ms +0.16% | ±0.57% +30.18%  |
| TextExtractorBench    | bench_extract_10k      | 1    | 3   | 4.501mb +0.08%  | 38.487ms +0.32%  | ±1.73% +282.68% |
| XmlExtractorBench     | bench_extract_10k      | 1    | 3   | 4.496mb +0.08%  | 607.855ms +0.92% | ±0.90% -73.87%  |
+-----------------------+------------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+---------------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| benchmark                       | subject                  | revs | its | mem_peak         | mode            | rstdev          |
+---------------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| RenameEntryTransformerBench     | bench_transform_10k_rows | 1    | 3   | 123.238mb +0.00% | 65.316ms -4.89% | ±0.90% +150.81% |
| RenameEachEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 18.500mb +0.02%  | 72.706ms +1.40% | ±0.39% -81.95%  |
+---------------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
Loaders
+--------------------+----------------+------+-----+------------------+-----------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode            | rstdev          |
+--------------------+----------------+------+-----+------------------+-----------------+-----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 62.437mb +0.01%  | 85.330ms -1.05% | ±0.94% -67.22%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 79.709mb +0.00%  | 94.247ms -2.17% | ±0.65% +126.39% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 166.213mb +0.00% | 20.843s +1.02%  | ±0.31% +218.97% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.807mb +0.02%  | 30.812ms -1.84% | ±0.65% +13.51%  |
+--------------------+----------------+------+-----+------------------+-----------------+-----------------+
Building Blocks
+-------------------+----------------------------+------+-----+------------------+------------------+-------------------------------+
| benchmark         | subject                    | revs | its | mem_peak         | mode             | rstdev                        |
+-------------------+----------------------------+------+-----+------------------+------------------+-------------------------------+
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 101.787mb +0.00% | 641.092ms -0.46% | ±0.76% +118.05%               |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 53.137mb +0.01%  | 324.989ms -0.77% | ±2.01% +847.71%               |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.387mb +0.03%  | 70.465ms +1.41%  | ±1.46% -0.45%                 |
| RowsBench         | bench_chunk_10_on_10k      | 2    | 3   | 93.391mb +0.00%  | 3.217ms -0.27%   | ±2.91% +103.01%               |
| RowsBench         | bench_diff_left_1k_on_10k  | 2    | 3   | 110.761mb +0.00% | 238.608ms -0.25% | ±0.32% -48.83%                |
| RowsBench         | bench_diff_right_1k_on_10k | 2    | 3   | 93.481mb +0.00%  | 23.477ms -1.94%  | ±0.60% -39.79%                |
| RowsBench         | bench_drop_1k_on_10k       | 2    | 3   | 94.266mb +0.00%  | 1.268ms -10.48%  | ±2.03% +17.75%                |
| RowsBench         | bench_drop_right_1k_on_10k | 2    | 3   | 94.266mb +0.00%  | 1.366ms -3.25%   | ±3.53% +2.04%                 |
| RowsBench         | bench_entries_on_10k       | 2    | 3   | 92.427mb +0.00%  | 3.392ms -6.00%   | ±1.63% -44.76%                |
| RowsBench         | bench_filter_on_10k        | 2    | 3   | 92.956mb +0.00%  | 18.386ms +14.40% | ±1.76% +24.05%                |
| RowsBench         | bench_find_on_10k          | 2    | 3   | 92.956mb +0.00%  | 18.658ms +19.57% | ±2.06% +782.42%               |
| RowsBench         | bench_find_one_on_10k      | 10   | 3   | 91.645mb +0.00%  | 1.794μs -5.58%   | ±2.67% +22832449392073000.00% |
| RowsBench         | bench_first_on_10k         | 10   | 3   | 91.645mb +0.00%  | 0.400μs 0.00%    | ±0.00% 0.00%                  |
| RowsBench         | bench_flat_map_on_1k       | 2    | 3   | 100.705mb +0.00% | 14.119ms -1.13%  | ±0.54% +49.36%                |
| RowsBench         | bench_map_on_10k           | 2    | 3   | 130.132mb +0.00% | 67.365ms -3.36%  | ±3.06% +1522.04%              |
| RowsBench         | bench_merge_1k_on_10k      | 2    | 3   | 93.475mb +0.00%  | 1.192ms -5.16%   | ±2.59% +115.61%               |
| RowsBench         | bench_partition_by_on_10k  | 2    | 3   | 96.843mb +0.00%  | 62.322ms -2.18%  | ±0.52% +73.63%                |
| RowsBench         | bench_remove_on_10k        | 2    | 3   | 94.528mb +0.00%  | 3.472ms -0.91%   | ±0.56% -67.24%                |
| RowsBench         | bench_sort_asc_on_1k       | 2    | 3   | 92.006mb +0.00%  | 40.315ms +2.81%  | ±1.14% -3.18%                 |
| RowsBench         | bench_sort_by_on_1k        | 2    | 3   | 92.006mb +0.00%  | 39.947ms -0.17%  | ±1.02% +29.45%                |
| RowsBench         | bench_sort_desc_on_1k      | 2    | 3   | 92.006mb +0.00%  | 40.191ms +1.46%  | ±1.06% -30.00%                |
| RowsBench         | bench_sort_entries_on_1k   | 2    | 3   | 94.087mb +0.00%  | 8.306ms +1.89%   | ±1.22% +27.34%                |
| RowsBench         | bench_sort_on_1k           | 2    | 3   | 91.837mb +0.00%  | 29.692ms -0.25%  | ±1.82% -29.30%                |
| RowsBench         | bench_take_1k_on_10k       | 10   | 3   | 91.645mb +0.00%  | 13.612μs -10.91% | ±0.69% -37.63%                |
| RowsBench         | bench_take_right_1k_on_10k | 10   | 3   | 91.645mb +0.00%  | 15.406μs -2.59%  | ±0.31% -91.65%                |
| RowsBench         | bench_unique_on_1k         | 2    | 3   | 110.762mb +0.00% | 240.893ms -1.10% | ±0.23% -60.18%                |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 42.073mb +0.01%  | 420.282ms -1.59% | ±0.33% -67.60%                |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 11.451mb +0.03%  | 86.089ms +0.83%  | ±0.47% -70.94%                |
+-------------------+----------------------------+------+-----+------------------+------------------+-------------------------------+

Copy link
codecov bot commented May 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 59 lines in your changes missing coverage. Please review.

Project coverage is 81.79%. Comparing base (47487c1) to head (a20356c).
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    #1684      +/-   ##
==========================================
- Coverage   82.04%   81.79%   -0.26%     
==========================================
  Files         704      705       +1     
  Lines       19085    19144      +59     
==========================================
  Hits        15658    15658              
- Misses       3427     3486      +59     
Components Coverage Δ
etl 88.35% <ø> (ø)
cli 84.42% <ø> (ø)
lib-array-dot 94.53% <ø> (ø)
lib-azure-sdk 62.56% <ø> (ø)
lib-doctrine-dbal-bulk 90.11% <ø> (ø)
lib-filesystem 78.02% <ø> (ø)
lib-types 55.53% <0.00%> (-2.55%) ⬇️
lib-parquet 84.37% <ø> (ø)
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 90.18% <ø> (ø)
adapter-doctrine 89.69% <ø> (ø)
adapter-elasticsearch 97.19% <ø> (ø)
adapter-google-sheet 83.87% <ø> (ø)
adapter-http 59.15% <ø> (ø)
adapter-json 90.62% <ø> (ø)
adapter-logger 53.84% <ø> (ø)
adapter-meilisearch 97.75% <ø> (ø)
adapter-parquet 78.64% <ø> (ø)
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
Copy link
Member Author

All the comments from Codecov are wrong, that new type is properly covered by tests, the reason why codecov don't see that is because the baseline coverage (generated after merging things to 1.x) didn't had library Types defined (I missed that). Once we merge this PR, the code coverage of Types library should get properly uploaded to codecov

@norberttech norberttech merged commit a5bc458 into 1.x May 27, 2025
20 of 22 checks passed
@norberttech norberttech deleted the 1683-proposal-intersectiontype branch May 27, 2025 09:59
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.

[Proposal]: IntersectionType
1 participant
0