Skip to content

Commit

Permalink
Change: typing BigInt to Long type (#208)
Browse files Browse the repository at this point in the history
Co-authored-by: Łukasz Ciołecki <[email protected]>
  • Loading branch information
lciolecki and Łukasz Ciołecki authored Dec 13, 2021
1 parent cad48b5 commit fce076b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ object PMMLSignatureInterpreter {
case "decimal" => Typed[BigDecimal]
case "float" => Typed[Float]
case "double" => Typed[Double]
case "integer" => Typed[BigInt]
case "nonPositiveInteger" => Typed[BigInt]
case "negativeInteger" => Typed[BigInt]
case "integer" => Typed[Long]
case "nonPositiveInteger" => Typed[Long]
case "negativeInteger" => Typed[Long]
case "long" => Typed[Long]
case "int" => Typed[Int]
case "short" => Typed[Short]
case "byte" => Typed[Byte]
case "nonNegativeInteger" => Typed[BigInt]
case "nonNegativeInteger" => Typed[Long]
case "unsignedLong" => Typed[Long]
case "unsignedInt" => Typed[Int]
case "unsignedShort" => Typed[Short]
case "unsignedByte" => Typed[Byte]
case "positiveInteger" => Typed[BigInt]
case "positiveInteger" => Typed[Long]
case _ => throw new IllegalArgumentException(s"Unknown PMMLDataType: $typeName")
//TODO Potentially add support for other types from XMLSchema-2 like time and date
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ class PMMLHttpApiTest extends PMMLContainerUnitTest
)

override def expectedFraudOutputs: List[(String, typing.TypingResult)] = List(
("fraud", Typed[BigInt])
("fraud", Typed[Long])
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ class PMMLLocalFileApiTest extends PMMLContainerUnitTest
)

override def expectedFraudOutputs: List[(String, typing.TypingResult)] = List(
("fraud", Typed[BigInt])
("fraud", Typed[Long])
)
}

0 comments on commit fce076b

Please sign in to comment.