-
-
Notifications
You must be signed in to change notification settings - Fork 48
[GoogleSheet] Prevent fatal error when extracted columns don't match headers amount #1606
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stloyd
commented
Apr 28, 2025
src/adapter/etl-adapter-google-sheet/src/Flow/ETL/Adapter/GoogleSheet/functions.php
Show resolved
Hide resolved
Contributor
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.882mb +0.02% | 620.326ms +0.89% | ±0.97% -16.58% |
| JsonExtractorBench | bench_extract_10k | 1 | 3 | 5.467mb +0.05% | 1.336s -1.91% | ±0.18% -54.45% |
| ParquetExtractorBench | bench_extract_10k | 1 | 3 | 86.479mb +0.00% | 928.598ms -1.39% | ±1.20% +226.00% |
| TextExtractorBench | bench_extract_10k | 1 | 3 | 4.606mb +0.02% | 40.162ms +3.23% | ±1.42% +18.69% |
| XmlExtractorBench | bench_extract_10k | 1 | 3 | 4.581mb +0.02% | 602.786ms -0.79% | ±0.90% +4.13% |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark | subject | revs | its | mem_peak | mode | rstdev |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1 | 3 | 127.404mb +0.00% | 69.431ms -2.58% | ±1.36% -28.28% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders+--------------------+----------------+------+-----+------------------+------------------+----------------+
| benchmark | subject | revs | its | mem_peak | mode | rstdev |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| CSVLoaderBench | bench_load_10k | 1 | 3 | 64.049mb +0.00% | 104.088ms -0.18% | ±1.14% +33.20% |
| JsonLoaderBench | bench_load_10k | 1 | 3 | 84.081mb +0.00% | 95.933ms -1.64% | ±0.27% -67.49% |
| ParquetLoaderBench | bench_load_10k | 1 | 3 | 166.563mb +0.00% | 20.722s -3.86% | ±0.25% -69.07% |
| TextLoaderBench | bench_load_10k | 1 | 3 | 18.139mb +0.00% | 31.525ms +0.18% | ±0.54% -27.53% |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
Building Blocks+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark | subject | revs | its | mem_peak | mode | rstdev |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| RowsBench | bench_chunk_10_on_10k | 2 | 3 | 97.066mb +0.00% | 3.188ms -23.14% | ±0.95% -70.24% |
| RowsBench | bench_diff_left_1k_on_10k | 2 | 3 | 114.422mb +0.00% | 180.561ms -2.51% | ±0.68% +2.01% |
| RowsBench | bench_diff_right_1k_on_10k | 2 | 3 | 97.142mb +0.00% | 18.165ms -4.85% | ±0.69% -18.88% |
| RowsBench | bench_drop_1k_on_10k | 2 | 3 | 97.941mb +0.00% | 1.516ms -30.41% | ±3.41% +323.45% |
| RowsBench | bench_drop_right_1k_on_10k | 2 | 3 | 97.941mb +0.00% | 1.513ms -31.48% | ±2.49% +244.22% |
| RowsBench | bench_entries_on_10k | 2 | 3 | 96.101mb +0.00% | 4.321ms -28.38% | ±2.19% -1.17% |
| RowsBench | bench_filter_on_10k | 2 | 3 | 96.630mb +0.00% | 16.581ms -3.46% | ±0.84% -16.01% |
| RowsBench | bench_find_on_10k | 2 | 3 | 96.630mb +0.00% | 16.491ms -2.86% | ±0.49% -24.32% |
| RowsBench | bench_find_one_on_10k | 10 | 3 | 95.322mb +0.00% | 1.706μs -14.70% | ±2.72% +0.00% |
| RowsBench | bench_first_on_10k | 10 | 3 | 95.322mb +0.00% | 0.400μs -20.00% | ±0.00% +0.00% |
| RowsBench | bench_flat_map_on_1k | 2 | 3 | 104.540mb +0.00% | 15.026ms -9.51% | ±0.33% -86.91% |
| RowsBench | bench_map_on_10k | 2 | 3 | 134.607mb +0.00% | 70.827ms -5.99% | ±1.09% +48.75% |
| RowsBench | bench_merge_1k_on_10k | 2 | 3 | 97.150mb +0.00% | 1.334ms -35.48% | ±3.50% -5.73% |
| RowsBench | bench_partition_by_on_10k | 2 | 3 | 100.522mb +0.00% | 63.310ms -0.77% | ±1.04% +159.54% |
| RowsBench | bench_remove_on_10k | 2 | 3 | 98.203mb +0.00% | 3.775ms -7.12% | ±0.73% -66.94% |
| RowsBench | bench_sort_asc_on_1k | 2 | 3 | 95.684mb +0.00% | 40.148ms -0.81% | ±0.35% -88.82% |
| RowsBench | bench_sort_by_on_1k | 2 | 3 | 95.685mb +0.00% | 40.913ms -2.08% | ±2.27% +259.68% |
| RowsBench | bench_sort_desc_on_1k | 2 | 3 | 95.684mb +0.00% | 41.189ms -1.33% | ±0.10% -89.91% |
| RowsBench | bench_sort_entries_on_1k | 2 | 3 | 97.762mb +0.00% | 8.384ms -1.28% | ±0.85% -56.88% |
| RowsBench | bench_sort_on_1k | 2 | 3 | 95.512mb +0.00% | 30.024ms -1.51% | ±2.76% +50.60% |
| RowsBench | bench_take_1k_on_10k | 10 | 3 | 95.322mb +0.00% | 14.562μs +1.10% | ±2.61% -5.06% |
| RowsBench | bench_take_right_1k_on_10k | 10 | 3 | 95.322mb +0.00% | 16.796μs -6.12% | ±3.65% +43.28% |
| RowsBench | bench_unique_on_1k | 2 | 3 | 114.423mb +0.00% | 187.191ms -1.50% | ±0.76% +116.95% |
| TypeDetectorBench | bench_type_detector | 1 | 3 | 44.047mb +0.00% | 466.969ms -0.02% | ±0.92% -51.82% |
| TypeDetectorBench | bench_type_detector | 1 | 3 | 11.857mb +0.01% | 94.023ms -0.33% | ±0.78% -23.59% |
| EntryFactoryBench | bench_entry_factory | 1 | 3 | 105.512mb +0.00% | 716.200ms -0.70% | ±0.44% +21.50% |
| EntryFactoryBench | bench_entry_factory | 1 | 3 | 55.022mb +0.00% | 370.531ms +2.14% | ±1.08% -38.16% |
| EntryFactoryBench | bench_entry_factory | 1 | 3 | 14.800mb +0.01% | 81.247ms +3.80% | ±0.65% -26.44% |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
|
192ff1f to
bb65616
Compare
stloyd
commented
Apr 28, 2025
src/adapter/etl-adapter-google-sheet/src/Flow/ETL/Adapter/GoogleSheet/GoogleSheetExtractor.php
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 1.x #1606 +/- ##
==========================================
+ Coverage 83.20% 83.21% +0.01%
==========================================
Files 703 703
Lines 19053 19060 +7
==========================================
+ Hits 15853 15861 +8
+ Misses 3200 3199 -1
🚀 New features to boost your workflow:
|
bb65616 to
96f1d7f
Compare
96f1d7f to
ab09964
Compare
norberttech
requested changes
Apr 28, 2025
...ogle-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Integration/GoogleSheetExtractorTest.php
Outdated
Show resolved
Hide resolved
norberttech
approved these changes
Apr 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Log
Added
Fixed
Changed
Removed
Deprecated
Security
Description
In edge cases when the given spreadsheet has some random columns filled (i.e., as comments from the reporter), it will fail to match properly the headers with columns, leading to a fatal error: