itholic commented on code in PR #44114:
URL: https://github.com/apache/spark/pull/44114#discussion_r1413282037
##########
python/pyspark/pandas/sql_processor.py:
##########
@@ -206,9 +206,7 @@ def _get_local_scope() -> Dict[str, Any]:
# Get 2 scopes above (_get_local_scope -> sql -> ...) to capture the vars
there.
try:
return inspect.stack()[_CAPTURE_SCOPES][0].f_locals
- except Exception:
- # TODO (rxin, thunterdb): use a narrower scope exception.
- # See https://github.com/databricks/koalas/pull/448
+ except IndexError:
Review Comment:
Actually it's raised from `inspect.stack()[_CAPTURE_SCOPES][0].f_locals`
that we cannot handle the error class, so I believe we should catch is as an
`IndexError`. Please let me know if I missing something!
--
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]