-
Notifications
You must be signed in to change notification settings - Fork 48
feat: Allow windowing in 'partial' ordering mode #861
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
Conversation
bigframes/session/__init__.py
Outdated
@@ -377,6 +378,10 @@ def slot_millis_sum(self): | |||
"""The sum of all slot time used by bigquery jobs in this session.""" | |||
return self._slot_millis_sum | |||
|
|||
@property | |||
def allow_ambiguity(self) -> bool: |
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.
Does this need to be a public property? I'd prefer to keep it private until we have a request from users to modifying it.
Also, I'm not sold on the naming. Should it be specific and mention ambiguous orderings? Or rename to allow all forms of non-determinism?
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.
Yes, no reason to make this a public property. This is specifically for use in windowing - where ambiguous orderings produce ambiguous row values. Ordering ambiguity is introduced through "partial" ordering mode already.
bigframes/core/__init__.py
Outdated
raise ValueError("Generating offsets not supported in unordered mode") | ||
if self.node.order_ambiguous and not (self.session._strictly_ordered): | ||
if not self.session._allows_ambiguity: | ||
raise ValueError("Generating offsets not supported in unordered mode") |
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.
Nit: partial ordered mode
Let's try to be consistent with our naming of the feature.
bigframes/core/__init__.py
Outdated
) | ||
if not self.session._allows_ambiguity: | ||
raise ValueError( | ||
"Generating offsets not supported in unordered mode" |
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.
Nit: partial ordered mode
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