mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-27 16:55:06 +00:00
MINOR: fix getter for failed rows sample (#16796)
* deep copy the returned test case * added comment about deep copy * use JsonUtils.deepCopy
This commit is contained in:
parent
7ddd8d7938
commit
80653c6988
@ -790,6 +790,8 @@ public class TestCaseRepository extends EntityRepository<TestCase> {
|
|||||||
"failedRowsSample",
|
"failedRowsSample",
|
||||||
JsonUtils.pojoToJson(tableData));
|
JsonUtils.pojoToJson(tableData));
|
||||||
setFieldsInternal(testCase, Fields.EMPTY_FIELDS);
|
setFieldsInternal(testCase, Fields.EMPTY_FIELDS);
|
||||||
|
// deep copy the test case to avoid updating the cached entity
|
||||||
|
testCase = JsonUtils.deepCopy(testCase, TestCase.class);
|
||||||
return testCase.withFailedRowsSample(tableData);
|
return testCase.withFailedRowsSample(tableData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -999,7 +1001,7 @@ public class TestCaseRepository extends EntityRepository<TestCase> {
|
|||||||
Entity.TABLE, table.getColumns(), table.getFullyQualifiedName(), true);
|
Entity.TABLE, table.getColumns(), table.getFullyQualifiedName(), true);
|
||||||
List<TagLabel> tags = daoCollection.tagUsageDAO().getTags(table.getFullyQualifiedName());
|
List<TagLabel> tags = daoCollection.tagUsageDAO().getTags(table.getFullyQualifiedName());
|
||||||
table.setTags(tags);
|
table.setTags(tags);
|
||||||
return maskSampleData(testCase.getFailedRowsSample(), table, table.getColumns());
|
return maskSampleData(sampleData, table, table.getColumns());
|
||||||
}
|
}
|
||||||
return sampleData;
|
return sampleData;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user