amogh-jahagirdar commented on code in PR #7626:
URL: https://github.com/apache/iceberg/pull/7626#discussion_r1195867054


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/SparkScanBuilder.java:
##########
@@ -222,12 +222,19 @@ public boolean pushAggregation(Aggregation aggregation) {
     }
 
     TableScan scan = table.newScan().includeColumnStats();
-    Snapshot snapshot = readSnapshot();
-    if (snapshot == null) {
-      LOG.info("Skipping aggregate pushdown: table snapshot is null");
+    if (readConf.startSnapshotId() == null) {

Review Comment:
   Nit: Can we move this check to the existing `canPushDownAggregation` helper 
method (and return false in case `readConf.startSnapshotId() != null`). 
Non-blocking but seems to follow the existing pattern a bit better and I 
anticipate it will be a smaller change



-- 
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]

Reply via email to