Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClickHouse External Table takes derived(aliased) column as normal, thus cause error when write to it #809

Open
yaboyang opened this issue Jul 30, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@yaboyang
Copy link

yaboyang commented Jul 30, 2024

The ClickHouse External Table pulls metadata from ClickHouse by itself. It's convenient but it takes derived columns as normal. And it put all columns into generated insert statement, which sent to ClickHouse, though you select partial columns in proton side. And then a "No such column" error raised if there's one aliased column.

How to reproduce
It should be quite clear.
create table aliased_column(pk Int32, v1 Int32, v2 Int32, s Int32 alias v1 + v2) engine = MergeTree order by pk;
CREATE EXTERNAL TABLE ch_test SETTINGS type='clickhouse', ...
insert into ch_test (pk, v1, v2) values (1, 1, 2)

And then:
Code: 16. DB::Exception: Received from localhost:8463. DB::Exception: Received from xxxx:9000. DB::Exception: No such column s in table default.aliased_column

Proton Version is 1.5.13 revision 54459

@yaboyang yaboyang added the bug Something isn't working label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants