Skip to content
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

Fix/add missing tests string functions #1491

Merged

Conversation

f-lapinski
Copy link
Contributor

Change Log

Added

  • Added missing tests to string functions

Fixed

Changed

Removed

Deprecated

Security


Description

Add missing test cases to added string functions, mostly return null and type return

Copy link
Contributor

github-actions bot commented Feb 20, 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.804mb +0.01%  | 549.772ms -0.97% | ±0.42% -52.36%   |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.877mb +0.01%  | 1.059s +0.12%    | ±0.31% -85.34%   |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 86.324mb +0.00% | 909.427ms +2.40% | ±1.82% +118.28%  |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.534mb +0.01%  | 36.559ms +2.36%  | ±2.03% +5537.46% |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.508mb +0.01%  | 606.971ms +0.69% | ±0.67% -7.14%    |
+-----------------------+-------------------+------+-----+-----------------+------------------+------------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 127.330mb +0.00% | 70.173ms +0.35% | ±1.08% +52.37% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 64.003mb +0.00%  | 105.176ms +3.03% | ±1.17% -44.14%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 84.350mb +0.00%  | 95.820ms -0.43%  | ±0.51% +40.52%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 161.194mb +0.00% | 20.686s +0.10%   | ±0.38% +107.19% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 18.000mb +0.00%  | 31.693ms +1.72%  | ±3.15% +235.22% |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark         | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 105.973mb +0.00% | 459.109ms -3.01% | ±0.85% -58.37%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.163mb +0.00%  | 228.614ms -2.45% | ±0.61% -56.74%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.685mb +0.00%  | 50.951ms +0.84%  | ±0.17% -63.57%  |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 43.808mb +0.00%  | 362.095ms +0.92% | ±0.14% -92.43%  |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 11.617mb +0.00%  | 72.484ms -0.42%  | ±1.23% +52.03%  |
| RowsBench         | bench_chunk_10_on_10k      | 2    | 3   | 97.016mb +0.00%  | 3.260ms -1.90%   | ±2.35% -25.95%  |
| RowsBench         | bench_diff_left_1k_on_10k  | 2    | 3   | 114.304mb +0.00% | 183.460ms -3.06% | ±1.22% -33.01%  |
| RowsBench         | bench_diff_right_1k_on_10k | 2    | 3   | 97.024mb +0.00%  | 18.571ms +0.47%  | ±0.38% +36.20%  |
| RowsBench         | bench_drop_1k_on_10k       | 2    | 3   | 97.891mb +0.00%  | 1.565ms +3.87%   | ±3.57% +131.06% |
| RowsBench         | bench_drop_right_1k_on_10k | 2    | 3   | 97.891mb +0.00%  | 1.612ms +10.66%  | ±2.90% +6.76%   |
| RowsBench         | bench_entries_on_10k       | 2    | 3   | 96.052mb +0.00%  | 4.739ms +5.21%   | ±0.75% -57.90%  |
| RowsBench         | bench_filter_on_10k        | 2    | 3   | 96.581mb +0.00%  | 16.922ms +3.11%  | ±1.70% +38.72%  |
| RowsBench         | bench_find_on_10k          | 2    | 3   | 96.581mb +0.00%  | 17.160ms +4.44%  | ±1.20% +39.58%  |
| RowsBench         | bench_find_one_on_10k      | 10   | 3   | 95.272mb +0.00%  | 1.994μs +5.28%   | ±2.40% -5.08%   |
| RowsBench         | bench_first_on_10k         | 10   | 3   | 95.272mb +0.00%  | 0.400μs 0.00%    | ±0.00% 0.00%    |
| RowsBench         | bench_flat_map_on_1k       | 2    | 3   | 104.490mb +0.00% | 15.458ms +4.77%  | ±3.36% +212.63% |
| RowsBench         | bench_map_on_10k           | 2    | 3   | 134.557mb +0.00% | 71.943ms +0.80%  | ±1.77% +59.51%  |
| RowsBench         | bench_merge_1k_on_10k      | 2    | 3   | 97.101mb +0.00%  | 1.619ms +19.74%  | ±1.06% -23.36%  |
| RowsBench         | bench_partition_by_on_10k  | 2    | 3   | 100.403mb +0.00% | 64.060ms +1.54%  | ±0.29% -68.29%  |
| RowsBench         | bench_remove_on_10k        | 2    | 3   | 98.153mb +0.00%  | 4.173ms +11.91%  | ±1.62% +39.60%  |
| RowsBench         | bench_sort_asc_on_1k       | 2    | 3   | 95.565mb +0.00%  | 42.412ms +2.56%  | ±2.59% +539.88% |
| RowsBench         | bench_sort_by_on_1k        | 2    | 3   | 95.566mb +0.00%  | 42.872ms +3.27%  | ±1.85% +75.82%  |
| RowsBench         | bench_sort_desc_on_1k      | 2    | 3   | 95.565mb +0.00%  | 42.328ms +0.80%  | ±1.13% +235.38% |
| RowsBench         | bench_sort_entries_on_1k   | 2    | 3   | 97.713mb +0.00%  | 8.421ms +1.54%   | ±1.51% +31.57%  |
| RowsBench         | bench_sort_on_1k           | 2    | 3   | 95.462mb +0.00%  | 29.845ms +0.98%  | ±1.34% +63.99%  |
| RowsBench         | bench_take_1k_on_10k       | 10   | 3   | 95.272mb +0.00%  | 14.682μs +11.17% | ±0.97% +171.92% |
| RowsBench         | bench_take_right_1k_on_10k | 10   | 3   | 95.272mb +0.00%  | 16.734μs +9.22%  | ±2.62% +220.52% |
| RowsBench         | bench_unique_on_1k         | 2    | 3   | 114.305mb +0.00% | 189.497ms +2.28% | ±0.12% -86.49%  |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.12%. Comparing base (78dbc90) to head (75857a4).
Report is 2 commits behind head on 1.x.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x    #1491      +/-   ##
==========================================
+ Coverage   83.06%   83.12%   +0.06%     
==========================================
  Files         671      671              
  Lines       17975    17975              
==========================================
+ Hits        14931    14942      +11     
+ Misses       3044     3033      -11     
Components Coverage Δ
etl 86.00% <ø> (+0.13%) ⬆️
cli 86.73% <ø> (ø)
lib-array-dot 94.53% <ø> (ø)
lib-azure-sdk 62.56% <ø> (ø)
lib-doctrine-dbal-bulk 97.43% <ø> (ø)
lib-filesystem 76.75% <ø> (ø)
lib-parquet 84.33% <ø> (ø)
lib-parquet-viewer 82.02% <ø> (ø)
lib-rdsl 87.09% <ø> (ø)
lib-snappy 91.16% <ø> (+0.46%) ⬆️
bridge-filesystem-async-aws 90.38% <ø> (ø)
bridge-filesystem-azure 89.92% <ø> (ø)
bridge-monolog-http 96.38% <ø> (ø)
symfony-http-foundation 74.19% <ø> (ø)
adapter-chartjs 86.45% <ø> (ø)
adapter-csv 89.57% <ø> (ø)
adapter-doctrine 88.68% <ø> (ø)
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% <ø> (ø)

@norberttech norberttech merged commit 83c5da3 into flow-php:1.x Feb 20, 2025
22 checks passed
@norberttech
Copy link
Member

Nice!! 💪

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.

2 participants