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