parthchandra commented on code in PR #1996:
URL: https://github.com/apache/datafusion-comet/pull/1996#discussion_r2211898302


##########
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:
   @andygrove should we rename `withInfo` to `withFallbackReason` to avoid this 
kind of mistaken use



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