[GitHub] spark pull request #18277: [SPARK-20947][PYTHON] Fix encoding/decoding error...
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/18277 --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #18277: [SPARK-20947][PYTHON] Fix encoding/decoding error...
Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/18277#discussion_r162782791 --- Diff: python/pyspark/rdd.py --- @@ -751,7 +751,7 @@ def func(iterator): def pipe_objs(out): for obj in iterator: -s = str(obj).rstrip('\n') + '\n' +s = unicode(obj).rstrip('\n') + '\n' --- End diff -- @chaoslawful, if you are active, we could change `\n` to `u\n` to reduce the conversion and don't rely on the implicit conversion between `str` and `unicode`. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #18277: [SPARK-20947][PYTHON] Fix encoding/decoding error...
Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/18277#discussion_r121589809 --- Diff: python/pyspark/rdd.py --- @@ -751,7 +751,7 @@ def func(iterator): def pipe_objs(out): for obj in iterator: -s = str(obj).rstrip('\n') + '\n' +s = unicode(obj).rstrip('\n') + '\n' --- End diff -- I think we need a small test to validate this. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #18277: [SPARK-20947][PYTHON] Fix encoding/decoding error...
GitHub user chaoslawful opened a pull request: https://github.com/apache/spark/pull/18277 [SPARK-20947][PYTHON] Fix encoding/decoding error in pipe action ## What changes were proposed in this pull request? Pipe action convert objects into strings using a way that was affected by the default encoding setting of Python environment. This patch fixed the problem. The detailed description is added here: https://issues.apache.org/jira/browse/SPARK-20947 ## How was this patch tested? Run the following statement in pyspark-shell, and it will NOT raise exception if this patch is applied: ```python sc.parallelize([u'\u6d4b\u8bd5']).pipe('cat').collect() ``` You can merge this pull request into a Git repository by running: $ git pull https://github.com/chaoslawful/spark fix_pipe_encoding_error Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/18277.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #18277 commit 1b13e3428fe893bfc8f06d44b846b92e198de2f6 Author: çæå²Date: 2017-06-12T10:15:15Z [SPARK-20947][PYTHON] Fix encoding/decoding error in pipe action --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org