Class

org.apache.spark.sql.internal

BaseSessionStateBuilder

Related Doc: package internal

Permalink

abstract class BaseSessionStateBuilder extends AnyRef

Builder class that coordinates construction of a new SessionState.

The builder explicitly defines all components needed by the session state, and creates a session state when build is called. Components should only be initialized once. This is not a problem for most components as they are only used in the build function. However some components (conf, catalog, functionRegistry, experimentalMethods & sqlParser) are as dependencies for other components and are shared as a result. These components are defined as lazy vals to make sure the component is created only once.

A developer can modify the builder by providing custom versions of components, or by using the hooks provided for the analyzer, optimizer & planner. There are some dependencies between the components (they are documented per dependency), a developer should respect these when making modifications in order to prevent initialization problems.

A parent SessionState can be used to initialize the new SessionState. The new session state will clone the parent sessions state's conf, functionRegistry, experimentalMethods and catalog fields. Note that the state is cloned when build is called, and not before.

Annotations
@Experimental() @Unstable()
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BaseSessionStateBuilder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BaseSessionStateBuilder(session: SparkSession, parentState: Option[SessionState] = None)

    Permalink

Type Members

  1. type NewBuilder = (SparkSession, Option[SessionState]) ⇒ BaseSessionStateBuilder

    Permalink

Abstract Value Members

  1. abstract def newBuilder: NewBuilder

    Permalink

    Function that produces a new instance of the SessionStateBuilder.

    Function that produces a new instance of the SessionStateBuilder. This is used by the SessionState's clone functionality. Make sure to override this when implementing your own SessionStateBuilder.

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def analyzer: Analyzer

    Permalink

    Logical query plan analyzer for resolving unresolved attributes and relations.

    Logical query plan analyzer for resolving unresolved attributes and relations.

    Note: this depends on the conf and catalog fields.

    Attributes
    protected
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def build(): SessionState

    Permalink

    Build the SessionState.

  7. lazy val catalog: SessionCatalog

    Permalink

    Catalog for managing table and database states.

    Catalog for managing table and database states. If there is a pre-existing catalog, the state of that catalog (temp tables & current database) will be copied into the new catalog.

    Note: this depends on the conf, functionRegistry and sqlParser fields.

    Attributes
    protected
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. lazy val conf: SQLConf

    Permalink

    SQL-specific key-value configurations.

    SQL-specific key-value configurations.

    These either get cloned from a pre-existing instance or newly created. The conf is always merged with its SparkConf.

    Attributes
    protected
  10. def createClone: (SparkSession, SessionState) ⇒ SessionState

    Permalink

    Function used to make clones of the session state.

    Function used to make clones of the session state.

    Attributes
    protected
  11. def createQueryExecution: (LogicalPlan) ⇒ QueryExecution

    Permalink

    Create a query execution object.

    Create a query execution object.

    Attributes
    protected
  12. def customCheckRules: Seq[(LogicalPlan) ⇒ Unit]

    Permalink

    Custom check rules to add to the Analyzer.

    Custom check rules to add to the Analyzer. Prefer overriding this instead of creating your own Analyzer.

    Note that this may NOT depend on the analyzer function.

    Attributes
    protected
  13. def customOperatorOptimizationRules: Seq[Rule[LogicalPlan]]

    Permalink

    Custom operator optimization rules to add to the Optimizer.

    Custom operator optimization rules to add to the Optimizer. Prefer overriding this instead of creating your own Optimizer.

    Note that this may NOT depend on the optimizer function.

    Attributes
    protected
  14. def customPlanningStrategies: Seq[Strategy]

    Permalink

    Custom strategies to add to the planner.

    Custom strategies to add to the planner. Prefer overriding this instead of creating your own Planner.

    Note that this may NOT depend on the planner function.

    Attributes
    protected
  15. def customPostHocResolutionRules: Seq[Rule[LogicalPlan]]

    Permalink

    Custom post resolution rules to add to the Analyzer.

    Custom post resolution rules to add to the Analyzer. Prefer overriding this instead of creating your own Analyzer.

    Note that this may NOT depend on the analyzer function.

    Attributes
    protected
  16. def customResolutionRules: Seq[Rule[LogicalPlan]]

    Permalink

    Custom resolution rules to add to the Analyzer.

    Custom resolution rules to add to the Analyzer. Prefer overriding this instead of creating your own Analyzer.

    Note that this may NOT depend on the analyzer function.

    Attributes
    protected
  17. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  19. lazy val experimentalMethods: ExperimentalMethods

    Permalink

    Experimental methods that can be used to define custom optimization rules and custom planning strategies.

    Experimental methods that can be used to define custom optimization rules and custom planning strategies.

    This either gets cloned from a pre-existing version or newly created.

    Attributes
    protected
  20. def extensions: SparkSessionExtensions

    Permalink

    Session extensions defined in the SparkSession.

    Session extensions defined in the SparkSession.

    Attributes
    protected
  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. lazy val functionRegistry: FunctionRegistry

    Permalink

    Internal catalog managing functions registered by the user.

    Internal catalog managing functions registered by the user.

    This either gets cloned from a pre-existing version or cloned from the built-in registry.

    Attributes
    protected
  23. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  24. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. def listenerManager: ExecutionListenerManager

    Permalink

    An interface to register custom org.apache.spark.sql.util.QueryExecutionListeners that listen for execution metrics.

    An interface to register custom org.apache.spark.sql.util.QueryExecutionListeners that listen for execution metrics.

    This gets cloned from parent if available, otherwise is a new instance is created.

    Attributes
    protected
  27. def mergeSparkConf(sqlConf: SQLConf, sparkConf: SparkConf): Unit

    Permalink

    Extract entries from SparkConf and put them in the SQLConf

    Extract entries from SparkConf and put them in the SQLConf

    Attributes
    protected
  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. def optimizer: Optimizer

    Permalink

    Logical query plan optimizer.

    Logical query plan optimizer.

    Note: this depends on the conf, catalog and experimentalMethods fields.

    Attributes
    protected
  32. val parentState: Option[SessionState]

    Permalink
  33. def planner: SparkPlanner

    Permalink

    Planner that converts optimized logical plans to physical plans.

    Planner that converts optimized logical plans to physical plans.

    Note: this depends on the conf and experimentalMethods fields.

    Attributes
    protected
  34. lazy val resourceLoader: SessionResourceLoader

    Permalink

    ResourceLoader that is used to load function resources and jars.

    ResourceLoader that is used to load function resources and jars.

    Attributes
    protected
  35. val session: SparkSession

    Permalink
  36. lazy val sqlParser: ParserInterface

    Permalink

    Parser that extracts expressions, plans, table identifiers etc.

    Parser that extracts expressions, plans, table identifiers etc. from SQL texts.

    Note: this depends on the conf field.

    Attributes
    protected
  37. def streamingQueryManager: StreamingQueryManager

    Permalink

    Interface to start and stop streaming queries.

    Interface to start and stop streaming queries.

    Attributes
    protected
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  39. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  40. def udfRegistration: UDFRegistration

    Permalink

    Interface exposed to the user for registering user-defined functions.

    Interface exposed to the user for registering user-defined functions.

    Note 1: The user-defined functions must be deterministic. Note 2: This depends on the functionRegistry field.

    Attributes
    protected
  41. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped