comphead commented on code in PR #9001:
URL: https://github.com/apache/arrow-datafusion/pull/9001#discussion_r1467870786
##########
datafusion/common/src/scalar.rs:
##########
@@ -2364,6 +2364,16 @@ impl ScalarValue {
ScalarValue::try_from_array(&cast_arr, 0)
}
+ /// Try to cast this value to a ScalarValue of type `data_type`
+ pub fn cast_to(&self, data_type: &DataType) -> Result<Self> {
Review Comment:
I was introducing the same method to overcome unnecessary string conversion
in 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]