Skip to content

Commit d9af782

Browse files
implicit parameters used to match TyperParser's expected single parameter input column
1 parent 20e9c97 commit d9af782

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

src/main/scala/za/co/absa/standardization/stages/InfinitySupport.scala

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -91,30 +91,13 @@ trait InfinitySupport {
9191
dateFormat.format(parsedWithISO)
9292
}
9393
} else{
94-
throw new IllegalArgumentException(s"Invalid infinity value: '$value' for type: $dataType with pattern ${patternOpt.getOrElse("none")} and ISO fallback ($isoPattern")
94+
throw new IllegalArgumentException(s"Invalid infinity value: '$value' for type: $dataType with pattern ${patternOpt.getOrElse("none")} and ISO fallback ($isoPattern)")
9595
}
9696
}
9797
}
9898

99-
protected val validatedInfMinusValue: Option[String] = if (origType == DateType || origType == TimestampType) {
100-
infMinusValue.map { v =>
101-
//validateAndConvertInfinityValue(v, origType,getPattern(origType))
102-
v
103-
}
104-
} else {
105-
infMinusValue.map(sanitizeInput)
106-
}
107-
108-
protected val validatedInfPlusValue: Option[String] = if (origType == DateType || origType == TimestampType) {
109-
infPlusValue.map { v =>
110-
//validateAndConvertInfinityValue(v, origType,getPattern(origType))
111-
v
112-
}
113-
} else {
114-
infPlusValue.map(sanitizeInput)
115-
}
11699

117-
def replaceInfinitySymbols(column: Column, spark:SparkSession, defaults: TypeDefaults): Column = {
100+
def replaceInfinitySymbols(column: Column)(implicit spark:SparkSession, defaults: TypeDefaults): Column = {
118101
var resultCol = column.cast(StringType)
119102

120103
val validatedMinus = if (origType == DateType || origType == TimestampType) {

0 commit comments

Comments
 (0)