yuqi1129 commented on code in PR #5757:
URL: https://github.com/apache/gravitino/pull/5757#discussion_r1872942928
##########
common/src/main/java/org/apache/gravitino/dto/requests/CatalogCreateRequest.java:
##########
@@ -79,6 +81,17 @@ public CatalogCreateRequest(
this.properties = properties;
}
+ /**
+ * Sets the provider of the catalog.
+ *
+ * @param provider The provider of the catalog.
+ */
+ @JsonSetter(value = "provider")
+ public void setProvider(String provider) {
+ this.provider =
+ StringUtils.isNotBlank(provider) ? provider :
CatalogProvider.builtinShortName(type);
Review Comment:
This makes sense, but it can't cover some cases. For instance, if users set
the type = 'relational' and `provider`= 'null', then the final error will be
very misleading, and users may have a problem finding what's wrong.
<img width="1528" alt="image"
src="https://github.com/user-attachments/assets/8e18e1b6-8a12-471f-9c0f-c4680c82ba64">
<img width="1931" alt="image"
src="https://github.com/user-attachments/assets/8328f656-168e-47e7-bfa8-e2e9d896bf16">
The full stack and error message is as the picture above. @jerryshao
--
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]