MaxGekk opened a new pull request #27078: [SPARK-30409][SQL][TESTS] Use `NoOp` 
datasource in SQL benchmarks
URL: https://github.com/apache/spark/pull/27078
 
 
   ### What changes were proposed in this pull request?
   In the PR, I propose to replace `.collect()`, `.count()` and `.foreach(_ => 
())` in SQL benchmarks and use the `NoOp` datasource. I added an implicit class 
to `SqlBasedBenchmark` with the `.noop()` method. It can be used in benchmark 
like: `ds.noop()`. The last one is unfolded to 
`ds.write.format("noop").mode(Overwrite).save()`. 
   
   ### Why are the changes needed?
   To avoid additional overhead that `collect()` (and other actions) has. For 
example, `.collect()` has to convert values according to external types and 
pull data to the driver. This can hide actual performance regressions or 
improvements of benchmarked operations.
   
   ### Does this PR introduce any user-facing change?
   No
   
   ### How was this patch tested?
   I run one of benchmark to check `.noop()` is applied and it doesn't fail:
   ```
   $ SPARK_GENERATE_BENCHMARK_FILES=1 build/sbt "sql/test:runMain 
org.apache.spark.sql.execution.benchmark.UDFBenchmark"
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to