You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/07 22:14:56 UTC

[GitHub] [arrow-datafusion] thinkharderdev commented on a diff in pull request #3547: Simplify the serialization of `ScalarValue::List`

thinkharderdev commented on code in PR #3547:
URL: https://github.com/apache/arrow-datafusion/pull/3547#discussion_r990526572


##########
datafusion/proto/src/from_proto.rs:
##########
@@ -838,6 +754,23 @@ impl TryFrom<&protobuf::ScalarValue> for ScalarValue {
     }
 }
 
+/// Ensures that all `values` are of type DataType::List and have the
+/// same type as field
+fn validate_list_values(field: &Field, values: &[ScalarValue]) -> Result<(), Error> {

Review Comment:
   It would be a weird edge case but if it did happen it would be hard to debug from whatever error happened downstream so I think it's worthwhile to do here. 



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