cloud-fan commented on a change in pull request #25104: [SPARK-28341][SQL] create a public API for V2SessionCatalog URL: https://github.com/apache/spark/pull/25104#discussion_r319417930
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalog.scala ########## @@ -39,20 +39,18 @@ import org.apache.spark.sql.util.CaseInsensitiveStringMap /** * A [[TableCatalog]] that translates calls to the v1 SessionCatalog. */ -class V2SessionCatalog(sessionState: SessionState) extends TableCatalog { +class V2SessionCatalog(catalog: SessionCatalog, conf: SQLConf) extends TableCatalog { + + def this(sessionState: SessionState) = this(sessionState.catalog, sessionState.conf) Review comment: It's mostly for ``` def this() = this(SparkSession.active.sessionState) ``` Due to the limitation of Scala class constructor, I need to call `SparkSession.active.sessionState` twice if we remove the constructor here. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org