in polaris-synchronizer/api/src/main/java/org/apache/polaris/tools/sync/polaris/planning/ModificationAwarePlanner.java [353:377]
public SynchronizationPlan<GrantResource> planGrantSync(
String catalogName,
String catalogRoleName,
List<GrantResource> grantsOnSource,
List<GrantResource> grantsOnTarget) {
FilteredNotModifiedEntityResult<GrantResource> result = filterOutEntitiesNotModified(
grantsOnSource,
grantsOnTarget,
grant -> grant,
GrantResource::equals
);
SynchronizationPlan<GrantResource> delegatedPlan =
delegate.planGrantSync(
catalogName,
catalogRoleName,
result.filteredEntitiesSource(),
result.filteredEntitiesTarget());
for (GrantResource grant : result.notModifiedEntities()) {
delegatedPlan.skipEntityNotModified(grant);
}
return delegatedPlan;
}