https://github.com/apache/airflow/blob/6c458f29c0eeadb1282e524e76fdd379d6436824/airflow/providers/apache/hive/hooks/hive.py#L464

It should be:
```
if hasattr(self, 'sub_process')
```
airflow/providers/apache/hive/hooks/hive.py
self,
        schema: str,
        table_name: str,
        field: Optional[str] = None,
        filter_map: Optional[Dict[Any, Any]] = None,
    ) -> Any:
        """
        Returns the maximum value for all partitions with given field in a table.
        If only one partition key exist in the table, the key will be used as field.
        filter_map should be a partition_key:partition_value map and will be used to
        filter out partitions.
        :param schema: schema name.
        :type schema: str
        :param table_name: table name.
        :type table_name: str
        :param field: partition key to get max partition from.
        :type field: str
        :param filter_map: partition_key:partition_value map used for partition filtering.
        :type filter_map: map
        >>> hh = HiveMetastoreHook()
        >>> filter_map = {'ds': '2015-01-01', 'ds': '2014-01-01'}
        >>> t = 'static_babynames_partitioned'
        >>> hh.max_partition(schema='airflow',\
        ... table_name=t, field='ds', filter_map=filter_map)
        '2015-01-01'
        """
        with self.metastore as client: