You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "panbingkun (via GitHub)" <gi...@apache.org> on 2024/06/11 09:30:02 UTC
[PR] [Only Test] test first [spark]
panbingkun opened a new pull request, #46937:
URL: https://github.com/apache/spark/pull/46937
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
4. Be sure to keep the PR description updated to reflect all changes.
5. Please write your PR title to summarize what this PR proposes.
6. If possible, provide a concise example to reproduce the issue for a faster review.
7. If you want to add a new configuration, please read the guideline first for naming configurations in
'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
8. If you want to add or modify an error type or message, please read the guideline first in
'common/utils/src/main/resources/error/README.md'.
-->
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
If no, write 'No'.
-->
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
-->
### Was this patch authored or co-authored using generative AI tooling?
<!--
If generative AI tooling has been used in the process of authoring this patch, please include the
phrase: 'Generated-by: ' followed by the name of the tool and its version.
If no, write 'No'.
Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
-->
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `JdbcDialect.classifyException` throw out the `original` exception [spark]
Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r1635967265
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -740,15 +740,16 @@ abstract class JdbcDialect extends Serializable with Logging {
* @param e The dialect specific exception.
* @param errorClass The error class assigned in the case of an unclassified `e`
* @param messageParameters The message parameters of `errorClass`
- * @param description The error description
* @return `AnalysisException` or its sub-class.
*/
def classifyException(
e: Throwable,
errorClass: String,
- messageParameters: Map[String, String],
- description: String): AnalysisException = {
- classifyException(description, e)
+ messageParameters: Map[String, String]): AnalysisException = {
+ new AnalysisException(
Review Comment:
`AnalysisException` seems unreasonable here.
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `built-in` JdbcDialect's method `classifyException` throw out the `original` exception [spark]
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r1642312247
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -841,6 +841,23 @@ abstract class JdbcDialect extends Serializable with Logging {
metadata: MetadataBuilder): Unit = {}
}
+/**
+ * Make the `classifyException` method throw out the original exception
+ */
+trait JdbcDialectHelper extends JdbcDialect {
Review Comment:
Okay, let me update it.
Done.
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `built-in` JdbcDialect's method `classifyException` throw out the `original` exception [spark]
Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #46937:
URL: https://github.com/apache/spark/pull/46937#issuecomment-2175270228
Merged into master for Spark 4.0. Thanks @panbingkun @cloud-fan @yaooqinn @beliefer
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `JdbcDialect.classifyException` throw out the `original` exception [spark]
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on PR #46937:
URL: https://github.com/apache/spark/pull/46937#issuecomment-2160515615
To reduce confusion among reviewers, this PR `does not` include the function of adding the prefix `catalog info` to `ident` discussed by https://github.com/apache/spark/pull/46912/files#r1630859747
It will be completed as a separate PR.
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `JdbcDialect.classifyException` throw out the `original` exception [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r1635092344
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -740,15 +740,16 @@ abstract class JdbcDialect extends Serializable with Logging {
* @param e The dialect specific exception.
* @param errorClass The error class assigned in the case of an unclassified `e`
* @param messageParameters The message parameters of `errorClass`
- * @param description The error description
* @return `AnalysisException` or its sub-class.
*/
def classifyException(
e: Throwable,
errorClass: String,
- messageParameters: Map[String, String],
- description: String): AnalysisException = {
Review Comment:
I think there was a reason to call the legacy `classifyException` method here. Can we dig into 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `JdbcDialect.classifyException` throw out the `original` exception [spark]
Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r1636041439
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -740,15 +740,16 @@ abstract class JdbcDialect extends Serializable with Logging {
* @param e The dialect specific exception.
* @param errorClass The error class assigned in the case of an unclassified `e`
* @param messageParameters The message parameters of `errorClass`
- * @param description The error description
* @return `AnalysisException` or its sub-class.
*/
def classifyException(
e: Throwable,
errorClass: String,
- messageParameters: Map[String, String],
- description: String): AnalysisException = {
Review Comment:
This guarantees pre-implemented legacy `classifyException`s from third-party to be correctly called
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `built-in` JdbcDialect's method `classifyException` throw out the `original` exception [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r1642265419
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -841,6 +841,23 @@ abstract class JdbcDialect extends Serializable with Logging {
metadata: MetadataBuilder): Unit = {}
}
+/**
+ * Make the `classifyException` method throw out the original exception
+ */
+trait JdbcDialectHelper extends JdbcDialect {
Review Comment:
can we give it a clearer name? like `NoLegacyJDBCError`.
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `JdbcDialect.classifyException` throw out the `original` exception [spark]
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r1634680879
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -740,15 +740,16 @@ abstract class JdbcDialect extends Serializable with Logging {
* @param e The dialect specific exception.
* @param errorClass The error class assigned in the case of an unclassified `e`
* @param messageParameters The message parameters of `errorClass`
- * @param description The error description
* @return `AnalysisException` or its sub-class.
*/
def classifyException(
e: Throwable,
errorClass: String,
- messageParameters: Map[String, String],
- description: String): AnalysisException = {
Review Comment:
From the code logic, it seems that there is no need for the field `description` to exist. Let's remove it.
Although `JdbcDialect` is marked as `DeveloperApi`, this method has been added from `Spark version 4.0` and the version `4.0` has not been released yet.
Can we directly remove 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `JdbcDialect.classifyException` throw out the `original` exception [spark]
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r1636310935
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -740,15 +740,16 @@ abstract class JdbcDialect extends Serializable with Logging {
* @param e The dialect specific exception.
* @param errorClass The error class assigned in the case of an unclassified `e`
* @param messageParameters The message parameters of `errorClass`
- * @param description The error description
* @return `AnalysisException` or its sub-class.
*/
def classifyException(
e: Throwable,
errorClass: String,
- messageParameters: Map[String, String],
- description: String): AnalysisException = {
Review Comment:
Yeah, that's right, see PR below:
1.https://github.com/apache/spark/pull/44358, the modification of this PR resulted in `break changes`, and with the suggestion of `cloud-fan`:
<img width="856" alt="image" src="https://github.com/apache/spark/assets/15246973/ded0b7db-932d-4959-bfdf-c72cadcb1755">
the following PR has been created.
2.https://github.com/apache/spark/pull/44449, this PR has restored compatibility behavior
<img width="891" alt="image" src="https://github.com/apache/spark/assets/15246973/3a6a0ca2-c3d9-4b3d-8dfc-5c9e637a6bb6">
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `built-in` JdbcDialect's method `classifyException` throw out the `original` exception [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r2052401492
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -841,6 +841,23 @@ abstract class JdbcDialect extends Serializable with Logging {
metadata: MetadataBuilder): Unit = {}
}
+/**
+ * Make the `classifyException` method throw out the original exception
+ */
+trait NoLegacyJDBCError extends JdbcDialect {
Review Comment:
is this supposed to be a public API? @panbingkun
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `built-in` JdbcDialect's method `classifyException` throw out the `original` exception [spark]
Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang closed pull request #46937: [SPARK-48585][SQL] Make `built-in` JdbcDialect's method `classifyException` throw out the `original` exception
URL: https://github.com/apache/spark/pull/46937
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `JdbcDialect.classifyException` throw out the `original` exception [spark]
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r1636005396
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -740,15 +740,16 @@ abstract class JdbcDialect extends Serializable with Logging {
* @param e The dialect specific exception.
* @param errorClass The error class assigned in the case of an unclassified `e`
* @param messageParameters The message parameters of `errorClass`
- * @param description The error description
* @return `AnalysisException` or its sub-class.
*/
def classifyException(
e: Throwable,
errorClass: String,
- messageParameters: Map[String, String],
- description: String): AnalysisException = {
Review Comment:
I am investigating history.
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `JdbcDialect.classifyException` throw out the `original` exception [spark]
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on PR #46937:
URL: https://github.com/apache/spark/pull/46937#issuecomment-2160516685
cc @cloud-fan @yaooqinn
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `built-in` JdbcDialect's method `classifyException` throw out the `original` exception [spark]
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r1642312247
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -841,6 +841,23 @@ abstract class JdbcDialect extends Serializable with Logging {
metadata: MetadataBuilder): Unit = {}
}
+/**
+ * Make the `classifyException` method throw out the original exception
+ */
+trait JdbcDialectHelper extends JdbcDialect {
Review Comment:
Okay, let me update 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `JdbcDialect.classifyException` throw out the `original` exception [spark]
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r1636008143
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -740,15 +740,16 @@ abstract class JdbcDialect extends Serializable with Logging {
* @param e The dialect specific exception.
* @param errorClass The error class assigned in the case of an unclassified `e`
* @param messageParameters The message parameters of `errorClass`
- * @param description The error description
* @return `AnalysisException` or its sub-class.
*/
def classifyException(
e: Throwable,
errorClass: String,
- messageParameters: Map[String, String],
- description: String): AnalysisException = {
- classifyException(description, e)
+ messageParameters: Map[String, String]): AnalysisException = {
+ new AnalysisException(
Review Comment:
Yeah, this should already be in the execution phase, so it's not reasonable.
Let me go through the history first.
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `built-in` JdbcDialect's method `classifyException` throw out the `original` exception [spark]
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on PR #46937:
URL: https://github.com/apache/spark/pull/46937#issuecomment-2175341409
> Merged into master for Spark 4.0. Thanks @panbingkun @cloud-fan @yaooqinn @beliefer
Thanks all.
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `JdbcDialect.classifyException` throw out the `original` exception [spark]
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on PR #46937:
URL: https://github.com/apache/spark/pull/46937#issuecomment-2162800276
The idea of this PR is to make various built-in JDBC dialects overload the method `def classifyException(e: Throwable, errorClass: String, messageParameters: Map[String, String], description: String): AnalysisException` and make them call `final def classifyException(e: Throwable, errorClass: String, messageParameters: Map[String, String]): AnalysisException`, so that the original exception can be thrown.
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `JdbcDialect.classifyException` throw out the `original` exception [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r1635089320
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/DB2Dialect.scala:
##########
@@ -156,8 +156,7 @@ private case class DB2Dialect() extends JdbcDialect with SQLConfHelper {
override def classifyException(
e: Throwable,
errorClass: String,
- messageParameters: Map[String, String],
- description: String): AnalysisException = {
Review Comment:
isn't it a breaking change? `JdbcDialect` is a public API.
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `JdbcDialect.classifyException` throw out the `original` exception [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #46937:
URL: https://github.com/apache/spark/pull/46937#discussion_r1635089320
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/DB2Dialect.scala:
##########
@@ -156,8 +156,7 @@ private case class DB2Dialect() extends JdbcDialect with SQLConfHelper {
override def classifyException(
e: Throwable,
errorClass: String,
- messageParameters: Map[String, String],
- description: String): AnalysisException = {
Review Comment:
isn't it a breaking change? `JdbcDialect` is a public API.
--
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: reviews-unsubscribe@spark.apache.org
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
Re: [PR] [SPARK-48585][SQL] Make `built-in` JdbcDialect's method `classifyException` throw out the `original` exception [spark]
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on PR #46937:
URL: https://github.com/apache/spark/pull/46937#issuecomment-2164171368
> * Another approach is to define a `trait` as follows:
>
> ```
> trait JdbcDialectHelper {
>
> def classifyException(
> e: Throwable,
> errorClass: String,
> messageParameters: Map[String, String],
> description: String): AnalysisException = {
> new AnalysisException(
> errorClass = errorClass,
> messageParameters = messageParameters,
> cause = Some(e))
> }
> }
> ```
>
> eg:
>
> ```
> private[sql] case class H2Dialect() extends JdbcDialect with `JdbcDialectHelper` {
>
> }
> ```
>
> and then have various built-in jdbc dialects `with` it, so that there is no need to make changes to each built-in jdbc dialects dialect, but this will add an extra `trait`.
>
I have already used this
--
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: reviews-unsubscribe@spark.apache.org
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