From a64e2c24762989a0f0599266dbe4cd4373dab816 Mon Sep 17 00:00:00 2001 From: jianfengmao Date: Thu, 2 Jan 2025 11:12:50 -0700 Subject: [PATCH] Specify default values for the callback proxies --- py/server/deephaven/experimental/table_data_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/server/deephaven/experimental/table_data_service.py b/py/server/deephaven/experimental/table_data_service.py index 5613d0903b2..1a2cc6a5295 100644 --- a/py/server/deephaven/experimental/table_data_service.py +++ b/py/server/deephaven/experimental/table_data_service.py @@ -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", [])) @@ -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", []))