You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/10/16 17:55:31 UTC

Re: [PR] Remove redundant unwrap in `ScalarValue::new_primitive`, return a `Result` [arrow-datafusion]

tustvold commented on code in PR #7830:
URL: https://github.com/apache/arrow-datafusion/pull/7830#discussion_r1361057473


##########
datafusion/common/src/scalar.rs:
##########
@@ -744,13 +744,13 @@ impl ScalarValue {
     pub fn new_primitive<T: ArrowPrimitiveType>(
         a: Option<T::Native>,
         d: &DataType,
-    ) -> Self {
+    ) -> Result<Self> {

Review Comment:
   with_data_type can still panic



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org