LuciferYang opened a new pull request, #13759: URL: https://github.com/apache/gluten/pull/13759
## What changes are proposed in this pull request? `SparkResourceUtil.getTotalCores` had no default case in its match on `spark.master`, so any master other than `local*`, `yarn`, `k8s:` or `spark:` threw `scala.MatchError`. That covers `mesos://` on Spark 3.4/3.5 and masters provided by an `ExternalClusterManager`. The ClickHouse backend calls it whenever it builds file partitions, so file scans failed on those masters. Those masters now fall back to `spark.default.parallelism`, the same value the `local` case uses. Fixes #13758. ## How was this patch tested? Added a test to `SparkResourceUtilSuite` that sets `spark.master` to `mesos://host:5050` and checks that `getTotalCores` returns `spark.default.parallelism`. It fails with `MatchError` on the old code. ## Was this patch authored or co-authored using generative AI tooling? Yes. Generated-by: Claude Opus. -- 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]
