You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/10/06 08:33:33 UTC

[GitHub] [spark] MaxGekk opened a new pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

MaxGekk opened a new pull request #29952:
URL: https://github.com/apache/spark/pull/29952


   ### What changes were proposed in this pull request?
   1. Add new method to the `JdbcDialect` class - `classifyException()`. It converts dialect specific exception to Spark's `AnalysisException` or its sub-classes.
   2. Replace H2 exception  `org.h2.jdbc.JdbcSQLException` in `JDBCTableCatalogSuite` by `AnalysisException`.
   
   ### Why are the changes needed?
   Currently JDBC v2 Table Catalog implementation throws dialect specific exception and ignores exceptions defined in the `TableCatalog` interface. This PR adds new method for converting dialect specific exception, and assumes that follow up PRs will implement `classifyException()`.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes.
   
   ### How was this patch tested?
   By running existing test suites `JDBCTableCatalogSuite` and `JDBCV2Suite`.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704157855






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704838878


   **[Test build #129502 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/129502/testReport)** for PR 29952 at commit [`90fcaf3`](https://github.com/apache/spark/commit/90fcaf35f0b2e95a2ed7185248196a6d4a669a6b).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704957476


   **[Test build #129513 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/129513/testReport)** for PR 29952 at commit [`ac55879`](https://github.com/apache/spark/commit/ac55879e80bbb964c1563466a8171f7a8fb2720d).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704157855






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704838878


   **[Test build #129502 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/129502/testReport)** for PR 29952 at commit [`90fcaf3`](https://github.com/apache/spark/commit/90fcaf35f0b2e95a2ed7185248196a6d4a669a6b).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704898864


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/129502/
   Test FAILed.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-705118048






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-705118048






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan closed pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #29952:
URL: https://github.com/apache/spark/pull/29952


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on a change in pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29952:
URL: https://github.com/apache/spark/pull/29952#discussion_r501191826



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala
##########
@@ -297,6 +308,7 @@ object JdbcDialects {
   registerDialect(DerbyDialect)
   registerDialect(OracleDialect)
   registerDialect(TeradataDialect)
+  registerDialect(H2Dialect)

Review comment:
       since we already have a `testH2Dialect`, how about we update `testH2Dialect` to implement `classifyException`, and use it in `JDBCTableCatalogSuite`? Then we don't need to have an official `H2Dialect`.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk commented on a change in pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #29952:
URL: https://github.com/apache/spark/pull/29952#discussion_r501239752



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala
##########
@@ -297,6 +308,7 @@ object JdbcDialects {
   registerDialect(DerbyDialect)
   registerDialect(OracleDialect)
   registerDialect(TeradataDialect)
+  registerDialect(H2Dialect)

Review comment:
       Probably, not related to this. If we don't want to support H2 officially as a dialect, why do we test it so broadly in Spark.?Maybe it makes sense to switch all internal Spark tests to Derby?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-705116927


   **[Test build #129513 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/129513/testReport)** for PR 29952 at commit [`ac55879`](https://github.com/apache/spark/commit/ac55879e80bbb964c1563466a8171f7a8fb2720d).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704244625






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704984655


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34118/
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704243557


   **[Test build #129439 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/129439/testReport)** for PR 29952 at commit [`b2e7a72`](https://github.com/apache/spark/commit/b2e7a721a525a29017894d39cd8e85a85d9c7833).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704157841


   Kubernetes integration test status success
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34046/
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-705000432






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704898857






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704898857


   Merged build finished. Test FAILed.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704244625






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-705076238


   @HyukjinKwon @cloud-fan @maropu @huaxingao I think this PR is ready for review. Please, have a look at it.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk commented on a change in pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #29952:
URL: https://github.com/apache/spark/pull/29952#discussion_r501213318



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalog.scala
##########
@@ -70,7 +70,9 @@ class JDBCTableCatalog extends TableCatalog with Logging {
     checkNamespace(ident.namespace())
     val writeOptions = new JdbcOptionsInWrite(
       options.parameters + (JDBCOptions.JDBC_TABLE_NAME -> getTableName(ident)))
-    withConnection(JdbcUtils.tableExists(_, writeOptions))
+    classifyException(s"Failed table existence check: $ident") {

Review comment:
       I don't think that mixing two conceptually different things will make them consistent.
   




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704858688


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34108/
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-705000405


   Kubernetes integration test status success
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34118/
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan closed pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #29952:
URL: https://github.com/apache/spark/pull/29952


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-705000432






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on a change in pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29952:
URL: https://github.com/apache/spark/pull/29952#discussion_r501187450



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalog.scala
##########
@@ -70,7 +70,9 @@ class JDBCTableCatalog extends TableCatalog with Logging {
     checkNamespace(ident.namespace())
     val writeOptions = new JdbcOptionsInWrite(
       options.parameters + (JDBCOptions.JDBC_TABLE_NAME -> getTableName(ident)))
-    withConnection(JdbcUtils.tableExists(_, writeOptions))
+    classifyException(s"Failed table existence check: $ident") {

Review comment:
       shall we be consistent and always put `classifyException` inside `withConnection`?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-705338608


   thanks, merging to master!


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704869592


   Kubernetes integration test status success
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34108/
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704121549


   **[Test build #129439 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/129439/testReport)** for PR 29952 at commit [`b2e7a72`](https://github.com/apache/spark/commit/b2e7a721a525a29017894d39cd8e85a85d9c7833).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk commented on a change in pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #29952:
URL: https://github.com/apache/spark/pull/29952#discussion_r501220067



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala
##########
@@ -297,6 +308,7 @@ object JdbcDialects {
   registerDialect(DerbyDialect)
   registerDialect(OracleDialect)
   registerDialect(TeradataDialect)
+  registerDialect(H2Dialect)

Review comment:
       If you look at `testH2Dialect`, it has test specific settings. Why should we have the settings in `JDBCTableCatalogSuite`?
   
   > Then we don't need to have an official `H2Dialect`.
   
   What is the problem to have built-in H2Dialect?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704957476


   **[Test build #129513 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/129513/testReport)** for PR 29952 at commit [`ac55879`](https://github.com/apache/spark/commit/ac55879e80bbb964c1563466a8171f7a8fb2720d).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704493454


   I think of to continue with this after https://github.com/apache/spark/pull/29957


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704869622






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704121549


   **[Test build #129439 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/129439/testReport)** for PR 29952 at commit [`b2e7a72`](https://github.com/apache/spark/commit/b2e7a721a525a29017894d39cd8e85a85d9c7833).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704869622






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704898715


   **[Test build #129502 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/129502/testReport)** for PR 29952 at commit [`90fcaf3`](https://github.com/apache/spark/commit/90fcaf35f0b2e95a2ed7185248196a6d4a669a6b).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds the following public classes _(experimental)_:
     * `class TableAlreadyExistsException(message: String, cause: Option[Throwable] = None)`
     * `class NoSuchNamespaceException(message: String, cause: Option[Throwable] = None)`
     * `class NoSuchTableException(message: String, cause: Option[Throwable] = None)`


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-704261560


   @HyukjinKwon @cloud-fan @maropu @huaxingao Could you review this PR, please. 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on pull request #29952: [SPARK-33074][SQL] Classify dialect exceptions in JDBC v2 Table Catalog

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29952:
URL: https://github.com/apache/spark/pull/29952#issuecomment-705338608


   thanks, merging to master!


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org