huangxiaopingRD commented on code in PR #53745:
URL: https://github.com/apache/spark/pull/53745#discussion_r2679229992


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala:
##########
@@ -915,6 +917,21 @@ object JdbcUtils extends Logging with SQLConfHelper {
     }
   }
 
+  /**
+   * Convert the value of isolation level to string.
+   */
+  def isolationLevelSting(isolationLevel: Int): String = {
+    isolationLevel match {
+      case Connection.TRANSACTION_NONE => "NONE"
+      case Connection.TRANSACTION_READ_UNCOMMITTED => "READ_UNCOMMITTED"
+      case Connection.TRANSACTION_READ_COMMITTED => "READ_COMMITTED"
+      case Connection.TRANSACTION_REPEATABLE_READ => "REPEATABLE_READ"
+      case Connection.TRANSACTION_SERIALIZABLE => "SERIALIZABLE"
+      case value =>
+        throw 
QueryExecutionErrors.invalidJdbcTxnIsolationLevelNumberError(value.toString)

Review Comment:
   This seems more reasonable. Thank you for your review. I have updated it 
according to your suggestion.



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