ayushtkn commented on code in PR #5134:
URL: https://github.com/apache/polaris/pull/5134#discussion_r3648670729
##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcBasePersistenceImpl.java:
##########
@@ -415,11 +452,20 @@ public void deleteAll(@NonNull PolarisCallContext
callCtx) {
@Override
public PolarisBaseEntity lookupEntity(
@NonNull PolarisCallContext callCtx, long catalogId, long entityId, int
typeCode) {
- Map<String, Object> params =
- Map.of("catalog_id", catalogId, "id", entityId, "type_code", typeCode,
"realm_id", realmId);
return getPolarisBaseEntity(
QueryGenerator.generateSelectQuery(
- ModelEntity.getAllColumnNames(schemaVersion),
ModelEntity.TABLE_NAME, params));
+ ModelEntity.getAllColumnNames(schemaVersion),
+ ModelEntity.TABLE_NAME,
+ entityKeyParams(catalogId, entityId, typeCode)));
+ }
+
+ /** WHERE-clause parameters that uniquely identify a single entity row
within this realm. */
+ private Map<String, Object> entityKeyParams(long catalogId, long entityId,
int typeCode) {
+ return Map.of(
+ "catalog_id", catalogId,
+ "id", entityId,
+ "type_code", typeCode,
+ "realm_id", realmId);
Review Comment:
Thanx @flyrain, have made the suggested change
--
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]