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

fix(search_family): Remove the output of extra fields in the FT.AGGREGATE command #4231

Conversation

BagritsevichStepan
Copy link
Contributor

@BagritsevichStepan BagritsevichStepan commented Nov 29, 2024

fixes #4230

First PR for complete support of the SORTBY option (#3631)

To see examples please check the issue.
Add code that checks, during aggregate steps, what fields should be printed.

};
}

PipelineResult Process(std::vector<DocValues> values, absl::Span<const PipelineStep> steps) {
PipelineResult Process(std::vector<DocValues> values,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please put your prod-duty hat, and think about all the VLOG statements you would like to have, if we have problems in production with this code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

return result;
values = std::move(result.value());
PipelineResult step_result = step(std::move(result));
result = std::move(step_result);
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer to see step method modifying the result instead of all these moves

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean that we need to refactor this logic and have something like Aggregator that stores current result and has methods like DoSort, DoReduce? Or use pointer here

Copy link
Contributor

Choose a reason for hiding this comment

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

yes

Copy link
Contributor

Choose a reason for hiding this comment

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

What about this question? to refactor steps and modify the result instead of moving it every time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I spoke about it today. I'm finalizing it

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you going to create another PR?

Copy link
Contributor Author

@BagritsevichStepan BagritsevichStepan Dec 11, 2024

Choose a reason for hiding this comment

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

Yes, I think that it would be better to create another PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also for logs that Roman mentioned, because we first need to refactor the code before adding the logs in the appropriate places

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BorysTheDev
BorysTheDev previously approved these changes Dec 11, 2024
Signed-off-by: Stepan Bagritsevich <[email protected]>
@BagritsevichStepan
Copy link
Contributor Author

Just fixed the nit

@BorysTheDev
Copy link
Contributor

Just fixed the nit

If you address comments please do an additional commit instead of amend and force push, because it's easier to review.

@BagritsevichStepan BagritsevichStepan enabled auto-merge (squash) December 11, 2024 10:43
@BagritsevichStepan BagritsevichStepan merged commit 76f79f0 into dragonflydb:main Dec 11, 2024
9 checks passed
@BagritsevichStepan BagritsevichStepan deleted the df.search/fix-aggregate-steps-result branch December 11, 2024 11:30
@BagritsevichStepan BagritsevichStepan restored the df.search/fix-aggregate-steps-result branch December 12, 2024 11:06
@BagritsevichStepan BagritsevichStepan deleted the df.search/fix-aggregate-steps-result branch December 12, 2024 14:07
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

Successfully merging this pull request may close these issues.

FT.AGGREGATE prints extra fields
3 participants