This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new e87342310 Actually test that `ScalarValue`s are the same after round
trip serialization (#3537)
e87342310 is described below
commit e87342310e20b58ae2de2bb7cd0942dce089092e
Author: Andrew Lamb <[email protected]>
AuthorDate: Tue Sep 20 03:14:45 2022 -0400
Actually test that `ScalarValue`s are the same after round trip
serialization (#3537)
---
datafusion/proto/src/lib.rs | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/datafusion/proto/src/lib.rs b/datafusion/proto/src/lib.rs
index 4a1e782f3..f34da705f 100644
--- a/datafusion/proto/src/lib.rs
+++ b/datafusion/proto/src/lib.rs
@@ -465,8 +465,17 @@ mod roundtrip_tests {
let proto: super::protobuf::ScalarValue = (&test_case)
.try_into()
.expect("failed conversion to protobuf");
- let _roundtrip: ScalarValue =
- (&proto).try_into().expect("failed conversion to protobuf");
+
+ let roundtrip: ScalarValue = (&proto)
+ .try_into()
+ .expect("failed conversion from protobuf");
+
+ assert_eq!(
+ test_case, roundtrip,
+ "ScalarValue was not the same after round trip!\n\n\
+ Input: {:?}\n\nRoundtrip: {:?}",
+ test_case, roundtrip
+ );
}
}