-
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
feat: Support remove_blink
to remove blink table semantics in server-side Python
#5958
Conversation
py/server/deephaven/table.py
Outdated
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Should this:
- Error (like here)?
- return self?
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.
@rcaudy @jmao-denver @rbasralian
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.
I think it should just return self.j_table.removeBlink()
without 'thinking about it' (i.e. remove the if
and lean on the behavior of the Java implementation, which the javadocs say happens to be option 2: @return A non-blink child table, or this table if it is not a blink table
)
My understanding of a blink-table is a refreshing one that discards all the previous-cycle-added rows in the current cycle. Does |
I spoke with @jmao-denver at length about this naming / behavior, and I want to summarize that discussion here. It seems that there are three possible competing definitions of "blink table":
Now, here's the difficulty / confusion: I would argue that the third definition is the most intuitive. It seems that the key property of a "blink" table would be the "blinking" property, not how such a table handles aggregations. In fact, I didn't know about these specialized aggregation semantics until very recently. @jmao-denver called me to discuss confusion over this, and we agreed that while definitions 2 or 3 might make sense, defintion 1 does not. One possible partial solution is to consider renaming |
py/server/deephaven/table.py
Outdated
def remove_blink(self) -> Table: | ||
"""Returns a new version of this table without specialized blink table aggregation semantics.""" |
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?
There is a lot of discussion above, but it seems to be overkill. The Javadocs are fairly straightforward:
Is there any reason to make this PR more complex than the javadocs? |
Labels indicate documentation is required. Issues for documentation have been opened: Community: deephaven/deephaven-docs-community#303 |
removeBlink
is used by the Java API to disable the specialized aggregation semantics that blink tables implement. This wrapper adds the functionality to disable those semantics from the Python API.