<!--
Welcome to Apache Airflow!

Please complete the next sections or the issue will be closed.
-->

**Apache Airflow version**:

2.2.0.dev0

**OS**:

Debian GNU/Linux

**Apache Airflow Provider versions**:

<!-- You can use `pip freeze | grep apache-airflow-providers` (you can leave only relevant ones)-->

**Deployment**:

docker-compose version 1.29.2

**What happened**:

Currently in hive hooks, when [get_pandas_df()](https://github.com/apache/airflow/blob/main/airflow/providers/apache/hive/hooks/hive.py#L1039) is used to create a dataframe, the first step creates the dataframe, the second step creates the columns.  The step to add columns throws an exception when the table is empty.

```
hh = HiveServer2Hook()
sql = "SELECT * FROM <table> WHERE 1=0"
df = hh.get_pandas_df(sql)

[2021-08-15 21:10:15,282] {{hive.py:449}} INFO - SELECT * FROM <table> WHERE 1=0
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/venv/lib/python3.7/site-packages/airflow/providers/apache/hive/hooks/hive.py", line 1073, in get_pandas_df
    df.columns = [c[0] for c in res['header']]
  File "/venv/lib/python3.7/site-packages/pandas/core/generic.py", line 5154, in __setattr__
    return object.__setattr__(self, name, value)
  File "pandas/_libs/properties.pyx", line 66, in pandas._libs.properties.AxisProperty.__set__
  File "/venv/lib/python3.7/site-packages/pandas/core/generic.py", line 564, in _set_axis
    self._mgr.set_axis(axis, labels)
  File "/venv/lib/python3.7/site-packages/pandas/core/internals/managers.py", line 227, in set_axis
    f"Length mismatch: Expected axis has {old_len} elements, new "
ValueError: Length mismatch: Expected axis has 0 elements, new values have 1 elements
```

**What you expected to happen**:

When an empty table is read, get_pandas_df() should return an empty dataframe, with the columns listed in the empty dataframe.  Ideally, `len(df.index)` produces `0` and `df.columns` lists the columns.


**How to reproduce it**:

Use your own hive server...
```
from airflow.providers.apache.hive.hooks.hive import HiveServer2Hook
hh = HiveServer2Hook()
sql = "SELECT * FROM <table> WHERE 1=0"
df = hh.get_pandas_df(sql)
```
Where \<table> can be any table.

**Anything else we need to know**:

Here's a potential fix ...
```
    #df = pandas.DataFrame(res['data'], **kwargs)
    #df.columns = [c[0] for c in res['header']]
    df = pandas.DataFrame(res['data'], columns=[c[0] for c in res['header']], **kwargs)

```

A PR is more or less ready but someone else should confirm this is an actual bug.  I can trigger the bug on an actual hive server.  I cannot trigger the bug using [test_hive.py](https://github.com/apache/airflow/blob/main/tests/providers/apache/hive/hooks/test_hive.py).  Also, if a PR Is needed, and a new test is needed, then I may need some help updating test_hive.py.

**Are you willing to submit a PR?**

Yes.

tests/providers/apache/hive/hooks/test_hive.py
#
#
#
#
import datetime
import itertools
import os
import unittest
from collections import OrderedDict, namedtuple
from unittest import mock
import pandas as pd
import pytest
from hmsclient import HMSClient
from airflow import PY39
from airflow.exceptions import AirflowException
from airflow.models.connection import Connection
from airflow.models.dag import DAG
from airflow.providers.apache.hive.hooks.hive import HiveMetastoreHook, HiveServer2Hook
from airflow.secrets.environment_variables import CONN_ENV_PREFIX
from airflow.utils import timezone
from airflow.utils.operator_helpers import AIRFLOW_VAR_NAME_FORMAT_MAPPING