dongjoon-hyun commented on code in PR #52755:
URL: https://github.com/apache/spark/pull/52755#discussion_r2479485903


##########
python/pyspark/errors/exceptions/captured.py:
##########
@@ -107,7 +107,9 @@ def getCondition(self) -> Optional[str]:
         if self._origin is not None and is_instance_of(
             gw, self._origin, "org.apache.spark.SparkThrowable"
         ):
-            return self._origin.getCondition()
+            return SparkContext._jvm.PythonErrorUtils.getCondition(
+                self._origin
+            )  # type: ignore[union-attr]

Review Comment:
   Strangely, it seems that `mypy` still complains at the new code.
   
   ```
   annotations failed mypy checks:
   python/pyspark/errors/exceptions/captured.py:110: error: Item "None" of "Any 
| None" has no attribute "PythonErrorUtils"  [union-attr]
   python/pyspark/errors/exceptions/captured.py:112: error: Unused "type: 
ignore" comment  [unused-ignore]
   python/pyspark/errors/exceptions/captured.py:131: error: Item "None" of "Any 
| None" has no attribute "PythonErrorUtils"  [union-attr]
   python/pyspark/errors/exceptions/captured.py:132: error: Unused "type: 
ignore" comment  [unused-ignore]
   python/pyspark/errors/exceptions/captured.py:145: error: Item "None" of "Any 
| None" has no attribute "PythonErrorUtils"  [union-attr]
   python/pyspark/errors/exceptions/captured.py:147: error: Unused "type: 
ignore" comment  [unused-ignore]
   python/pyspark/errors/exceptions/captured.py:161: error: Item "None" of "Any 
| None" has no attribute "PythonErrorUtils"  [union-attr]
   python/pyspark/errors/exceptions/captured.py:163: error: Unused "type: 
ignore" comment  [unused-ignore]
   python/pyspark/errors/exceptions/captured.py:164: error: Item "None" of "Any 
| None" has no attribute "PythonErrorUtils"  [union-attr]
   python/pyspark/errors/exceptions/captured.py:166: error: Unused "type: 
ignore" comment  [unused-ignore]
   python/pyspark/errors/exceptions/captured.py:187: error: Item "None" of "Any 
| None" has no attribute "PythonErrorUtils"  [union-attr]
   python/pyspark/errors/exceptions/captured.py:189: error: Unused "type: 
ignore" comment  [unused-ignore]
   Found 12 errors in 1 file (checked 1173 source files)
   ```



-- 
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]

Reply via email to