Skip to content

Commit e7d7156

Browse files
authored
fix(lineage): Use lineage viz methods when ignoreAsHops is specified (#15171)
1 parent 8ee03b4 commit e7d7156

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

metadata-io/src/main/java/com/linkedin/metadata/search/LineageSearchService.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -952,9 +952,17 @@ private boolean enableCache(@Nullable final SearchFlags searchFlags) {
952952
}
953953

954954
private static boolean isLineageVisualization(@Nullable LineageFlags lineageFlags) {
955-
return lineageFlags != null
956-
&& lineageFlags.getEntitiesExploredPerHopLimit() != null
957-
&& lineageFlags.getEntitiesExploredPerHopLimit() > 0;
955+
if (lineageFlags == null) {
956+
return false;
957+
}
958+
959+
boolean hasEntitiesExploredLimit =
960+
lineageFlags.getEntitiesExploredPerHopLimit() != null
961+
&& lineageFlags.getEntitiesExploredPerHopLimit() > 0;
962+
boolean hasIgnoreAsHops =
963+
lineageFlags.getIgnoreAsHops() != null && !lineageFlags.getIgnoreAsHops().isEmpty();
964+
965+
return hasEntitiesExploredLimit || hasIgnoreAsHops;
958966
}
959967

960968
private EntityLineageResult getLineageResult(

0 commit comments

Comments
 (0)