Skip to content

ATLAS-5274: [Impala Hook] Self-referencing INSERT OVERWRITE produces …#605

Merged
pinal-shah merged 1 commit intoapache:masterfrom
achandel-01:ATLAS-5274
Apr 28, 2026
Merged

ATLAS-5274: [Impala Hook] Self-referencing INSERT OVERWRITE produces …#605
pinal-shah merged 1 commit intoapache:masterfrom
achandel-01:ATLAS-5274

Conversation

@achandel-01
Copy link
Copy Markdown
Contributor

…impala_process with empty outputs[], breaking lineage

What changes were proposed in this pull request?

earlier for impala insert overwrite (DML QUERY) shows the wrong lineage graph :
image

now after these changes lineage will look like this :
image

explanation :
getEntities() walks inputNodes and outputNodes and fills the process’s inputs and outputs lists, using a single processedNames set to avoid duplicates. When the same table is both read and written (e.g. self-lineage / INSERT OVERWRITE into the table you read from), its qualified name appears in both node lists. The input loop runs first and registers that name in processedNames. The output loop then treats the name as “already processed” and skips adding that table to outputs, even though it is a real write target. The fix is to dedupe per side (separate sets for inputs vs outputs) so the same qualified name can appear in both inputs and outputs when the lineage says so.

How was this patch tested?

unit testing , mvn build

…impala_process with empty outputs[], breaking lineage
@pinal-shah pinal-shah merged commit d60238e into apache:master Apr 28, 2026
1 check passed
@achandel-01 achandel-01 deleted the ATLAS-5274 branch April 29, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants