viirya commented on code in PR #8411:
URL: https://github.com/apache/arrow-datafusion/pull/8411#discussion_r1416257790
##########
datafusion/common/src/scalar.rs:
##########
@@ -4645,6 +4651,16 @@ mod tests {
);
}
+ #[test]
+ fn test_scalar_value_from_string() {
+ let scalar = ScalarValue::from("foo");
+ assert_eq!(scalar, ScalarValue::Utf8(Some("foo".to_string())));
+ let scalar = ScalarValue::from("foo".to_string());
+ assert_eq!(scalar, ScalarValue::Utf8(Some("foo".to_string())));
Review Comment:
> I tried this and found there weren't any obvious examples in the codebase
-- the more common pattern is `ScalarValue::from("foo")` with a constant string
Nice!
--
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]