Repository navigation
Fix column filtering on Lineage - #25353
Conversation
| ColumnMetadataCache cache = new ColumnMetadataCache(); | ||
| AtomicInteger batchFetches = new AtomicInteger(); | ||
| AtomicInteger fallbackFetches = new AtomicInteger(); |
There was a problem hiding this comment.
This test uses AtomicInteger but the diff snippet does not show an import being added for it. Ensure java.util.concurrent.atomic.AtomicInteger is imported, otherwise the test file won't compile.
| description = | ||
| "Column-level lineage filter. Supports filtering by column names, tags, or glossary terms (e.g., 'columnName:customer_id', 'tag:PII', 'glossary:BusinessTerm')") | ||
| @QueryParam("columnFilter") | ||
| @QueryParam("column_filter") |
There was a problem hiding this comment.
This changes public query parameter names from columnFilter/preservePaths to column_filter/preserve_paths for existing endpoints, which is a breaking API change for clients that still send camelCase params. To avoid breaking existing integrations, consider accepting both names (e.g., support both @QueryParam(\"columnFilter\") and @QueryParam(\"column_filter\") and coalesce), or provide a deprecation window.
| description = | ||
| "When true, preserves all nodes in the path to filtered results. When false, only returns nodes matching the filter. Default is true.") | ||
| @QueryParam("preservePaths") | ||
| @QueryParam("preserve_paths") |
There was a problem hiding this comment.
This changes public query parameter names from columnFilter/preservePaths to column_filter/preserve_paths for existing endpoints, which is a breaking API change for clients that still send camelCase params. To avoid breaking existing integrations, consider accepting both names (e.g., support both @QueryParam(\"columnFilter\") and @QueryParam(\"column_filter\") and coalesce), or provide a deprecation window.
| public String getLineageByEntityCount( | ||
| String fqn, | ||
| String direction, | ||
| int from, | ||
| int size, | ||
| Integer nodeDepth, | ||
| int maxDepth, | ||
| boolean includeDeleted, | ||
| String queryFilter, | ||
| String columnFilter, | ||
| String entityType) |
There was a problem hiding this comment.
The server-side entity-count endpoint now supports additional toggles (preserve_paths, include_pagination_info, and also upstream/downstream depth inputs). The SDK wrapper doesn’t expose these new parameters, which makes the new capability inaccessible via the SDK and can force consumers to drop down to raw HTTP. Consider adding overloads/params to cover the new query params so the SDK remains feature-complete with the REST API.
| Map<String, Object> entityDoc = entityFetcher.fetchEntity(parentFqn); | ||
| extractColumnMetadata(parentFqn, entityDoc, entry.getValue()); | ||
| loadedParentFqns.add(parentFqn); | ||
| } catch (Exception e) { |
There was a problem hiding this comment.
entityFetcher.fetchEntity(parentFqn) can return null (or an empty/malformed document) in some implementations; extractColumnMetadata(...) will then throw a NullPointerException. Add a null guard (similar to the batch-loading path) and skip/mark the parent as loaded or log accordingly to avoid repeated failing fetches.
| Map<String, Object> entityDoc = entityFetcher.fetchEntity(parentFqn); | |
| extractColumnMetadata(parentFqn, entityDoc, entry.getValue()); | |
| loadedParentFqns.add(parentFqn); | |
| } catch (Exception e) { | |
| Map<String, Object> entityDoc = entityFetcher.fetchEntity(parentFqn); | |
| if (nullOrEmpty(entityDoc)) { | |
| LOG.warn("Skipping metadata load for parent entity {} because no entity document was returned", parentFqn); | |
| loadedParentFqns.add(parentFqn); | |
| continue; | |
| } | |
| extractColumnMetadata(parentFqn, entityDoc, entry.getValue()); | |
| loadedParentFqns.add(parentFqn); | |
| } catch (Exception e) { | |
| loadedParentFqns.add(parentFqn); |
| @Slf4j | ||
| public class LineageUtil { |
There was a problem hiding this comment.
With Lombok @Slf4j, the generated logger is log, not LOG. If this class doesn’t already define a LOG field elsewhere, this won’t compile. Align by either using the Lombok-generated log consistently, or remove @Slf4j and keep the existing logger pattern.
Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Gitar
|
|
|
Failed to cherry-pick changes to the 1.12.5 branch. |



Describe your changes:
Fix #24246
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
This will update automatically on new commits.