Skip to content

Conversation

@norberttech
Copy link
Member

Resolves: #1791

Change Log


Added

  • Rows::head()
  • Rows::tail()
  • Rows::last()

Fixed

Changed

Removed

Deprecated

Security

@norberttech norberttech linked an issue Jul 28, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jul 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.27%. Comparing base (af99327) to head (f2f9601).
⚠️ Report is 2 commits behind head on 1.x.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x    #1792      +/-   ##
==========================================
+ Coverage   82.25%   82.27%   +0.02%     
==========================================
  Files         752      752              
  Lines       21251    21272      +21     
==========================================
+ Hits        17479    17501      +22     
+ Misses       3772     3771       -1     
Components Coverage Δ
etl 89.12% <100.00%> (+0.03%) ⬆️
cli 85.91% <ø> (ø)
lib-array-dot 94.56% <ø> (ø)
lib-azure-sdk 61.35% <ø> (ø)
lib-doctrine-dbal-bulk 95.59% <ø> (ø)
lib-filesystem 78.02% <ø> (ø)
lib-types 53.55% <ø> (ø)
lib-parquet 85.50% <ø> (ø)
lib-parquet-viewer 83.11% <ø> (ø)
lib-snappy 90.23% <ø> (+0.46%) ⬆️
bridge-filesystem-async-aws 90.38% <ø> (ø)
bridge-filesystem-azure 89.92% <ø> (ø)
bridge-monolog-http 97.04% <ø> (ø)
bridge-openapi-specification 93.16% <ø> (ø)
symfony-http-foundation 74.41% <ø> (ø)
adapter-chartjs 86.70% <ø> (ø)
adapter-csv 88.85% <ø> (ø)
adapter-doctrine 91.03% <ø> (ø)
adapter-elasticsearch 97.23% <ø> (ø)
adapter-google-sheet 83.87% <ø> (ø)
adapter-http 58.10% <ø> (ø)
adapter-json 87.98% <ø> (ø)
adapter-logger 53.84% <ø> (ø)
adapter-meilisearch 97.95% <ø> (ø)
adapter-parquet 78.92% <ø> (ø)
adapter-text 84.44% <ø> (ø)
adapter-xml 82.73% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
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.889mb +0.08%  | 443.741ms +0.97% | ±0.78% +14.41%  |
| ExcelExtractorBench   | bench_extract_10k_ods  | 1    | 3   | 65.585mb +0.01% | 1.052s -3.18%    | ±0.77% +55.28%  |
| ExcelExtractorBench   | bench_extract_10k_xlsx | 1    | 3   | 67.685mb +0.02% | 1.676s -1.34%    | ±0.32% -68.75%  |
| JsonExtractorBench    | bench_extract_10k      | 1    | 3   | 5.481mb +0.12%  | 1.161s -0.39%    | ±0.70% -53.42%  |
| ParquetExtractorBench | bench_extract_10k      | 1    | 3   | 10.707mb -0.14% | 9.207s -21.14%   | ±0.79% +152.51% |
| TextExtractorBench    | bench_extract_10k      | 1    | 3   | 4.612mb +0.15%  | 41.942ms -1.01%  | ±0.49% -10.22%  |
| XmlExtractorBench     | bench_extract_10k      | 1    | 3   | 4.597mb +0.09%  | 596.936ms -1.06% | ±0.27% +143.40% |
+-----------------------+------------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+---------------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| benchmark                       | subject                  | revs | its | mem_peak         | mode            | rstdev          |
+---------------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| RenameEachEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 18.608mb +0.02%  | 72.595ms -2.10% | ±0.91% +44.56%  |
| RenameEntryTransformerBench     | bench_transform_10k_rows | 1    | 3   | 123.346mb +0.00% | 66.137ms -3.97% | ±1.43% +303.74% |
+---------------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev         |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 62.550mb +0.01%  | 86.973ms +1.77%  | ±0.95% +44.49% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 80.631mb +0.00%  | 100.148ms -0.83% | ±0.96% -24.15% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 819.310mb +0.04% | 20.267s -26.32%  | ±0.38% -6.98%  |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.914mb +0.02%  | 29.700ms -0.84%  | ±0.21% -57.75% |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
Building Blocks
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark         | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 106.028mb +0.00% | 662.700ms +1.00% | ±0.83% +156.69% |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.303mb +0.01%  | 335.758ms -0.15% | ±0.77% +75.13%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.889mb +0.05%  | 70.668ms -1.68%  | ±1.56% +20.92%  |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 42.559mb -0.00%  | 404.044ms -0.48% | ±1.02% +127.58% |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 11.617mb -0.01%  | 82.691ms +1.01%  | ±0.94% -24.51%  |
| RowsBench         | bench_chunk_10_on_10k      | 2    | 3   | 93.499mb +0.00%  | 3.463ms -17.79%  | ±1.75% +41.84%  |
| RowsBench         | bench_diff_left_1k_on_10k  | 2    | 3   | 110.889mb +0.00% | 241.487ms +1.08% | ±0.59% -32.35%  |
| RowsBench         | bench_diff_right_1k_on_10k | 2    | 3   | 93.609mb +0.00%  | 24.678ms +0.22%  | ±0.22% -62.25%  |
| RowsBench         | bench_drop_1k_on_10k       | 2    | 3   | 94.374mb +0.00%  | 1.534ms -16.86%  | ±1.95% -18.49%  |
| RowsBench         | bench_drop_right_1k_on_10k | 2    | 3   | 94.374mb +0.00%  | 1.576ms -12.03%  | ±3.40% +126.72% |
| RowsBench         | bench_entries_on_10k       | 2    | 3   | 92.535mb +0.00%  | 3.423ms -8.33%   | ±2.11% +56.48%  |
| RowsBench         | bench_filter_on_10k        | 2    | 3   | 93.064mb +0.00%  | 15.632ms -1.73%  | ±2.15% +441.23% |
| RowsBench         | bench_find_on_10k          | 2    | 3   | 93.064mb +0.00%  | 15.410ms -1.68%  | ±2.10% +378.44% |
| RowsBench         | bench_find_one_on_10k      | 10   | 3   | 91.752mb +0.00%  | 1.706μs -14.70%  | ±2.72% +0.00%   |
| RowsBench         | bench_first_on_10k         | 10   | 3   | 91.752mb +0.00%  | 0.400μs -20.00%  | ±0.00% +0.00%   |
| RowsBench         | bench_flat_map_on_1k       | 2    | 3   | 100.813mb +0.00% | 14.509ms -14.13% | ±1.75% +170.42% |
| RowsBench         | bench_map_on_10k           | 2    | 3   | 130.240mb +0.00% | 67.477ms -5.61%  | ±0.47% -44.98%  |
| RowsBench         | bench_merge_1k_on_10k      | 2    | 3   | 93.583mb +0.00%  | 1.439ms -12.40%  | ±2.34% -5.94%   |
| RowsBench         | bench_partition_by_on_10k  | 2    | 3   | 96.971mb +0.00%  | 61.102ms -2.78%  | ±0.58% -20.45%  |
| RowsBench         | bench_remove_on_10k        | 2    | 3   | 94.636mb +0.00%  | 3.651ms -13.57%  | ±1.73% -44.62%  |
| RowsBench         | bench_sort_asc_on_1k       | 2    | 3   | 92.133mb +0.00%  | 40.922ms -1.84%  | ±2.16% +293.37% |
| RowsBench         | bench_sort_by_on_1k        | 2    | 3   | 92.133mb +0.00%  | 39.861ms -4.45%  | ±0.48% +15.69%  |
| RowsBench         | bench_sort_desc_on_1k      | 2    | 3   | 92.133mb +0.00%  | 39.929ms -7.66%  | ±1.46% -44.68%  |
| RowsBench         | bench_sort_entries_on_1k   | 2    | 3   | 94.195mb +0.00%  | 8.017ms -5.65%   | ±0.41% -72.89%  |
| RowsBench         | bench_sort_on_1k           | 2    | 3   | 91.945mb +0.00%  | 29.237ms -4.06%  | ±1.60% -31.93%  |
| RowsBench         | bench_take_1k_on_10k       | 10   | 3   | 91.752mb +0.00%  | 14.280μs -4.69%  | ±1.18% -17.30%  |
| RowsBench         | bench_take_right_1k_on_10k | 10   | 3   | 91.752mb +0.00%  | 16.142μs -5.80%  | ±3.38% +106.86% |
| RowsBench         | bench_unique_on_1k         | 2    | 3   | 110.890mb +0.00% | 247.388ms +1.52% | ±0.55% +39.72%  |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
Parquet Library
+--------------------+---------------------------------+------+-----+------------------+-------------------+------------------+
| benchmark          | subject                         | revs | its | mem_peak         | mode              | rstdev           |
+--------------------+---------------------------------+------+-----+------------------+-------------------+------------------+
| ParquetReaderBench | bench_page_headers              | 1    | 3   | 6.686mb -0.02%   | 3.306s -0.45%     | ±0.91% +13.85%   |
| ParquetReaderBench | bench_read_metadata             | 1    | 3   | 5.371mb -0.02%   | 18.126ms -1.80%   | ±0.43% -28.11%   |
| ParquetReaderBench | bench_read_schema               | 1    | 3   | 5.371mb -0.02%   | 18.090ms -1.74%   | ±0.25% -43.41%   |
| ParquetReaderBench | bench_read_values_all_columns   | 1    | 3   | 9.121mb -0.22%   | 5.647s -28.22%    | ±0.34% -21.58%   |
| ParquetReaderBench | bench_read_values_single_column | 1    | 3   | 6.418mb -0.31%   | 236.353ms -48.82% | ±0.72% -52.82%   |
| ParquetReaderBench | bench_read_values_with_limit    | 1    | 3   | 6.949mb -0.47%   | 28.790ms -16.03%  | ±0.45% -2.33%    |
| ParquetWriterBench | bench_write_batch               | 1    | 3   | 11.739mb -14.44% | 191.366ms -14.73% | ±0.40% +24.60%   |
| ParquetWriterBench | bench_write_gzip                | 1    | 3   | 10.364mb +0.01%  | 217.175ms -1.77%  | ±0.78% +1363.86% |
| ParquetWriterBench | bench_write_row_by_row          | 1    | 3   | 11.739mb -14.44% | 191.308ms -15.25% | ±0.38% +136.86%  |
| ParquetWriterBench | bench_write_snappy              | 1    | 3   | 11.739mb -14.44% | 192.416ms -14.41% | ±0.93% +62.51%   |
| ParquetWriterBench | bench_write_uncompressed        | 1    | 3   | 10.039mb +0.01%  | 193.273ms +0.48%  | ±0.34% -41.19%   |
+--------------------+---------------------------------+------+-----+------------------+-------------------+------------------+

@norberttech norberttech merged commit 1c21eca into 1.x Jul 28, 2025
21 checks passed
@norberttech norberttech deleted the 1791-proposal-add-head-last-and-tail-methods-to-rows branch July 28, 2025 17:13
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]: Add head(), last() and tail() methods to Rows

2 participants