andygrove commented on code in PR #346:
URL: https://github.com/apache/datafusion-comet/pull/346#discussion_r1585036199
##########
spark/src/test/scala/org/apache/comet/CometCastSuite.scala:
##########
@@ -55,8 +55,39 @@ class CometCastSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
castTest(generateFloats, DataTypes.IntegerType)
}
- ignore("cast float to string") {
- castTest(generateFloats, DataTypes.StringType)
+ test("cast double to string") {
+ val testValues = (
+ Seq(
+ 1.0499721536516571e-4,
+ 0.001,
+ 10000000.0,
+ 9999999.0,
+ Float.NegativeInfinity,
+ Float.PositiveInfinity,
+ Float.MinPositiveValue,
+ Double.MinValue,
+ Double.MaxValue,
+ Double.NaN,
+ 0.0,
+ -0.0)
+ ).toDF("a")
+ castTest(testValues, DataTypes.StringType, testAnsiModeThrows = false)
Review Comment:
If there are still some inputs that produce different results, we can
document that in the compatibility guide and skip fuzz testing (or have some
reduced form of fuzz testing). We could also consider adding a config so that
the user can opt in or out of enabling this particular cast, depending on the
severity of any incompatibilities.
--
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]