diff --git a/data-model/src/main/scala/za/co/absa/enceladus/model/conformanceRule/package.scala b/data-model/src/main/scala/za/co/absa/enceladus/model/conformanceRule/package.scala index 036971cc2..591c35315 100644 --- a/data-model/src/main/scala/za/co/absa/enceladus/model/conformanceRule/package.scala +++ b/data-model/src/main/scala/za/co/absa/enceladus/model/conformanceRule/package.scala @@ -45,7 +45,7 @@ package object conformanceRule { outputColumn: String, controlCheckpoint: Boolean, inputColumns: Seq[String]) extends ConformanceRule { - override def withUpdatedOrder(newOrder: Int): ConformanceRule = copy(order = newOrder) + override def withUpdatedOrder(newOrder: Int): ConcatenationConformanceRule = copy(order = newOrder) } case class CastingConformanceRule(order: Int, @@ -53,20 +53,20 @@ package object conformanceRule { controlCheckpoint: Boolean, inputColumn: String, outputDataType: String) extends ConformanceRule { - override def withUpdatedOrder(newOrder: Int): ConformanceRule = copy(order = newOrder) + override def withUpdatedOrder(newOrder: Int): CastingConformanceRule = copy(order = newOrder) } case class DropConformanceRule(order: Int, controlCheckpoint: Boolean, outputColumn: String) extends ConformanceRule { - override def withUpdatedOrder(newOrder: Int): ConformanceRule = copy(order = newOrder) + override def withUpdatedOrder(newOrder: Int): DropConformanceRule = copy(order = newOrder) } case class LiteralConformanceRule(order: Int, outputColumn: String, controlCheckpoint: Boolean, value: String) extends ConformanceRule { - override def withUpdatedOrder(newOrder: Int): ConformanceRule = copy(order = newOrder) + override def withUpdatedOrder(newOrder: Int): LiteralConformanceRule = copy(order = newOrder) } @@ -78,14 +78,14 @@ package object conformanceRule { targetAttribute: String, outputColumn: String, isNullSafe: Boolean = false) extends ConformanceRule { - override def withUpdatedOrder(newOrder: Int): ConformanceRule = copy(order = newOrder) + override def withUpdatedOrder(newOrder: Int): MappingConformanceRule = copy(order = newOrder) } case class NegationConformanceRule(order: Int, outputColumn: String, controlCheckpoint: Boolean, inputColumn: String) extends ConformanceRule { - override def withUpdatedOrder(newOrder: Int): ConformanceRule = copy(order = newOrder) + override def withUpdatedOrder(newOrder: Int): NegationConformanceRule = copy(order = newOrder) } /** @@ -98,7 +98,7 @@ package object conformanceRule { outputColumn: String, inputColumn: String, inputColumnAlias: String) extends ConformanceRule { - override def withUpdatedOrder(newOrder: Int): ConformanceRule = copy(order = newOrder) + override def withUpdatedOrder(newOrder: Int): SingleColumnConformanceRule = copy(order = newOrder) } /** @@ -112,14 +112,14 @@ package object conformanceRule { outputColumn: String, controlCheckpoint: Boolean, sparkConfKey: String) extends ConformanceRule { - override def withUpdatedOrder(newOrder: Int): ConformanceRule = copy(order = newOrder) + override def withUpdatedOrder(newOrder: Int): SparkSessionConfConformanceRule = copy(order = newOrder) } case class UppercaseConformanceRule(order: Int, outputColumn: String, controlCheckpoint: Boolean, inputColumn: String) extends ConformanceRule { - override def withUpdatedOrder(newOrder: Int): ConformanceRule = copy(order = newOrder) + override def withUpdatedOrder(newOrder: Int): UppercaseConformanceRule = copy(order = newOrder) } case class FillNullsConformanceRule(order: Int, @@ -127,7 +127,7 @@ package object conformanceRule { controlCheckpoint: Boolean, inputColumn: String, value: String) extends ConformanceRule { - override def withUpdatedOrder(newOrder: Int): ConformanceRule = copy(order = newOrder) + override def withUpdatedOrder(newOrder: Int): FillNullsConformanceRule = copy(order = newOrder) } abstract class ExtensibleConformanceRule() extends ConformanceRule