Numeric `T64` codec argument returns `BAD_GET` instead of a codec parameter error
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start with the argument validation in src/Compression/CompressionCodecT64.cpp around lines 863–866, where the issue identifies the unchecked string access. Find the codec tests covering invalid T64 parameters and add a case for a numeric argument. The change is done when that input returns an explicit codec parameter or syntax error instead of BAD_GET, and the relevant test passes.
Written by the indexing model from the issue text.
Description
Describe what's wrong
CODEC(T64(1)) passes a numeric literal into a string-only codec variant parser and returns the internal BAD_GET error (Code: 170). Other invalid codec arguments return explicit validation errors.
Does it reproduce on the most recent release?
Yes. Reproduced on the official 26.11.3.10 image and on master 26.12.1.406 (4bb4fd70a64f5f47d831ac058dc1e66ef7566379).
How to reproduce
CREATE TABLE t64_bad (v Int64 CODEC(T64(1))) ENGINE = MergeTree ORDER BY tuple();
Observed on both official builds (version and system.build_options.VERSION_GITHASH shown first):
26.11.3.10 140ed3946895ad84e6c05da55e9a117752e1f631
Code: 170. DB::Exception: Received from localhost:9000. DB::Exception: Bad get: has UInt64, requested String. (BAD_GET)
26.12.1.406 4bb4fd70a64f5f47d831ac058dc1e66ef7566379
Code: 170. DB::Exception: Received from localhost:9000. DB::Exception: Bad get: has UInt64, requested String. (BAD_GET)
T64(9) returns the same error. Controls on both builds: T64('LZ4') returns Code: 433 (ILLEGAL_CODEC_PARAMETER) with Wrong modification for T64: LZ4.; T64('LZ4', 1) returns Code: 431 (ILLEGAL_SYNTAX_FOR_CODEC_TYPE) with T64 support zero or one parameter, given 2.; Delta(7) returns Code 433, NONE(1) Code 378, and GCD(None) Code 431.
Expected behavior
Reject a non-string T64 variant with ILLEGAL_CODEC_PARAMETER or ILLEGAL_SYNTAX_FOR_CODEC_TYPE, as other invalid codec arguments are rejected.
Relevant code
src/Compression/CompressionCodecT64.cpp:863-866 in both v26.11.3.10-stable and 4bb4fd70a64f checks that the argument is an ASTLiteral, then calls literal->value.safeGet<String>() without checking the literal's value type. That call throws BAD_GET for a numeric literal.
- Dominant language
- C++
- Stars
- 51.1k
- Forks
- 9.3k
- Avg merge
- 14h 56m
- Merged PRs (30d)
- 423
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ClickHouse/ClickHouse
-
comp-documentation
Difficulty 1/5 Under an hour Newbie friendliness 88/100
ClickHouse/ClickHouse#135112 ·
Maintainers usually reply within 1 day
-
PromQL string literals accept a `+` inside hexadecimal escapes (`\x+1`, `\u+041`)Possibly taken @lazerg claimed this today. Opencomp-promql potential bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/ClickHouse#134781 ·
Maintainers usually reply within 1 day
-
`SIGFPE` reading `JSON` from a `Wide` part when `max_prefixes_deserialization_thread_pool_size` is 0Possibly taken @groeneai claimed this 1 day ago. Opencomp-json-datatype v25.8-affected v26.10-affected v26.11-affected v26.8-affected v26.9-affected
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ClickHouse/ClickHouse#134554 ·
Maintainers usually reply within 1 day
-
Prometheus query API: X-ClickHouse-Summary reports read_rows 0 for the PromQL queries it runsPossibly taken @groeneai claimed this 1 day ago. Opencomp-promql
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/ClickHouse#134380 ·
Maintainers usually reply within 1 day
-
bug comp-keeper
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ClickHouse/ClickHouse#134242 · 3 comments ·
Maintainers usually reply within 1 day
All issues in ClickHouse/ClickHouse
Similar issues
-
Build fails on macOS 27: dyld refuses stripped Rust proc-macros (mis-aligned LINKEDIT string pool)Open
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
cloudflare/workerd#8963 ·
Maintainers usually reply within 1 day
-
Android Bug Core Drape
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
organicmaps/organicmaps#14449 ·
Maintainers usually reply within 1 day
-
difficulty:easy func:python os:windows prio:high type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NatronGitHub/Natron#2029 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
ardazishvili/Sota#114 ·
Maintainers usually reply within 1 day
-
`Rect::containsPoint` is not `const`, so a `const Rect` cannot be asked whether it holds a pointOpenNeeds: Triage :mag:
Difficulty 1/5 Under an hour Newbie friendliness 82/100
react/react-native#60349 ·
Maintainers usually reply within 1 day