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


##########
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:
   Its an exceptional case that would imply some sort of schema inconsistency 
within the running plan, so imo panicking is perfectly valid, but then so is 
returning an error. The broader point is the doc is still correct



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

Reply via email to