villebro commented on a change in pull request #8098: [Hive Engine Spec] Fix
latest partition logic
URL:
https://github.com/apache/incubator-superset/pull/8098#discussion_r316971958
##########
File path: superset/db_engine_specs/hive.py
##########
@@ -321,10 +324,10 @@ def latest_sub_partition(cls, table_name, schema,
database, **kwargs):
pass
@classmethod
- def _latest_partition_from_df(cls, df):
+ def _latest_partition_from_df(cls, df) -> Optional[List[str]]:
"""Hive partitions look like ds={partition name}"""
if not df.empty:
- return df.ix[:, 0].max().split("=")[1]
+ return [df.ix[:, 0].max().split("=")[1]]
Review comment:
`return None` here to make sure there's an explicit return.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]