Acehaidrey commented on a change in pull request #8598:
URL: https://github.com/apache/airflow/pull/8598#discussion_r429486073



##########
File path: airflow/providers/apache/hive/hooks/hive.py
##########
@@ -708,7 +708,11 @@ def _get_max_partition_from_part_specs(part_specs, 
partition_key, filter_map):
         if not candidates:
             return None
         else:
-            return max(candidates).encode('utf-8')
+            max_val = max(candidates).encode('utf-8')
+            # this check is for python3 to keep same behavior of returning a 
string type
+            if isinstance(max_val, (bytes, bytearray)):

Review comment:
       @ashb went ahead and just gutted any call to encode it. since we're all 
in py3 our response is a string as it is, and we don't need to encode to bytes 
since we want it decoded for use




----------------------------------------------------------------
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]


Reply via email to