You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "amaliujia (via GitHub)" <gi...@apache.org> on 2023/02/27 18:18:25 UTC

[GitHub] [spark] amaliujia commented on a diff in pull request #40184: [SPARK-42569][CONNECT] Throw exceptions for unsupported session API

amaliujia commented on code in PR #40184:
URL: https://github.com/apache/spark/pull/40184#discussion_r1119120662


##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/SparkSession.scala:
##########
@@ -190,6 +190,22 @@ class SparkSession(
     range(start, end, step, Option(numPartitions))
   }
 
+  def newSession(): SparkSession = {
+    throw new UnsupportedOperationException("newSession is not supported")

Review Comment:
   This is to match Python client: https://github.com/apache/spark/blob/5243d0be2c15e3af36e981a9487ea600ab86a808/python/pyspark/sql/connect/session.py#L422
   
   
   I see the difference between `want to support but not yet` and `won't support`. Right now it is not differentiated in both Scala client and Python client. We probably need a pass to change both together if we want to do so.  



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org