Skip to content

Conversation

@norberttech
Copy link
Member

Resolves: #1713

Change Log


Added

  • Option to choose if we dbal bulk data should use positional or named parameter

Fixed

Changed

  • DbalBulk to use positional instead of named parameters by default

Removed

Deprecated

Security

@norberttech norberttech linked an issue Jul 20, 2025 that may be closed by this pull request
Allow user to decide if he wants to use positional or named parameters
when using BulkData (positional are set as default). Additionally we
moved a method generating cased parameters to BulkData from
TableDefinition.
@codecov
Copy link

codecov bot commented Jul 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.93%. Comparing base (4f6ed64) to head (10af231).
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    #1777      +/-   ##
==========================================
+ Coverage   81.88%   81.93%   +0.05%     
==========================================
  Files         729      729              
  Lines       20878    20943      +65     
==========================================
+ Hits        17095    17159      +64     
- Misses       3783     3784       +1     
Components Coverage Δ
etl 88.46% <ø> (ø)
cli 85.46% <ø> (ø)
lib-array-dot 94.56% <ø> (ø)
lib-azure-sdk 61.35% <ø> (ø)
lib-doctrine-dbal-bulk 95.59% <100.00%> (+0.56%) ⬆️
lib-filesystem 78.02% <ø> (ø)
lib-types 53.55% <ø> (ø)
lib-parquet 85.50% <ø> (ø)
lib-parquet-viewer 83.11% <ø> (ø)
lib-snappy 89.76% <ø> (-0.47%) ⬇️
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

