-
Notifications
You must be signed in to change notification settings - Fork 14
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 Primary Entity Prefix When Specifying Dimensions in the WhereFilter #128
Conversation
1dc2eb0
to
90fece9
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.
One nit, but otherwise looks wonderful!
dimension_reference=DimensionReference(element_name=group_by_item_name.element_name), | ||
entity_path=( | ||
tuple(EntityReference(element_name=arg) for arg in entity_path) | ||
+ group_by_item_name.entity_links |
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.
So the primary entity will be the last one in the entity_path tuple. Cool Cool 👍
87b3fd4
to
49e1388
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.
YAY!
I don't like time granularity dunder joins but it's better to have them here at this time. Let's just annotate it as undesirable in the docstring.
e.g. listing__ds__week -> | ||
entity_links: ["listing"] | ||
element_name: "ds" | ||
granularity: TimeGranularity.WEEK |
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.
Can we indicate that including time granularity is a legacy anti-pattern and no implementer should be relying on it? It has caused so much trouble, and we are trying to eliminate it somehow or other.
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.
Added.
90fece9
to
7351937
Compare
4aa22a6
to
df0645b
Compare
With the invariant that all dimensions are associated with a primary entity, require the specification of the entity when using dimensions in the where filter. e.g. ``` dimension('capacity_latest') > 10 -> dimension('listing__capacity_latest') > 10 ```
df0645b
to
f322968
Compare
Resolves #123
Description
With the invariant that all dimensions are associated with a primary entity, require the specification of the entity when using dimensions in the where filter.
e.g.
Checklist
changie new
to create a changelog entry