-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Add Redis table Engine/Function #50150
Conversation
This is an automated comment for commit 49082bf with description of existing statuses. It's updated for the latest CI running
|
Sorry, I'm interested in this feature, but could you please share the usage scenarious of it? Thanks in advance :) |
@helifu n my production scenario, there is a need for flexibility in querying as well as a requirement for high query throughput. I want to promote query throughput Redis. Usage:
|
Ah, that's cool. But it seems that redis can't offer high throughput since it's a key-value storage IIRC. |
It will work in key based query scenarios. |
b9cf222
to
31d81a5
Compare
@pufit Please review it when you have a chance. There are some test errors but maybe unrelated with the PR. |
@pufit May I ask when you have a chance to review th PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides some small questions, LGTM!
@pufit for the issue duplicated keys. To perfectly resolve it, we need additional rehashing stat info from Redis, I submit an issue to Redis for it. And now we have two ways:
I prefer the second one, but any way I will take your opinion? |
Well, actually, the first option looks much more straightforward. All duplications can be handled on ClickHouse side (using |
@pufit Thank you, docs is modified. |
@JackyWoo late to see this but started testing it. I see you always use MGET command and never HMGET - the latter feels more natural for table data. Anyway we could support this as MGET means the values must be a string? |
@gingerwizard Assume that there is a table with schama (key, v1, v2, v3) in which key is ClickHouse primary key. I map key to Redis key and the other columns are packed to Redis value. So PS: key, v1, v2, v3 can be any ClickHouse data type. |
This PR try to close #46146
Changelog category (leave one):
Implements storage in the Redis.
Usage : ENGINE = Redis(host:port[, db_index[, password[, pool_size]]]) PRIMARY KEY(key)
In current design, redis table engine/function must have only one column as primary key who is redis key. And the other columns will be serialized together as redis value.
Redis table engine/function now supports
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
TableFunctionRedis
RedisCommon
which contains Redis related tools and typesequals
andin
filter push down into RedisDocumentation entry for user-facing changes
Tests