-
Notifications
You must be signed in to change notification settings - Fork 80
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
feat: Barrage Refactor Read/Write Chunk Factories #6065
base: main
Are you sure you want to change the base?
Conversation
a6ad4c9
to
c4e970d
Compare
c4e970d
to
28b25d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little nervous about the scope, and the willingness to truncate inputs or infer units.
engine/table/src/main/java/io/deephaven/engine/table/impl/QueryTable.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ReinterpretUtils.java
Show resolved
Hide resolved
@@ -18,7 +20,56 @@ | |||
/** | |||
* Consumes Flight/Barrage streams and transforms them into WritableChunks. | |||
*/ | |||
public interface ChunkReader { | |||
public interface ChunkReader<ReadChunkType extends WritableChunk<Values>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We wondered if you could make the bound looser, e.g. PoolableChunk
or SafeCloseable
. Looks like maybe not? Should PoolableChunk
be a Chunk
(it's not right now)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need these to return the Chunks to support usages such as LongChunkReader#transformTo
. Since ownership is also being passed, it is best to advertise that they're WritableChunk
s.
extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/ChunkReader.java
Outdated
Show resolved
Hide resolved
...s/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/DefaultChunkWriterFactory.java
Show resolved
Hide resolved
...s/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/DefaultChunkWriterFactory.java
Outdated
Show resolved
Hide resolved
...s/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/DefaultChunkWriterFactory.java
Outdated
Show resolved
Hide resolved
...s/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/DefaultChunkWriterFactory.java
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
private static long factorForTimeUnit(final TimeUnit unit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ryan's placeholder.
flakiness (#9948)"
…protobuf repeated fields (deephaven#6434) The fix is taken from code in deephaven#6065. That branch has been in WIP state for several months and we need this fix for DHE. fixes deephaven#6433
… gRPC client (deephaven#6420) This reverts commit 6ada0cb. See deephaven#6401 See deephaven#6400 See deephaven#5996
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The biggest thing I would like to see is unit tests that demonstrate coverage of the various different modes and cases that can happen for the types. There is a lot of code, and I think the testing you've done has mostly been using our clients or flight sql to show that the data makes it back and forth; but there is a lot of room in the spec and a lot of cases that we should make sure get covered for each of these types. We really do have a matrix that is pretty darn big with all of the various input types and output types in the DefaultChunkReaderFactory and DefaultChunkWriterFactory methods.
engine/table/src/main/java/io/deephaven/engine/table/impl/BaseTable.java
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/remote/ConstructSnapshot.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/updategraph/impl/PeriodicUpdateGraph.java
Outdated
Show resolved
Hide resolved
extensions/barrage/src/main/java/io/deephaven/extensions/barrage/ChunkListWriter.java
Outdated
Show resolved
Hide resolved
extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/UnionChunkWriter.java
Outdated
Show resolved
Hide resolved
...rrage/src/main/java/io/deephaven/extensions/barrage/chunk/SingleElementListHeaderReader.java
Show resolved
Hide resolved
extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/MapChunkReader.java
Outdated
Show resolved
Hide resolved
extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/MapChunkReader.java
Outdated
Show resolved
Hide resolved
...nsions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/VarBinaryChunkWriter.java
Show resolved
Hide resolved
@@ -56,6 +56,8 @@ test_that("is_static returns the correct value", { | |||
}) | |||
|
|||
test_that("nrow returns the correct number of rows", { | |||
skip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just temporary until you work with Corey to fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These few test skip()
s are going to be committed with this PR to enable independent PRs between Corey and I.
The issue is that the cpp client cannot handle the data type explicitly uploaded by the r client in this test (as now DH assume you want to round-trip schema).
extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/BooleanChunkWriter.java
Outdated
Show resolved
Hide resolved
extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/BooleanChunkWriter.java
Outdated
Show resolved
Hide resolved
extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/BooleanChunkWriter.java
Outdated
Show resolved
Hide resolved
extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/ByteChunkWriter.java
Outdated
Show resolved
Hide resolved
extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/ListChunkWriter.java
Outdated
Show resolved
Hide resolved
...nsions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/VarBinaryChunkWriter.java
Outdated
Show resolved
Hide resolved
@@ -275,7 +275,8 @@ public <T extends WritableChunk<Values>> ChunkReader<T> newReader( | |||
final ExpansionKernel<?> kernel = | |||
ArrayExpansionKernel.makeExpansionKernel(chunkType, componentTypeInfo.type()); | |||
final ChunkReader<?> componentReader = newReader(componentTypeInfo, options); | |||
return (ChunkReader<T>) new ListChunkReader<>(ListChunkReader.Mode.DENSE, 0, kernel, componentReader); | |||
return (ChunkReader<T>) new ListChunkReader<>(ListChunkReader.Mode.VARIABLE, 0, kernel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why hardcoded here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Primary reason is/was that the UI client (at this time) can only speak with a DH server. So, we know that the Schema field is going to be a List. I've added ListView
and FixedSizeList
to this case and differentiated the modes.
We don't have a way to currently test the code paths for ListView nor FixedSizeList for the web reader .. but I see that it might be useful if someone finds a way to get their paws on our reader in js or typescript and want to read from a non-deephaven arrow host.
It's also easy for me to add what looks to be correct.
...s/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/DefaultChunkWriterFactory.java
Outdated
Show resolved
Hide resolved
...s/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/DefaultChunkWriterFactory.java
Outdated
Show resolved
Hide resolved
I think this should fix #6201 - at one point I believe you had nbauernfeind@b18d660 in this branch, can you bring it back in so we can verify the fix, remove the TODO, and mark that issue as fixed in the description? |
Fixes #58 (custom type serialization / deserialization).
Fixes #936 (ColumnConversionModes is being replaced with easy to integrate custom serialization).
Fixes #2984 (refactoring has good interface documentation).
Fixes #3403 (by supporting a variety of mappings, these now must match client wiring).
Fixes #5258 (snapshot/subscribe methods with default w2w options).
Fixes #5453 (support other Timestamp arrow wire encodings).
Fixes #5864 (support for uint64_t).
Fixes #6114 (supports ObjectVector properly).
This PR adds support to (some to be implemented as this is a WIP):
nightlies: https://github.com/nbauernfeind/deephaven-core/actions/runs/12172832822