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

Erroneous Vector column expression produces table that fails to render. #2869

Closed
jcferretti opened this issue Sep 19, 2022 · 3 comments · Fixed by #2895
Closed

Erroneous Vector column expression produces table that fails to render. #2869

jcferretti opened this issue Sep 19, 2022 · 3 comments · Fixed by #2895
Assignees
Labels
barrage bug Something isn't working web-client-ui The Web GUI
Milestone

Comments

@jcferretti
Copy link
Member

This expression fails in a python console while trying to render the table, leaving the [!] sign with the "Unable to open table: Error: Error displaying table" in the table rendering zone:

from deephaven import empty_table
t = empty_table(10).update(["A = i % 3", "B = 3 + i % 3", "C = i % 6"]).group_by("A").update("D = (B - C) > 0")

>heduler-Concurrent-4 | .b.BarrageMessageProducer | Internal Error 'ba9c6919-e1ac-4cd8-8fa0-05e516b0b9ca' io.deephaven.UncheckedDeephavenException: Failure to execute snapshot function with unchanged clock
[...]
caused by:
java.lang.UnsupportedOperationException: Vector is not implemented for primitive booleans
@jcferretti jcferretti added bug Something isn't working triage labels Sep 19, 2022
@jcferretti jcferretti added this to the Backlog milestone Sep 19, 2022
@jcferretti
Copy link
Member Author

Another example:
Deephaven - Google Chrome_008
Deephaven - Google Chrome_009

@nbauernfeind
Copy link
Member

nbauernfeind commented Sep 19, 2022

Below is the stack trace of the error. This requires a server-side fix either from @rcaudy, @niloc132 or myself. The apply preview columns task tries to wrap arrays as Vector instances, but boolean vectors are not allowed because we typically reinterpret to byte, to support the null boolean.

Thinking out loud, but the solution that comes to mind is to support boolean[] with a non-vector style wrapper.

java.lang.UnsupportedOperationException: Vector is not implemented for primitive booleans
        at io.deephaven.vector.VectorFactory$1.vectorWrap(VectorFactory.java:20)
        at io.deephaven.engine.table.impl.preview.ArrayPreview.fromArray(ArrayPreview.java:31)
        at io.deephaven.engine.table.impl.select.FunctionalColumn.lambda$new$0(FunctionalColumn.java:48)
        at io.deephaven.engine.table.impl.select.FunctionalColumn$1.get(FunctionalColumn.java:151)
        at io.deephaven.engine.table.impl.chunkfillers.ObjectChunkFiller.lambda$fillByIndices$1(ObjectChunkFiller.java:44)
        at io.deephaven.engine.rowset.RowSequence.lambda$forAllRowKeys$0(RowSequence.java:179)
        at io.deephaven.engine.rowset.impl.singlerange.SingleRangeMixin.forEachRowKey(SingleRangeMixin.java:17)
        at io.deephaven.engine.rowset.RowSequence.forAllRowKeys(RowSequence.java:178)
        at io.deephaven.engine.table.impl.chunkfillers.ObjectChunkFiller.fillByIndices(ObjectChunkFiller.java:43)
        at io.deephaven.engine.table.impl.select.FunctionalColumn$1.fillChunk(FunctionalColumn.java:170)
        at io.deephaven.engine.table.impl.sources.ViewColumnSource.fillChunk(ViewColumnSource.java:219)
        at io.deephaven.engine.table.impl.remote.ConstructSnapshot.getSnapshotDataAsChunkList(ConstructSnapshot.java:1462)

@nbauernfeind nbauernfeind assigned rcaudy and unassigned mofojed Sep 19, 2022
@niloc132
Copy link
Member

Could also just wrap in an ObjectVector instead when boolean is seen, which is what groupBy will to do plain bool columns:

t = empty_table(10).update(formulas = ["BoolCol = true", "A=1"])
t2 = t.group_by("A")

I would have expected t2 to have the same error, but instead it might suggest a solution? Or, this is also wrong, and we should have a real boolean vector type?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
barrage bug Something isn't working web-client-ui The Web GUI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants