-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#3190] fix(jdbc-backend): Fix the cast issue when Relational Garbage…
… Collector cleaning fileset version info (#3191) ### What changes were proposed in this pull request? When obtaining the maximum version result of fileset, pass the result into the object to solve the `ClassCastException` problem. ### Why are the changes needed? Fix: #3190 ### How was this patch tested? Add some ITs. --------- Co-authored-by: xiaojiebao <[email protected]>
- Loading branch information
Showing
7 changed files
with
306 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
core/src/main/java/com/datastrato/gravitino/storage/relational/po/FilesetMaxVersionPO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2024 Datastrato Pvt Ltd. | ||
* This software is licensed under the Apache License version 2. | ||
*/ | ||
package com.datastrato.gravitino.storage.relational.po; | ||
|
||
import com.google.common.base.Objects; | ||
|
||
public class FilesetMaxVersionPO { | ||
private Long filesetId; | ||
private Long version; | ||
|
||
public Long getFilesetId() { | ||
return filesetId; | ||
} | ||
|
||
public Long getVersion() { | ||
return version; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (!(o instanceof FilesetMaxVersionPO)) return false; | ||
FilesetMaxVersionPO that = (FilesetMaxVersionPO) o; | ||
return Objects.equal(getFilesetId(), that.getFilesetId()) | ||
&& Objects.equal(getVersion(), that.getVersion()); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hashCode(getFilesetId(), getVersion()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.