[CORE] Selecting a cost model the backend has no coster for fails with ClassNotFoundException

Open Beginner friendly
#13,700 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

@LuciferYang is already working on this.

Since Nov 20, 2026.

  • #13701 by @LuciferYang — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
clickhouse, scala, spark
Domain
backend, databases

Research direction

Start at GlutenCostModel.find, which treats unknown names as class names, then inspect LongCostModel.Kind.values() and LongCostModel.Registry.get. Reproduce with the ClickHouse backend and spark.gluten.costModel=rough; the fix should reject an unregistered cost model during lookup and include the config name in the error. Add or update a Scala test covering an unknown kind and an empty coster chain; done means the failure happens at lookup with a clear message.

Written by the indexing model from the issue text.

Description

When spark.gluten.costModel names a built-in cost model that the backend registers no coster for, the error does not say so. The ClickHouse backend only registers LegacyCoster, so the rough kind is never initialized and is missing from LongCostModel.Kind.values(). Setting spark.gluten.costModel=rough there makes GlutenCostModel.find treat rough as a class name and fail with ClassNotFoundException: rough. Even when the kind is known, LongCostModel.Registry.get returns an empty coster chain, and the failure only surfaces later as Cost not found for node: ....

Gluten could reject such a cost model when it is looked up and name the config.

This issue was written with the assistance of AI (Claude Opus).

Dominant language
Scala
Stars
1.6k
Forks
679
Avg merge
4d 16h
Merged PRs (30d)
84

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/gluten

All issues in apache/gluten

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.