You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "michael-s-molina (via GitHub)" <gi...@apache.org> on 2023/04/12 20:04:28 UTC

[GitHub] [superset] michael-s-molina commented on a diff in pull request #23656: chore(db_engine_specs): Refactor get_index

michael-s-molina commented on code in PR #23656:
URL: https://github.com/apache/superset/pull/23656#discussion_r1164582876


##########
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(
+            df=database.get_df(
+                sql=cls._partition_query(
+                    table_name,
+                    database,

Review Comment:
   ```suggestion
                       table_name=table_name,
                       database=database,
   ```



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org