spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdas <>
Subject [GitHub] spark pull request #16826: [SPARK-19540][SQL] Add ability to clone SparkSess...
Date Sat, 25 Feb 2017 01:34:00 GMT
Github user tdas commented on a diff in the pull request:
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/internal/SessionState.scala ---
    @@ -17,43 +17,60 @@
     package org.apache.spark.sql.internal
     import org.apache.hadoop.conf.Configuration
    -import org.apache.hadoop.fs.Path
    +import org.apache.spark.{SparkConf, SparkContext}
     import org.apache.spark.sql._
    -import org.apache.spark.sql.catalyst.TableIdentifier
     import org.apache.spark.sql.catalyst.analysis.{Analyzer, FunctionRegistry}
     import org.apache.spark.sql.catalyst.catalog._
     import org.apache.spark.sql.catalyst.optimizer.Optimizer
     import org.apache.spark.sql.catalyst.parser.ParserInterface
     import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
     import org.apache.spark.sql.execution._
    -import org.apache.spark.sql.execution.command.AnalyzeTableCommand
     import org.apache.spark.sql.execution.datasources._
    -import org.apache.spark.sql.streaming.{StreamingQuery, StreamingQueryManager}
    +import org.apache.spark.sql.streaming.StreamingQueryManager
     import org.apache.spark.sql.util.ExecutionListenerManager
      * A class that holds all session-specific state in a given [[SparkSession]].
    -private[sql] class SessionState(sparkSession: SparkSession) {
    +private[sql] class SessionState(
    +    sparkContext: SparkContext,
    +    sharedState: SharedState,
    +    val conf: SQLConf,
    +    val experimentalMethods: ExperimentalMethods,
    +    val functionRegistry: FunctionRegistry,
    +    val catalog: SessionCatalog,
    +    val sqlParser: ParserInterface,
    +    val analyzer: Analyzer,
    +    val streamingQueryManager: StreamingQueryManager,
    +    val queryExecutionCreator: LogicalPlan => QueryExecution) {
    +  /**
    +   * Interface exposed to the user for registering user-defined functions.
    +   * Note that the user-defined functions must be deterministic.
    +   */
    +  val udf: UDFRegistration = new UDFRegistration(functionRegistry)
    -  // Note: These are all lazy vals because they depend on each other (e.g. conf) and
    -  // want subclasses to override some of the fields. Otherwise, we would get a lot of
    +  // Logical query plan optimizer.
    --- End diff --
    super nit: use /** */ for consistency with rest of the fields in the file.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message