coderfender commented on code in PR #1996:
URL: https://github.com/apache/datafusion-comet/pull/1996#discussion_r2233026854
##########
spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala:
##########
@@ -677,7 +677,14 @@ object QueryPlanSerde extends Logging with CometExprShim {
}
None
- case div @ IntegralDivide(left, right, _) if
supportedDataType(left.dataType) =>
+ case div @ IntegralDivide(leftInt, rightInt, _) if
supportedDataType(leftInt.dataType) =>
+ val left =
+ if (leftInt.dataType.isInstanceOf[DecimalType]) leftInt else
Cast(leftInt, DoubleType)
+ val right =
+ if (rightInt.dataType.isInstanceOf[DecimalType]) rightInt
+ else Cast(rightInt, DoubleType)
+ withInfo(div, s"left data type ${left.dataType} casted to
${leftInt.dataType}")
+ withInfo(div, s"right data type ${right.dataType} casted to
${rightInt.dataType}")
Review Comment:
Sure ! I will make those changes in a separate PR
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]