-
-
Notifications
You must be signed in to change notification settings - Fork 48
[GoogleSheet] Skip empty rows at the beginning of a sheet #1829
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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
🚀 New features to boost your workflow:
|
Flow PHP - BenchmarksResults 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]); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh right 👍
Resolves: #1828
Change Log
Added
Fixed
Changed
Removed
Deprecated
Security