feat: improve presto query perf (#11069)

This commit is contained in:
Erik Ritter
2020-09-28 08:52:00 -07:00
committed by GitHub
parent 046bd02d65
commit 0f7e90f1f7

View File

@@ -730,10 +730,10 @@ class PrestoEngineSpec(BaseEngineSpec):
)
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,
}
@@ -925,6 +925,7 @@ class PrestoEngineSpec(BaseEngineSpec):
return None
@classmethod
@cache.memoize(timeout=60)
def latest_partition(
cls,
table_name: str,