-
Notifications
You must be signed in to change notification settings - Fork 80
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
feat: Support remove_blink
to remove blink table semantics in server-side Python
#5958
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 |
---|---|---|
|
@@ -816,6 +816,16 @@ def flatten(self) -> Table: | |
"""Returns a new version of this table with a flat row set, i.e. from 0 to number of rows - 1.""" | ||
return Table(j_table=self.j_table.flatten()) | ||
|
||
def remove_blink(self) -> Table: | ||
"""Returns a new version of this table without specialized blink table aggregation semantics.""" | ||
if self.is_blink: | ||
try: | ||
return Table(j_table=self.j_table.removeBlink()) | ||
except Exception as e: | ||
raise DHError(e, "failed to remove blink table semantics.") from e | ||
else: | ||
raise RuntimeError("Table is not a blink table, so blink table semantics cannot be removed.") | ||
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. Should this:
I'm not sure which provides the most natural behavior in the wild or what is most consistent with other API operations we have. I might guess 2 is more consistent, but I'm not sure. 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 think it should just return |
||
|
||
def snapshot(self) -> Table: | ||
"""Returns a static snapshot table. | ||
|
||
|
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.
Do we need to document what happens if this table is not a blink table?