dpgaspar commented on a change in pull request #10978:
URL:
https://github.com/apache/incubator-superset/pull/10978#discussion_r492783244
##########
File path: superset/databases/utils.py
##########
@@ -44,7 +44,7 @@ def get_indexes_metadata(
def get_col_type(col: Dict[Any, Any]) -> str:
try:
dtype = f"{col['type']}"
- except Exception: # pylint: disable=broad-except
+ except KeyError:
Review comment:
Actually I think this one may be trickier. I was staring at this and
wondering why a `KeyError` is raised and on the exception handling we are
trying to access the same key again with `col["type"].__class__.__name__`. So
the exception KeyError makes sense, because it may be possible, but what we are
catching is a serialisation problem, `# sqla.types.JSON __str__ has a bug, so
using __class__.`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]