chore(ci): fix numpy type errors and revert #22610 (#22782)

This commit is contained in:
Ville Brofeldt
2023-01-19 14:53:48 +02:00
committed by GitHub
parent 39c96d0568
commit 577ac81686
29 changed files with 373 additions and 196 deletions

View File

@@ -14,6 +14,8 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations
import logging
import os
import re
@@ -206,7 +208,7 @@ class HiveEngineSpec(PrestoEngineSpec):
with cls.get_engine(database) as engine:
engine.execute(f"DROP TABLE IF EXISTS {str(table)}")
def _get_hive_type(dtype: np.dtype) -> str:
def _get_hive_type(dtype: np.dtype[Any]) -> str:
hive_type_by_dtype = {
np.dtype("bool"): "BOOLEAN",
np.dtype("float64"): "DOUBLE",