datafaker-net / datafaker

Generating fake data for the JVM (Java, Kotlin, Groovy) has never been easier!
https://www.datafaker.net
Apache License 2.0
1.09k stars 151 forks source link

Add multi-row/batch insert for Spark SQL #1284

Closed gatear closed 2 days ago

gatear commented 6 days ago

I was mistaken on the first PR https://github.com/datafaker-net/datafaker/pull/1261

Spark SQL supports multi-row inserts https://spark.apache.org/docs/3.0.0-preview/sql-ref-syntax-dml-insert-into.html

Validated on Databricks that the following statement is accepted.

INSERT INTO `MY_TABLE` (`field1`, `field2`)
VALUES ('value1', 'value2'),
       ('value1', 'value2'),
       ('value1', 'value2'),
       ...
what-the-diff[bot] commented 6 days ago

PR Summary

codecov-commenter commented 6 days ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.96%. Comparing base (b37c566) to head (bf40361). Report is 206 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1284 +/- ## ============================================ - Coverage 92.35% 91.96% -0.39% - Complexity 2821 3085 +264 ============================================ Files 292 310 +18 Lines 5609 6025 +416 Branches 599 628 +29 ============================================ + Hits 5180 5541 +361 - Misses 275 332 +57 + Partials 154 152 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kingthorin commented 6 days ago

Some tests are failing.

gatear commented 2 days ago

@kingthorin it's ready for review