SavicStefan commented on code in PR #53830:
URL: https://github.com/apache/spark/pull/53830#discussion_r2697937087
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala:
##########
@@ -64,6 +70,9 @@ object JDBCRDD extends Logging {
try {
getQueryOutputSchema(fullQuery, options, dialect, conn)
} catch {
+ case e: SQLException if ident.isDefined &&
+ dialect.isObjectNotFoundException(e) =>
+ throw QueryCompilationErrors.noSuchTableError(catalogName.get,
ident.get)
Review Comment:
> By checking `isObjectNotFoundException` before `isSyntaxErrorBestEffort`,
the code can reliably distinguish between the case where table does not exists
and other SQL syntax errors. This order is important because when a table does
not exist, the exception raised can also match the criteria for
`isSyntaxErrorBestEffort`.
Yes.
--
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]