Skip to content

Commit

Permalink
Specify default values for the callback proxies
Browse files Browse the repository at this point in the history
  • Loading branch information
jmao-denver committed Jan 2, 2025
1 parent 492121d commit a64e2c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/server/deephaven/experimental/table_data_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def _table_locations(self, table_key: TableKey, location_cb: jpy.JType, success_
success_cb (jpy.JType): the success Java callback function with no arguments
failure_cb (jpy.JType): the failure Java callback function with one argument: an exception string
"""
def location_cb_proxy(pt_location_key: TableLocationKey, pt_table: pa.Table):
def location_cb_proxy(pt_location_key: TableLocationKey, pt_table: Optional[pa.Table] = None):
j_tbl_location_key = _JTableLocationKeyImpl(pt_location_key)
if pt_table is None or pt_table.to_batches() is None:
location_cb.apply(j_tbl_location_key, jpy.array("java.nio.ByteBuffer", []))
Expand Down Expand Up @@ -347,7 +347,7 @@ def _subscribe_to_table_locations(self, table_key: TableKey, location_cb: jpy.JT
Returns:
Callable[[], None]: a function that can be called to unsubscribe from this subscription
"""
def location_cb_proxy(pt_location_key: TableLocationKey, pt_table: pa.Table):
def location_cb_proxy(pt_location_key: TableLocationKey, pt_table: Optional[pa.Table] = None):
j_tbl_location_key = _JTableLocationKeyImpl(pt_location_key)
if pt_table is None:
location_cb.apply(j_tbl_location_key, jpy.array("java.nio.ByteBuffer", []))
Expand Down

0 comments on commit a64e2c2

Please sign in to comment.