-
Notifications
You must be signed in to change notification settings - Fork 81
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
JS ChartData type doesn't handle shifts correctly #2435
Comments
Note: hold off on investigation until I can prove it's not due to #2405. |
Python snippet: from deephaven import time_table
tt = time_table("00:00:00.001")\
.update_view(["TimeBin=lowerBin(Timestamp, 1000000000)", "I=i", "K=i%3+i%5+i%7+i%11", "M=K%3+K%5+K%7+K%11"])\
.sort("M")\
.count_by("Count", ["TimeBin", "M"])\
.sort("M") While testing I'm hitting an index error in deephaven-core/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/ChartData.java Line 80 in 80d2379
Maybe @niloc132 would want to know? Digging a bit more before passing off |
This also happens on Enterprise. Here's debug logging with some failure updates - in this case we're looking for
@niloc132 helped with the investigation. Stack trace
|
The underlying issue is SubscriptionTableData doesn't propagate shifts to consumers, like TableData, so the data is broken if shifts appear. Apparently this has always been broken, since shifts were introduced. The easiest fix to consume by JS would be to normalized shifts into add/modify/removes in the existing event, but the most efficient would be to propagate them to TableData to avoid unnecessary data operations. Adding a "shiftObliviousListener" sort of helper here might be best, so that TableData can get the most efficient code, and JS consumers can opt out of handling shifts. Any fix made here should cherry-pick cleanly to enterprise. |
I wonder if we should do an audit of listeners to see if there are any other obvious spots that are missing shift handling :s |
Not the prettiest query, but it seems to get the job done.
Create the following ticking table, and then use chart builder to create a bar chart with TimeBin on x-axis and Count on y-axis, w/ sync'd state. Add a quick-filter on M is equal to 8. The chart will likely tick correctly for a little bit, but then some it will likely stop ticking and will show incorrect data.
A similar demonstration has been achieved w/ pie chart.
The text was updated successfully, but these errors were encountered: