srowen commented on code in PR #43456:
URL: https://github.com/apache/spark/pull/43456#discussion_r1368591778
##########
sql/api/src/main/scala/org/apache/spark/sql/types/Decimal.scala:
##########
@@ -681,8 +681,6 @@ object Decimal {
override def toLong(x: Decimal): Long = x.toLong
override def fromInt(x: Int): Decimal = new Decimal().set(x)
override def compare(x: Decimal, y: Decimal): Int = x.compare(y)
- // Added from Scala 2.13; don't override to work in 2.12
- // TODO revisit once Scala 2.12 support is dropped
def parseString(str: String): Option[Decimal] = Try(Decimal(str)).toOption
Review Comment:
I think this is meant to be `override` in Scala 2.13; does that work?
##########
sql/api/src/main/scala/org/apache/spark/sql/types/DoubleType.scala:
##########
@@ -40,34 +38,4 @@ class DoubleType private() extends FractionalType {
* @since 1.3.0
*/
@Stable
-case object DoubleType extends DoubleType {
-
- // Traits below copied from Scala 2.12; not present in 2.13
Review Comment:
In the previous PR that added these traits, were just these traits added for
Scala 2.12/2.13? I am not sure if the object DoubleAsIfIntegral should be
removed too
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/types/PhysicalDataType.scala:
##########
@@ -92,7 +92,6 @@ object PhysicalNumericType {
sealed abstract class PhysicalFractionalType extends PhysicalNumericType {
private[sql] val fractional: Fractional[InternalType]
- private[sql] val asIntegral: Integral[InternalType]
Review Comment:
What's the reason for removing this? I wasn't sure if this is related to
Scala 2.12/2.13
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]