mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[hotfix] Presto's latest_sub_partion rendering fail
This commit is contained in:
@@ -571,7 +571,7 @@ class PrestoEngineSpec(BaseEngineSpec):
|
||||
return part_field, cls._latest_partition_from_df(df)
|
||||
|
||||
@classmethod
|
||||
def latest_sub_partition(cls, table_name, schema, database, **kwargs):
|
||||
def latest_sub_partition(cls, table_name, schema, database, **kwargs):
|
||||
"""Returns the latest (max) partition value for a table
|
||||
|
||||
A filtering criteria should be passed for all fields that are
|
||||
@@ -740,7 +740,7 @@ class HiveEngineSpec(PrestoEngineSpec):
|
||||
return False
|
||||
|
||||
@classmethod
|
||||
def latest_sub_partition(cls, table_name, **kwargs):
|
||||
def latest_sub_partition(cls, table_name, schema, database, **kwargs):
|
||||
# TODO(bogdan): implement`
|
||||
pass
|
||||
|
||||
|
||||
@@ -124,7 +124,10 @@ class PrestoTemplateProcessor(BaseTemplateProcessor):
|
||||
def latest_sub_partition(self, table_name, **kwargs):
|
||||
table_name, schema = self._schema_table(table_name, self.schema)
|
||||
return self.database.db_engine_spec.latest_sub_partition(
|
||||
table_name, schema, self.database, kwargs)
|
||||
table_name=table_name,
|
||||
schema=schema,
|
||||
database=self.database,
|
||||
**kwargs)
|
||||
|
||||
|
||||
class HiveTemplateProcessor(PrestoTemplateProcessor):
|
||||
|
||||
Reference in New Issue
Block a user