wengh commented on code in PR #49535: URL: https://github.com/apache/spark/pull/49535#discussion_r1924468968
########## python/pyspark/util.py: ########## @@ -468,16 +468,19 @@ def handle_worker_exception(e: BaseException, outfile: IO) -> None: and exception traceback info to outfile. JVM could then read from the outfile and perform exception handling there. """ - try: - exc_info = None + + def format_exception() -> str: + if os.environ.get("SPARK_HIDE_TRACEBACK", False): + return "".join(traceback.format_exception_only(type(e), e)) Review Comment: Then who sets the parameter? Actually, do we want to hide stack trace only for `analyze_udtf` or do we want it to apply to more places? If only for `analyze_udtf` then `analyze_udtf` can read the environment variable to set the parameter, I guess. -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org