Package org.apache.arrow.flight.sql.util
Class SqlInfoOptionsUtils
java.lang.Object
org.apache.arrow.flight.sql.util.SqlInfoOptionsUtils
Utility class for
FlightSql.SqlInfo
and FlightSqlClient.getSqlInfo(org.apache.arrow.flight.sql.impl.FlightSql.SqlInfo...)
option parsing.-
Method Summary
Modifier and TypeMethodDescriptionstatic long
createBitmaskFromEnums
(com.google.protobuf.ProtocolMessageEnum... enums) Creates a bitmask that translates to the specifiedenums
.static long
createBitmaskFromEnums
(Collection<com.google.protobuf.ProtocolMessageEnum> enums) Creates a bitmask that translates to the specifiedenums
.static boolean
doesBitmaskTranslateToEnum
(com.google.protobuf.ProtocolMessageEnum enumInstance, long bitmask) Returns whether the providedbitmask
points to the providedProtocolMessageEnum
by comparingProtocolMessageEnum.getNumber()
with the respective bit index of thebitmask
.
-
Method Details
-
doesBitmaskTranslateToEnum
public static boolean doesBitmaskTranslateToEnum(com.google.protobuf.ProtocolMessageEnum enumInstance, long bitmask) Returns whether the providedbitmask
points to the providedProtocolMessageEnum
by comparingProtocolMessageEnum.getNumber()
with the respective bit index of thebitmask
.- Parameters:
enumInstance
- the protobuf message enum to use.bitmask
- the bitmask response fromFlightSqlClient.getSqlInfo(org.apache.arrow.flight.sql.impl.FlightSql.SqlInfo...)
.- Returns:
- whether the provided
bitmask
points to the specifiedenumInstance
.
-
createBitmaskFromEnums
public static long createBitmaskFromEnums(com.google.protobuf.ProtocolMessageEnum... enums) Creates a bitmask that translates to the specifiedenums
.- Parameters:
enums
- theProtocolMessageEnum
instances to represent as bitmask.- Returns:
- the bitmask.
-
createBitmaskFromEnums
public static long createBitmaskFromEnums(Collection<com.google.protobuf.ProtocolMessageEnum> enums) Creates a bitmask that translates to the specifiedenums
.- Parameters:
enums
- theProtocolMessageEnum
instances to represent as bitmask.- Returns:
- the bitmask.
-