File tree Expand file tree Collapse file tree
docs/source/user-guide/latest
main/scala/org/apache/comet/expressions
test/scala/org/apache/comet Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ The following cast operations are generally compatible with Spark except for the
173173| integer | long | |
174174| integer | float | |
175175| integer | double | |
176+ | integer | decimal | |
176177| integer | string | |
177178| long | boolean | |
178179| long | byte | |
@@ -227,7 +228,6 @@ The following cast operations are not compatible with Spark for all inputs and a
227228<!-- BEGIN:INCOMPAT_CAST_TABLE-->
228229| From Type | To Type | Notes |
229230| -| -| -|
230- | integer | decimal | No overflow check |
231231| float | decimal | There can be rounding differences |
232232| double | decimal | There can be rounding differences |
233233| string | float | Does not support inputs ending with 'd' or 'f'. Does not support 'inf'. Does not support ANSI mode. |
Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ object CometCast extends CometExpressionSerde[Cast] with CometExprShim {
284284 case DataTypes .FloatType | DataTypes .DoubleType =>
285285 Compatible ()
286286 case _ : DecimalType =>
287- Incompatible ( Some ( " No overflow check " ) )
287+ Compatible ( )
288288 case _ =>
289289 unsupported(DataTypes .IntegerType , toType)
290290 }
Original file line number Diff line number Diff line change @@ -322,8 +322,7 @@ class CometCastSuite extends CometTestBase with AdaptiveSparkPlanHelper {
322322 castTest(generateInts(), DataTypes .DoubleType )
323323 }
324324
325- ignore(" cast IntegerType to DecimalType(10,2)" ) {
326- // Comet should have failed with [NUMERIC_VALUE_OUT_OF_RANGE] -1117686336 cannot be represented as Decimal(10, 2)
325+ test(" cast IntegerType to DecimalType(10,2)" ) {
327326 castTest(generateInts(), DataTypes .createDecimalType(10 , 2 ))
328327 }
329328
You can’t perform that action at this time.
0 commit comments