From ce96e8a9aedf72bec257d8f0dbbf7ad800a78dc3 Mon Sep 17 00:00:00 2001 From: sundyli <543950155@qq.com> Date: Sun, 18 Feb 2024 16:09:32 -0800 Subject: [PATCH] fix(python): type conversion for unicode & binary (#5) --- python/databend_udf/udf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/databend_udf/udf.py b/python/databend_udf/udf.py index 85851bd..9775fd1 100644 --- a/python/databend_udf/udf.py +++ b/python/databend_udf/udf.py @@ -543,9 +543,9 @@ def _field_type_to_string(field: pa.Field) -> str: return "DATE" elif pa.types.is_timestamp(t): return "TIMESTAMP" - elif pa.types.is_large_unicode(t): + elif pa.types.is_large_unicode(t) or pa.types.is_unicode(t): return "VARCHAR" - elif pa.types.is_large_binary(t): + elif pa.types.is_large_binary(t) or pa.types.is_binary(t): if _field_is_variant(field): return "VARIANT" else: