john-bodley commented on code in PR #23656:
URL: https://github.com/apache/superset/pull/23656#discussion_r1163554883


##########
superset/db_engine_specs/presto.py:
##########
@@ -561,10 +561,18 @@ def latest_partition(
             )
 
         column_names = indexes[0]["column_names"]
-        part_fields = [(column_name, True) for column_name in column_names]
-        sql = cls._partition_query(table_name, database, 1, part_fields)
-        df = database.get_df(sql, schema)
-        return column_names, cls._latest_partition_from_df(df)
+
+        return column_names, cls._latest_partition_from_df(

Review Comment:
   Same logic as before just a cleaner presentation including adding keyword 
arguments, i.e., previously it wasn't apparent in 
`cls._partition_query(table_name, database, 1, part_fields)` what `1` and 
`part_fields` meant.



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