This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 5b59129e70b5 [SPARK-49047][PYTHON][CONNECT][FOLLOWUP] Catch potential truncation failure 5b59129e70b5 is described below commit 5b59129e70b5cd06efffbfad6e20812c741a2831 Author: Ruifeng Zheng <ruife...@apache.org> AuthorDate: Tue Aug 6 20:41:16 2024 +0900 [SPARK-49047][PYTHON][CONNECT][FOLLOWUP] Catch potential truncation failure ### What changes were proposed in this pull request? Catch potential truncation failure ### Why are the changes needed? logging should not fail execution ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? ci ### Was this patch authored or co-authored using generative AI tooling? no Closes #47629 from zhengruifeng/msg_truncate_fu. Authored-by: Ruifeng Zheng <ruife...@apache.org> Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> --- python/pyspark/sql/connect/client/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/pyspark/sql/connect/client/core.py b/python/pyspark/sql/connect/client/core.py index 2acb0d2cb01d..53d1412e9d05 100644 --- a/python/pyspark/sql/connect/client/core.py +++ b/python/pyspark/sql/connect/client/core.py @@ -997,6 +997,8 @@ class SparkConnectClient(object): return text_format.MessageToString(p2, as_one_line=True) except RecursionError: return "<Truncated message due to recursion error>" + except Exception: + return "<Truncated message due to truncation error>" def _truncate(self, p: google.protobuf.message.Message) -> google.protobuf.message.Message: """ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org