This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 048059bae2d Fix mypy type error in MsSqlToHiveOperator (#61902)
048059bae2d is described below
commit 048059bae2d4bf2870220e4e32a9ecb72ae84ba9
Author: Henry Chen <[email protected]>
AuthorDate: Sat Feb 14 18:18:24 2026 +0800
Fix mypy type error in MsSqlToHiveOperator (#61902)
---
.../src/airflow/providers/apache/hive/transfers/mssql_to_hive.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/providers/apache/hive/src/airflow/providers/apache/hive/transfers/mssql_to_hive.py
b/providers/apache/hive/src/airflow/providers/apache/hive/transfers/mssql_to_hive.py
index 3bb6cee2de2..b3487278e28 100644
---
a/providers/apache/hive/src/airflow/providers/apache/hive/transfers/mssql_to_hive.py
+++
b/providers/apache/hive/src/airflow/providers/apache/hive/transfers/mssql_to_hive.py
@@ -119,9 +119,10 @@ class MsSqlToHiveOperator(BaseOperator):
with NamedTemporaryFile(mode="w", encoding="utf-8") as
tmp_file:
csv_writer = csv.writer(tmp_file, delimiter=self.delimiter)
field_dict = {}
- for col_count, field in enumerate(cursor.description,
start=1):
- col_position = f"Column{col_count}"
- field_dict[col_position if field[0] == "" else
field[0]] = self.type_map(field[1])
+ if cursor.description is not None:
+ for col_count, field in enumerate(cursor.description,
start=1):
+ col_position = f"Column{col_count}"
+ field_dict[col_position if field[0] == "" else
field[0]] = self.type_map(field[1])
csv_writer.writerows(cursor) # type:ignore[arg-type]
tmp_file.flush()