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

Added and/or/andNot/orNot to ScalarFunctionsChain #1378

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

norberttech
Copy link
Member

Change Log

Added

  • Added and/or/andNot/orNot to ScalarFunctionsChain

Fixed

Changed

Removed

Deprecated

Security


Description

Small DX Improvement:

ref('id')->isEven()->andNot(ref('id')->equals(lit(1))

is the same as

all(ref('id')->isEven(), not(ref('id')->equals(lit(1)))

Copy link
Contributor

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.746mb +0.01%  | 540.756ms -0.12% | ±0.71% +153.61% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.814mb +0.01%  | 1.027s -3.20%    | ±0.58% +476.33% |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 86.465mb +0.00% | 856.012ms -7.73% | ±0.52% +50.26%  |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.479mb +0.01%  | 31.972ms -8.05%  | ±1.00% +145.14% |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.456mb +0.01%  | 574.663ms -4.57% | ±1.51% +53.75%  |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 108.474mb +0.00% | 57.110ms -2.84% | ±0.55% -22.67% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+-----------------+------------------+
| benchmark          | subject        | revs | its | mem_peak         | mode            | rstdev           |
+--------------------+----------------+------+-----+------------------+-----------------+------------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.022mb +0.00%  | 95.547ms -6.41% | ±3.25% +1231.76% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 76.782mb +0.00%  | 86.415ms -9.55% | ±3.05% +184.11%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 166.962mb +0.00% | 19.712s -6.47%  | ±0.54% +32.81%   |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.066mb +0.00%  | 28.966ms -8.94% | ±1.97% +97.25%   |
+--------------------+----------------+------+-----+------------------+-----------------+------------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 80.249mb +0.00%  | 3.177ms -27.37%  | ±3.06% +57.61%  |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 97.524mb +0.00%  | 178.585ms -5.69% | ±2.20% +201.36% |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 80.244mb +0.00%  | 18.045ms -6.12%  | ±2.19% +24.57%  |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 81.124mb +0.00%  | 1.294ms -34.39%  | ±2.11% +73.86%  |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 81.124mb +0.00%  | 1.291ms -32.12%  | ±2.10% +0.97%   |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 79.285mb +0.00%  | 3.482ms -12.37%  | ±2.10% +220.10% |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 79.814mb +0.00%  | 14.740ms -4.67%  | ±1.11% +39.56%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 79.814mb +0.00%  | 14.999ms -0.98%  | ±1.94% +263.47% |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 78.505mb +0.00%  | 1.706μs -10.49%  | ±2.72% +11.54%  |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 78.505mb +0.00%  | 0.400μs 0.00%    | ±0.00% 0.00%    |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 86.842mb +0.00%  | 11.935ms -8.51%  | ±0.54% -56.72%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 114.190mb +0.00% | 56.377ms -8.81%  | ±1.57% +122.70% |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 80.333mb +0.00%  | 1.212ms -30.21%  | ±2.80% +209.81% |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 83.624mb +0.00%  | 56.834ms -7.98%  | ±0.66% -27.49%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 81.386mb +0.00%  | 3.343ms -23.25%  | ±0.61% -36.83%  |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 78.786mb +0.00%  | 40.441ms -3.89%  | ±2.24% +393.35% |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 78.787mb +0.00%  | 40.409ms -6.36%  | ±1.32% -37.18%  |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 78.786mb +0.00%  | 41.078ms -4.48%  | ±1.79% +54.97%  |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 80.945mb +0.00%  | 7.819ms -7.09%   | ±0.90% -26.02%  |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 78.695mb +0.00%  | 28.113ms -5.95%  | ±0.59% -16.50%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 78.505mb +0.00%  | 12.521μs -13.05% | ±1.00% -11.78%  |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 78.505mb +0.00%  | 14.666μs -6.61%  | ±1.39% -44.83%  |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 97.525mb +0.00%  | 186.791ms -2.47% | ±1.31% +8.51%   |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 98.640mb +0.00%  | 423.203ms -4.62% | ±0.88% +217.02% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 51.471mb +0.00%  | 208.391ms -8.76% | ±0.78% +30.06%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 13.643mb +0.00%  | 47.417ms -6.11%  | ±2.87% +25.22%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 43.774mb +0.00%  | 345.128ms -5.57% | ±0.31% -60.63%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 11.584mb +0.00%  | 68.920ms -6.43%  | ±2.07% +194.77% |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 35.71429% with 18 lines in your changes missing coverage. Please review.

Project coverage is 82.50%. Comparing base (0fabc13) to head (a157144).
Report is 2 commits behind head on 1.x.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x    #1378      +/-   ##
==========================================
- Coverage   82.56%   82.50%   -0.07%     
==========================================
  Files         645      645              
  Lines       17341    17361      +20     
==========================================
+ Hits        14318    14324       +6     
- Misses       3023     3037      +14     
Components Coverage Δ
etl 85.83% <35.71%> (-0.16%) ⬇️
cli 85.17% <ø> (ø)
lib-array-dot 94.53% <ø> (ø)
lib-azure-sdk 62.56% <ø> (ø)
lib-doctrine-dbal-bulk 97.36% <ø> (ø)
lib-filesystem 76.23% <ø> (ø)
lib-parquet 84.57% <ø> (ø)
lib-parquet-viewer 82.02% <ø> (ø)
lib-rdsl 87.09% <ø> (ø)
lib-snappy 90.69% <ø> (ø)
bridge-filesystem-async-aws 90.38% <ø> (ø)
bridge-filesystem-azure 89.92% <ø> (ø)
bridge-monolog-http 96.38% <ø> (ø)
symfony-http-foundation 77.10% <ø> (ø)
adapter-chartjs 86.45% <ø> (ø)
adapter-csv 89.49% <ø> (ø)
adapter-doctrine 90.14% <ø> (ø)
adapter-elasticsearch 97.19% <ø> (ø)
adapter-google-sheet 78.04% <ø> (ø)
adapter-http 59.15% <ø> (ø)
adapter-json 92.85% <ø> (ø)
adapter-logger 53.84% <ø> (ø)
adapter-meilisearch 97.75% <ø> (ø)
adapter-parquet 59.88% <ø> (ø)
adapter-text 84.44% <ø> (ø)
adapter-xml 83.15% <ø> (ø)

@norberttech norberttech merged commit 39f3d51 into flow-php:1.x Jan 16, 2025
20 of 22 checks passed
Bellangelo pushed a commit to Bellangelo/flow that referenced this pull request Jan 16, 2025
norberttech added a commit that referenced this pull request Jan 17, 2025
* Update PHPUnit to v11.5.3

* Constructor of TestCase is now final

* In PHPUnit11 providers need to be static

* In PHPUnit11 providers need to be static

* Fix styling

* CacheResultFile is removed. See sebastianbergmann/phpunit#4600

* PHPStan complain that readonly properties must be handled inside the constructor

* Fix cache issues

* Invalidate cache

* Remove composer cache

* Revert changed environment variable

* Call parent to initialise variables

* Revert changes in Github Action

* Bump symfonycasts/tailwind-bundle from 0.5.3 to 0.6.1 in /web/landing (#1376)

Bumps [symfonycasts/tailwind-bundle](https://github.com/SymfonyCasts/tailwind-bundle) from 0.5.3 to 0.6.1.
- [Release notes](https://github.com/SymfonyCasts/tailwind-bundle/releases)
- [Commits](SymfonyCasts/tailwind-bundle@v0.5.3...v0.6.1)

---
updated-dependencies:
- dependency-name: symfonycasts/tailwind-bundle
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Updated CHANGELOG.md

* Added and/or/andNot/orNot to ScalarFunctionsChain (#1378)

* Bump coduo/php-humanizer from 4.0.3 to 5.0.0 in /web/landing (#1373)

Bumps [coduo/php-humanizer](https://github.com/coduo/php-humanizer) from 4.0.3 to 5.0.0.
- [Release notes](https://github.com/coduo/php-humanizer/releases)
- [Changelog](https://github.com/coduo/php-humanizer/blob/5.x/CHANGELOG.md)
- [Upgrade guide](https://github.com/coduo/php-humanizer/blob/5.x/UPGRADE.md)
- [Commits](coduo/php-humanizer@4.0.3...5.0.0)

---
updated-dependencies:
- dependency-name: coduo/php-humanizer
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Updated CHANGELOG.md

* Fix conflicts

* Updated CHANGELOG.md

* Bump async-aws/s3 from 2.6.0 to 2.7.0 (#1381)

Bumps [async-aws/s3](https://github.com/async-aws/s3) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/async-aws/s3/releases)
- [Changelog](https://github.com/async-aws/s3/blob/master/CHANGELOG.md)
- [Commits](async-aws/s3@2.6.0...2.7.0)

---
updated-dependencies:
- dependency-name: async-aws/s3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Added elasticsearch examples (#1384)

* Updated CHANGELOG.md

* Fix dependencies

* Fix styling

* Remove duplicated path

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: aeon-automation <[email protected]>
Co-authored-by: Norbert Orzechowicz <[email protected]>
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.

1 participant