Skip to content

Commit

Permalink
Delegate blink checking and return values to Java impl
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpeters1208 committed Aug 22, 2024
1 parent c4464d5 commit 8c1c65f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
11 changes: 4 additions & 7 deletions py/server/deephaven/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,13 +818,10 @@ def flatten(self) -> Table:

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.")
try:
return Table(j_table=self.j_table.removeBlink())
except Exception as e:
raise DHError(e, "failed to remove blink table semantics.") from e

def snapshot(self) -> Table:
"""Returns a static snapshot table.
Expand Down
3 changes: 0 additions & 3 deletions py/server/tests/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,9 +936,6 @@ def test_remove_blink(self):
self.assertEqual(t_blink.is_blink, True)
self.assertEqual(t_no_blink.is_blink, False)

with self.assertRaises(RuntimeError):
t_no_blink.remove_blink()

def test_grouped_column_as_arg(self):
t1 = empty_table(100).update(
["id = i % 10", "Person = random() > 0.5 ? true : random() > 0.5 ? false : true"]).sort(
Expand Down

0 comments on commit 8c1c65f

Please sign in to comment.