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


##########
spark/src/test/scala/org/apache/comet/CometCastSuite.scala:
##########
@@ -895,6 +895,18 @@ class CometCastSuite extends CometTestBase with 
AdaptiveSparkPlanHelper {
     }
   }
 
+  test("cast between decimals with different precision and scale") {
+    // cast between default Decimal(38, 18) to Decimal(9,1)
+    val values = Seq(BigDecimal("12345.6789"), BigDecimal("9876.5432"), 
BigDecimal("123.4567"))
+    val df = withNulls(values).toDF("a")
+    castTest(df, DataTypes.createDecimalType(7, 2))

Review Comment:
   The output is confusing here, but the left side is Spark and the right side 
is Comet. Spark is producing `null` but Comet is producing `12345.68`. We need 
to have Comet use the same logic as Spark here.



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