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

Connector doesn't recognize hash functions for Distributed Tables while insertInto #385

Open
FreakingMind opened this issue Feb 13, 2025 · 0 comments

Comments

@FreakingMind
Copy link

When I create a table with rand() distribution key everything works fine:

create table test.test_local
(
    `installment_id` String,
    `payment_num`    Float64,
    `payment_date`   Date
)
    engine = MergeTree
        order by installment_id;

create table test.test_distributed on cluster 'all_sharded_cluster' as test.test_local
engine = Distributed('all_sharded_cluster', test, test_local, rand());

But when I create it with toUInt32OrDefault(xxHash32() I get error:

create table test.test_distributed_2 on cluster 'all_sharded_cluster' as test.test_local
engine = Distributed('all_sharded_cluster', test, test_local, toUInt32OrDefault(xxHash32(installment_id));
final_table.write.insertInto("clickhouse.test.test_distributed_2")

Error

AnalysisException: [-1] Unsupported ClickHouse expression: FuncExpr[toUInt32OrDefault(xxHash32(installment_id))]

Can u provide any help on solving this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant