roryqi commented on code in PR #10874:
URL: https://github.com/apache/gravitino/pull/10874#discussion_r3161141587
##########
core/src/main/java/org/apache/gravitino/storage/relational/service/SchemaMetaService.java:
##########
@@ -185,7 +198,8 @@ public void insertSchema(SchemaEntity schemaEntity, boolean
overwrite) throws IO
baseMetricName = "updateSchema")
public <E extends Entity & HasIdentifier> SchemaEntity updateSchema(
NameIdentifier identifier, Function<E, E> updater) throws IOException {
- SchemaPO oldSchemaPO = getSchemaPOByIdentifier(identifier);
+ // Use physical identifier for DB lookup; expose logical entity to the
updater.
+ SchemaPO oldSchemaPO =
getSchemaPOByIdentifier(toPhysicalIdentifier(identifier));
SchemaEntity oldSchemaEntity = POConverters.fromSchemaPO(oldSchemaPO,
identifier.namespace());
SchemaEntity newEntity = (SchemaEntity) updater.apply((E) oldSchemaEntity);
Review Comment:
Accepted.
--
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]