Class ProtocolFeatureUtil

java.lang.Object
com.databricks.jdbc.common.util.ProtocolFeatureUtil

public final class ProtocolFeatureUtil extends Object
Utility class for checking Spark protocol version features. Provides methods to determine if specific protocol features are supported.
  • Method Details

    • supportsGetInfosInOpenSession

      public static boolean supportsGetInfosInOpenSession(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports getting additional information in OpenSession.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if getInfos in OpenSession is supported, false otherwise
    • supportsDirectResults

      public static boolean supportsDirectResults(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports direct results.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if direct results are supported, false otherwise
    • supportsModifiedHasMoreRowsSemantics

      public static boolean supportsModifiedHasMoreRowsSemantics(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports modified hasMoreRows semantics.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if modified hasMoreRows semantics are supported, false otherwise
    • supportsCloudFetch

      public static boolean supportsCloudFetch(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports cloud result fetching.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if cloud fetch is supported, false otherwise
    • supportsMultipleCatalogs

      public static boolean supportsMultipleCatalogs(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports multiple catalogs in metadata operations.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if multiple catalogs are supported, false otherwise
    • supportsArrowMetadata

      public static boolean supportsArrowMetadata(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports Arrow metadata in result sets.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if Arrow metadata is supported, false otherwise
    • supportsResultSetMetadataFromFetch

      public static boolean supportsResultSetMetadataFromFetch(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports getting result set metadata from fetch results.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if getting result set metadata from fetch is supported, false otherwise
    • supportsAdvancedArrowTypes

      public static boolean supportsAdvancedArrowTypes(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports advanced Arrow types.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if advanced Arrow types are supported, false otherwise
    • supportsCompressedArrowBatches

      public static boolean supportsCompressedArrowBatches(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports compressed Arrow batches.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if compressed Arrow batches are supported, false otherwise
    • supportsAsyncMetadataExecution

      public static boolean supportsAsyncMetadataExecution(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports async metadata execution.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if async metadata execution is supported, false otherwise
    • supportsResultPersistenceMode

      public static boolean supportsResultPersistenceMode(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports result persistence mode.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if result persistence mode is supported, false otherwise
    • supportsParameterizedQueries

      public static boolean supportsParameterizedQueries(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports parameterized queries.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if parameterized queries are supported, false otherwise
    • supportsAsyncMetadataOperations

      public static boolean supportsAsyncMetadataOperations(TProtocolVersion protocolVersion)
      Checks if the given protocol version supports async metadata operations.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if async metadata operations are supported, false otherwise
    • isNonDatabricksCompute

      public static boolean isNonDatabricksCompute(TProtocolVersion protocolVersion)
      Checks if the given protocol version indicates a non-Databricks compute.
      Parameters:
      protocolVersion - The protocol version to check
      Returns:
      true if this is a non-Databricks compute, false otherwise