crepererum commented on code in PR #7548:
URL: https://github.com/apache/arrow-rs/pull/7548#discussion_r2108883176
##########
parquet_derive_test/src/lib.rs:
##########
@@ -347,6 +347,36 @@ mod tests {
assert_eq!(drs[0].isize, out[0].isize);
}
+ #[test]
+ fn test_aliased_result() {
+ // Issue 7547, Where aliasing the `Result` led to
+ // a collision with the macro internals of derive ParquetRecordReader
+
+ mod aliased_result {
+ use parquet_derive::{ParquetRecordReader, ParquetRecordWriter};
+ pub type Result = std::result::Result<(), Box<dyn
std::error::Error>>;
+
+ #[derive(ParquetRecordReader, ParquetRecordWriter, Debug)]
+ pub struct ARecord {
+ pub bool: bool,
+ pub string: String,
+ }
+
+ impl ARecord {
+ pub fn validate(&self) -> Result {
Review Comment:
```suggestion
pub fn validate(&self) -> std::result::Result<(), Box<dyn
std::error::Error>> {
```
(so it doesn't use our `Result` shadow)
##########
parquet_derive_test/src/lib.rs:
##########
@@ -347,6 +347,36 @@ mod tests {
assert_eq!(drs[0].isize, out[0].isize);
}
+ #[test]
+ fn test_aliased_result() {
+ // Issue 7547, Where aliasing the `Result` led to
+ // a collision with the macro internals of derive ParquetRecordReader
+
+ mod aliased_result {
+ use parquet_derive::{ParquetRecordReader, ParquetRecordWriter};
+ pub type Result = std::result::Result<(), Box<dyn
std::error::Error>>;
Review Comment:
```suggestion
// not an actual result type
pub type Result = ();
```
--
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]