-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
evanh/feat/use composite queries metrics formulas #5717
Conversation
@@ -0,0 +1,71 @@ | |||
pytest tests/query/parser/test_formula_mql_query.py -k "test_simple_formula" |
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.
This file was just to help me track my progress, so I didn't have to context switch as much. Please ignore.
@@ -160,15 +160,6 @@ def get_alias_node_map(self) -> Mapping[str, IndividualNode[TSimpleDataSource]]: | |||
**self.right_node.get_alias_node_map(), | |||
} | |||
|
|||
def __post_init__(self) -> None: |
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.
This was removed because of resolution: this check happens before resolving happens, so there are bunch of columns in the query that "don't exist".
@@ -0,0 +1,185 @@ | |||
from __future__ import annotations |
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.
Moved all of this logic to this file to simplify the parser code a bit. Also made it able to work for simple and formula queries.
@@ -0,0 +1,260 @@ | |||
from __future__ import annotations |
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.
Ignore this for now.
@@ -1,3 +1,5 @@ | |||
from __future__ import annotations |
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.
Ignore this 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.
I know the pipeline isn't suppose to be functional yet, but something I came across when re-organizing the query pipeline is adding the storages set keys to JOINABLE_STORAGE_SETS
in order for composite query pipeline to work properly:
snuba/snuba/clusters/storage_sets.py
Line 86 in 8261937
JOINABLE_STORAGE_SETS: FrozenSet[FrozenSet[StorageSetKey]] = frozenset( |
5fa5687
to
ed82f21
Compare
dbb158c
to
eaeb668
Compare
6493edb
to
18489d0
Compare
35730b7
to
10c0825
Compare
Unnecessary now. |
Initial draft of changes to support multi-type formulas.
This PR only has changes to the MQL parser, the rest of the pipeline doesn't work yet.
To see an example of a finished query, look at
tests/query/parser/test_formula_mql_query.py
.