You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "itholic (via GitHub)" <gi...@apache.org> on 2025/01/22 06:52:33 UTC
[PR] [SPARK-50947][PYTHON][SQL][CONNECT] Assign appropriate error class for duplicated artifacts [spark]
itholic opened a new pull request, #49598:
URL: https://github.com/apache/spark/pull/49598
### What changes were proposed in this pull request?
This PR proposes to assign appropriate error class for duplicated artifacts.
### Why are the changes needed?
To convert SparkConnectGrpcException into proper PySparkException so that we can ensure handling exceptions from Spark Connect Server properly.
### Does this PR introduce _any_ user-facing change?
No API changes, but the user-facing error message would be improved.
### 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.
-->
Updated the existing test.
### 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.
-->
No.
--
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-50947][PYTHON][SQL][CONNECT] Assign appropriate error class and SparkException for duplicated artifacts [spark]
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #49598:
URL: https://github.com/apache/spark/pull/49598#issuecomment-2609169408
+1, LGTM. Merging to master/4.0.
Thank you, @itholic.
--
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-50947][PYTHON][SQL][CONNECT] Assign appropriate error class and SparkException for duplicated artifacts [spark]
Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #49598:
URL: https://github.com/apache/spark/pull/49598#discussion_r1926422181
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -1229,6 +1229,12 @@
],
"sqlState" : "42710"
},
+ "DUPLICATED_ARTIFACT" : {
+ "message" : [
+ "Duplicate Artifact: <normalizedRemoteRelativePath>. Artifacts cannot be overwritten."
Review Comment:
Applied the suggestions. Thanks!
--
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-50947][PYTHON][SQL][CONNECT] Assign appropriate error class and SparkException for duplicated artifacts [spark]
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on code in PR #49598:
URL: https://github.com/apache/spark/pull/49598#discussion_r1925003554
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -1229,6 +1229,12 @@
],
"sqlState" : "42710"
},
+ "DUPLICATED_ARTIFACT" : {
Review Comment:
How about `ARTIFACT_ALREADY_EXISTS`
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -1229,6 +1229,12 @@
],
"sqlState" : "42710"
},
+ "DUPLICATED_ARTIFACT" : {
+ "message" : [
+ "Duplicate Artifact: <normalizedRemoteRelativePath>. Artifacts cannot be overwritten."
Review Comment:
```suggestion
"The artifact <normalizedRemoteRelativePath> already exists. Please choose a different name for the new artifact because it cannot be overwritten."
```
--
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-50947][PYTHON][SQL][CONNECT] Assign appropriate error class for duplicated artifacts [spark]
Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on PR #49598:
URL: https://github.com/apache/spark/pull/49598#issuecomment-2606432589
Also cc @MaxGekk fyi
--
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-50947][PYTHON][SQL][CONNECT] Assign appropriate error class and SparkException for duplicated artifacts [spark]
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #49598:
URL: https://github.com/apache/spark/pull/49598#issuecomment-2609168133
The test failure is not related to the changes:
```
[info] - SPARK-29442 Set `default` mode should override the existing mode *** FAILED *** (9 milliseconds)
[info] java.lang.NoSuchFieldException: mode
[info] at java.base/java.lang.Class.getDeclaredField(Class.java:2610)
[info] at org.apache.spark.sql.DataFrameSuite.$anonfun$new$476(DataFrameSuite.scala:2061)
[info] at org.scalatest.enablers.Timed$$anon$1.timeoutAfter(Timed.scala:127)
```
--
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-50947][PYTHON][SQL][CONNECT] Assign appropriate error class and SparkException for duplicated artifacts [spark]
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk closed pull request #49598: [SPARK-50947][PYTHON][SQL][CONNECT] Assign appropriate error class and SparkException for duplicated artifacts
URL: https://github.com/apache/spark/pull/49598
--
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