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

Hit response refactor #289

Merged
merged 6 commits into from
Jun 7, 2024
Merged

Hit response refactor #289

merged 6 commits into from
Jun 7, 2024

Conversation

jakozaur
Copy link
Contributor

@jakozaur jakozaur commented Jun 7, 2024

Move response creation to parsing so we would able to leverage parsing features to set the right options.

We should also relax condition; the hits could be any query, not necessarily the last one.

@jakozaur jakozaur requested a review from a team as a code owner June 7, 2024 15:50
@jakozaur jakozaur mentioned this pull request Jun 7, 2024
@@ -46,7 +46,6 @@ type (
NoDBQuery bool // true <=> we don't need query to DB here, true in some pipeline aggregations
Parent string // parent aggregation name, used in some pipeline aggregations
Aggregators []Aggregator // keeps names of aggregators, e.g. "0", "1", "2", "suggestions". Needed for JSON response.
SubSelect string
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is unused.

@@ -99,14 +99,6 @@ func (cw *ClickhouseQueryTranslator) MakeAsyncSearchResponse(ResultSet []model.Q
return &response, nil
}

func (cw *ClickhouseQueryTranslator) MakeAsyncSearchResponseMarshalled(ResultSet []model.QueryResultRow, query *model.Query, asyncRequestIdStr string, isPartial bool) ([]byte, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was function only used twice in tests. Inlining in tests makes more sense.

@pivovarit pivovarit merged commit 272cbac into main Jun 7, 2024
4 checks passed
@pivovarit pivovarit deleted the jacek-response-refactor branch June 7, 2024 17:38
pdelewski pushed a commit that referenced this pull request Jun 9, 2024
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.

2 participants