alamb commented on code in PR #7837:
URL: https://github.com/apache/arrow-datafusion/pull/7837#discussion_r1361137849
##########
datafusion/proto/src/logical_plan/to_proto.rs:
##########
@@ -56,13 +56,6 @@ use datafusion_expr::{
pub enum Error {
General(String),
- InconsistentListTyping(DataType, DataType),
Review Comment:
These variants are no longer used
##########
datafusion/proto/src/logical_plan/from_proto.rs:
##########
@@ -655,29 +656,36 @@ impl TryFrom<&protobuf::ScalarValue> for ScalarValue {
let schema: Schema = if let Some(schema_ref) = schema {
schema_ref.try_into()?
} else {
- return Err(Error::General("Unexpected
schema".to_string()));
+ return Err(Error::General(
+ "Invalid schema while deserializing ScalarValue::List"
+ .to_string(),
+ ));
};
- let message = root_as_message(ipc_message.as_slice()).unwrap();
+ let message =
root_as_message(ipc_message.as_slice()).map_err(|e| {
+ Error::General(format!(
+ "Error IPC message while deserializing
ScalarValue::List: {e}"
+ ))
+ })?;
+ let buffer = Buffer::from(arrow_data);
- // TODO: Add comment to why adding 0 before arrow_data.
Review Comment:
The 0 was added in the arrow.rs code as it was a test for unaligned data.
The zero is not needed for this cod
cc @jayzhan211
--
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]