github-actions bot commented Jul 20, 2025

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.872mb -0.02%  | 441.808ms +0.23% | ±2.22% +363.89% |
| ExcelExtractorBench   | bench_extract_10k_ods  | 1    | 3   | 65.568mb -0.00% | 1.060s -1.47%    | ±0.46% -21.30%  |
| ExcelExtractorBench   | bench_extract_10k_xlsx | 1    | 3   | 67.668mb -0.00% | 1.684s -0.33%    | ±0.67% -2.30%   |
| JsonExtractorBench    | bench_extract_10k      | 1    | 3   | 5.465mb -0.02%  | 1.138s +0.78%    | ±2.81% +126.88% |
| ParquetExtractorBench | bench_extract_10k      | 1    | 3   | 10.671mb -0.18% | 9.171s -19.08%   | ±0.69% -25.54%  |
| TextExtractorBench    | bench_extract_10k      | 1    | 3   | 4.595mb -0.02%  | 42.035ms -0.23%  | ±0.32% -8.18%   |
| XmlExtractorBench     | bench_extract_10k      | 1    | 3   | 4.581mb -0.02%  | 601.865ms +0.25% | ±0.57% +270.50% |
+-----------------------+------------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+---------------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                       | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+---------------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEachEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 18.592mb -0.00%  | 73.005ms +1.01% | ±0.39% -19.55% |
| RenameEntryTransformerBench     | bench_transform_10k_rows | 1    | 3   | 123.330mb -0.00% | 66.672ms +0.09% | ±0.32% -60.63% |
+---------------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev         |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 62.533mb -0.00%  | 84.339ms +1.06%  | ±0.25% -80.19% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 80.615mb -0.00%  | 101.240ms +0.86% | ±0.72% +79.22% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 819.275mb +0.04% | 20.113s -25.75%  | ±0.56% -4.98%  |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.898mb -0.00%  | 29.009ms -2.84%  | ±0.97% +42.33% |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
Building Blocks
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark         | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 106.012mb -0.00% | 662.043ms +0.15% | ±0.38% -41.71%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.286mb -0.00%  | 330.009ms -1.23% | ±0.99% +77.45%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.872mb -0.01%  | 69.565ms -2.25%  | ±0.54% -71.64%  |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 42.542mb -0.00%  | 398.275ms -0.10% | ±0.52% -28.97%  |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 11.600mb -0.01%  | 80.814ms -0.25%  | ±0.78% +18.57%  |
| RowsBench         | bench_chunk_10_on_10k      | 2    | 3   | 93.482mb -0.00%  | 3.292ms -7.24%   | ±3.19% +158.55% |
| RowsBench         | bench_diff_left_1k_on_10k  | 2    | 3   | 110.853mb -0.00% | 236.772ms +0.53% | ±0.83% +29.03%  |
| RowsBench         | bench_diff_right_1k_on_10k | 2    | 3   | 93.573mb -0.00%  | 23.710ms -0.87%  | ±0.96% +81.85%  |
| RowsBench         | bench_drop_1k_on_10k       | 2    | 3   | 94.357mb -0.00%  | 1.362ms +4.98%   | ±1.93% +72.30%  |
| RowsBench         | bench_drop_right_1k_on_10k | 2    | 3   | 94.357mb -0.00%  | 1.348ms -0.31%   | ±2.93% +0.66%   |
| RowsBench         | bench_entries_on_10k       | 2    | 3   | 92.518mb -0.00%  | 3.367ms -6.02%   | ±1.11% -8.40%   |
| RowsBench         | bench_filter_on_10k        | 2    | 3   | 93.047mb -0.00%  | 15.470ms +1.07%  | ±0.31% +75.96%  |
| RowsBench         | bench_find_on_10k          | 2    | 3   | 93.047mb -0.00%  | 15.446ms +2.90%  | ±0.79% -36.52%  |
| RowsBench         | bench_find_one_on_10k      | 10   | 3   | 91.736mb -0.00%  | 1.806μs +0.34%   | ±2.57% +0.00%   |
| RowsBench         | bench_first_on_10k         | 10   | 3   | 91.736mb -0.00%  | 0.400μs 0.00%    | ±0.00% 0.00%    |
| RowsBench         | bench_flat_map_on_1k       | 2    | 3   | 100.796mb -0.00% | 14.180ms +0.40%  | ±1.01% +88.30%  |
| RowsBench         | bench_map_on_10k           | 2    | 3   | 130.223mb -0.00% | 67.905ms +0.19%  | ±0.70% +63.82%  |
| RowsBench         | bench_merge_1k_on_10k      | 2    | 3   | 93.567mb -0.00%  | 1.239ms +0.43%   | ±2.34% -27.62%  |
| RowsBench         | bench_partition_by_on_10k  | 2    | 3   | 96.936mb -0.00%  | 60.916ms +1.98%  | ±0.53% -14.16%  |
| RowsBench         | bench_remove_on_10k        | 2    | 3   | 94.619mb -0.00%  | 3.438ms -1.11%   | ±0.31% -86.45%  |
| RowsBench         | bench_sort_asc_on_1k       | 2    | 3   | 92.097mb -0.00%  | 39.617ms +0.42%  | ±0.28% -79.84%  |
| RowsBench         | bench_sort_by_on_1k        | 2    | 3   | 92.098mb -0.00%  | 39.762ms -0.48%  | ±0.40% -36.23%  |
| RowsBench         | bench_sort_desc_on_1k      | 2    | 3   | 92.097mb -0.00%  | 40.099ms +0.96%  | ±0.74% +69.12%  |
| RowsBench         | bench_sort_entries_on_1k   | 2    | 3   | 94.179mb -0.00%  | 7.926ms +1.55%   | ±0.07% -89.47%  |
| RowsBench         | bench_sort_on_1k           | 2    | 3   | 91.929mb -0.00%  | 29.321ms +0.46%  | ±1.13% -7.78%   |
| RowsBench         | bench_take_1k_on_10k       | 10   | 3   | 91.736mb -0.00%  | 14.217μs +2.61%  | ±1.53% -49.08%  |
| RowsBench         | bench_take_right_1k_on_10k | 10   | 3   | 91.736mb -0.00%  | 15.460μs +0.25%  | ±1.85% -46.58%  |
| RowsBench         | bench_unique_on_1k         | 2    | 3   | 110.854mb -0.00% | 243.017ms +1.51% | ±0.36% -52.74%  |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
Parquet Library
+--------------------+---------------------------------+------+-----+------------------+-------------------+------------------+
| benchmark          | subject                         | revs | its | mem_peak         | mode              | rstdev           |
+--------------------+---------------------------------+------+-----+------------------+-------------------+------------------+
| ParquetReaderBench | bench_page_headers              | 1    | 3   | 6.670mb -0.01%   | 3.317s -0.62%     | ±0.51% -25.60%   |
| ParquetReaderBench | bench_read_metadata             | 1    | 3   | 5.354mb -0.01%   | 18.153ms -0.80%   | ±0.34% +37.43%   |
| ParquetReaderBench | bench_read_schema               | 1    | 3   | 5.354mb -0.01%   | 18.148ms -0.90%   | ±0.35% +96.75%   |
| ParquetReaderBench | bench_read_values_all_columns   | 1    | 3   | 9.104mb -0.21%   | 5.618s -28.13%    | ±0.64% +137.41%  |
| ParquetReaderBench | bench_read_values_single_column | 1    | 3   | 6.402mb -0.30%   | 234.508ms -48.87% | ±0.62% -15.59%   |
| ParquetReaderBench | bench_read_values_with_limit    | 1    | 3   | 6.932mb -0.46%   | 29.025ms -13.85%  | ±0.53% +123.05%  |
| ParquetWriterBench | bench_write_batch               | 1    | 3   | 11.722mb -14.46% | 192.390ms -13.43% | ±0.60% +155.82%  |
| ParquetWriterBench | bench_write_gzip                | 1    | 3   | 10.347mb +0.01%  | 219.252ms +1.32%  | ±0.47% -8.28%    |
| ParquetWriterBench | bench_write_row_by_row          | 1    | 3   | 11.722mb -14.46% | 188.788ms -15.11% | ±0.85% +94.11%   |
| ParquetWriterBench | bench_write_snappy              | 1    | 3   | 11.722mb -14.46% | 194.663ms -12.41% | ±1.19% +1058.55% |
| ParquetWriterBench | bench_write_uncompressed        | 1    | 3   | 10.022mb +0.01%  | 191.304ms +1.52%  | ±1.26% -29.30%   |
+--------------------+---------------------------------+------+-----+------------------+-------------------+------------------+

When column type is passed to constructor, method generating sql casted
parametrs will prioritize it over detecting column type by executing sql
query.
@norberttech norberttech force-pushed the 1713-proposal-bulk-data-parameters branch from 591df98 to fed0744 Compare July 20, 2025 11:21
@norberttech norberttech requested a review from stloyd July 20, 2025 11:36
@norberttech norberttech merged commit 13ad610 into 1.x Jul 20, 2025
21 checks passed
@norberttech norberttech deleted the 1713-proposal-bulk-data-parameters branch July 20, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Proposal]: Bulk Data Parameters

2 participants