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

ref(api): parse pipeline tests, mql pipeline before treeify #5885

Merged
merged 3 commits into from
May 13, 2024

Conversation

kylemumma
Copy link
Member

@kylemumma kylemumma commented May 9, 2024

Major Changes

  • separate everything that comes before treeify in mql parse pipeline into its own stage
  • add tests for this stage
  • misc other things

@@ -33,8 +31,7 @@

def and_cond_repr(exp: Expression, visitor: ExpressionVisitor[str]) -> str:
assert isinstance(exp, FunctionCall)
conditions = get_first_level_and_conditions(exp)
parameters = ", ".join([arg.accept(visitor) for arg in conditions])
parameters = ", ".join([arg.accept(visitor) for arg in exp.parameters])
Copy link
Member Author

Choose a reason for hiding this comment

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

the way mapper was creating conditions did not reflect the structure of the query object, bc it was rebalancing

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 is a the class i used to capture intermediate values of the pipeline

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 reflects the new behavior of the mapper to not rebalance

@kylemumma kylemumma marked this pull request as ready for review May 9, 2024 19:33
@kylemumma kylemumma requested a review from a team as a code owner May 9, 2024 19:33
@volokluev
Copy link
Member

cool title

Copy link
Member

@volokluev volokluev left a comment

Choose a reason for hiding this comment

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

Does the PipelineLogger have to be checked in? It's fine for an intermediate step but idk if I want it in the odebase as is

snuba/query/mql/parser.py Outdated Show resolved Hide resolved
snuba/query/mql/parser.py Outdated Show resolved Hide resolved
snuba/utils/pipeline_logger.py Outdated Show resolved Hide resolved
@kylemumma kylemumma changed the title init ref(api): parse pipeline tests, mql pipeline before treeify May 9, 2024
@kylemumma kylemumma merged commit c0237fc into master May 13, 2024
30 checks passed
@kylemumma kylemumma deleted the krm/parserfirsthalf branch May 13, 2024 16:16
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