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,
        hql: Union[str, Text],
        csv_filepath: str,
        schema: str = 'default',
        delimiter: str = ',',
        lineterminator: str = '\r\n',
        output_header: bool = True,
        fetch_size: int = 1000,
        hive_conf: Optional[Dict[Any, Any]] = None,
    ) -> None:
        """
        Execute hql in target schema and write results to a csv file.
        :param hql: hql to be executed.
        :type hql: str or list
        :param csv_filepath: filepath of csv to write results into.
        :type csv_filepath: str
        :param schema: target schema, default to 'default'.
        :type schema: str
        :param delimiter: delimiter of the csv file, default to ','.
        :type delimiter: str
        :param lineterminator: lineterminator of the csv file.