Skip to content

Commit

Permalink
feat: improve presto query perf (apache#11069)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Ritter authored and auxten committed Nov 20, 2020
1 parent ab2e9a5 commit 41e5406
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions superset/db_engine_specs/presto.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,10 +730,10 @@ def extra_table_metadata(
)

if not latest_parts:
latest_parts = tuple([None] * len(col_names)) # type: ignore
latest_parts = tuple([None] * len(col_names))
metadata["partitions"] = {
"cols": cols,
"latest": dict(zip(col_names, latest_parts)), # type: ignore
"latest": dict(zip(col_names, latest_parts)),
"partitionQuery": pql,
}

Expand Down Expand Up @@ -925,6 +925,7 @@ def _latest_partition_from_df(cls, df: pd.DataFrame) -> Optional[List[str]]:
return None

@classmethod
@cache.memoize(timeout=60)
def latest_partition(
cls,
table_name: str,
Expand Down

0 comments on commit 41e5406

Please sign in to comment.