flyrain commented on code in PR #2262:
URL: https://github.com/apache/polaris/pull/2262#discussion_r2258375116
##########
polaris-core/src/main/java/org/apache/polaris/core/entity/EntityNameLookupRecord.java:
##########
@@ -89,14 +89,14 @@ public EntityNameLookupRecord(
this.subTypeCode = subTypeCode;
}
- /** Constructor to create the object with provided entity */
- public EntityNameLookupRecord(PolarisBaseEntity entity) {
- this.catalogId = entity.getCatalogId();
- this.id = entity.getId();
- this.parentId = entity.getParentId();
- this.typeCode = entity.getTypeCode();
- this.name = entity.getName();
- this.subTypeCode = entity.getSubTypeCode();
+ public static EntityNameLookupRecord fromEntity(PolarisBaseEntity entity) {
Review Comment:
I'm fine to add a new static method like this. I'd suggest to deprecate the
constructor first and remove it later if we don't need it.
--
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]