newBuilder: (SparkSession, Option[SessionState]) => BaseSessionStateBuilder
BaseSessionStateBuilder — Generic Builder of SessionState
BaseSessionStateBuilder is the abstraction of builders that can produce a new BaseSessionStateBuilder to create a SessionState.
|
Note
|
BaseSessionStateBuilder and spark.sql.catalogImplementation configuration property allow for Hive and non-Hive Spark deployments.
|
| Method | Description |
|---|---|
|
Produces a new Used when |
BaseSessionStateBuilder is created when SparkSession is requested for a SessionState.
scala> :type spark
org.apache.spark.sql.SparkSession
scala> :type spark.sessionState
org.apache.spark.sql.internal.SessionState
BaseSessionStateBuilder holds properties that (together with newBuilder) are used to create a SessionState.
| Name | Description | ||
|---|---|---|---|
|
|||
|
Used to create Analyzer, Optimizer and a SessionState itself
|
||
|
|||
|
Custom operator optimization rules to add to the base Operator Optimization batch. When requested for the custom rules, |
||
|
|||
|
|||
|
|||
|
|||
|
SparkOptimizer (that is downcast to the base Optimizer) that is created with the SessionCatalog and the ExperimentalMethods. Note that the
|
||
|
|||
|
|||
|
|||
|
|||
|
| BaseSessionStateBuilder | Description |
|---|---|
|
Note
|
|
|
Note
|
BaseSessionStateBuilder is an experimental and unstable API.
|
Creating BaseSessionStateBuilder Instance
BaseSessionStateBuilder takes the following to be created:
-
Optional SessionState
Creating Clone of SessionState (Lazily) — createClone Method
createClone: (SparkSession, SessionState) => SessionState
createClone creates a SessionState (lazily as a function) using newBuilder followed by build.
|
Note
|
createClone is used when BaseSessionStateBuilder is requested for a SessionState.
|
Creating SessionState — build Method
build(): SessionState
build creates a SessionState with the following:
|
Note
|
|
Getting Function to Create QueryExecution For LogicalPlan — createQueryExecution Method
createQueryExecution: LogicalPlan => QueryExecution
createQueryExecution simply returns a function that takes a LogicalPlan and creates a QueryExecution with the SparkSession and the logical plan.
|
Note
|
createQueryExecution is used exclusively when BaseSessionStateBuilder is requested to create a SessionState instance.
|