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


##########
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:
   The main issue is that we are trimming the input before processing, so error 
messages use the trimmed input instead of the original input. Once I resolved 
that I saw that we had extra processing for leading and trailing whitespace 
that is never used (ported from Spark) so I ended up removing that for some 
performance wins.



-- 
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