Skip to content

Commit 3898cad

Browse files
committed
Fix VECTOR workaround: use nullable inner field
1 parent ccb8276 commit 3898cad

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

python/databend_udf/udf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ def _type_str_to_arrow_field_inner(type_str: str) -> pa.Field:
14101410
# This is a workaround because Databend UDF client might not support FixedSizeList yet.
14111411
return pa.field(
14121412
"",
1413-
pa.list_(pa.field("item", pa.float32(), nullable=False)),
1413+
pa.list_(pa.field("item", pa.float32(), nullable=True)),
14141414
nullable=False,
14151415
metadata={
14161416
EXTENSION_KEY: ARROW_EXT_TYPE_VECTOR,

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ classifiers = [
77
description = "Databend UDF Server"
88
license = { text = "Apache-2.0" }
99
name = "databend-udf"
10-
version = "0.2.14"
10+
version = "0.2.15"
1111
readme = "README.md"
1212
requires-python = ">=3.7"
1313
dependencies = [

python/tests/test_vector_type.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_vector_type_formatting():
4040
# Test that a List with VECTOR metadata is formatted as VECTOR(N)
4141
field = pa.field(
4242
"",
43-
pa.list_(pa.field("item", pa.float32(), nullable=False)),
43+
pa.list_(pa.field("item", pa.float32(), nullable=True)),
4444
nullable=False,
4545
metadata={
4646
b"Extension": b"Vector",
@@ -55,7 +55,7 @@ def test_vector_input_processing():
5555
# Input processing should handle List (which is what VECTOR is physically)
5656
field = pa.field(
5757
"",
58-
pa.list_(pa.field("item", pa.float32(), nullable=False)),
58+
pa.list_(pa.field("item", pa.float32(), nullable=True)),
5959
nullable=False,
6060
metadata={
6161
b"Extension": b"Vector",
@@ -74,7 +74,7 @@ def test_vector_output_processing():
7474
# Output processing should handle List
7575
field = pa.field(
7676
"",
77-
pa.list_(pa.field("item", pa.float32(), nullable=False)),
77+
pa.list_(pa.field("item", pa.float32(), nullable=True)),
7878
nullable=False,
7979
metadata={
8080
b"Extension": b"Vector",

0 commit comments

Comments
 (0)