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

Unified behavior of first/last aggregations #1248

Conversation

norberttech
Copy link
Member

Change Log

Added

Fixed

  • Unified behavior of first/last aggregations to prevent columns conflicts when doing aggregation and grouping by the same column

Changed

Removed

Deprecated

Security


Description

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.618mb +0.04%  | 513.286ms -1.07% | ±1.63% +2.21%  |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.706mb +0.04%  | 1.090s -0.37%    | ±0.34% -81.29% |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 29.162mb +0.01% | 436.437ms -1.08% | ±0.61% -12.62% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.346mb +0.04%  | 33.567ms +0.26%  | ±0.24% +38.61% |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.328mb +0.04%  | 649.859ms -0.34% | ±1.52% +20.43% |
+-----------------------+-------------------+------+-----+-----------------+------------------+----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 116.622mb +0.00% | 60.276ms -2.72% | ±0.92% -37.67% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+------------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev           |
+--------------------+----------------+------+-----+------------------+------------------+------------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.815mb +0.00%  | 137.927ms -2.57% | ±0.86% +167.20%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 90.399mb +0.00%  | 116.641ms -2.23% | ±0.22% +150.33%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 124.452mb +0.00% | 1.236s -0.97%    | ±0.24% -83.07%   |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.537mb +0.01%  | 44.794ms +1.75%  | ±1.59% +1817.18% |
+--------------------+----------------+------+-----+------------------+------------------+------------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 87.370mb +0.00%  | 3.775ms -2.47%   | ±0.97% -36.03%  |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 102.973mb +0.00% | 191.164ms -2.01% | ±1.60% +13.41%  |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 85.693mb +0.00%  | 18.844ms -1.10%  | ±1.87% +58.20%  |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 88.610mb +0.00%  | 1.945ms +9.91%   | ±2.96% +63.10%  |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 88.610mb +0.00%  | 2.013ms +15.35%  | ±3.08% -3.66%   |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 85.722mb +0.00%  | 3.098ms +2.33%   | ±3.31% +496.81% |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 86.251mb +0.00%  | 15.182ms -9.21%  | ±2.43% +91.51%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 86.251mb +0.00%  | 15.133ms -10.18% | ±0.52% -61.03%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 84.155mb +0.00%  | 1.794μs -10.03%  | ±2.67% +11.32%  |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 84.155mb +0.00%  | 0.300μs 0.00%    | ±0.00% 0.00%    |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 93.505mb +0.00%  | 12.594ms -0.62%  | ±0.10% -89.38%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 122.876mb +0.00% | 63.269ms +0.68%  | ±0.55% -17.07%  |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 86.771mb +0.00%  | 1.583ms -7.69%   | ±3.45% +565.45% |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 90.122mb +0.00%  | 63.543ms -5.37%  | ±1.25% -21.85%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 88.872mb +0.00%  | 4.424ms -12.70%  | ±2.04% -2.09%   |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 84.304mb +0.00%  | 41.274ms -0.67%  | ±1.82% +5.26%   |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 84.305mb +0.00%  | 40.274ms -1.56%  | ±1.73% +17.61%  |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 84.304mb +0.00%  | 40.006ms -3.32%  | ±0.63% +134.97% |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 86.596mb +0.00%  | 7.385ms -0.47%   | ±0.60% -58.85%  |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 84.155mb +0.00%  | 29.377ms +0.53%  | ±0.27% -62.40%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 84.155mb +0.00%  | 13.359μs -3.75%  | ±1.85% +106.93% |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 84.155mb +0.00%  | 16.055μs -2.58%  | ±2.60% +245.04% |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 102.974mb +0.00% | 190.067ms -1.29% | ±0.69% +0.19%   |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 53.196mb +0.00%  | 396.322ms +0.50% | ±1.24% +14.90%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 13.462mb +0.01%  | 80.767ms +0.77%  | ±0.26% -62.65%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 107.458mb +0.00% | 481.148ms -2.44% | ±0.35% -49.44%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.816mb +0.00%  | 238.374ms -4.14% | ±1.75% +36.53%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.655mb +0.01%  | 52.481ms -1.30%  | ±1.74% +37.78%  |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+

@norberttech norberttech merged commit 0407556 into flow-php:1.x Oct 20, 2024
26 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.

1 participant