Skip to content
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

Fix batch export response handling pyclient #1859

Merged
merged 1 commit into from
Jan 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pyclient/pydeephaven/_table_service.py
Original file line number Diff line number Diff line change
@@ -25,10 +25,11 @@ def batch(self, ops):
for exported in response:
if not exported.success:
raise DHError(exported.error_info)
exported_tables.append(Table(self.session, ticket=exported.result_id.ticket,
schema_header=exported.schema_header,
size=exported.size,
is_static=exported.is_static))
if exported.result_id.WhichOneof("ref") == "ticket":
exported_tables.append(Table(self.session, ticket=exported.result_id.ticket,
schema_header=exported.schema_header,
size=exported.size,
is_static=exported.is_static))
return exported_tables[-1]
except Exception as e:
raise DHError("failed to finish the table batch operation.") from e
4 changes: 2 additions & 2 deletions pyclient/pydeephaven/table.py
Original file line number Diff line number Diff line change
@@ -43,8 +43,8 @@ def __del__(self):
if self.ticket and self.schema and self.session.is_alive:
self.session.release(self.ticket)
except Exception as e:
# TODO: log the exception
...
# TODO(deephaven-core#1858): Better error handling for pyclient around release #1858
pass

@property
def is_closed(self):