AnkitAhlawat7742 commented on issue #47447:
URL: https://github.com/apache/arrow/issues/47447#issuecomment-4405763231
Thanks @raulcd for the core dump
I had a quick look at the issue.
The return statement is attempting to construct Result<int64_t> from
Status::OK() (frame 6). The root cause is that **Status::OK() is being returned
instead of a valid int64_t value.**
above frame 6:
arrow::Result<long>::Result(arrow::Status const&)
indicates that the Result constructor is being invoked with a Status object.
I see the constructor description as well as we can see below
```
/// Constructs a Result object with the given non-OK Status object. All
/// calls to ValueOrDie() on this object will abort. The given `status`
must
/// not be an OK status, otherwise this constructor will abort.
///
/// This constructor is not declared explicit so that a function with a
return
/// type of `Result<T>` can return a Status object, and the status will be
/// implicitly converted to the appropriate return type as a matter of
/// convenience.
///
/// \param status The non-OK Status object to initialize to.
Result(const Status& status) noexcept // NOLINT(runtime/explicit)
: status_(status) {
if (ARROW_PREDICT_FALSE(status.ok())) {
internal::DieWithMessage(std::string("Constructed with a non-error
status: ") +
status.ToString());
}
}
```
Returning Status::OK() is invalid because it represents a successful status
without an associated value. Result<T> is expected to contain either:
a valid value of type T on success, or
a non-OK Status on failure.
**In this case, the function is expected to return an int64_t value wrapped
in Result<int64_t>**
CC @jorisvandenbossche
Please let me know if my analysis is in right direction so that we can find
some solution for this issue
--
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]