XuQianJin-Stars opened a new pull request, #3689:
URL: https://github.com/apache/fluss/pull/3689
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #xxx
Introduce reusable input-argument validation helpers in the Spark `CALL`
procedure base class so that procedures fail fast with clear, user-facing error
messages when a required parameter is missing or its type does not match the
declared parameter spec.
### Brief change log
- Added two reusable validation helpers in `BaseProcedure`:
- `checkRequiredArgument(parameter, provided)`: throws an
`IllegalArgumentException` with a descriptive message when a required parameter
is not supplied.
- `checkArgumentType(parameter, value)`: throws an
`IllegalArgumentException` when the supplied value's type does not match the
declared parameter type.
- `GetClusterConfigsProcedure.call` now invokes these helpers to validate
the `config_keys` array parameter before execution.
- Added a negative test (`GetClusterConfigsProcedureTest`) asserting a
type-mismatched argument is rejected.
### Tests
- `GetClusterConfigsProcedureTest`:
- `get_cluster_configs: rejects wrong argument type for config_keys` —
verifies that passing a scalar `STRING` where an `ARRAY` is expected fails with
a friendly error instead of a cryptic internal failure.
### API and Format
- No public API or storage format change. Validation is internal to the
procedure framework; only the failure mode (error message) for invalid input is
improved.
### Documentation
- No documentation change required. Behavior is backward compatible.
--
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]