Module org.apache.arrow.flight.sql
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 longcreateBitmaskFromEnums(com.google.protobuf.ProtocolMessageEnum... enums) Creates a bitmask that translates to the specifiedenums.static longcreateBitmaskFromEnums(Collection<com.google.protobuf.ProtocolMessageEnum> enums) Creates a bitmask that translates to the specifiedenums.static booleandoesBitmaskTranslateToEnum(com.google.protobuf.ProtocolMessageEnum enumInstance, long bitmask) Returns whether the providedbitmaskpoints to the providedProtocolMessageEnumby 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 providedbitmaskpoints to the providedProtocolMessageEnumby 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
bitmaskpoints to the specifiedenumInstance.
-
createBitmaskFromEnums
public static long createBitmaskFromEnums(com.google.protobuf.ProtocolMessageEnum... enums) Creates a bitmask that translates to the specifiedenums.- Parameters:
enums- theProtocolMessageEnuminstances 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- theProtocolMessageEnuminstances to represent as bitmask.- Returns:
- the bitmask.
-