laglangyue commented on code in PR #43456:
URL: https://github.com/apache/spark/pull/43456#discussion_r1373117603
##########
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:
I have reviewed the previous changes and the code here, and here are my
observations.
method `asIntegral` is used for the DecimalType type to convert to Integral.
In Scala 2.12, Float, Double, and Decimal belong to Fractional and Integral,
which include XXXIsFractional, XXXAsIfIntegral, and XXXIsConflicted.
In Scala 2.13, Decimal remains in its original form, while Float and Double
are no longer Integral, all of thess Class were removed.
To ensure binary compatibility, we copied the code for Float and Double from
2.12, but since we have now removed 2.12, we can discard it completely. We have
not used the asIntegral method for Float and Double.
link these pr
[SPARK-30011][SQL] Inline 2.12 "AsIfIntegral" classes, not present in 2.13
[SPARK-43110][SQL] Move asIntegral to PhysicalDataType
--
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]