ISSUE-2422: Handled None datatype (#2423)

Co-authored-by: Mayur SIngal <mayursingal@Mayurs-MacBook-Pro.local>
This commit is contained in:
Mayur Singal 2022-01-25 22:12:37 +05:30 committed by GitHub
parent c3fc763bdd
commit cfca795edf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -506,7 +506,7 @@ class SQLSource(Source[OMetaDatabaseAndTable]):
col_data_length = self._check_col_length( col_data_length = self._check_col_length(
col_type, column["type"] col_type, column["type"]
) )
if col_type == "NULL": if col_type == "NULL" or col_type is None:
col_type = "VARCHAR" col_type = "VARCHAR"
data_type_display = "varchar" data_type_display = "varchar"
logger.warning( logger.warning(
@ -567,7 +567,7 @@ class SQLSource(Source[OMetaDatabaseAndTable]):
return None return None
def _check_col_length(self, datatype, col_raw_type): def _check_col_length(self, datatype, col_raw_type):
if datatype.upper() in { if datatype is not None and datatype.upper() in {
"CHAR", "CHAR",
"VARCHAR", "VARCHAR",
"BINARY", "BINARY",