Class DatabricksThriftUtil


  • public class DatabricksThriftUtil
    extends Object
    • Field Detail

      • SUCCESS_STATUS_LIST

        public static final List<TStatusCode> SUCCESS_STATUS_LIST
    • 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
      • getTypeFromTypeDesc

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

        public static List<List<Object>> convertColumnarToRowBased​(TRowSet rowSet)
        Converts columnar data from a TRowSet to a row-based list format.
        Parameters:
        rowSet - the TRowSet containing the data
        Returns:
        a list where each sublist represents a row with column values, or an empty list if rowSet is empty
      • 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)