xiaozcy commented on code in PR #7674:
URL: https://github.com/apache/gravitino/pull/7674#discussion_r2209491563
##########
core/src/main/java/org/apache/gravitino/listener/api/info/ModelVersionInfo.java:
##########
@@ -83,21 +84,53 @@ public ModelVersionInfo(
Map<String, String> properties,
String[] aliases,
Audit auditInfo) {
- this.uri = uri;
+ this.uris =
+ uri == null ? Collections.emptyMap() :
ImmutableMap.of(ModelVersion.URI_NAME_UNKNOWN, uri);
+ this.properties = properties == null ? ImmutableMap.of() :
ImmutableMap.copyOf(properties);
+ this.comment = Optional.ofNullable(comment);
+ this.audit = Optional.ofNullable(auditInfo);
+ this.aliases = Optional.ofNullable(aliases);
+ }
+ /**
+ * Constructs a {@link ModelVersionInfo} instance based on given URIs,
comment, properties,
+ * aliases, and audit information.
+ *
+ * @param uris The URIs of the model version.
+ * @param comment The comment of the model version.
+ * @param properties The properties of the model version.
+ * @param aliases The aliases of the model version.
+ * @param auditInfo The audit information of the model version.
+ */
+ public ModelVersionInfo(
+ Map<String, String> uris,
+ String comment,
+ Map<String, String> properties,
+ String[] aliases,
+ Audit auditInfo) {
+ this.uris = uris;
Review Comment:
Yes, it will be done in the next PR.
--
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]