Subham-KRLX commented on code in PR #4190:
URL: https://github.com/apache/polaris/pull/4190#discussion_r3323258405
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -2700,6 +2756,30 @@ private Page<TableIdentifier> listTableLike(
.map(record -> TableIdentifier.of(parentNamespace, record.getName()));
}
+ private Optional<PolarisEntitySubType> conflictingTableLikeSubtype(
+ List<PolarisEntity> catalogPath, String entityName) {
+ for (PolarisEntitySubType subType :
+ List.of(PolarisEntitySubType.ICEBERG_TABLE,
PolarisEntitySubType.ICEBERG_VIEW)) {
Review Comment:
Backend level enforcement would be ideal for atomicity but the current
approach follows the same read before write pattern already used for table ↔
view collision checks in doCommit on main for the two readEntityByName calls
can reduce to a single lookup using ANY_SUBTYPE with TABLE_LIKE Let me know if
you would prefer that optimization here with backend enforcement as a follow up
or the full refactor in this 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]