From 061ea540f2e6392189430b541cc72a88516c4ed4 Mon Sep 17 00:00:00 2001 From: Nikolaus Schuetz Date: Wed, 26 Aug 2026 13:53:48 -0400 Subject: [PATCH] fix: Strip trailing space from INT32_LIST type-string key The INT32_LIST entry in the type-string lookup table had a trailing space in its key ("INT32_LIST "), so _convert_value_type_str_to_value_type never matched the string "INT32_LIST" and silently fell back to ValueType.STRING. Remove the stray space so the string maps to ValueType.INT32_LIST, and add a regression test. Signed-off-by: Nikolaus Schuetz --- sdk/python/feast/type_map.py | 2 +- sdk/python/tests/unit/test_type_map.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sdk/python/feast/type_map.py b/sdk/python/feast/type_map.py index 54699396c80..206515321f3 100644 --- a/sdk/python/feast/type_map.py +++ b/sdk/python/feast/type_map.py @@ -562,7 +562,7 @@ def _convert_value_type_str_to_value_type(type_str: str) -> ValueType: "UNIX_TIMESTAMP": ValueType.UNIX_TIMESTAMP, "BYTES_LIST": ValueType.BYTES_LIST, "STRING_LIST": ValueType.STRING_LIST, - "INT32_LIST ": ValueType.INT32_LIST, + "INT32_LIST": ValueType.INT32_LIST, "INT64_LIST": ValueType.INT64_LIST, "DOUBLE_LIST": ValueType.DOUBLE_LIST, "FLOAT_LIST": ValueType.FLOAT_LIST, diff --git a/sdk/python/tests/unit/test_type_map.py b/sdk/python/tests/unit/test_type_map.py index 5dfb0c52437..d764e3b7f3f 100644 --- a/sdk/python/tests/unit/test_type_map.py +++ b/sdk/python/tests/unit/test_type_map.py @@ -50,6 +50,12 @@ def test_null_unix_timestamp_list(): assert converted[0] is None +def test_convert_value_type_str_to_value_type_int_lists(): + # Regression: "INT32_LIST" once had a trailing space and fell through to STRING. + assert _convert_value_type_str_to_value_type("INT32_LIST") == ValueType.INT32_LIST + assert _convert_value_type_str_to_value_type("INT64_LIST") == ValueType.INT64_LIST + + @pytest.mark.parametrize( "values", (