Skip to content

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

Open
achandel-01 wants to merge 1 commit intoapache:masterfrom
achandel-01:ATLAS-5274
Open

ATLAS-5274: [Impala Hook] Self-referencing INSERT OVERWRITE produces …#605
achandel-01 wants to merge 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
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.

2 participants