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


##########
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:
   I think in theory this code could be reached with malformed input -- it 
might be nice to return an error rather than 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to