yukkit commented on code in PR #8239:
URL: https://github.com/apache/arrow-datafusion/pull/8239#discussion_r1396798432


##########
datafusion/proto/src/logical_plan/from_proto.rs:
##########
@@ -698,7 +698,11 @@ impl TryFrom<&protobuf::ScalarValue> for ScalarValue {
                 .map_err(DataFusionError::ArrowError)
                 .map_err(|e| e.context("Decoding ScalarValue::List Value"))?;
                 let arr = record_batch.column(0);
-                Self::List(arr.to_owned())
+                match value {
+                    Value::ListValue(_) => Self::List(arr.to_owned()),
+                    Value::FixedSizeListValue(_) => 
Self::FixedSizeList(arr.to_owned()),
+                    _ => unreachable!(),

Review Comment:
   FYI. For the sake of code robustness, I agree with @alamb 's suggestion to 
return an error instead of unreachable. If someone accidentally modifies the 
match branch, this panic might get exposed.



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