-
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
Dev release bug fix: compatible granularities for date_part #214
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,4 +40,4 @@ def to_int(self) -> int: | |
@property | ||
def compatible_granularities(self) -> List[TimeGranularity]: | ||
"""Granularities that can be queried with this date part.""" | ||
return [granularity for granularity in TimeGranularity if granularity.to_int() >= self.to_int()] | ||
return [granularity for granularity in TimeGranularity if granularity.to_int() <= self.to_int()] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a test case around this check anyplace? Might be nice to illustrate what it is and why it's there. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[project] | ||
name = "dbt-semantic-interfaces" | ||
version = "0.4.1" | ||
version = "0.4.2dev0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh wait, this is wrong! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 This is the version that @QMalcolm tole me to use! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tlento Courtney and I talked about this. The goal is to do a dev release so that it can be tested in MetricFlow without doing a production patch release. What we do is a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh is this that it should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll be out the rest of the week, so please move forward without me 🙂 |
||
description = 'The shared semantic layer definitions that dbt-core and MetricFlow use' | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
|
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.
This is so confusing, can we explain it here?
We are switching this to allow TimeGranularity.DAY for DatePart.MONTH, correct? So it'd now look like:
Whereas before we only allowed something like this:
Ok, that makes sense to me now.
Maybe we can document this as:
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.
@tlento this is just the dev release for a PR that already merged to main, you can see here.
This is not actually a behavior change for queries, this was only used in an error message.