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

[CH] Support convert Char type of HiveTable to FixedString in ClickHouse backend #6057

Open
KevinyhZou opened this issue Jun 12, 2024 · 0 comments · May be fixed by #6060
Open

[CH] Support convert Char type of HiveTable to FixedString in ClickHouse backend #6057

KevinyhZou opened this issue Jun 12, 2024 · 0 comments · May be fixed by #6060
Labels
enhancement New feature or request

Comments

@KevinyhZou
Copy link
Contributor

KevinyhZou commented Jun 12, 2024

Description

Now that the char/varchar type of hive table are always convert to string type in clickhouse backend. And the char type in hive table means the field has fixed bytes, which is suitable to convert to FixedString type in clickhouse.

And in some suitation, the fixed string type can have better performance that the string type in clickhouse. such as the querys contains order by.

Here we defined 2 tables, has the same data, the first one is defined as test_tbl1(id UInt64, d String), and the second is defined as test_tbl2(id UInt64, d FixedString(20)), and we do the query select * from test_tbl order by d limit 100 settings max_threads=1 to compare the performance

In the first table, the result show as below
image

In the second table, the result show as below
image

and we can see that abort 20% ~ 30% performance improve when the table field is defined as FixedString type.

@KevinyhZou KevinyhZou added the enhancement New feature or request label Jun 12, 2024
@KevinyhZou KevinyhZou changed the title [CH] Support convert Char type of HiveTable to FixedString of ClickHouse backend [CH] Support convert Char type of HiveTable to FixedString in ClickHouse backend Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant