Repository navigation
chore: Add PySpark-based benchmarks, starting with ETL example - #3065
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3065 +/- ##
============================================
+ Coverage 56.12% 59.50% +3.38%
- Complexity 976 1382 +406
============================================
Files 119 167 +48
Lines 11743 15524 +3781
Branches 2251 2575 +324
============================================
+ Hits 6591 9238 +2647
- Misses 4012 4989 +977
- Partials 1140 1297 +157 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| This script generates a parquet dataset with a realistic schema (100 columns | ||
| including deeply nested structs, arrays, and maps) for benchmarking shuffle | ||
| operations across Spark, Comet JVM, and Comet Native shuffle modes. |
There was a problem hiding this comment.
would be nice to see the generated schema example, it might be separate txt file, WDYT?
There was a problem hiding this comment.
The schema does get printed each time you run the script
| --conf spark.comet.exec.enabled=true \ | ||
| --conf spark.comet.exec.all.enabled=true \ | ||
| --conf spark.comet.exec.shuffle.enabled=true \ | ||
| --conf spark.comet.shuffle.mode=jvm \ |
There was a problem hiding this comment.
| --conf spark.comet.shuffle.mode=jvm \ |
this is hallucination
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
comphead
left a comment
There was a problem hiding this comment.
Thanks @andygrove this is a good start!
| ) | ||
|
|
||
| print(f"Generated schema with {len(df.columns)} columns") | ||
| df.printSchema() |
There was a problem hiding this comment.
👍 It's easier to check schema
| df.printSchema() | ||
|
|
||
| # Write as parquet | ||
| df.write.mode("overwrite").parquet(output_path) |
There was a problem hiding this comment.
(nit) We can add zstd compression if you want, not necessary though.
| " 'country', 'USA'," | ||
| " 'geo', named_struct(" | ||
| " 'lat', cast(id % 180 as double) - 90.0," | ||
| " 'lng', cast(id % 360 as double) - 180.0," |


Which issue does this PR close?
Closes #.
Rationale for this change
Add a realistic benchmark with a wide schema and nested types that can be run in a cluster, in an effort to track down reported issues of Comet producing larger shuffle files than Spark.
This is intended as a starting point for a full suite of standalone benchmarks to cover different use cases.
What changes are included in this PR?
ETL benchmark: read parquet, repartition, write parquet.
How are these changes tested?