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


##########
core/src/execution/datafusion/expressions/cast.rs:
##########
@@ -644,14 +644,16 @@ impl Cast {
                     | DataType::Float32
                     | DataType::Float64
             ),
-            DataType::Decimal128(_, _) => matches!(
+            DataType::Decimal128(_, _) | DataType::Decimal256(_, _) => 
matches!(

Review Comment:
   I think this is probably the root cause (in `planner.rs`):
   
   ```rust
                   // For some Decimal128 operations, we need wider internal 
digits.
                   // Cast left and right to Decimal256 and cast the result 
back to Decimal128
                   let left = Arc::new(Cast::new_without_timezone(
                       left,
                       DataType::Decimal256(p1, s1),
                       EvalMode::Legacy,
                   ));
                   let right = Arc::new(Cast::new_without_timezone(
                       right,
                       DataType::Decimal256(p2, s2),
                       EvalMode::Legacy,
                   ));
   ```



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