-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add semantic_model_origin property to LinkableElement interface #1230
Add semantic_model_origin property to LinkableElement interface #1230
Conversation
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
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. |
ee88ff9
to
2ec263f
Compare
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.
Makes sense!
506ca50
to
7b8a6b8
Compare
7b8a6b8
to
2e4a1e1
Compare
LinkableElements have a commonality, which is that they always have either a semantic model where they are defined, or they are virtual constructs (either metric queries or virtual dimensions, such as metric_time). In order to do predicate pushdown evaluation against source nodes, we require the linkable element to have a singular semantic model origin. That may be a virtual model, as in the case of metric_time or metric elements, or it may be a concrete model, as in the case of all other entities and dimensions. This change provides that accessor. It is separated out for ease of review due to the need to rename the existing `semantic_model_origin` property. We could not re-use it, as dataclasses do not allow a mixture of @Property decorated functions and simple properties. This has the added benefit of differentiating between the semantic model origin, which may be virtual, and the semantic model containing the element definition.
2e4a1e1
to
2ea0703
Compare
LinkableElements have a commonality, which is that they always have
either a semantic model where they are defined, or they are virtual
constructs (either metric queries or virtual dimensions, such as
metric_time).
In order to do predicate pushdown evaluation against source nodes,
we require the linkable element to have a singular semantic model origin.
That may be a virtual model, as in the case of metric_time or metric
elements, or it may be a concrete model, as in the case of all other
entities and dimensions.
This change provides that accessor. It is separated out for ease of
review due to the need to rename the existing
semantic_model_origin
property. We could not re-use it, as dataclasses do not allow a mixture
of @Property decorated functions and simple properties. This has the
added benefit of differentiating between the semantic model origin,
which may be virtual, and the semantic model containing the element
definition.