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

WIP - multi hop tests #1174

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from
Draft

WIP - multi hop tests #1174

wants to merge 34 commits into from

Conversation

courtneyholcomb
Copy link
Contributor

Resolves #

Description

1) Use new MetricSubqueryJoinPath; 2) Remove redundant attributes; 3) Always require JOINED and METRIC properties
This PR changed how we use the semantic_model_join_path, so this validation is no longer relevant. Now, the semantic_model_join_path does not include the last entity link, since the last join is not joining to a semantic model.
LinkableMetrics are extra complicated because they involve multiple join paths: 1) the join path needed to join the metric subquery to the outer query, and 2) the join path used in the subquery to join the metric to the group by entity. So far we have only been tracking join path 1. This commit adds tracking for join path 2.
…ricSubqueryJoinPathElement.

The user might need to specify an entity path to get to the metric they want. In that case, we might have multiple entity paths to get to a given metric/entity combo. Store all options.
Needed to resolve the appropriate join path for multi-hop joins. Moved source node-building logic to query parser class to avoid cirular import errors. This change also required adding the query parser as a dependency for the dataflow plan builder.
Originally I left out this last entity link because it was duplicated in the outer query entity links. Turns out this is needed when there are no entity links left in the outer query, because otherwise we won't know what entity the metric is being grouped by.
Originally I thought this wasn't necessary since the entity links should be a duplicate of the entities in the join path. Later I reailzed that there is one scenario where they don't match the join path. We allow querying local entities both alone and prefixed with any of the other entities in the same semantic model. If you query a local entity with another entity prefix, the entity links won't match the join path. To account for that, we need to store both entity links and join path on MetricSubqueryJoinPathElement.
@cla-bot cla-bot bot added the cla:yes label May 2, 2024
Copy link

github-actions bot commented May 2, 2024

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

1 similar comment
Copy link

github-actions bot commented May 2, 2024

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Base automatically changed from court/gb-metrics16 to main May 3, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant