Skip to content

fix: Remove double-wrapping in query_update_performance_map (6883)#7781

Merged
jmao-denver merged 7 commits intodeephaven:mainfrom
leochen4891:fix/perfmon-query-update-performance-map
Mar 11, 2026
Merged

fix: Remove double-wrapping in query_update_performance_map (6883)#7781
jmao-denver merged 7 commits intodeephaven:mainfrom
leochen4891:fix/perfmon-query-update-performance-map

Conversation

@leochen4891
Copy link
Copy Markdown
Contributor

@leochen4891 leochen4891 commented Mar 11, 2026

Summary

perfmon.query_update_performance_map() fails with ValueError: cast: argument 1 (obj) must be a Java object because j_map_to_dict already wraps Java Table values into Python Table instances via wrap_j_object, but the function then tries to wrap them again with Table(j_table=d[k]).

The first commit adds a test capturing the existing behavior. The second commit fixes the double-wrapping and updates the test to verify the expected behavior.

Fixes #6883

leochen4891 and others added 2 commits March 11, 2026 13:04
…883)

The function raises DHError because j_map_to_dict already wraps Java
Table values via wrap_j_object, but the function then attempts to wrap
them again with Table(j_table=d[k]), causing a jpy.cast ValueError.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
j_map_to_dict already converts Java Table values to Python Table
instances via wrap_j_object. The subsequent loop re-wrapping with
Table(j_table=d[k]) passed an already-wrapped Python Table to jpy.cast,
which only accepts Java objects.

Fixes deephaven#6883

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 11, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 11, 2026

No docs changes detected for a2b90f1

@leochen4891
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

deephaven-internal added a commit to deephaven/cla that referenced this pull request Mar 11, 2026
@jmao-denver jmao-denver changed the title fix: Remove double-wrapping in query_update_performance_map (DH-6883) fix: Remove double-wrapping in query_update_performance_map (6883) Mar 11, 2026
Comment thread py/server/tests/test_perfmon.py Outdated
@leochen4891
Copy link
Copy Markdown
Contributor Author

@jmao-denver Nice catch. Thanks.

Comment thread py/server/deephaven/perfmon.py Outdated
Comment thread py/server/tests/test_perfmon.py
Comment thread py/server/tests/test_perfmon.py Outdated
Comment thread py/server/tests/test_perfmon.py
Co-authored-by: Jianfeng Mao <4297243+jmao-denver@users.noreply.github.com>
@jmao-denver jmao-denver self-requested a review March 11, 2026 18:12
Comment thread py/server/tests/test_perfmon.py Outdated
@jmao-denver jmao-denver self-requested a review March 11, 2026 19:26
@jmao-denver
Copy link
Copy Markdown
Contributor

jmao-denver commented Mar 11, 2026

@jmao-denver Nice catch. Thanks.

No problem. The changes look good. I thought I could quickly fix the format issues but human can seldom beat the tools. And thanks for the fix!

@jmao-denver jmao-denver merged commit c0fca93 into deephaven:main Mar 11, 2026
24 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 11, 2026
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.

perfmon.query_update_performance_map() does not work

2 participants