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

Display partitions #877

Merged
merged 2 commits into from
Dec 13, 2023
Merged

Conversation

norberttech
Copy link
Member

Change Log

Added

  • Displaying partitions under data when using to_output or DataFrame::display
  • dsl functions for save modes
  • DataFrame::saveMode as an aliast for DataFrame::mode

Fixed

  • Inconsistent behavior of DataFrame::fetch for partitioned rows
  • Merging rows from the same partition makes new rows keep that partition

Changed

  • Rows::merge accepts only one instance of Rows instead of many

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          |
+-----------------------+-------------------+------+-----+------------------+------------------+-----------------+
| AvroExtractorBench    | bench_extract_10k | 1    | 3   | 35.132mb +0.02%  | 703.928ms +1.68% | ±1.41% +33.41%  |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.830mb +0.12%   | 306.969ms +1.21% | ±1.46% +104.20% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.929mb +0.12%   | 944.191ms +1.79% | ±0.40% -54.01%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 239.634mb +0.03% | 1.124s +2.18%    | ±3.23% +911.90% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.707mb +0.09%   | 27.228ms +9.26%  | ±1.62% +116.73% |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.709mb +0.09%   | 412.769ms +2.10% | ±1.49% +300.66% |
+-----------------------+-------------------+------+-----+------------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 110.393mb +0.01% | 63.959ms +1.64% | ±0.88% -38.33% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev         |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 94.792mb +0.01%  | 460.277ms +4.71% | ±1.78% -21.82% |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.870mb +0.02%  | 71.992ms +5.65%  | ±1.84% +67.89% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 105.453mb +0.01% | 58.143ms +4.12%  | ±0.96% -60.24% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 320.663mb +0.00% | 1.273s +1.52%    | ±0.28% -90.52% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.747mb +0.07%  | 41.651ms +2.87%  | ±0.73% -38.23% |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 59.389mb +0.01%  | 336.107ms +2.74% | ±0.71% +102.79% |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 14.312mb +0.03%  | 67.592ms +3.05%  | ±0.49% -79.13%  |
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 76.444mb +0.02%  | 4.330ms +65.93%  | ±1.31% -19.74%  |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 96.237mb +0.01%  | 179.524ms -0.28% | ±0.63% +2.95%   |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 74.762mb +0.02%  | 17.982ms -0.52%  | ±1.28% +31.16%  |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 77.684mb +0.02%  | 1.810ms +11.28%  | ±2.94% +340.27% |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 77.684mb +0.02%  | 1.749ms +6.35%   | ±2.79% +322.97% |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 74.796mb +0.02%  | 2.653ms +3.42%   | ±1.02% +9.04%   |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 75.325mb +0.02%  | 15.219ms +5.10%  | ±2.00% +276.98% |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 75.325mb +0.02%  | 14.966ms +0.11%  | ±1.47% -38.16%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 73.228mb +0.02%  | 1.600μs -11.11%  | ±0.00% +0.00%   |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 73.228mb +0.02%  | 0.300μs 0.00%    | ±0.00% 0.00%    |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 86.785mb +0.09%  | 12.387ms -2.45%  | ±0.14% -93.59%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 116.144mb +0.01% | 65.186ms +4.05%  | ±2.50% +107.94% |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 75.845mb +0.02%  | 1.274ms -35.21%  | ±2.45% -28.62%  |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 78.119mb +0.02%  | 36.211ms +9.00%  | ±0.28% -83.57%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 77.946mb +0.02%  | 3.868ms +1.09%   | ±0.99% -36.43%  |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 73.373mb +0.02%  | 39.660ms -0.12%  | ±0.49% -23.95%  |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 73.374mb +0.02%  | 39.149ms -0.26%  | ±2.00% +160.35% |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 73.373mb +0.02%  | 39.992ms -3.38%  | ±1.70% +27.62%  |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 75.670mb +0.02%  | 7.353ms -0.27%   | ±0.21% -52.97%  |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 73.228mb +0.02%  | 29.047ms -1.09%  | ±0.49% -42.32%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 73.228mb +0.02%  | 17.400μs +29.01% | ±0.94% +33.72%  |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 73.228mb +0.02%  | 21.385μs +36.10% | ±3.03% +407.04% |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 96.238mb +0.01%  | 180.550ms -0.49% | ±1.56% +8.21%   |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 115.987mb +0.05% | 376.977ms -1.78% | ±1.03% -19.75%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 59.705mb +0.09%  | 192.931ms +1.44% | ±1.04% +177.51% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.830mb +0.05%  | 39.566ms -2.54%  | ±1.08% +23.77%  |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+

@norberttech norberttech merged commit f0ef0da into flow-php:1.x Dec 13, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant