LuciferYang opened a new pull request, #13701: URL: https://github.com/apache/gluten/pull/13701
## What changes are proposed in this pull request? Selecting a built-in cost model that the backend registers no coster for, such as `spark.gluten.costModel=rough` on ClickHouse, failed with `ClassNotFoundException: rough`: built-in kinds only register when their object is first touched, and nothing touched `Rough` there, so its name was loaded as a class. `LongCostModel.Kind.values()` now registers the built-in kinds before returning, and `LongCostModel.Registry.get` throws a `GlutenException` naming the cost model and `spark.gluten.costModel` when no coster is registered for it, instead of returning an empty chain. Fixes #13700. ## How was this patch tested? Added `LongCostModelSuite`. With a backend that only registers a legacy coster, it checks that `legacy` still resolves and that `rough` is rejected with that message, both through a fresh registry and through `GlutenCostModel.find`. The last two tests fail 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]
