andygrove commented on code in PR #450:
URL: https://github.com/apache/datafusion-comet/pull/450#discussion_r1607200546


##########
spark/src/test/scala/org/apache/comet/CometCastSuite.scala:
##########
@@ -533,11 +533,16 @@ class CometCastSuite extends CometTestBase with 
AdaptiveSparkPlanHelper {
     castTest(gen.generateStrings(dataSize, numericPattern, 5).toDF("a"), 
DataTypes.ShortType)
   }
 
-  ignore("cast StringType to IntegerType") {
+  test("cast StringType to IntegerType") {
     // test with hand-picked values
     castTest(castStringToIntegralInputs.toDF("a"), DataTypes.IntegerType)
     // fuzz test
-    castTest(gen.generateStrings(dataSize, numericPattern, 8).toDF("a"), 
DataTypes.IntegerType)
+    castTest(
+      gen
+        .generateStrings(dataSize, numericPattern, 8)
+        .toDF("a")
+        .withColumn("a", functions.trim($"a")),
+      DataTypes.IntegerType)

Review Comment:
   I'd prefer to see us fix the compatibility issue rather than skip testing 
strings that have leading and/or trailing whitespace. I have been looking into 
this and was going to make some comments here but it turned out to be a bit 
more involved that I thought it would, so will create a PR soon with my 
proposed fix.



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to