Skip to content

Commit

Permalink
fix ratio in constraint_message
Browse files Browse the repository at this point in the history
  • Loading branch information
Aigul9 authored Dec 6, 2023
1 parent 1fc09e1 commit 149d84b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ object ReferentialIntegrity extends ComparisonBase {
val referenceSparkCols = reference.select(referenceColumns.map(col): _*)
val mismatchCount = primarySparkCols.except(referenceSparkCols).count()

val ratio = if (mismatchCount == 0) 1.0 else (primaryCount - mismatchCount).toDouble / primaryCount
val ratio = mismatchCount.toDouble / primaryCount

if (assertion(ratio)) {
ComparisonSucceeded()
Expand Down

0 comments on commit 149d84b

Please sign in to comment.