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

Java: FT.PROFILE #2473

Merged
merged 8 commits into from
Oct 28, 2024
Merged

Conversation

Yury-Fridlyand
Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand commented Oct 17, 2024

Issue link

#2428

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one issue.
  • Commit message has a detailed description of what changed and why.
  • Tests are added or updated.
  • CHANGELOG.md and documentation files are updated.
  • Destination branch is correct - main or release
  • Commits will be squashed upon merging.

@Yury-Fridlyand Yury-Fridlyand added the java issues and fixes related to the java client label Oct 17, 2024
@Yury-Fridlyand Yury-Fridlyand requested a review from a team as a code owner October 17, 2024 21:01
@Yury-Fridlyand Yury-Fridlyand marked this pull request as draft October 17, 2024 21:01
@Yury-Fridlyand Yury-Fridlyand mentioned this pull request Oct 17, 2024
13 tasks
@Yury-Fridlyand Yury-Fridlyand force-pushed the java/yuryf-ft-profile-valkey-424 branch from 6641d4d to 6b23e6b Compare October 17, 2024 23:18
@Yury-Fridlyand Yury-Fridlyand marked this pull request as ready for review October 17, 2024 23:19
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
…t-profile-valkey-424

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
…t-profile-valkey-424

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
@@ -1472,6 +1511,14 @@ pub(crate) fn expected_type_for_cmd(cmd: &Cmd) -> Option<ExpectedReturnType> {
}),
b"FT.AGGREGATE" => Some(ExpectedReturnType::FTAggregateReturnType),
b"FT.SEARCH" => Some(ExpectedReturnType::FTSearchReturnType),
// TODO replace with tuple
b"FT.PROFILE" => Some(ExpectedReturnType::FTProfileReturnType(
if cmd.arg_idx(2).is_some_and(|a| a == b"SEARCH") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting solution - good re-use of code

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
public class FTProfileOptions {
private final QueryType queryType;
private final boolean limited;
private final GlideString[] commandLine;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good. This avoids the confusion between query and commandLine.

@Yury-Fridlyand Yury-Fridlyand merged commit cb21081 into release-1.2 Oct 28, 2024
40 of 42 checks passed
@Yury-Fridlyand Yury-Fridlyand deleted the java/yuryf-ft-profile-valkey-424 branch October 28, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java issues and fixes related to the java client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants