taepper commented on code in PR #53314:
URL: https://github.com/apache/arrow/pull/53314#discussion_r4258721635
##########
cpp/src/arrow/dataset/file_ipc.cc:
##########
@@ -145,9 +145,9 @@ Result<RecordBatchGenerator>
IpcFileFormat::ScanBatchesAsync(
auto reopen_reader = [self, options,
source](std::shared_ptr<ipc::RecordBatchFileReader>
reader)
-> Future<std::shared_ptr<ipc::RecordBatchFileReader>> {
- ARROW_ASSIGN_OR_RAISE(auto options,
+ ARROW_ASSIGN_OR_RAISE(auto read_options,
Review Comment:
Well, because we use `auto` here, we got a compile-time error. Otherwise,
`rexpr` would use the `lhs`'s declaration as an uninitialized object.
Even when keeping in mind that
```
auto options = GetReadOptions(*reader->schema(), *self,
*options)).ValueUnsafe();
```
would obviously already have been broken before, this breakage is definitely
something to consider, given that it can introduce potentially subtle bugs in
_broken but working_ consumers of the macro
--
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]