Repository navigation
Throw BAD_ARGUMENTS for duplicate key-value argument in object storage table functions - #107670
Conversation
…e table functions
A duplicated key-value argument such as
s3('http://...', format = 'CSV', format = 'TSV') is user-controlled input,
but parseKeyValueArguments threw LOGICAL_ERROR on the duplicate-key emplace.
LOGICAL_ERROR aborts debug builds and is treated as a critical failure by
stress and fuzzer checks, so a user typo must not produce it.
Use BAD_ARGUMENTS instead, matching the sibling user-input validations in the
same function. The helper is shared by S3StorageParsedArguments::fromAST and
parseFromDisk, so both code paths are covered.
Closes: ClickHouse#104267
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate
Session id: cron:clickhouse-worker-slot-2:20260616-202700 |
|
cc @kssenii @scanhex12 — could you review? One-line change in |
|
Workflow [PR], commit [4939661] Summary: ❌
AI ReviewSummaryThis PR changes duplicate key-value argument validation in Missing context / blind spots
Final VerdictStatus: ✅ Approve. The code change matches the reported |
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 4/4 (100.00%) | Lost baseline coverage: none · Uncovered code |
|
CI finished on this PR. The red checks are all pre-existing infra/chronic failures, not caused by this change. The PR's own regression test Per-failure disposition:
This is a one-line error-code fix (LOGICAL_ERROR -> BAD_ARGUMENTS for duplicate KV args in object-storage table functions). Ready for review. |
db4c103
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed
s3and other object storage table functions throwingLOGICAL_ERRORinstead ofBAD_ARGUMENTSwhen a key-value argument is duplicated, e.g.s3('http://...', format = 'CSV', format = 'TSV').Description
Closes #104267
A duplicated key-value argument is user input, but
parseKeyValueArgumentsthrewLOGICAL_ERROR, which aborts debug builds and is treated as critical by stress/fuzzer checks. Changed it toBAD_ARGUMENTS, matching the sibling validations in the same function. The helper is shared by thes3table function and the S3-on-disk path, so both are covered.Version info
26.6.1.914