Skip to content

Commit

Permalink
fix: Modify key table viewport to only include key columns (deephaven…
Browse files Browse the repository at this point in the history
…#5669)

* modify key table viewport to only include key columns
* change fetchSummary
  • Loading branch information
AkshatJawne authored Jun 26, 2024
1 parent a7d4ea8 commit 77b6c1c
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.partitionedtable_pb.GetTableRequest;
import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.partitionedtable_pb.MergeRequest;
import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.partitionedtable_pb.PartitionedTableDescriptor;
import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.table_pb.DropColumnsRequest;
import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.table_pb.SelectOrUpdateRequest;
import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
import io.deephaven.web.client.api.barrage.WebBarrageUtils;
import io.deephaven.web.client.api.barrage.def.ColumnDefinition;
Expand Down Expand Up @@ -82,15 +82,15 @@ public Promise<JsPartitionedTable> refetch() {
return w.getExportedObjects()[0].fetch();
}).then(result -> connection.newState((c, state, metadata) -> {
JsTable keyTable = (JsTable) result;
DropColumnsRequest drop = new DropColumnsRequest();
drop.setColumnNamesList(new String[] {descriptor.getConstituentColumnName()});
drop.setSourceId(keyTable.state().getHandle().makeTableReference());
drop.setResultId(state.getHandle().makeTicket());
connection.tableServiceClient().dropColumns(drop, metadata, (fail, success) -> {
SelectOrUpdateRequest view = new SelectOrUpdateRequest();
view.setSourceId(keyTable.state().getHandle().makeTableReference());
view.setResultId(state.getHandle().makeTicket());
view.setColumnSpecsList(descriptor.getKeyColumnNamesList());
connection.tableServiceClient().view(view, metadata, (fail, success) -> {
keyTable.close();
c.apply(fail, success);
});
}, "drop constituent column")
}, "view only keys columns")
.refetch(this, connection.metadata())
.then(state -> Promise.resolve(new JsTable(connection, state)))).then(result -> {
keys = result;
Expand Down

0 comments on commit 77b6c1c

Please sign in to comment.