From 954c18f228a184e04b6eaad2d583b1c739563c58 Mon Sep 17 00:00:00 2001 From: SamratMitra Date: Wed, 27 May 2020 21:25:38 +0530 Subject: [PATCH] Removed #45 changes and correct spelling mistake --- README.md | 2 +- .../scala/com/target/data_validator/TestHelpers.scala | 1 - .../data_validator/validator/ColumnSumCheckSpec.scala | 10 +--------- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 275c739..082c7d0 100644 --- a/README.md +++ b/README.md @@ -324,7 +324,7 @@ This check sums a column in all rows. If the sum applied to the `column` doesn't | `maxValue` | NumericType | The upper bound of the sum. Type depends on the type of the `column`. | | `inclusive` | Boolean | Include `minValue` and `maxValue` as part of the range. | -**Note:** If bounds are non-inclusive, and the actual sum is eequal to one of the bounds, the relative error percentage will be undefined. +**Note:** If bounds are non-inclusive, and the actual sum is equal to one of the bounds, the relative error percentage will be undefined. ## Example Config diff --git a/src/test/scala/com/target/data_validator/TestHelpers.scala b/src/test/scala/com/target/data_validator/TestHelpers.scala index d43a356..1277f8f 100644 --- a/src/test/scala/com/target/data_validator/TestHelpers.scala +++ b/src/test/scala/com/target/data_validator/TestHelpers.scala @@ -25,7 +25,6 @@ object TestHelpers { case "java.lang.Double" => DoubleType case "java.lang.Boolean" => BooleanType case "java.lang.Long" => LongType - case "java.lang.Byte" => ByteType case _ => throw new IllegalArgumentException(s"Unknown type '${v.getClass.getCanonicalName}'") } diff --git a/src/test/scala/com/target/data_validator/validator/ColumnSumCheckSpec.scala b/src/test/scala/com/target/data_validator/validator/ColumnSumCheckSpec.scala index 9458fec..a7ddc79 100644 --- a/src/test/scala/com/target/data_validator/validator/ColumnSumCheckSpec.scala +++ b/src/test/scala/com/target/data_validator/validator/ColumnSumCheckSpec.scala @@ -207,7 +207,7 @@ class ColumnSumCheckSpec extends FunSpec with Matchers with TestingSparkSession assert(!sut.failed) } - it("upper bound success with short") { + it("upper bound success") { val check = ColumnSumCheck("foo", maxValue = Some(Json.fromDouble(10).get)) // scalastyle:ignore magic.number val df = mkDf(spark, "foo" -> List[Short](1, 2, 1)) val sut = ValidatorDataFrame(df, None, None, List(check)) @@ -215,14 +215,6 @@ class ColumnSumCheckSpec extends FunSpec with Matchers with TestingSparkSession assert(!sut.failed) } - it("upper bound success with byte") { - val check = ColumnSumCheck("foo", maxValue = Some(Json.fromDouble(10).get)) // scalastyle:ignore magic.number - val df = mkDf(spark, "foo" -> List[Byte](1, 2, 1)) - val sut = ValidatorDataFrame(df, None, None, List(check)) - assert(!sut.quickChecks(spark, mkDict())(config)) - assert(!sut.failed) - } - it("upper bound failure") { val check = ColumnSumCheck("foo", maxValue = Some(Json.fromFloat(1).get)) // scalastyle:ignore magic.number val df = mkDf(spark, "foo" -> List(1L, 1L, 1L))