rdblue commented on code in PR #9102: URL: https://github.com/apache/iceberg/pull/9102#discussion_r1398492074
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkTable.java: ########## @@ -327,12 +331,9 @@ private boolean canDeleteUsingMetadata(Expression deleteExpr) { .filter(deleteExpr) .caseSensitive(caseSensitive) .includeColumnStats() + .useRef(branch()) .ignoreResiduals(); - if (branch != null) { - scan.useRef(branch); - } Review Comment: I think it would be better to use `scan = scan.useRef(branch)` instead of explicitly passing `"main"`. I'm concerned about relying on `useRef` with an explicit main branch hiding problems with not calling `useRef` at all. -- 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