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

evanh/feat/use composite queries metrics formulas #5717

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

evanh
Copy link
Member

@evanh evanh commented Apr 2, 2024

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.

@@ -0,0 +1,71 @@
pytest tests/query/parser/test_formula_mql_query.py -k "test_simple_formula"
Copy link
Member Author

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:
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

Choose a reason for hiding this comment

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

Ignore this for now.

Copy link
Member

@enochtangg enochtangg left a 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:

JOINABLE_STORAGE_SETS: FrozenSet[FrozenSet[StorageSetKey]] = frozenset(

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.

None yet

2 participants