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 2023/11/14 00:30:44 UTC

[PR] [SPARK-45913][PYTHON] Make the internal attributes private from `PySparkException`. [spark]

itholic opened a new pull request, #43790:
URL: https://github.com/apache/spark/pull/43790

   ### What changes were proposed in this pull request?
   
   This PR proposes to hide the internal attributes from `PySparkException`.
   
   
   ### Why are the changes needed?
   
   We should expose only user APIs to the surface, in this case `getErrorClass`, `getMessageParameters` and `getSqlState`, but currently there are some internal attributes such as `error_reader`, `message`, `error_class` and `message_parameters` are exposed as an user API as below:
   <img width="680" alt="Screenshot 2023-11-14 at 9 09 54 AM" src="https://github.com/apache/spark/assets/44108233/86f9a8c7-b11e-4935-ba62-930b39ffd2c0">
   
   We should hide them by adding underscore. 
   
   ### Does this PR introduce _any_ user-facing change?
   
   No API changes, but the internal attributes are explicitly marked as private from user space:
   
   <img width="676" alt="Screenshot 2023-11-14 at 9 17 41 AM" src="https://github.com/apache/spark/assets/44108233/0c342bcc-14cc-4836-93cf-5ed0ba2cc380">
   
   
   
   ### 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.
   -->
   The existing CI should pass
   
   ### 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-45913][PYTHON] Make the internal attributes private from PySpark errors. [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on PR #43790:
URL: https://github.com/apache/spark/pull/43790#issuecomment-1809362360

   Sounds good. Let me address them within this PR as well. Just updated the PR title & description.


-- 
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-45913][PYTHON] Make the internal attributes private from PySpark errors. [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #43790:
URL: https://github.com/apache/spark/pull/43790#issuecomment-1811678634

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

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-45913][PYTHON] Make the internal attributes private from PySpark errors. [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on PR #43790:
URL: https://github.com/apache/spark/pull/43790#issuecomment-1811642917

   CI passed. cc @ueshin @HyukjinKwon could you review an additional fix when you find some time?


-- 
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-45913][PYTHON] Make the internal attributes private from `PySparkException`. [spark]

Posted by "ueshin (via GitHub)" <gi...@apache.org>.
ueshin commented on PR #43790:
URL: https://github.com/apache/spark/pull/43790#issuecomment-1809357271

   We should also take a look at `CapturedException` and `SparkConnectGrpcException`?


-- 
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-45913][PYTHON] Make the internal attributes private from `PySparkException`. [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on PR #43790:
URL: https://github.com/apache/spark/pull/43790#issuecomment-1809350516

   cc @HyukjinKwon @ueshin 


-- 
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-45913][PYTHON] Make the internal attributes private from PySpark errors. [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #43790: [SPARK-45913][PYTHON] Make the internal attributes private from PySpark errors.
URL: https://github.com/apache/spark/pull/43790


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