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.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]