Class DatabricksThriftUtil


  • public class DatabricksThriftUtil
    extends Object
    • Constructor Detail

      • DatabricksThriftUtil

        public DatabricksThriftUtil()
    • Method Detail

      • byteBufferToString

        public static String byteBufferToString​(ByteBuffer buffer)
      • extractValues

        public static List<List<Object>> extractValues​(List<TColumn> columnList)
        In metadata operations, a list of singleton lists is obtained. This function extracts metadata values from these TColumn lists based on the data type set in the column.
        Parameters:
        columnList - the TColumn from which to extract values
        Returns:
        a singleton list of metadata result
      • getStatementStatus

        public static com.databricks.sdk.service.sql.StatementStatus getStatementStatus​(TGetOperationStatusResp resp)
        Returns statement status for given operation status response
      • getAsyncStatus

        public static com.databricks.sdk.service.sql.StatementStatus getAsyncStatus​(TStatus status)
        Returns statement status for given status response
      • getTypeFromTypeDesc

        public static com.databricks.sdk.service.sql.ColumnInfoTypeName getTypeFromTypeDesc​(TTypeDesc typeDesc)
      • extractValuesFromRowSet

        public static List<List<Object>> extractValuesFromRowSet​(TRowSet rowSet)
        Extracts and returns the values from each column of a TRowSet as a list of lists. Each sublist represents a column of values. Returns an empty list if the input is null or contains no columns.
        Parameters:
        rowSet - the TRowSet to extract values from
        Returns:
        a list of lists, each containing the values of a column, or an empty list if the input is invalid
      • getRowCount

        public static long getRowCount​(TRowSet resultData)