Skip to content

Commit

Permalink
Dont show change icon if one side is not profiled
Browse files Browse the repository at this point in the history
Signed-off-by: popcorny <[email protected]>
  • Loading branch information
popcornylu committed Aug 15, 2023
1 parent 7ac474c commit 7d6dfed
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions static_report/src/utils/dbt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,21 +185,27 @@ export function compareColumn(
return 'col_added';
} else if (!target) {
return 'col_removed';
} else if (base.schema_type !== target?.schema_type) {
} else if (
base.schema_type &&
target.schema_type &&
base.schema_type !== target.schema_type
) {
return 'col_changed';
}

// value change
if (base?.nulls !== target?.nulls) {
return 'col_changed';
}
if (base?.nulls !== undefined && target?.nulls !== undefined) {
if (base?.nulls !== target?.nulls) {
return 'col_changed';
}

if (base?.distinct !== target?.distinct) {
return 'col_changed';
}
if (base?.distinct !== target?.distinct) {
return 'col_changed';
}

if (base?.duplicates !== target?.duplicates) {
return 'col_changed';
if (base?.duplicates !== target?.duplicates) {
return 'col_changed';
}
}
}

Expand Down

0 comments on commit 7d6dfed

Please sign in to comment.