ClickHouse / ClickHouse/ClickHouse

Dictionary with same fields for keys and attributes fails

Open
#25,673 2 comments 0 reactions 0 assignees View on GitHub
comp-dictionary external unexpected behaviour
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

**Describe the unexpected behaviour**
I'm creating a dictionary that has 3 fields that are also used in the PRIMARY KEY.

Example:
```
CREATE DICTIONARY test (
user_name String,
from_country String,
to_country String

)
PRIMARY KEY user_name, from_country, to_country
.....
```
Which results in an error: `DB::Exception: Dictionary has no attributes defined `

**How to reproduce**
* Which ClickHouse server version to use: 21.3.9.83

**Expected behavior**
The XML version of the dictionary allows for this so expected this to work with the DDL version.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.