Reranko05 opened a new pull request, #50263: URL: https://github.com/apache/arrow/pull/50263
### Rationale for this change A malformed Substrait `SimpleExtensionDeclaration` with an unset `mapping_type` currently reaches `Unreachable()`, causing the process to abort during deserialization. Since this can be triggered by malformed input, the deserializer should instead return an `Invalid` status. ### What changes are included in this PR? * Replace the `Unreachable()` call in `GetExtensionSetFromMessage` with a `Status::Invalid` return for unset or unknown `mapping_type` values. * Add a regression test to verify that deserializing a Substrait plan containing an empty `SimpleExtensionDeclaration` returns an `Invalid` status instead of aborting. ### Are these changes tested? Yes. A regression test covering the malformed `SimpleExtensionDeclaration` case has been added to `serde_test.cc`. ### Are there any user-facing changes? No. **This PR contains a "Critical Fix".** This change prevents process termination when deserializing malformed Substrait plans or expressions by returning a proper error instead of calling `std::abort()`. -- 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]
