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 array copy function for booleans #3357

Merged
merged 2 commits into from
Jan 25, 2023
Merged

Conversation

mofojed
Copy link
Member

@mofojed mofojed commented Jan 25, 2023

  • Boolean was encoded as a ByteArrayColumnData in WebBarrageUtils. Converting to an Int was causing a class cast exception
  • Use a BooleanArrayColumnData for encoding boolean data instead (BooleanArrayColumnData wasn't being used anywhere)
  • Just check for null values, then check the boolean value
  • Only subscribe to columns necessary for the current plot instead of all the columns in the table
  • Fixes Plot builder doesn't work #3356

Tested with the snippets from the ticket, and building plots with the tables. All worked fine.
Also tested with a ticking table with true, false, and null:

from deephaven import time_table
tt = time_table("00:00:01").update(["y=Math.sin(i)", "MyBoolean=i%5==0 ? true : i%2 == 0 ? false : null"])

Worked as expected without errors.

- Boolean was encoded as a ByteArrayColumnData in WebBarrageUtils. Converting to an Int was causing a class cast exception
- Use a BooleanArrayColumnData for encoding boolean data instead (BooleanArrayColumnData wasn't being used anywhere)
- Just check for null values, then check the boolean value
- Fixes deephaven#3356
@mofojed mofojed added bug Something isn't working NoDocumentationNeeded NoReleaseNotesNeeded No release notes are needed. labels Jan 25, 2023
@mofojed mofojed added this to the Jan 2023 milestone Jan 25, 2023
@mofojed mofojed self-assigned this Jan 25, 2023
Copy link
Member

@nbauernfeind nbauernfeind left a comment

Choose a reason for hiding this comment

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

Hmm.. Sorry about the Byte/Boolean typo! I wonder why I didn't catch this error in non-plot related testing. I did check trues/falses and nulls.

@mofojed mofojed merged commit 89cbd6a into deephaven:main Jan 25, 2023
@mofojed mofojed deleted the 1004-plot-builder branch January 25, 2023 20:13
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working NoDocumentationNeeded NoReleaseNotesNeeded No release notes are needed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plot builder doesn't work
2 participants