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.16k stars 160 forks source link

Implement generate stream for SQL transformer #1264

Closed gatear closed 3 months ago

gatear commented 3 months ago

Generate a stream of SQL statements, support both singular and batch statements.

what-the-diff[bot] commented 3 months ago

PR Summary

gatear commented 3 months ago

@snuyanzin it's ready for review. This work is another critical item for my use-case with Spark.

After this change I'll follow-up on this https://github.com/datafaker-net/datafaker/pull/1261#issuecomment-2172615830 and show some useful examples for Spark.

Thanks 🙏

bodiam commented 3 months ago

@gatear This PR looks good to me, thank you for that, I think this should land in 2.3.0

Anyone else feedback?

kingthorin commented 3 months ago

It looks okay to me, but I honestly haven't worked with or on the Transformers at all.

snuyanzin commented 3 months ago

lgtm, i left a minor comment

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.92%. Comparing base (b37c566) to head (19c0147). Report is 170 commits behind head on main.

Files Patch % Lines
.../datafaker/transformations/sql/SqlTransformer.java 91.66% 2 Missing :warning:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1264 +/- ## ============================================ - Coverage 92.35% 91.92% -0.44% - Complexity 2821 3090 +269 ============================================ Files 292 310 +18 Lines 5609 6052 +443 Branches 599 636 +37 ============================================ + Hits 5180 5563 +383 - Misses 275 326 +51 - Partials 154 163 +9 ```

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