itholic commented on code in PR #45377: URL: https://github.com/apache/spark/pull/45377#discussion_r1552966218
########## python/pyspark/errors/exceptions/captured.py: ########## @@ -379,5 +379,13 @@ def fragment(self) -> str: def callSite(self) -> str: return str(self._q.callSite()) + def pysparkFragment(self) -> Optional[str]: # type: ignore[return] + if self.contextType() == QueryContextType.DataFrame: + return str(self._q.pysparkFragment()) + + def pysparkCallSite(self) -> Optional[str]: # type: ignore[return] Review Comment: > how are these two different? The given example only shows the call site > > ``` > == PySpark call site == > "divide" was called from > /.../spark/python/test_pyspark_error.py:8 > ``` Yes, the `fragment` is a function identifier and the call site is the file name including line number. I follows this behavior from JVM `DataFrameQueryContext`. -- 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