ClickHouse / ClickHouse/ClickHouse

Distributed table engine does not recognize virtual column `_partition_value`

Open
#85,169 0 comments 0 reactions 0 assignees View on GitHub
comp-distributed external potential bug
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

### Company or project name

_No response_

### Describe what's wrong

```sql
CREATE TABLE t (p String, s String)
ENGINE=MergeTree
PARTITION BY p
ORDER BY tuple();

CREATE TABLE t_dist AS t ENGINE=Distributed('default','default','t');

INSERT INTO t VALUES ( 'p1','value1');

SELECT * FROM t WHERE _partition_value.1='p1';
SELECT * FROM t_dist WHERE _partition_value.1='p1';
```

https://fiddle.clickhouse.com/e31e77c6-1cab-4e75-b7b8-af3794c166ea

### Does it reproduce on the most recent release?

Yes

### How to reproduce

^

### Expected behavior

_No response_

### Error message and/or stacktrace

_No response_

### Additional context

_No response_

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.