Skip to content

HiveSessionStateBuilder

HiveSessionStateBuilder is a concrete ../BaseSessionStateBuilder.md[builder] to produce a Hive-aware ../SessionState.md[SessionState] for...FIXME

HiveSessionStateBuilder comes with Hive-specific <>, <>, <>, <> and <>.

.HiveSessionStateBuilder's Hive-Specific Properties image::../images/spark-sql-HiveSessionStateBuilder.png[align="center"]

HiveSessionStateBuilder is <> (using <>) when...FIXME

.HiveSessionStateBuilder and SessionState (in SparkSession) image::../images/spark-sql-HiveSessionStateBuilder-SessionState.png[align="center"]

[[properties]] .HiveSessionStateBuilder's Properties [cols="1,2",options="header",width="100%"] |=== | Name | Description

| <> a| [[analyzer]] Hive-specific logical query plan analyzer with the Hive-specific rules.

| catalog a| [[catalog]] HiveSessionCatalog with the following:

  • <>
  • ../SharedState.md#globalTempViewManager[GlobalTempViewManager] from the session-specific SharedState
  • New HiveMetastoreCatalog.md[HiveMetastoreCatalog]
  • ../BaseSessionStateBuilder.md#functionRegistry[FunctionRegistry]
  • ../BaseSessionStateBuilder.md#conf[SQLConf]
  • New Hadoop ../SessionState.md#newHadoopConf[Configuration]
  • ../BaseSessionStateBuilder.md#sqlParser[ParserInterface]
  • <>

NOTE: If <> is defined, the state is copied to catalog

Used to create <> and a RelationConversions.md#creating-instance[RelationConversions] logical evaluation rule (as part of <>)

| externalCatalog | [[externalCatalog]] HiveExternalCatalog

| <> | [[planner]] SparkPlanner with <>.

| resourceLoader | [[resourceLoader]] HiveSessionResourceLoader |===

=== [[planner-indepth]] SparkPlanner with Hive-Specific Strategies -- planner Property

[source, scala]

planner: SparkPlanner

NOTE: planner is part of ../BaseSessionStateBuilder.md#planner[BaseSessionStateBuilder Contract] to create a query planner.

planner is a SparkPlanner with...FIXME

planner uses the <>.

[[planner-strategies]] .Hive-Specific SparkPlanner's Hive-Specific Strategies [cols="30m,70",options="header",width="100%"] |=== | Strategy | Description

| HiveTableScans.md[HiveTableScans] | [[HiveTableScans]] Replaces HiveTableRelation.md[HiveTableRelation] logical operators with HiveTableScanExec.md[HiveTableScanExec] physical operators

| Scripts | [[Scripts]] |===

=== [[analyzer-indepth]] Logical Query Plan Analyzer with Hive-Specific Rules -- analyzer Property

analyzer: Analyzer

analyzer is a Logical Analyzer with <> (and ../BaseSessionStateBuilder.md#conf[SQLConf]).

analyzer uses the Hive-specific <>, <> and <> rules.

analyzer is part of the BaseSessionStateBuilder abstraction.

[[extendedResolutionRules]] .Hive-Specific Analyzer's Extended Resolution Rules (in the order of execution) [cols="1,2",options="header",width="100%"] |=== | Logical Rule | Description

| ResolveHiveSerdeTable | [[ResolveHiveSerdeTable]]

| FindDataSourceTable | [[FindDataSourceTable]]

| ResolveSQLOnFile | [[ResolveSQLOnFile]]

|===

[[postHocResolutionRules]] .Hive-Specific Analyzer's PostHoc Resolution Rules [cols="1,2",options="header",width="100%"] |=== | Logical Rule | Description

[[DetermineTableStats]] DetermineTableStats.md[DetermineTableStats]
[[RelationConversions]] RelationConversions.md[RelationConversions]
[[PreprocessTableCreation]] PreprocessTableCreation
[[PreprocessTableInsertion]] PreprocessTableInsertion
[[DataSourceAnalysis]] .DataSourceAnalysis
[[HiveAnalysis]] HiveAnalysis.md[HiveAnalysis]
===

[[extendedCheckRules]] .Hive-Specific Analyzer's Extended Check Rules [cols="1,2",options="header",width="100%"] |=== | Logical Rule | Description

[[PreWriteCheck]] PreWriteCheck
[[PreReadCheck]] PreReadCheck
===

=== [[creating-instance]] Creating HiveSessionStateBuilder Instance

HiveSessionStateBuilder takes the following when created:

  • [[session]] ../SparkSession.md[SparkSession]
  • [[parentState]] Optional ../SessionState.md[SessionState] (default: None)

=== [[newBuilder]] Builder Function to Create HiveSessionStateBuilder -- newBuilder Method

[source, scala]

newBuilder: (SparkSession, Option[SessionState]) => BaseSessionStateBuilder

NOTE: newBuilder is part of ../BaseSessionStateBuilder.md#newBuilder[BaseSessionStateBuilder] contract to...FIXME.

newBuilder...FIXME