feat: add column-level lineage to the OpenLineage#19643
Open
mshahid6 wants to merge 2 commits into
Open
Conversation
FrankChen021
reviewed
Jul 1, 2026
FrankChen021
left a comment
Member
There was a problem hiding this comment.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 0 |
| P2 | 3 |
| P3 | 0 |
| Total | 3 |
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 0 |
| P2 | 3 |
| P3 | 0 |
| Total | 3 |
Found 3 issues.
Reviewed 5 of 5 changed files.
This is an automated review by Codex GPT-5.5
Contributor
|
Drive-by comment: if we can, I'd like to expose this column extraction logic within Druid itself. A few reasons for this:
|
Contributor
|
@gianm @clintropolis would like to get your thoughts here on the column extraction logic – do we want to make use of any Calcite functionality here? |
FrankChen021
reviewed
Jul 3, 2026
FrankChen021
left a comment
Member
There was a problem hiding this comment.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 0 |
| P2 | 2 |
| P3 | 0 |
| Total | 2 |
Reviewed 8 of 8 changed files.
Found 2 issues in the updated lineage implementation. The prior datasource-filter and filtered-aggregator concerns look addressed.
This is an automated review by Codex GPT-5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #19314
Description
Builds on #19107 (the OpenLineage request-logger extension) to add column-level lineage for native queries. Each input dataset now carries which columns the query referenced and how they were used.
Two facets are attached per input dataset:
schema— the standard OpenLineageSchemaDatasetFacetlisting the referenced input column names (names only, sorted).druid_columnUsage— a Druid-specific dataset facet mapping each referenced column to the role(s) it was used in:PROJECTION,GROUP_BY,AGGREGATION,FILTER,JOIN.Validated in docker:
SELECT page, "user" FROM wikipedia WHERE countryName = '…' LIMIT 10scanpage=PROJECTION, user=PROJECTION, countryName=FILTERSELECT countryName, SUM(added) FROM wikipedia WHERE channel = '…' GROUP BY countryNamegroupBycountryName=GROUP_BY, added=AGGREGATION, channel=FILTERSELECT page, SUM(added) s FROM wikipedia GROUP BY page ORDER BY s DESC LIMIT 5topNpage=GROUP_BY, added=AGGREGATIONSELECT SUM(added) FROM wikipedia WHERE isRobot = 'false'timeseriesadded=AGGREGATION, isRobot=FILTERSELECT w1.page, w2.channel FROM wikipedia w1 JOIN wikipedia w2 ON w1.page = w2.page WHERE w1.countryName = '…'scan(join)page=[PROJECTION, JOIN], channel=PROJECTION, countryName=FILTER— right-sidew2.channelcorrectly un-prefixedSELECT countryName FROM (SELECT countryName, SUM(added) s FROM wikipedia GROUP BY countryName) GROUP BY countryNamegroupBycountryName=GROUP_BY— no fabricated sub-query-output columnsExample emitted facets for the join query's input dataset:
Release note
The OpenLineage emitter now emits column-level lineage for native queries as
schemaanddruid_columnUsagefacets on input datasets. This can be disabled withdruid.request.logging.columnLineageEnabled=false.Key changed/added classes in this PR
OpenLineageRequestLoggerOpenLineageRequestLoggerProviderDruidColumnUsageDatasetFacet.jsonThis PR has: