aokolnychyi commented on code in PR #11131: URL: https://github.com/apache/iceberg/pull/11131#discussion_r1802191850
########## core/src/main/java/org/apache/iceberg/ManifestFilterManager.java: ########## @@ -340,7 +362,22 @@ private ManifestFile filterManifest(Schema tableSchema, ManifestFile manifest) { } } + @SuppressWarnings("checkstyle:CyclomaticComplexity") Review Comment: This method gets too complicated. What about refactoring it like this? ``` private boolean canContainDeletedFiles(ManifestFile manifest) { return canContainDropBySeq(manifest) || canContainExpressionDeletes(manifest) || canContainDroppedPartitions(manifest) || canContainDroppedFiles(manifest); } ``` Where `canContainDroppedFiles` would contain the new logic (just an example): ``` private boolean canContainDroppedFiles(ManifestFile manifest) { if (deleteFileManifests.contains(manifest.path()) || !deletePaths.isEmpty()) { return true; } else if (allDeletesReferenceManifests && trustReferencedManifests) { return false; } else { return ManifestFileUtil.canContainAny(manifest, deleteFilePartitions, specsById); } } ``` -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org