Search in sources :

Example 1 with CustomColumnDescriptor

use of io.deephaven.web.shared.data.CustomColumnDescriptor in project deephaven-core by deephaven.

the class BatchBuilder method buildCustomColumns.

private Operation buildCustomColumns(BatchOp op, Supplier<TableReference> prevTableSupplier, Consumer<Ticket>[] lastOp) {
    SelectOrUpdateRequest value = new SelectOrUpdateRequest();
    for (CustomColumnDescriptor customColumn : op.getCustomColumns()) {
        if (op.getAppendTo() == null || !op.getAppendTo().hasCustomColumn(customColumn)) {
            value.addColumnSpecs(customColumn.getExpression());
        }
    }
    if (value.getColumnSpecsList().length == 0) {
        return null;
    }
    Operation updateViewOp = new Operation();
    updateViewOp.setUpdateView(value);
    value.setSourceId(prevTableSupplier.get());
    lastOp[0] = value::setResultId;
    return updateViewOp;
}
Also used : CustomColumnDescriptor(io.deephaven.web.shared.data.CustomColumnDescriptor) Operation(io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.table_pb.batchtablerequest.Operation)

Aggregations

Operation (io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.table_pb.batchtablerequest.Operation)1 CustomColumnDescriptor (io.deephaven.web.shared.data.CustomColumnDescriptor)1