Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Adding average rate logic in query service #87
Adding average rate logic in query service #87
Changes from 31 commits
9ca540d
8ce1e48
a93b752
ae7e640
aad7af7
7f0097c
089cb3c
4f2692f
334b090
f0c2675
d53b439
216ace8
711325a
33ebefa
3bd93d6
67f55da
c1ebc65
7dd43eb
305632f
9cca2be
ee60629
246600d
18781c2
50203ef
c7d51dd
20b4073
c4cd3f2
5b77e64
beeed4b
c006e70
69a500f
7cfb5a7
93cb20b
f1c9029
88b66d7
029f188
f322ed5
2041c72
83e1d1e
3b9180a
a159461
4f8ddaf
67b9e9c
e76db76
ab7dcfe
b87da0b
dcb6e04
db84e83
81e6b1d
4002459
b735a55
909f014
a1e298c
bc0c19c
a4fac59
cd3036e
6f9fa28
4a49ce0
5378145
8ba8fae
49a8f9a
8e9585f
a5438ec
b9e8f1f
f182691
31c1633
7052c4a
8d6152d
9c3606e
12f8c3e
21acc1f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
it may not start with startTime either - that's not an assumption we want in code. We want to read this col name out of config if we can, I think another comment pointed out where that is. Not sure if we have the context about which view will be selected yet here though, so at a minimum, we should isolate this assumption into its own function that can be fixed later (another option is to take a heuristic approach like look for a pair of filters that are doing >= long and < long, but probably overkill for now).
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.
We never check operators here. What if I put a filter on it like startTime = X ?
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.
Yes. As discussed with @kotharironak, we will read it from a config file in a later follow up PR. Also possibility of startTime = X was ruled out in the discussion.
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.
As part of the discussion, I was suggesting two things.
What do we have to do?
If we agree to use this config (https://github.com/hypertrace/query-service/blob/main/query-service/src/main/resources/configs/common/application.conf#L29 ) as our time filter column, for now, we can add this information in execution context in handler selection. This will also require RequstHandler to expose a method something like
getTimeFilterAttribute
.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.
Given how we generally translate the time range filter (towards the top) I think I'd actually do a breadth first rather than DFS/in-order, but it shouldn't really matter. The important difference from a regular tree walk that will need to be accounted for either way - only recursing through AND nodes. As soon as you hit an OR, you can turn discard that node because a time range can never be OR'd.
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.
Also, agree on using that config - just want to make sure we're careful about any dependencies between parsing the query and handler selection (we need to parse to do handler selection, but we need handler selected to parse out this info).
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.
@rish691