You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2023/03/09 13:19:40 UTC

[GitHub] [spark] LuciferYang commented on a diff in pull request #40352: [SPARK-42664][CONNECT] Support `bloomFilter` function for `DataFrameStatFunctions`

LuciferYang commented on code in PR #40352:
URL: https://github.com/apache/spark/pull/40352#discussion_r1131019335


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectService.scala:
##########
@@ -265,7 +268,23 @@ object SparkConnectService {
   }
 
   private def newIsolatedSession(): SparkSession = {
-    SparkSession.active.newSession()
+    val session = SparkSession.active.newSession()
+    registerBloomFilterFunction(session)
+    session
+  }
+
+  private def registerBloomFilterFunction(session: SparkSession): Unit = {

Review Comment:
   if register this here, the py test:
   
   ```
       def test_sql_with_command(self):
           # SPARK-42705: spark.sql should return values from the command.
           self.assertEqual(
               self.connect.sql("show functions").collect(), self.spark.sql("show functions").collect()
           )
   ```
   
   will failed ...



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