-
Notifications
You must be signed in to change notification settings - Fork 247
feat: Implement Spark-compatible CAST float/double to string #346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4e44598
62fef7d
f0d0c2b
b5df50d
afda3c5
70d403d
b90aa8f
f9e46c1
44503fc
b6e46be
805d80e
a0cea1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -329,9 +329,22 @@ class CometCastSuite extends CometTestBase with AdaptiveSparkPlanHelper { | |||
| castTest(generateFloats(), DataTypes.createDecimalType(10, 2)) | ||||
| } | ||||
|
|
||||
| ignore("cast FloatType to StringType") { | ||||
| test("cast FloatType to StringType") { | ||||
| // https://github.com/apache/datafusion-comet/issues/312 | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should remove the references to the issue now that we are resolving the issue
Suggested change
|
||||
| castTest(generateFloats(), DataTypes.StringType) | ||||
| val r = new Random(0) | ||||
| val values = Seq( | ||||
| Float.MaxValue, | ||||
| Float.MinValue, | ||||
| Float.NaN, | ||||
| Float.PositiveInfinity, | ||||
| Float.NegativeInfinity, | ||||
| 1.0f, | ||||
| -1.0f, | ||||
| Short.MinValue.toFloat, | ||||
| Short.MaxValue.toFloat, | ||||
| 0.0f) ++ | ||||
| Range(0, dataSize).map(_ => r.nextFloat()) | ||||
| withNulls(values).toDF("a") | ||||
| } | ||||
|
|
||||
| ignore("cast FloatType to TimestampType") { | ||||
|
|
@@ -374,9 +387,18 @@ class CometCastSuite extends CometTestBase with AdaptiveSparkPlanHelper { | |||
| castTest(generateDoubles(), DataTypes.createDecimalType(10, 2)) | ||||
| } | ||||
|
|
||||
| ignore("cast DoubleType to StringType") { | ||||
| test("cast DoubleType to StringType") { | ||||
| // https://github.com/apache/datafusion-comet/issues/312 | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can remove these comments in a future PR |
||||
| castTest(generateDoubles(), DataTypes.StringType) | ||||
| val r = new Random(0) | ||||
| val values = Seq( | ||||
| Double.MaxValue, | ||||
| Double.MinValue, | ||||
| Double.NaN, | ||||
| Double.PositiveInfinity, | ||||
| Double.NegativeInfinity, | ||||
| 0.0d) ++ | ||||
| Range(0, dataSize).map(_ => r.nextDouble()) | ||||
| withNulls(values).toDF("a") | ||||
| } | ||||
|
|
||||
| ignore("cast DoubleType to TimestampType") { | ||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.