xloya commented on a change in pull request #3724:
URL: https://github.com/apache/iceberg/pull/3724#discussion_r768262329
##########
File path:
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/actions/Spark3BinPackStrategy.java
##########
@@ -67,6 +68,11 @@ public Table table() {
.option(SparkReadOptions.FILE_OPEN_COST, "0")
.load(table.name());
+ // If got 0 pieces of data, no need write new data file, should return
to expire the data file
+ if (scanDF.count() == 0) {
Review comment:
After reading it, I did not consider the cost of `count()` in spark,
maybe another way should be considered
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]