bvolpato opened a new pull request, #27190: URL: https://github.com/apache/datafusion/pull/27190
> [!IMPORTANT] > > **Fork CI setup:** For pull requests from a fork to `main`, enable workflows in your fork's **Actions** tab before you push. > See the [fork CI setup guide](https://datafusion.apache.org/contributor-guide/#pull-requests-from-forks). ## Which issue does this PR close? No linked issue. ## Rationale for this change Decoding a Substrait sort with the valid `Clustered` direction panics with `called Result::unwrap() on an Err value: NotImplemented("Sort with direction clustered is not yet supported")`. The consumer already constructs an error for unsupported sort kinds, but then unwraps it. This AI-assisted PR is a draft pending author review. ## What changes are included in this PR? Propagate the existing error from `from_substrait_sorts` with `?`. ## What is the testing strategy for this PR? `unsupported_sort_kinds_return_errors` decodes plans with clustered and comparison-function sort kinds and checks the returned errors. The regression fails with the original panic before the fix and passes afterward. Passed the Substrait crate tests, formatting, all-target/all-feature Clippy, and `dev/rust_lint.sh`. Extended workspace validation completed across the full initial run, a Substrait rerun with backtraces enabled after correcting the error assertion, and a separate run of the remaining targets. ## Are there any user-facing changes? Unsupported sort kinds return `DataFusionError::NotImplemented` instead of panicking. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
