[Improvement] TMS optimizer normalize CLI table identifiers with default catalog
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 935
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 298
Description
### What would you like to be improved?
Parent issue: #10360
TMS optimizer CLI currently handles `--identifiers` inconsistently across commands.
For table-oriented commands, users can reasonably expect `schema.table` to be accepted when
`gravitino.optimizer.gravitinoDefaultCatalog` is configured, and internally normalized to
`catalog.schema.table` before being passed to monitor, recommender, and updater modules.
However, the current CLI path still parses identifiers directly in several commands, so downstream
components may receive non-normalized identifiers such as `db.table`. This is inconsistent with:
- the documented CLI behavior for default catalog usage
- the existing `submit-update-stats-job` command, which already performs table identifier normalization
- Gravitino-based optimizer providers, which expect normalized `catalog.schema.table`
This can lead to inconsistent behavior across commands such as:
- `submit-strategy-jobs`
- `monitor-metrics`
- `list-table-metrics`
### How should we improve?
- Normalize table identifiers in optimizer CLI before passing them to table-oriented modules.
- When users provide `schema.table` and `gravitino.optimizer.gravitinoDefaultCatalog` is set,
convert it to `catalog.schema.table`.
- Keep job identifier parsing unchanged for job-oriented commands such as `list-job-metrics`.
- Fail fast with a clear error message when `schema.table` is used but no default catalog is configured.
- Add unit tests to cover:
- `catalog.schema.table` passthrough
- `schema.table` normalization with default catalog
- clear failure without default catalog
- no regression for job identifier commands
Contributor guide
Research direction
Start in the TMS optimizer CLI handlers for submit-strategy-jobs, monitor-metrics, and list-table-metrics, and compare their identifier parsing with submit-update-stats-job. Run the existing optimizer CLI unit tests, then cover catalog passthrough, default-catalog normalization, missing-catalog failure, and unchanged job identifier handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100