-
-
Notifications
You must be signed in to change notification settings - Fork 48
Added concat_ws #1385
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
Added concat_ws #1385
Conversation
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.759mb +0.05% | 541.237ms +0.45% | ±0.87% -14.38% |
| JsonExtractorBench | bench_extract_10k | 1 | 3 | 4.827mb +0.05% | 1.059s +0.32% | ±0.67% +31.55% |
| ParquetExtractorBench | bench_extract_10k | 1 | 3 | 86.480mb +0.00% | 906.205ms -0.80% | ±0.54% +70.91% |
| TextExtractorBench | bench_extract_10k | 1 | 3 | 4.492mb +0.05% | 33.724ms -1.14% | ±0.63% -29.87% |
| XmlExtractorBench | bench_extract_10k | 1 | 3 | 4.469mb +0.05% | 602.372ms +0.47% | ±0.97% +198.11% |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| benchmark | subject | revs | its | mem_peak | mode | rstdev |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1 | 3 | 108.487mb +0.00% | 58.924ms -2.89% | ±1.17% +154.47% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
Loaders+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark | subject | revs | its | mem_peak | mode | rstdev |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| CSVLoaderBench | bench_load_10k | 1 | 3 | 54.035mb +0.00% | 100.313ms -0.79% | ±0.28% +168.53% |
| JsonLoaderBench | bench_load_10k | 1 | 3 | 76.795mb +0.00% | 92.971ms -0.70% | ±0.92% +27.22% |
| ParquetLoaderBench | bench_load_10k | 1 | 3 | 166.978mb +0.00% | 20.658s -0.77% | ±0.21% -72.20% |
| TextLoaderBench | bench_load_10k | 1 | 3 | 17.079mb +0.01% | 30.299ms -4.73% | ±0.55% +86.95% |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark | subject | revs | its | mem_peak | mode | rstdev |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| RowsBench | bench_chunk_10_on_10k | 2 | 3 | 80.252mb +0.00% | 3.415ms -8.88% | ±0.72% -76.13% |
| RowsBench | bench_diff_left_1k_on_10k | 2 | 3 | 97.530mb +0.00% | 192.056ms +0.86% | ±0.95% +110.34% |
| RowsBench | bench_diff_right_1k_on_10k | 2 | 3 | 80.250mb +0.00% | 19.460ms +2.33% | ±1.08% +104.67% |
| RowsBench | bench_drop_1k_on_10k | 2 | 3 | 81.127mb +0.00% | 1.779ms -5.19% | ±2.94% +28.37% |
| RowsBench | bench_drop_right_1k_on_10k | 2 | 3 | 81.127mb +0.00% | 1.954ms +4.00% | ±1.87% -35.52% |
| RowsBench | bench_entries_on_10k | 2 | 3 | 79.288mb +0.00% | 3.710ms -9.07% | ±0.19% -89.82% |
| RowsBench | bench_filter_on_10k | 2 | 3 | 79.817mb +0.00% | 15.073ms -3.97% | ±0.24% -63.91% |
| RowsBench | bench_find_on_10k | 2 | 3 | 79.817mb +0.00% | 14.894ms -4.86% | ±1.66% +387.54% |
| RowsBench | bench_find_one_on_10k | 10 | 3 | 78.508mb +0.00% | 1.894μs -0.64% | ±2.53% +3.57% |
| RowsBench | bench_first_on_10k | 10 | 3 | 78.508mb +0.00% | 0.300μs 0.00% | ±0.00% 0.00% |
| RowsBench | bench_flat_map_on_1k | 2 | 3 | 86.845mb +0.00% | 12.677ms -2.40% | ±0.53% -22.99% |
| RowsBench | bench_map_on_10k | 2 | 3 | 114.193mb +0.00% | 60.369ms -3.09% | ±0.10% -85.75% |
| RowsBench | bench_merge_1k_on_10k | 2 | 3 | 80.336mb +0.00% | 1.396ms -22.01% | ±2.70% +514.62% |
| RowsBench | bench_partition_by_on_10k | 2 | 3 | 83.629mb +0.00% | 60.425ms -6.98% | ±0.36% -62.82% |
| RowsBench | bench_remove_on_10k | 2 | 3 | 81.389mb +0.00% | 3.886ms -4.68% | ±1.04% -60.04% |
| RowsBench | bench_sort_asc_on_1k | 2 | 3 | 78.792mb +0.00% | 42.461ms -2.59% | ±0.43% -51.59% |
| RowsBench | bench_sort_by_on_1k | 2 | 3 | 78.792mb +0.00% | 41.807ms -4.22% | ±0.46% -68.27% |
| RowsBench | bench_sort_desc_on_1k | 2 | 3 | 78.792mb +0.00% | 42.196ms -3.43% | ±1.11% +107.91% |
| RowsBench | bench_sort_entries_on_1k | 2 | 3 | 80.948mb +0.00% | 8.211ms -1.95% | ±0.79% -40.61% |
| RowsBench | bench_sort_on_1k | 2 | 3 | 78.698mb +0.00% | 29.183ms -1.59% | ±0.21% -39.62% |
| RowsBench | bench_take_1k_on_10k | 10 | 3 | 78.508mb +0.00% | 13.735μs -9.04% | ±3.01% +0.00% |
| RowsBench | bench_take_right_1k_on_10k | 10 | 3 | 78.508mb +0.00% | 15.312μs -14.74% | ±0.61% -67.27% |
| RowsBench | bench_unique_on_1k | 2 | 3 | 97.531mb +0.00% | 195.563ms +0.84% | ±1.00% +40.27% |
| NativeEntryFactoryBench | bench_entry_factory | 1 | 3 | 98.643mb +0.00% | 441.716ms +0.45% | ±1.54% +304.81% |
| NativeEntryFactoryBench | bench_entry_factory | 1 | 3 | 51.474mb +0.00% | 226.654ms +0.40% | ±0.84% +832.23% |
| NativeEntryFactoryBench | bench_entry_factory | 1 | 3 | 13.646mb +0.02% | 48.859ms +0.58% | ±1.37% +7.99% |
| TypeDetectorBench | bench_type_detector | 1 | 3 | 43.777mb +0.01% | 362.923ms +0.25% | ±1.66% +411.01% |
| TypeDetectorBench | bench_type_detector | 1 | 3 | 11.587mb +0.02% | 73.103ms -2.56% | ±1.63% +3.97% |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 1.x #1385 +/- ##
==========================================
- Coverage 82.51% 82.51% -0.01%
==========================================
Files 648 649 +1
Lines 17395 17414 +19
==========================================
+ Hits 14354 14369 +15
- Misses 3041 3045 +4
|
| if (\count($concatValues) === 0) { | ||
| return ''; | ||
| } |
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.
This can be ommited as the implode should handle an empty array
| } | ||
| } | ||
|
|
||
| if (\count($concatValues) === 0) { |
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.
Same, as for concat.
| return ''; | ||
| } | ||
|
|
||
| $values = \array_map(fn (ScalarFunction|string $string) : mixed => \is_string($string) ? $string : Caster::default()->to(type_string(true))->value($string->eval($row)), $this->refs); |
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.
Instead of map, it could be merged into below loop, so it won't be doing two loops over given values.
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.
Change Log
Added
Fixed
Changed
Removed
Deprecated
Security
Description