john-bodley commented on a change in pull request #9897:
URL: 
https://github.com/apache/incubator-superset/pull/9897#discussion_r432888255



##########
File path: superset/db_engine_specs/presto.py
##########
@@ -817,13 +818,17 @@ def _partition_query(  # pylint: 
disable=too-many-arguments,too-many-locals
 
         presto_version = database.get_extra().get("version")
 
+        partdollarqry = f"SHOW PARTITIONS FROM {table_name}"
+        if not presto_version or StrictVersion(presto_version) >= 
StrictVersion("0.199"):
+            if schema and len(schema) > 0:

Review comment:
       This logic can then be simplified as `str(table)` and thus no if/else 
statement is requirement.

##########
File path: superset/db_engine_specs/presto.py
##########
@@ -783,6 +783,7 @@ def _extract_error_message(cls, ex: Exception) -> 
Optional[str]:
     def _partition_query(  # pylint: disable=too-many-arguments,too-many-locals
         cls,
         table_name: str,
+        schema: Optional[str],

Review comment:
       Could you replace `table_name`/`schema` with the 
[`Table`](https://github.com/apache/incubator-superset/blob/master/superset/sql_parse.py#L56)
 dataclass.




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

Reply via email to