Skip to content

fix: DH-18655: JS API can upload the same types it can download#7995

Open
niloc132 wants to merge 21 commits intodeephaven:mainfrom
niloc132:18655-bmwi-js
Open

fix: DH-18655: JS API can upload the same types it can download#7995
niloc132 wants to merge 21 commits intodeephaven:mainfrom
niloc132:18655-bmwi-js

Conversation

@niloc132
Copy link
Copy Markdown
Member

@niloc132 niloc132 commented May 6, 2026

Uses BarrageMessageWriterImpl to serialize chunks to upload with DoPut from the JS API, ensuring that we have matching chunk reader and writer support.

Extends our JS emulation to handle more of RowSet, including RowSetShiftData and BarrageMessage. This patch does not go further to remove WebBarrageMessage where it exists already and read/write the same message type, but that probably will be helpful eventually.

JsDataHandler still serves a role here, normalizing arrays of data passed from JS into a form that we can wrap with chunks and write to the server. It also has mappings for JVM types and how we expect to encode them in flight.

@niloc132 niloc132 added this to the 42.0 milestone May 6, 2026
@niloc132 niloc132 requested review from cpwright and rcaudy as code owners May 6, 2026 19:53
@niloc132 niloc132 added the arrow label May 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

No docs changes detected for f55499d

Comment thread web/client-api/src/main/java/io/deephaven/web/client/api/LocalTimeWrapper.java Outdated
Copy link
Copy Markdown
Contributor

@cpwright cpwright left a comment

Choose a reason for hiding this comment

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

The only serious thing is the question about null handling for some types, I am worried that a null BigInteger or friends will result in an NPE as we try to write it.

case Type.Binary: {
if (typeInfo.type() == BigIntegerWrapper.class) {
return (ChunkWriter<T>) new VarBinaryChunkWriter<BigIntegerWrapper>(true,
(out, item) -> out.write(item.getWrapped().toByteArray()));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We don't have to worry about item nulls here or in BigDecimal/utf8?

Comment on lines +68 to +70
if (this.isEmpty() || rowSet.isEmpty()) {
return RowSetFactory.empty();
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would flip the empty checks, which should be cheap compared to an equals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants