szehon-ho commented on a change in pull request #3530:
URL: https://github.com/apache/iceberg/pull/3530#discussion_r746946061
##########
File path: core/src/main/java/org/apache/iceberg/deletes/Deletes.java
##########
@@ -261,7 +258,20 @@ public void close() {
@Override
protected boolean shouldKeep(T posDelete) {
- return CHARSEQ_COMPARATOR.compare(dataLocation, (CharSequence)
FILENAME_ACCESSOR.get(posDelete)) == 0;
+ return charSeqEquals(dataLocation, (CharSequence)
FILENAME_ACCESSOR.get(posDelete));
+ }
+
+ private boolean charSeqEquals(CharSequence s1, CharSequence s2) {
+ if (s1 == s2) {
+ return true;
+ }
+
+ int count = s1.length();
+ if (count != s2.length()) {
Review comment:
nit, no need for this 'count' variable if its just used once and if
s1.length() is not that complex?
--
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]