Skip to content

Conversation

@stloyd
Copy link
Member

@stloyd stloyd commented Aug 19, 2025

Resolves: #1828

Change Log


Added

Fixed

  • [GoogleSheet] Skip empty rows at the beginning of a sheet

Changed

Removed

Deprecated

Security

@codecov
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.30%. Comparing base (a0c6291) to head (ec9a4ce).
⚠️ Report is 2 commits behind head on 1.x.

Additional details and impacted files
@@           Coverage Diff           @@
##              1.x    #1829   +/-   ##
=======================================
  Coverage   82.30%   82.30%           
=======================================
  Files         753      753           
  Lines       21312    21317    +5     
=======================================
+ Hits        17540    17545    +5     
  Misses       3772     3772           
Components Coverage Δ
etl 89.12% <ø> (ø)
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 89.76% <ø> (ø)
bridge-filesystem-async-aws 90.38% <ø> (ø)
bridge-filesystem-azure 89.92% <ø> (ø)
bridge-monolog-http 97.04% <ø> (ø)
bridge-openapi-specification 94.52% <ø> (ø)
symfony-http-foundation 74.41% <ø> (ø)
adapter-chartjs 86.70% <ø> (ø)
adapter-csv 88.85% <ø> (ø)
adapter-doctrine 91.03% <ø> (ø)
adapter-elasticsearch 97.23% <ø> (ø)
adapter-google-sheet 84.49% <100.00%> (+0.62%) ⬆️
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.897mb -0.02%  | 441.046ms +0.26% | ±2.02% +614.21% |
| ExcelExtractorBench   | bench_extract_10k_ods  | 1    | 3   | 65.592mb -0.00% | 1.062s -0.48%    | ±1.56% +64.82%  |
| ExcelExtractorBench   | bench_extract_10k_xlsx | 1    | 3   | 67.704mb -0.00% | 1.692s -2.45%    | ±0.70% +452.76% |
| JsonExtractorBench    | bench_extract_10k      | 1    | 3   | 5.491mb -0.02%  | 1.129s -0.93%    | ±0.27% -50.40%  |
| ParquetExtractorBench | bench_extract_10k      | 1    | 3   | 10.714mb -0.18% | 9.241s -19.47%   | ±0.66% +8.86%   |
| TextExtractorBench    | bench_extract_10k      | 1    | 3   | 4.622mb -0.02%  | 41.927ms -0.33%  | ±0.97% +664.92% |
| XmlExtractorBench     | bench_extract_10k      | 1    | 3   | 4.605mb -0.02%  | 600.289ms +0.48% | ±0.68% -27.87%  |
+-----------------------+------------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+---------------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                       | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+---------------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench     | bench_transform_10k_rows | 1    | 3   | 123.354mb -0.00% | 65.307ms -1.98% | ±0.50% -40.41% |
| RenameEachEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 18.616mb -0.01%  | 72.138ms -0.57% | ±0.38% -63.59% |
+---------------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+-----------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode            | rstdev          |
+--------------------+----------------+------+-----+------------------+-----------------+-----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 62.558mb -0.00%  | 83.920ms -3.12% | ±0.84% -46.95%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 80.639mb -0.00%  | 99.824ms -3.50% | ±1.42% +135.53% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 819.318mb +0.04% | 20.222s -25.62% | ±0.37% +30.42%  |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.922mb -0.01%  | 29.087ms -2.49% | ±0.76% -16.97%  |
+--------------------+----------------+------+-----+------------------+-----------------+-----------------+
Building Blocks
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark         | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 106.036mb -0.00% | 656.161ms +0.14% | ±1.28% +31.83%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.313mb -0.00%  | 328.134ms -0.74% | ±0.88% -32.37%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.899mb -0.01%  | 69.161ms -0.66%  | ±1.06% +47.05%  |
| RowsBench         | bench_chunk_10_on_10k      | 2    | 3   | 93.507mb -0.00%  | 3.435ms +6.93%   | ±3.67% +860.08% |
| RowsBench         | bench_diff_left_1k_on_10k  | 2    | 3   | 110.896mb -0.00% | 235.842ms -0.09% | ±0.16% -72.34%  |
| RowsBench         | bench_diff_right_1k_on_10k | 2    | 3   | 93.616mb -0.00%  | 23.988ms -0.08%  | ±1.44% -57.88%  |
| RowsBench         | bench_drop_1k_on_10k       | 2    | 3   | 94.382mb -0.00%  | 1.374ms +1.57%   | ±1.74% +22.07%  |
| RowsBench         | bench_drop_right_1k_on_10k | 2    | 3   | 94.382mb -0.00%  | 1.366ms +0.14%   | ±1.40% -45.06%  |
| RowsBench         | bench_entries_on_10k       | 2    | 3   | 92.542mb -0.00%  | 3.479ms +3.85%   | ±2.08% +249.01% |
| RowsBench         | bench_filter_on_10k        | 2    | 3   | 93.071mb -0.00%  | 14.699ms -3.45%  | ±2.48% +122.73% |
| RowsBench         | bench_find_on_10k          | 2    | 3   | 93.071mb -0.00%  | 14.823ms -2.63%  | ±1.61% +73.12%  |
| RowsBench         | bench_find_one_on_10k      | 10   | 3   | 91.760mb -0.00%  | 1.706μs -10.49%  | ±2.72% +11.54%  |
| RowsBench         | bench_first_on_10k         | 10   | 3   | 91.760mb -0.00%  | 0.400μs 0.00%    | ±0.00% 0.00%    |
| RowsBench         | bench_flat_map_on_1k       | 2    | 3   | 100.821mb -0.00% | 14.285ms -0.50%  | ±0.46% -47.03%  |
| RowsBench         | bench_map_on_10k           | 2    | 3   | 130.248mb -0.00% | 67.513ms -0.84%  | ±0.22% -80.19%  |
| RowsBench         | bench_merge_1k_on_10k      | 2    | 3   | 93.591mb -0.00%  | 1.232ms -2.43%   | ±3.00% +15.30%  |
| RowsBench         | bench_partition_by_on_10k  | 2    | 3   | 96.979mb -0.00%  | 60.704ms +0.27%  | ±1.72% +97.83%  |
| RowsBench         | bench_remove_on_10k        | 2    | 3   | 94.644mb -0.00%  | 3.408ms -3.35%   | ±0.70% -48.26%  |
| RowsBench         | bench_sort_asc_on_1k       | 2    | 3   | 92.141mb -0.00%  | 39.669ms +1.39%  | ±0.42% -48.46%  |
| RowsBench         | bench_sort_by_on_1k        | 2    | 3   | 92.141mb -0.00%  | 39.018ms -0.76%  | ±0.76% +125.25% |
| RowsBench         | bench_sort_desc_on_1k      | 2    | 3   | 92.141mb -0.00%  | 39.643ms -0.99%  | ±2.26% +51.01%  |
| RowsBench         | bench_sort_entries_on_1k   | 2    | 3   | 94.203mb -0.00%  | 7.888ms -0.36%   | ±0.50% -8.86%   |
| RowsBench         | bench_sort_on_1k           | 2    | 3   | 91.953mb -0.00%  | 29.698ms -0.30%  | ±1.54% +40.66%  |
| RowsBench         | bench_take_1k_on_10k       | 10   | 3   | 91.760mb -0.00%  | 14.041μs -1.81%  | ±1.79% +213.54% |
| RowsBench         | bench_take_right_1k_on_10k | 10   | 3   | 91.760mb -0.00%  | 15.340μs -3.93%  | ±3.27% +2.54%   |
| RowsBench         | bench_unique_on_1k         | 2    | 3   | 110.897mb -0.00% | 243.202ms +0.84% | ±1.91% +417.88% |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 42.561mb -0.00%  | 402.291ms -3.02% | ±1.08% -23.45%  |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 11.619mb -0.01%  | 80.864ms +0.66%  | ±1.30% +137.49% |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
Parquet Library
+--------------------+---------------------------------+------+-----+------------------+-------------------+-----------------+
| benchmark          | subject                         | revs | its | mem_peak         | mode              | rstdev          |
+--------------------+---------------------------------+------+-----+------------------+-------------------+-----------------+
| ParquetWriterBench | bench_write_batch               | 1    | 3   | 11.741mb -14.43% | 192.147ms -12.66% | ±0.96% +21.59%  |
| ParquetWriterBench | bench_write_gzip                | 1    | 3   | 10.366mb +0.01%  | 217.922ms -0.04%  | ±0.92% +306.07% |
| ParquetWriterBench | bench_write_row_by_row          | 1    | 3   | 11.741mb -14.43% | 191.856ms -14.00% | ±0.43% -2.21%   |
| ParquetWriterBench | bench_write_snappy              | 1    | 3   | 11.741mb -14.43% | 190.812ms -14.78% | ±1.07% +322.97% |
| ParquetWriterBench | bench_write_uncompressed        | 1    | 3   | 10.042mb +0.01%  | 192.654ms -0.37%  | ±0.57% +78.89%  |
| ParquetReaderBench | bench_page_headers              | 1    | 3   | 6.689mb -0.02%   | 3.349s +0.69%     | ±0.93% +156.31% |
| ParquetReaderBench | bench_read_metadata             | 1    | 3   | 5.374mb -0.02%   | 18.065ms -0.53%   | ±0.51% -34.47%  |
| ParquetReaderBench | bench_read_schema               | 1    | 3   | 5.374mb -0.02%   | 18.056ms -0.34%   | ±0.56% +6.55%   |
| ParquetReaderBench | bench_read_values_all_columns   | 1    | 3   | 9.123mb -0.22%   | 5.608s -28.86%    | ±0.99% -23.10%  |
| ParquetReaderBench | bench_read_values_single_column | 1    | 3   | 6.421mb -0.31%   | 233.136ms -48.89% | ±1.24% +90.00%  |
| ParquetReaderBench | bench_read_values_with_limit    | 1    | 3   | 6.951mb -0.46%   | 28.839ms -14.02%  | ±1.02% +150.94% |
+--------------------+---------------------------------+------+-----+------------------+-------------------+-----------------+

foreach ($values as $index => $row) {
if ([] === $row) {
// Remove empty rows at the beginning of a sheet
unset($values[$index]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm wont that remove any empty row, regardless of the position in the sheet? Like for example one in the middle?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No cause there is a break; after assign of first found data, so it will remove just first rows till any data found.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh right 👍

@norberttech norberttech merged commit 56961ae into flow-php:1.x Aug 26, 2025
20 checks passed
@stloyd stloyd deleted the bugfix/issue-1828 branch August 26, 2025 08:31
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.

[Bug]: Empty rows considered as header in Google Loader

2 participants