venkateshwaracholan commented on code in PR #4602:
URL: https://github.com/apache/polaris/pull/4602#discussion_r3370065034
##########
polaris-core/src/testFixtures/java/org/apache/polaris/core/persistence/PolarisTestMetaStoreManager.java:
##########
@@ -1209,16 +1209,18 @@ boolean isPolicyMappingRecordExists(
PolarisBaseEntity target,
PolicyEntity policy,
Map<String, String> parameters) {
- PolarisPolicyMappingRecord expected =
- new PolarisPolicyMappingRecord(
- target.getCatalogId(),
- target.getId(),
- policy.getCatalogId(),
- policy.getId(),
- policy.getPolicyTypeCode(),
- parameters);
+ Map<String, String> expectedParameters = parameters == null ? Map.of() :
parameters;
long policyMappingCount =
- policyMappingRecords.stream().filter(record ->
expected.equals(record)).count();
+ policyMappingRecords.stream()
+ .filter(
+ record ->
+ record.getPolicyCatalogId() == policy.getCatalogId()
Review Comment:
Similar rationale here. The semantic comparator compares parsed JSON content
rather than serialized JSON strings so the assertions remain stable across
JSONB backends.
--
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]