You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "ChristinaTech (via GitHub)" <gi...@apache.org> on 2023/05/19 18:41:51 UTC

[GitHub] [iceberg] ChristinaTech commented on a diff in pull request #7636: Support Aggregate push down for incremental scan

ChristinaTech commented on code in PR #7636:
URL: https://github.com/apache/iceberg/pull/7636#discussion_r1199251036


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/SparkScanBuilder.java:
##########
@@ -221,15 +221,7 @@ public boolean pushAggregation(Aggregation aggregation) {
       return false;
     }
 
-    TableScan scan = table.newScan().includeColumnStats();
-    Snapshot snapshot = readSnapshot();
-    if (snapshot == null) {
-      LOG.info("Skipping aggregate pushdown: table snapshot is null");
-      return false;
-    }
-    scan = scan.useSnapshot(snapshot.snapshotId());
-    scan = configureSplitPlanning(scan);
-    scan = scan.filter(filterExpression());
+    org.apache.iceberg.Scan scan = buildIcebergBatchScan(true);

Review Comment:
   Please modify boolean parameters you are passing with an inline comment to follow the [Contributing Style Guidelines on Boolean Arguments](https://github.com/apache/iceberg/blob/master/CONTRIBUTING.md#boolean-arguments)
   



##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/SparkScanBuilder.java:
##########
@@ -188,6 +187,7 @@ public Filter[] pushedFilters() {
   }
 
   @Override
+  @SuppressWarnings("checkstyle:CyclomaticComplexity")

Review Comment:
   You have removed a decent amount of the branch points that were added in the prior commit that made this `SuppressWarnings` necessary. Can you see if its still needed after the most recent refactoring?



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org