michaelzhan-db commented on code in PR #42548:
URL: https://github.com/apache/spark/pull/42548#discussion_r1303446564


##########
python/pyspark/sql/connect/session.py:
##########
@@ -176,6 +180,27 @@ def enableHiveSupport(self) -> "SparkSession.Builder":
                 error_class="NOT_IMPLEMENTED", message_parameters={"feature": 
"enableHiveSupport"}
             )
 
+        def _apply_options(self, session: "SparkSession") -> None:
+            with self._lock:
+                for k, v in self._options.items():
+                    try:
+                        session.conf.set(k, v)
+                    except AnalysisException as e:
+                        current = currentframe()

Review Comment:
   In the unit tests, the exception that was raised when invalid configuration 
key was provided was always analysis exception so I used `AnalysisException` in 
the except.
   
   I was originally trying to provide detailed warnings but after seeing 
@zhengruifeng's suggestions I see that providing a simple warning with the 
details of the exception should be ample for users.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to