This is an automated email from the ASF dual-hosted git repository.
yuqi4733 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new 8aff98d980 [#8110] Improvement: Equality check in equals method in
FileSetCatalogOperations.java (#8132)
8aff98d980 is described below
commit 8aff98d980b5c5569011c77159bcb71215eefb48
Author: Raj Gupta <[email protected]>
AuthorDate: Mon Aug 18 11:43:37 2025 +0530
[#8110] Improvement: Equality check in equals method in
FileSetCatalogOperations.java (#8132)
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
Examples:
- "[#123] feat(operator): support xxx"
- "[#233] fix: check null before access result in xxx"
- "[MINOR] refactor: fix typo in variable name"
- "[MINOR] docs: fix typo in README"
- "[#255] test: fix flaky test NameOfTheTest"
Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->
### What changes were proposed in this pull request?
- Fixed a bug in the `equals` method where `scheme` was incorrectly
compared to `that.authority`.
- Updated the logic to correctly compare `scheme` with `that.scheme`
### Why are the changes needed?
This fix ensures object equality is consistent and accurate.
Fix: #8110
### Does this PR introduce _any_ user-facing change?
- No user-facing changes.
- This fix only corrects the internal equality logic.
### How was this patch tested?
Verified that objects with different `scheme` values are not considered
equal.
---
.../org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java
b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java
index 9f67123aa0..68297bb7cb 100644
---
a/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java
+++
b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java
@@ -187,7 +187,7 @@ public class FilesetCatalogOperations extends
ManagedSchemaOperations
}
FileSystemCacheKey that = (FileSystemCacheKey) o;
return conf.equals(that.conf)
- && (scheme == null ? that.authority == null :
scheme.equals(that.scheme))
+ && (scheme == null ? that.scheme == null :
scheme.equals(that.scheme))
&& (authority == null ? that.authority == null :
authority.equals(that.authority))
&& currentUser.equals(that.currentUser);
}