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

Remove java execution logic during table.py module init #2872

Merged

Conversation

devinrsmith
Copy link
Member

Fixes #2853

jmao-denver
jmao-denver previously approved these changes Sep 19, 2022
Copy link
Contributor

@jmao-denver jmao-denver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@devinrsmith devinrsmith requested a review from rcaudy September 19, 2022 16:20
rcaudy
rcaudy previously approved these changes Sep 19, 2022
chipkent
chipkent previously approved these changes Sep 19, 2022
@devinrsmith devinrsmith dismissed stale reviews from chipkent and rcaudy via 5b106f5 September 19, 2022 22:30
@devinrsmith
Copy link
Member Author

Related #2867

@@ -11,10 +11,12 @@

class FilterTestCase(BaseTestCase):
def setUp(self):
BaseTestCase.setUp(self)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super().setUp()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

Comment on lines 58 to 59
if not j_query_scope:
raise DHError("ExecutionContext does not have QueryScope")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for PoisonedQueryScope?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following cast will throw an appropriate exception, essentially saying that a poisoned query scope can't be cast into the type we are wanting to.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That said; this may have been me fumbling around trying to figure out why my DHError wasn't working. Looking at the code, I don't think any of the values in ExecutionContext can/should be null. I'll add a not null check to ExecutionContext, and I think we can get rid of this extraneous check.

jmao-denver
jmao-denver previously approved these changes Sep 20, 2022

t = empty_table(1).update("X = i").update("TableString = inner_func(X + 10)")
with make_user_exec_ctx():
def inner_func(p) -> str:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that it is more clear if the method is not defined within the open context. Only the update calls need it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

open_ctx.close()
return t.to_string().split()[2]
with make_user_exec_ctx():
def inner_func(p) -> str:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same on this inner function

@devinrsmith devinrsmith merged commit 7f63d2c into deephaven:main Sep 20, 2022
@devinrsmith devinrsmith deleted the deephaven-table-init-no-java-exec branch September 20, 2022 17:02
@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2022
@nbauernfeind
Copy link
Member

LGTM, too (yah, I know it's already merged)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to assert that deephaven_server.Server is started before importing deephaven
5 participants