Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(query): Support access Redis data from dictionaries via the dict_get_batch function. #16766

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ prometheus-client = "0.22"
prost = { version = "0.12.1" }
prost-build = { version = "0.12.1" }
rand = { version = "0.8.5", features = ["small_rng"] }
redis = { version = "0.27.5", features = [
"connection-manager",
]}
regex = "1.8.1"
reqwest = { version = "0.12", default-features = false, features = [
"json",
Expand Down
1 change: 1 addition & 0 deletions src/common/exception/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ opendal = { workspace = true }
parquet = { workspace = true }
paste = { workspace = true }
prost = { workspace = true }
redis = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
Expand Down
6 changes: 6 additions & 0 deletions src/common/exception/src/exception_into.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,3 +447,9 @@ impl From<sqlx::Error> for ErrorCode {
ErrorCode::DictionarySourceError(format!("Dictionary Sqlx Error, cause: {}", error))
}
}

impl From<redis::RedisError> for ErrorCode {
fn from(error: redis::RedisError) -> Self {
ErrorCode::DictionarySourceError(format!("Dictionary Redis Error, cause: {}", error))
}
}
2 changes: 1 addition & 1 deletion src/meta/app/src/schema/dictionary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl DictionaryMeta {
.options
.get("port")
.ok_or_else(|| ErrorCode::BadArguments("Miss option `port`"))?;
Ok(format!("tcp://{}:{}", host, port))
Ok(format!("redis://{}:{}", host, port))
}
}

Expand Down
1 change: 1 addition & 0 deletions src/query/expression/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ num-bigint = "0.4.6"
num-traits = "0.2.15"
rand = { workspace = true }
recursive = "0.1.1"
redis = { workspace = true }
roaring = { version = "0.10.1", features = ["serde"] }
rust_decimal = "1.26"
serde = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions src/query/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ poem = { workspace = true }
prost = { workspace = true }
rand = { workspace = true }
recursive = "0.1.1"
redis = { workspace = true }
regex = { workspace = true }
reqwest = { workspace = true }
rustls = "0.22"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,10 @@ impl AsyncTransform for TransformAsyncFunction {
)
.await?;
}
AsyncFunctionArgument::DictGetFunction(dict_arg) => {
AsyncFunctionArgument::DictGetFunction(_) => {
self.transform_dict_get(
i,
&mut data_block,
dict_arg,
&async_func_desc.arg_indices,
&async_func_desc.data_type,
)
Expand Down
Loading
Loading