io.deephaven.proto.flight.util.ArrowHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-proto-backplane-grpc-flight Show documentation
Show all versions of deephaven-proto-backplane-grpc-flight Show documentation
The Deephaven proto-backplane-grpc-flight
The newest version!
//
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
//
package io.deephaven.proto.flight.util;
import org.apache.arrow.flight.FlightDescriptor;
import org.apache.arrow.flight.Ticket;
import org.apache.arrow.flight.impl.Flight;
import java.util.List;
public class ArrowHelper {
public static FlightDescriptor descriptor(org.apache.arrow.flight.impl.Flight.FlightDescriptor impl) {
switch (impl.getType()) {
case PATH:
return FlightDescriptor.path(impl.getPathList());
case CMD:
return FlightDescriptor.command(impl.getCmd().toByteArray());
default:
throw new IllegalArgumentException("Unexpected type " + impl.getTypeValue());
}
}
public static FlightDescriptor descriptor(List path) {
return FlightDescriptor.path(path);
}
public static Ticket ticket(Flight.Ticket ticket) {
return new Ticket(ticket.getTicket().toByteArray());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy