This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
The following commit(s) were added to refs/heads/main by this push:
new f210412de test: cast negative zero to string (#3829)
f210412de is described below
commit f210412ded78f0c0982d8e4331b9712a5f274044
Author: KAZUYUKI TANIMURA <[email protected]>
AuthorDate: Tue Mar 31 07:09:35 2026 -0700
test: cast negative zero to string (#3829)
---
docs/source/user-guide/latest/compatibility.md | 7 -------
spark/src/test/scala/org/apache/comet/CometCastSuite.scala | 6 ++++++
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/docs/source/user-guide/latest/compatibility.md
b/docs/source/user-guide/latest/compatibility.md
index 3ec665618..e0bc5f06e 100644
--- a/docs/source/user-guide/latest/compatibility.md
+++ b/docs/source/user-guide/latest/compatibility.md
@@ -153,13 +153,6 @@ Cast operations in Comet fall into three levels of support:
Spark.
- **N/A**: Spark does not support this cast.
-### Negative Zero
-
-When casting floating-point values to strings, Spark normalizes negative zero
(`-0.0`) to `"0.0"`, but Comet
-may produce `"-0.0"`. Since negative zero and positive zero are semantically
equivalent (`-0.0 == 0.0` is true
-in IEEE 754), this difference is unlikely to affect real-world results. See
-[#1036](https://github.com/apache/datafusion-comet/issues/1036) for more
details.
-
### Legacy Mode
<!--BEGIN:CAST_LEGACY_TABLE-->
diff --git a/spark/src/test/scala/org/apache/comet/CometCastSuite.scala
b/spark/src/test/scala/org/apache/comet/CometCastSuite.scala
index d1d00e339..9a0d42102 100644
--- a/spark/src/test/scala/org/apache/comet/CometCastSuite.scala
+++ b/spark/src/test/scala/org/apache/comet/CometCastSuite.scala
@@ -498,6 +498,7 @@ class CometCastSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
-1.0f,
Short.MinValue.toFloat,
Short.MaxValue.toFloat,
+ -0.0f,
0.0f) ++
Range(0, dataSize).map(_ => r.nextFloat())
castTest(withNulls(values).toDF("a"), DataTypes.StringType)
@@ -558,6 +559,11 @@ class CometCastSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
Double.NaN,
Double.PositiveInfinity,
Double.NegativeInfinity,
+ 1.0d,
+ -1.0d,
+ Int.MinValue.toDouble,
+ Int.MaxValue.toDouble,
+ -0.0d,
0.0d) ++
Range(0, dataSize).map(_ => r.nextDouble())
castTest(withNulls(values).toDF("a"), DataTypes.StringType)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]