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

Auto convert md np array to java array for the output of Python UDFs #5011

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jmao-denver
Copy link
Contributor

Fixes #4989

@jmao-denver jmao-denver self-assigned this Jan 5, 2024
@jmao-denver jmao-denver requested a review from jjbrosnan January 5, 2024 21:20
@jmao-denver jmao-denver changed the title Auto convert md np array to java array Auto convert md np array to java array (WIP) Jan 5, 2024
@jmao-denver jmao-denver marked this pull request as ready for review January 5, 2024 21:26
@jmao-denver jmao-denver changed the title Auto convert md np array to java array (WIP) Auto convert md np array to java array Jan 9, 2024
py/server/deephaven/jcompat.py Show resolved Hide resolved
@@ -210,7 +212,7 @@ def f() -> np.ndarray[np.int64]:

with self.assertRaises(DHError) as cm:
t = empty_table(10).update(["X1 = f()"])
self.assertIn("not support multi-dimensional arrays", str(cm.exception))
self.assertIn("java.lang.ClassCastException: class [[J cannot be cast to class [J", str(cm.exception))
Copy link
Member

Choose a reason for hiding this comment

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

Can we get a more python-user-friendly error message, or is the whole message python friendly, and this is just a snippet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is the most important part of the message (including the full trackback etc.) and it is emitted out of the engine. I don't know there is a safe and easy way to make it more Python-user-friendly.

py/server/tests/test_numba_guvectorize.py Outdated Show resolved Hide resolved
@jmao-denver jmao-denver changed the title Auto convert md np array to java array Auto convert md np array to java array for the output of Python UDFs Jan 10, 2024
@jmao-denver jmao-denver marked this pull request as draft February 2, 2024 16:09
@jmao-denver jmao-denver closed this Mar 4, 2024
@jmao-denver jmao-denver deleted the 4989-ndarray-out branch March 4, 2024 18:29
@github-actions github-actions bot locked and limited conversation to collaborators Mar 4, 2024
@jmao-denver jmao-denver restored the 4989-ndarray-out branch March 4, 2024 21:24
@jmao-denver jmao-denver reopened this Mar 4, 2024
@pete-petey pete-petey removed this from the 1. March 2024 milestone Aug 26, 2024
@pete-petey pete-petey added this to the 5. Backlog milestone Aug 26, 2024
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.

Feature request: Support multidimensional arrays in query strings returned from Python functions
3 participants