File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -57,3 +57,16 @@ def test_vector_embed_text_batch_inputs():
5757 for vector in result :
5858 assert len (vector ) == EXPECTED_DIMENSION
5959 assert all (isinstance (v , float ) for v in vector )
60+
61+
62+ def test_vector_result_type ():
63+ # Verify that the UDF result type is correctly set to VECTOR(1024)
64+ # This ensures that databend-udf parses it correctly (if it validates on definition)
65+ # or at least that the string is passed correctly.
66+ # The result type is parsed into _result_schema
67+ assert len (ai_embed_1024 ._result_schema ) == 1
68+ field = ai_embed_1024 ._result_schema [0 ]
69+ # Check if it is a fixed size list of size 1024
70+ import pyarrow as pa
71+ assert pa .types .is_fixed_size_list (field .type )
72+ assert field .type .list_size == 1024
You can’t perform that action at this time.
0 commit comments