From edb56ad1a83a0b1d92a2cae0124fc0be5d58cd48 Mon Sep 17 00:00:00 2001 From: LJ Date: Thu, 17 Apr 2025 17:17:57 -0700 Subject: [PATCH] Make sure building core types for list element struct with full info --- python/cocoindex/typing.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python/cocoindex/typing.py b/python/cocoindex/typing.py index c7e50ae6..1c6382ab 100644 --- a/python/cocoindex/typing.py +++ b/python/cocoindex/typing.py @@ -183,11 +183,7 @@ def _encode_type(type_info: AnalyzedTypeInfo) -> dict[str, Any]: if type_info.elem_type is None: raise ValueError(f"{type_info.kind} type must have an element type") row_type_info = analyze_type_info(type_info.elem_type) - if row_type_info.dataclass_type is None: - raise ValueError(f"{type_info.kind} type must have a dataclass type") - encoded_type['row'] = { - 'fields': _encode_fields_schema(row_type_info.dataclass_type), - } + encoded_type['row'] = _encode_type(row_type_info) return encoded_type