jerryshao commented on code in PR #7037:
URL: https://github.com/apache/gravitino/pull/7037#discussion_r2065323680
##########
api/src/main/java/org/apache/gravitino/model/ModelVersionChange.java:
##########
@@ -71,6 +80,19 @@ static ModelVersionChange updateUri(String newUri) {
return new ModelVersionChange.UpdateUri(newUri);
}
+ /**
+ * Create a ModelVersionChange for updating the aliases of a model version.
+ *
+ * @param aliasesToAdd The new aliases to be added for the model version.
+ * @param aliasesToDelete The aliases to be removed from the model version.
+ * @return A new ModelVersionChange instance for updating the aliases of a
model version.
+ */
+ static ModelVersionChange updateAliases(String[] aliasesToAdd, String[]
aliasesToDelete) {
+ return new UpdateAliases(
+ Arrays.stream(aliasesToAdd).collect(Collectors.toList()),
+ Arrays.stream(aliasesToDelete).collect(Collectors.toList()));
Review Comment:
I guess there'll be an issue if `aliasesToAdd` or `aliasesToDelete` is null?
--
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]