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

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

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


##########
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:
   Perhaps we should have a special exception for this, so it is easier to catch these compatibility issues for users. We can also use them to provide migration hints. Finally, there is also a difference between the methods we do want to support, and the ones we don't.



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