You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/08/06 20:28:19 UTC
[GitHub] [incubator-superset] etr2460 commented on a change in pull request
#7993: [Jinja] Make Presto template functions backwards compatible
etr2460 commented on a change in pull request #7993: [Jinja] Make Presto template functions backwards compatible
URL: https://github.com/apache/incubator-superset/pull/7993#discussion_r311259572
##########
File path: superset/jinja_context.py
##########
@@ -240,7 +240,39 @@ def _schema_table(
schema, table_name = table_name.split(".")
return table_name, schema
- def latest_partition(self, table_name: str):
+ def latest_partition(self, table_name: str) -> str:
+ """
+ Supports the backwards compatible Jinja template API from before
+ https://github.com/apache/incubator-superset/pull/7782. Returns the first
+ (or only) value in the array of all latest partitions for the given table name.
+
+ :param table_name: table name in the format `schema.table`
+ :return: the first (or only) value in the latest partition array
+ """
+
+ return self._first_latest_partition(table_name)
+
+ def _first_latest_partition(self, table_name: str) -> str:
Review comment:
updated
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org