andygrove commented on code in PR #3583:
URL: https://github.com/apache/datafusion-comet/pull/3583#discussion_r2849960843
##########
native/core/src/execution/columnar_to_row.rs:
##########
@@ -1068,7 +1068,19 @@ impl ColumnarToRowContext {
})?;
Ok(Arc::new(decimal_array))
}
- _ => Ok(Arc::clone(array)),
+ _ => {
+ // For any other type mismatch, attempt an Arrow cast.
+ // This handles cases like Int32 → Date32 (which can happen
when Spark
+ // generates default column values using the physical storage
type rather
+ // than the logical type).
+ let options = CastOptions::default();
Review Comment:
Claude says that this is cheap and that there are no heap allocations.
```
CastOptions::default() is just setting a bool and a struct of Option::None
fields on the stack. There are no heap allocations. The actual cost is entirely
in cast_with_options itself (which processes the array data). Creating the
options struct is negligible.
```
--
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]