You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/03/13 23:12:23 UTC
[GitHub] [incubator-superset] john-bodley commented on a change in pull
request #7029: [sqlparse] Fixing table name extraction for ill-defined query
john-bodley commented on a change in pull request #7029: [sqlparse] Fixing table name extraction for ill-defined query
URL: https://github.com/apache/incubator-superset/pull/7029#discussion_r265367647
##########
File path: superset/sql_parse.py
##########
@@ -89,8 +89,8 @@ def __process_identifier(self, identifier):
# exclude subselects
if '(' not in str(identifier):
table_name = self.__get_full_name(identifier)
- if not table_name.startswith(CTE_PREFIX):
- self._table_names.add(self.__get_full_name(identifier))
+ if table_name and not table_name.startswith(CTE_PREFIX):
+ self._table_names.add(table_name)
Review comment:
Note there's no need to recall `self.__get_full_name(identifier)` again as the return value is captured by the `table_name` variable.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org