urosstan-db commented on code in PR #60673:
URL: https://github.com/apache/spark/pull/60673#discussion_r4616601409


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala:
##########
@@ -72,6 +72,16 @@ object JDBCRDD extends Logging {
     try {
       getQueryOutputSchema(fullQuery, options, dialect, conn)
     } catch {
+      // Must precede isObjectNotFoundException, whose default matches any 
42xxx SQLSTATE.
+      case e: SQLException if dialect.isPermissionDeniedException(e) =>
+        throw new SparkException(

Review Comment:
   nit: can we add it in query compilation errors, or query execution errors 
class where we would have centralized parametrized place for error 
construction. Potentailly you can pass arg for isSchemaResolution if there is 
common class for throwing of both errors



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