urosstan-db commented on code in PR #59148:
URL: https://github.com/apache/spark/pull/59148#discussion_r4146409374
##########
connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/SharedJDBCIntegrationSuite.scala:
##########
@@ -54,6 +54,75 @@ abstract class SharedJDBCIntegrationSuite extends
DockerJDBCIntegrationSuite {
batchStmt.close()
}
+ /**
+ * Name of a table that does not exist in the database under test.
+ */
+ protected val nonExistentTableName = "table_that_does_not_exist"
+
+ /**
+ * SQLSTATE the driver reports when [[nonExistentTableName]] is read. None
when the suite does
+ * not pin the dialect's SQLSTATE down.
+ */
+ protected def nonExistentTableSQLState: Option[String] = None
+
+ /**
+ * Whether reading [[nonExistentTableName]] is expected to surface the
driver's own exception
+ * instead of `JDBC_EXTERNAL_ENGINE_SYNTAX_ERROR`. An engine that reports a
missing table with a
+ * SQLSTATE it also uses for syntax errors (e.g. StarRocks reports error
1064/SQLSTATE 42000 for
+ * both) cannot pass this check until its classifier is tightened.
+ */
+ protected def nonExistentTableIsNotSyntaxError: Boolean = true
Review Comment:
Since we use this concept only in StarRocks suite currently, it is better to
add test to excluded list (override excluded method), and specify reason you
already did.
Having abstract method for single exclusion polutes base suite interface, if
we have some other DB in the future like StarRocks, we may consider refactoring
--
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]