diff --git a/docs/reference/type-system.md b/docs/reference/type-system.md index eb39b5e794..6353d41d90 100644 --- a/docs/reference/type-system.md +++ b/docs/reference/type-system.md @@ -26,6 +26,7 @@ Feast supports the following data types: | `UnixTimestamp` | `datetime` | Unix timestamp (nullable) | | `Uuid` | `uuid.UUID` | UUID (any version) | | `TimeUuid` | `uuid.UUID` | Time-based UUID (version 1) | +| `Decimal` | `decimal.Decimal` | Arbitrary-precision decimal number | ### Domain-Specific Primitive Types @@ -56,6 +57,7 @@ All primitive types have corresponding array (list) types: | `Array(UnixTimestamp)` | `List[datetime]` | List of timestamps | | `Array(Uuid)` | `List[uuid.UUID]` | List of UUIDs | | `Array(TimeUuid)` | `List[uuid.UUID]` | List of time-based UUIDs | +| `Array(Decimal)` | `List[decimal.Decimal]` | List of arbitrary-precision decimals | ### Set Types @@ -73,6 +75,7 @@ All primitive types (except `Map` and `Json`) have corresponding set types for s | `Set(UnixTimestamp)` | `Set[datetime]` | Set of unique timestamps | | `Set(Uuid)` | `Set[uuid.UUID]` | Set of unique UUIDs | | `Set(TimeUuid)` | `Set[uuid.UUID]` | Set of unique time-based UUIDs | +| `Set(Decimal)` | `Set[decimal.Decimal]` | Set of unique arbitrary-precision decimals | **Note:** Set types automatically remove duplicate values. When converting from lists or other iterables to sets, duplicates are eliminated. @@ -194,7 +197,7 @@ from datetime import timedelta from feast import Entity, FeatureView, Field, FileSource from feast.types import ( Int32, Int64, Float32, Float64, String, Bytes, Bool, UnixTimestamp, - Uuid, TimeUuid, Array, Set, Map, Json, Struct + Uuid, TimeUuid, Decimal, Array, Set, Map, Json, Struct ) # Define a data source @@ -226,6 +229,7 @@ user_features = FeatureView( Field(name="last_login", dtype=UnixTimestamp), Field(name="session_id", dtype=Uuid), Field(name="event_id", dtype=TimeUuid), + Field(name="price", dtype=Decimal), # Array types Field(name="daily_steps", dtype=Array(Int32)), @@ -238,6 +242,7 @@ user_features = FeatureView( Field(name="login_timestamps", dtype=Array(UnixTimestamp)), Field(name="related_session_ids", dtype=Array(Uuid)), Field(name="event_chain", dtype=Array(TimeUuid)), + Field(name="historical_prices", dtype=Array(Decimal)), # Set types (unique values only — see backend caveats above) Field(name="visited_pages", dtype=Set(String)), @@ -246,6 +251,7 @@ user_features = FeatureView( Field(name="preferred_languages", dtype=Set(String)), Field(name="unique_device_ids", dtype=Set(Uuid)), Field(name="unique_event_ids", dtype=Set(TimeUuid)), + Field(name="unique_prices", dtype=Set(Decimal)), # Map types Field(name="user_preferences", dtype=Map), @@ -313,9 +319,44 @@ related_sessions = [uuid.uuid4(), uuid.uuid4(), uuid.uuid4()] unique_devices = {uuid.uuid4(), uuid.uuid4()} ``` -### Nested Collection Type Usage Examples +### Decimal Type Usage Examples + +The `Decimal` type stores arbitrary-precision decimal numbers using Python's `decimal.Decimal`. +Values are stored as strings in the proto to preserve full precision — no floating-point rounding occurs. + +```python +import decimal + +# Scalar decimal — e.g., a financial price +price = decimal.Decimal("19.99") + +# High-precision value — all digits preserved +tax_rate = decimal.Decimal("0.08750000000000000000") + +# Decimal values are returned as decimal.Decimal objects from get_online_features() +response = store.get_online_features( + features=["product_features:price"], + entity_rows=[{"product_id": 42}], +) +result = response.to_dict() +# result["price"][0] is a decimal.Decimal object + +# Decimal lists — e.g., a history of prices +historical_prices = [ + decimal.Decimal("18.50"), + decimal.Decimal("19.00"), + decimal.Decimal("19.99"), +] + +# Decimal sets — unique price points seen +unique_prices = {decimal.Decimal("9.99"), decimal.Decimal("19.99"), decimal.Decimal("29.99")} +``` -Nested collections allow storing multi-dimensional data with unlimited depth: +{% hint style="warning" %} +`Decimal` is **not** inferred from any backend schema. You must declare it explicitly in your feature view schema. The pandas dtype for `Decimal` columns is `object` (holding `decimal.Decimal` instances), not a numeric dtype. +{% endhint %} + +### Nested Collection Type Usage Examples ```python # List of lists — e.g., weekly score history per user @@ -420,7 +461,7 @@ Each of these columns must be associated with a Feast type, which requires conve * `source_datatype_to_feast_value_type` calls the appropriate method in `type_map.py`. For example, if a `SnowflakeSource` is being examined, `snowflake_python_type_to_feast_value_type` from `type_map.py` will be called. {% hint style="info" %} -**Types that cannot be inferred:** `Set`, `Json`, `Struct`, `PdfBytes`, and `ImageBytes` types are never inferred from backend schemas. If you use these types, you must declare them explicitly in your feature view schema. +**Types that cannot be inferred:** `Set`, `Json`, `Struct`, `Decimal`, `PdfBytes`, and `ImageBytes` types are never inferred from backend schemas. If you use these types, you must declare them explicitly in your feature view schema. {% endhint %} ### Materialization diff --git a/protos/feast/types/Value.proto b/protos/feast/types/Value.proto index 4194c19bac..6c8082a43b 100644 --- a/protos/feast/types/Value.proto +++ b/protos/feast/types/Value.proto @@ -65,6 +65,9 @@ message ValueType { TIME_UUID_SET = 41; VALUE_LIST = 42; VALUE_SET = 43; + DECIMAL = 44; + DECIMAL_LIST = 45; + DECIMAL_SET = 46; } } @@ -112,6 +115,9 @@ message Value { StringSet time_uuid_set_val = 41; RepeatedValue list_val = 42; RepeatedValue set_val = 43; + string decimal_val = 44; + StringList decimal_list_val = 45; + StringSet decimal_set_val = 46; } } diff --git a/sdk/python/feast/protos/feast/types/Value_pb2.py b/sdk/python/feast/protos/feast/types/Value_pb2.py index 44ad6f115c..3f6e55d300 100644 --- a/sdk/python/feast/protos/feast/types/Value_pb2.py +++ b/sdk/python/feast/protos/feast/types/Value_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x66\x65\x61st/types/Value.proto\x12\x0b\x66\x65\x61st.types\"\xe2\x04\n\tValueType\"\xd4\x04\n\x04\x45num\x12\x0b\n\x07INVALID\x10\x00\x12\t\n\x05\x42YTES\x10\x01\x12\n\n\x06STRING\x10\x02\x12\t\n\x05INT32\x10\x03\x12\t\n\x05INT64\x10\x04\x12\n\n\x06\x44OUBLE\x10\x05\x12\t\n\x05\x46LOAT\x10\x06\x12\x08\n\x04\x42OOL\x10\x07\x12\x12\n\x0eUNIX_TIMESTAMP\x10\x08\x12\x0e\n\nBYTES_LIST\x10\x0b\x12\x0f\n\x0bSTRING_LIST\x10\x0c\x12\x0e\n\nINT32_LIST\x10\r\x12\x0e\n\nINT64_LIST\x10\x0e\x12\x0f\n\x0b\x44OUBLE_LIST\x10\x0f\x12\x0e\n\nFLOAT_LIST\x10\x10\x12\r\n\tBOOL_LIST\x10\x11\x12\x17\n\x13UNIX_TIMESTAMP_LIST\x10\x12\x12\x08\n\x04NULL\x10\x13\x12\x07\n\x03MAP\x10\x14\x12\x0c\n\x08MAP_LIST\x10\x15\x12\r\n\tBYTES_SET\x10\x16\x12\x0e\n\nSTRING_SET\x10\x17\x12\r\n\tINT32_SET\x10\x18\x12\r\n\tINT64_SET\x10\x19\x12\x0e\n\nDOUBLE_SET\x10\x1a\x12\r\n\tFLOAT_SET\x10\x1b\x12\x0c\n\x08\x42OOL_SET\x10\x1c\x12\x16\n\x12UNIX_TIMESTAMP_SET\x10\x1d\x12\x08\n\x04JSON\x10 \x12\r\n\tJSON_LIST\x10!\x12\n\n\x06STRUCT\x10\"\x12\x0f\n\x0bSTRUCT_LIST\x10#\x12\x08\n\x04UUID\x10$\x12\r\n\tTIME_UUID\x10%\x12\r\n\tUUID_LIST\x10&\x12\x12\n\x0eTIME_UUID_LIST\x10\'\x12\x0c\n\x08UUID_SET\x10(\x12\x11\n\rTIME_UUID_SET\x10)\x12\x0e\n\nVALUE_LIST\x10*\x12\r\n\tVALUE_SET\x10+\"\xd9\x0c\n\x05Value\x12\x13\n\tbytes_val\x18\x01 \x01(\x0cH\x00\x12\x14\n\nstring_val\x18\x02 \x01(\tH\x00\x12\x13\n\tint32_val\x18\x03 \x01(\x05H\x00\x12\x13\n\tint64_val\x18\x04 \x01(\x03H\x00\x12\x14\n\ndouble_val\x18\x05 \x01(\x01H\x00\x12\x13\n\tfloat_val\x18\x06 \x01(\x02H\x00\x12\x12\n\x08\x62ool_val\x18\x07 \x01(\x08H\x00\x12\x1c\n\x12unix_timestamp_val\x18\x08 \x01(\x03H\x00\x12\x30\n\x0e\x62ytes_list_val\x18\x0b \x01(\x0b\x32\x16.feast.types.BytesListH\x00\x12\x32\n\x0fstring_list_val\x18\x0c \x01(\x0b\x32\x17.feast.types.StringListH\x00\x12\x30\n\x0eint32_list_val\x18\r \x01(\x0b\x32\x16.feast.types.Int32ListH\x00\x12\x30\n\x0eint64_list_val\x18\x0e \x01(\x0b\x32\x16.feast.types.Int64ListH\x00\x12\x32\n\x0f\x64ouble_list_val\x18\x0f \x01(\x0b\x32\x17.feast.types.DoubleListH\x00\x12\x30\n\x0e\x66loat_list_val\x18\x10 \x01(\x0b\x32\x16.feast.types.FloatListH\x00\x12.\n\rbool_list_val\x18\x11 \x01(\x0b\x32\x15.feast.types.BoolListH\x00\x12\x39\n\x17unix_timestamp_list_val\x18\x12 \x01(\x0b\x32\x16.feast.types.Int64ListH\x00\x12%\n\x08null_val\x18\x13 \x01(\x0e\x32\x11.feast.types.NullH\x00\x12#\n\x07map_val\x18\x14 \x01(\x0b\x32\x10.feast.types.MapH\x00\x12,\n\x0cmap_list_val\x18\x15 \x01(\x0b\x32\x14.feast.types.MapListH\x00\x12.\n\rbytes_set_val\x18\x16 \x01(\x0b\x32\x15.feast.types.BytesSetH\x00\x12\x30\n\x0estring_set_val\x18\x17 \x01(\x0b\x32\x16.feast.types.StringSetH\x00\x12.\n\rint32_set_val\x18\x18 \x01(\x0b\x32\x15.feast.types.Int32SetH\x00\x12.\n\rint64_set_val\x18\x19 \x01(\x0b\x32\x15.feast.types.Int64SetH\x00\x12\x30\n\x0e\x64ouble_set_val\x18\x1a \x01(\x0b\x32\x16.feast.types.DoubleSetH\x00\x12.\n\rfloat_set_val\x18\x1b \x01(\x0b\x32\x15.feast.types.FloatSetH\x00\x12,\n\x0c\x62ool_set_val\x18\x1c \x01(\x0b\x32\x14.feast.types.BoolSetH\x00\x12\x37\n\x16unix_timestamp_set_val\x18\x1d \x01(\x0b\x32\x15.feast.types.Int64SetH\x00\x12\x12\n\x08json_val\x18 \x01(\tH\x00\x12\x30\n\rjson_list_val\x18! \x01(\x0b\x32\x17.feast.types.StringListH\x00\x12&\n\nstruct_val\x18\" \x01(\x0b\x32\x10.feast.types.MapH\x00\x12/\n\x0fstruct_list_val\x18# \x01(\x0b\x32\x14.feast.types.MapListH\x00\x12\x12\n\x08uuid_val\x18$ \x01(\tH\x00\x12\x17\n\rtime_uuid_val\x18% \x01(\tH\x00\x12\x30\n\ruuid_list_val\x18& \x01(\x0b\x32\x17.feast.types.StringListH\x00\x12\x35\n\x12time_uuid_list_val\x18\' \x01(\x0b\x32\x17.feast.types.StringListH\x00\x12.\n\x0cuuid_set_val\x18( \x01(\x0b\x32\x16.feast.types.StringSetH\x00\x12\x33\n\x11time_uuid_set_val\x18) \x01(\x0b\x32\x16.feast.types.StringSetH\x00\x12.\n\x08list_val\x18* \x01(\x0b\x32\x1a.feast.types.RepeatedValueH\x00\x12-\n\x07set_val\x18+ \x01(\x0b\x32\x1a.feast.types.RepeatedValueH\x00\x42\x05\n\x03val\"\x18\n\tBytesList\x12\x0b\n\x03val\x18\x01 \x03(\x0c\"\x19\n\nStringList\x12\x0b\n\x03val\x18\x01 \x03(\t\"\x18\n\tInt32List\x12\x0b\n\x03val\x18\x01 \x03(\x05\"\x18\n\tInt64List\x12\x0b\n\x03val\x18\x01 \x03(\x03\"\x19\n\nDoubleList\x12\x0b\n\x03val\x18\x01 \x03(\x01\"\x18\n\tFloatList\x12\x0b\n\x03val\x18\x01 \x03(\x02\"\x17\n\x08\x42oolList\x12\x0b\n\x03val\x18\x01 \x03(\x08\"\x17\n\x08\x42ytesSet\x12\x0b\n\x03val\x18\x01 \x03(\x0c\"\x18\n\tStringSet\x12\x0b\n\x03val\x18\x01 \x03(\t\"\x17\n\x08Int32Set\x12\x0b\n\x03val\x18\x01 \x03(\x05\"\x17\n\x08Int64Set\x12\x0b\n\x03val\x18\x01 \x03(\x03\"\x18\n\tDoubleSet\x12\x0b\n\x03val\x18\x01 \x03(\x01\"\x17\n\x08\x46loatSet\x12\x0b\n\x03val\x18\x01 \x03(\x02\"\x16\n\x07\x42oolSet\x12\x0b\n\x03val\x18\x01 \x03(\x08\"m\n\x03Map\x12&\n\x03val\x18\x01 \x03(\x0b\x32\x19.feast.types.Map.ValEntry\x1a>\n\x08ValEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.feast.types.Value:\x02\x38\x01\"(\n\x07MapList\x12\x1d\n\x03val\x18\x01 \x03(\x0b\x32\x10.feast.types.Map\"0\n\rRepeatedValue\x12\x1f\n\x03val\x18\x01 \x03(\x0b\x32\x12.feast.types.Value*\x10\n\x04Null\x12\x08\n\x04NULL\x10\x00\x42Q\n\x11\x66\x65\x61st.proto.typesB\nValueProtoZ0github.com/feast-dev/feast/go/protos/feast/typesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x66\x65\x61st/types/Value.proto\x12\x0b\x66\x65\x61st.types\"\x92\x05\n\tValueType\"\x84\x05\n\x04\x45num\x12\x0b\n\x07INVALID\x10\x00\x12\t\n\x05\x42YTES\x10\x01\x12\n\n\x06STRING\x10\x02\x12\t\n\x05INT32\x10\x03\x12\t\n\x05INT64\x10\x04\x12\n\n\x06\x44OUBLE\x10\x05\x12\t\n\x05\x46LOAT\x10\x06\x12\x08\n\x04\x42OOL\x10\x07\x12\x12\n\x0eUNIX_TIMESTAMP\x10\x08\x12\x0e\n\nBYTES_LIST\x10\x0b\x12\x0f\n\x0bSTRING_LIST\x10\x0c\x12\x0e\n\nINT32_LIST\x10\r\x12\x0e\n\nINT64_LIST\x10\x0e\x12\x0f\n\x0b\x44OUBLE_LIST\x10\x0f\x12\x0e\n\nFLOAT_LIST\x10\x10\x12\r\n\tBOOL_LIST\x10\x11\x12\x17\n\x13UNIX_TIMESTAMP_LIST\x10\x12\x12\x08\n\x04NULL\x10\x13\x12\x07\n\x03MAP\x10\x14\x12\x0c\n\x08MAP_LIST\x10\x15\x12\r\n\tBYTES_SET\x10\x16\x12\x0e\n\nSTRING_SET\x10\x17\x12\r\n\tINT32_SET\x10\x18\x12\r\n\tINT64_SET\x10\x19\x12\x0e\n\nDOUBLE_SET\x10\x1a\x12\r\n\tFLOAT_SET\x10\x1b\x12\x0c\n\x08\x42OOL_SET\x10\x1c\x12\x16\n\x12UNIX_TIMESTAMP_SET\x10\x1d\x12\x08\n\x04JSON\x10 \x12\r\n\tJSON_LIST\x10!\x12\n\n\x06STRUCT\x10\"\x12\x0f\n\x0bSTRUCT_LIST\x10#\x12\x08\n\x04UUID\x10$\x12\r\n\tTIME_UUID\x10%\x12\r\n\tUUID_LIST\x10&\x12\x12\n\x0eTIME_UUID_LIST\x10\'\x12\x0c\n\x08UUID_SET\x10(\x12\x11\n\rTIME_UUID_SET\x10)\x12\x0e\n\nVALUE_LIST\x10*\x12\r\n\tVALUE_SET\x10+\x12\x0b\n\x07\x44\x45\x43IMAL\x10,\x12\x10\n\x0c\x44\x45\x43IMAL_LIST\x10-\x12\x0f\n\x0b\x44\x45\x43IMAL_SET\x10.\"\xd8\r\n\x05Value\x12\x13\n\tbytes_val\x18\x01 \x01(\x0cH\x00\x12\x14\n\nstring_val\x18\x02 \x01(\tH\x00\x12\x13\n\tint32_val\x18\x03 \x01(\x05H\x00\x12\x13\n\tint64_val\x18\x04 \x01(\x03H\x00\x12\x14\n\ndouble_val\x18\x05 \x01(\x01H\x00\x12\x13\n\tfloat_val\x18\x06 \x01(\x02H\x00\x12\x12\n\x08\x62ool_val\x18\x07 \x01(\x08H\x00\x12\x1c\n\x12unix_timestamp_val\x18\x08 \x01(\x03H\x00\x12\x30\n\x0e\x62ytes_list_val\x18\x0b \x01(\x0b\x32\x16.feast.types.BytesListH\x00\x12\x32\n\x0fstring_list_val\x18\x0c \x01(\x0b\x32\x17.feast.types.StringListH\x00\x12\x30\n\x0eint32_list_val\x18\r \x01(\x0b\x32\x16.feast.types.Int32ListH\x00\x12\x30\n\x0eint64_list_val\x18\x0e \x01(\x0b\x32\x16.feast.types.Int64ListH\x00\x12\x32\n\x0f\x64ouble_list_val\x18\x0f \x01(\x0b\x32\x17.feast.types.DoubleListH\x00\x12\x30\n\x0e\x66loat_list_val\x18\x10 \x01(\x0b\x32\x16.feast.types.FloatListH\x00\x12.\n\rbool_list_val\x18\x11 \x01(\x0b\x32\x15.feast.types.BoolListH\x00\x12\x39\n\x17unix_timestamp_list_val\x18\x12 \x01(\x0b\x32\x16.feast.types.Int64ListH\x00\x12%\n\x08null_val\x18\x13 \x01(\x0e\x32\x11.feast.types.NullH\x00\x12#\n\x07map_val\x18\x14 \x01(\x0b\x32\x10.feast.types.MapH\x00\x12,\n\x0cmap_list_val\x18\x15 \x01(\x0b\x32\x14.feast.types.MapListH\x00\x12.\n\rbytes_set_val\x18\x16 \x01(\x0b\x32\x15.feast.types.BytesSetH\x00\x12\x30\n\x0estring_set_val\x18\x17 \x01(\x0b\x32\x16.feast.types.StringSetH\x00\x12.\n\rint32_set_val\x18\x18 \x01(\x0b\x32\x15.feast.types.Int32SetH\x00\x12.\n\rint64_set_val\x18\x19 \x01(\x0b\x32\x15.feast.types.Int64SetH\x00\x12\x30\n\x0e\x64ouble_set_val\x18\x1a \x01(\x0b\x32\x16.feast.types.DoubleSetH\x00\x12.\n\rfloat_set_val\x18\x1b \x01(\x0b\x32\x15.feast.types.FloatSetH\x00\x12,\n\x0c\x62ool_set_val\x18\x1c \x01(\x0b\x32\x14.feast.types.BoolSetH\x00\x12\x37\n\x16unix_timestamp_set_val\x18\x1d \x01(\x0b\x32\x15.feast.types.Int64SetH\x00\x12\x12\n\x08json_val\x18 \x01(\tH\x00\x12\x30\n\rjson_list_val\x18! \x01(\x0b\x32\x17.feast.types.StringListH\x00\x12&\n\nstruct_val\x18\" \x01(\x0b\x32\x10.feast.types.MapH\x00\x12/\n\x0fstruct_list_val\x18# \x01(\x0b\x32\x14.feast.types.MapListH\x00\x12\x12\n\x08uuid_val\x18$ \x01(\tH\x00\x12\x17\n\rtime_uuid_val\x18% \x01(\tH\x00\x12\x30\n\ruuid_list_val\x18& \x01(\x0b\x32\x17.feast.types.StringListH\x00\x12\x35\n\x12time_uuid_list_val\x18\' \x01(\x0b\x32\x17.feast.types.StringListH\x00\x12.\n\x0cuuid_set_val\x18( \x01(\x0b\x32\x16.feast.types.StringSetH\x00\x12\x33\n\x11time_uuid_set_val\x18) \x01(\x0b\x32\x16.feast.types.StringSetH\x00\x12.\n\x08list_val\x18* \x01(\x0b\x32\x1a.feast.types.RepeatedValueH\x00\x12-\n\x07set_val\x18+ \x01(\x0b\x32\x1a.feast.types.RepeatedValueH\x00\x12\x15\n\x0b\x64\x65\x63imal_val\x18, \x01(\tH\x00\x12\x33\n\x10\x64\x65\x63imal_list_val\x18- \x01(\x0b\x32\x17.feast.types.StringListH\x00\x12\x31\n\x0f\x64\x65\x63imal_set_val\x18. \x01(\x0b\x32\x16.feast.types.StringSetH\x00\x42\x05\n\x03val\"\x18\n\tBytesList\x12\x0b\n\x03val\x18\x01 \x03(\x0c\"\x19\n\nStringList\x12\x0b\n\x03val\x18\x01 \x03(\t\"\x18\n\tInt32List\x12\x0b\n\x03val\x18\x01 \x03(\x05\"\x18\n\tInt64List\x12\x0b\n\x03val\x18\x01 \x03(\x03\"\x19\n\nDoubleList\x12\x0b\n\x03val\x18\x01 \x03(\x01\"\x18\n\tFloatList\x12\x0b\n\x03val\x18\x01 \x03(\x02\"\x17\n\x08\x42oolList\x12\x0b\n\x03val\x18\x01 \x03(\x08\"\x17\n\x08\x42ytesSet\x12\x0b\n\x03val\x18\x01 \x03(\x0c\"\x18\n\tStringSet\x12\x0b\n\x03val\x18\x01 \x03(\t\"\x17\n\x08Int32Set\x12\x0b\n\x03val\x18\x01 \x03(\x05\"\x17\n\x08Int64Set\x12\x0b\n\x03val\x18\x01 \x03(\x03\"\x18\n\tDoubleSet\x12\x0b\n\x03val\x18\x01 \x03(\x01\"\x17\n\x08\x46loatSet\x12\x0b\n\x03val\x18\x01 \x03(\x02\"\x16\n\x07\x42oolSet\x12\x0b\n\x03val\x18\x01 \x03(\x08\"m\n\x03Map\x12&\n\x03val\x18\x01 \x03(\x0b\x32\x19.feast.types.Map.ValEntry\x1a>\n\x08ValEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.feast.types.Value:\x02\x38\x01\"(\n\x07MapList\x12\x1d\n\x03val\x18\x01 \x03(\x0b\x32\x10.feast.types.Map\"0\n\rRepeatedValue\x12\x1f\n\x03val\x18\x01 \x03(\x0b\x32\x12.feast.types.Value*\x10\n\x04Null\x12\x08\n\x04NULL\x10\x00\x42Q\n\x11\x66\x65\x61st.proto.typesB\nValueProtoZ0github.com/feast-dev/feast/go/protos/feast/typesb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,48 +24,48 @@ _globals['DESCRIPTOR']._serialized_options = b'\n\021feast.proto.typesB\nValueProtoZ0github.com/feast-dev/feast/go/protos/feast/types' _globals['_MAP_VALENTRY']._options = None _globals['_MAP_VALENTRY']._serialized_options = b'8\001' - _globals['_NULL']._serialized_start=2843 - _globals['_NULL']._serialized_end=2859 + _globals['_NULL']._serialized_start=3018 + _globals['_NULL']._serialized_end=3034 _globals['_VALUETYPE']._serialized_start=41 - _globals['_VALUETYPE']._serialized_end=651 + _globals['_VALUETYPE']._serialized_end=699 _globals['_VALUETYPE_ENUM']._serialized_start=55 - _globals['_VALUETYPE_ENUM']._serialized_end=651 - _globals['_VALUE']._serialized_start=654 - _globals['_VALUE']._serialized_end=2279 - _globals['_BYTESLIST']._serialized_start=2281 - _globals['_BYTESLIST']._serialized_end=2305 - _globals['_STRINGLIST']._serialized_start=2307 - _globals['_STRINGLIST']._serialized_end=2332 - _globals['_INT32LIST']._serialized_start=2334 - _globals['_INT32LIST']._serialized_end=2358 - _globals['_INT64LIST']._serialized_start=2360 - _globals['_INT64LIST']._serialized_end=2384 - _globals['_DOUBLELIST']._serialized_start=2386 - _globals['_DOUBLELIST']._serialized_end=2411 - _globals['_FLOATLIST']._serialized_start=2413 - _globals['_FLOATLIST']._serialized_end=2437 - _globals['_BOOLLIST']._serialized_start=2439 - _globals['_BOOLLIST']._serialized_end=2462 - _globals['_BYTESSET']._serialized_start=2464 - _globals['_BYTESSET']._serialized_end=2487 - _globals['_STRINGSET']._serialized_start=2489 - _globals['_STRINGSET']._serialized_end=2513 - _globals['_INT32SET']._serialized_start=2515 - _globals['_INT32SET']._serialized_end=2538 - _globals['_INT64SET']._serialized_start=2540 - _globals['_INT64SET']._serialized_end=2563 - _globals['_DOUBLESET']._serialized_start=2565 - _globals['_DOUBLESET']._serialized_end=2589 - _globals['_FLOATSET']._serialized_start=2591 - _globals['_FLOATSET']._serialized_end=2614 - _globals['_BOOLSET']._serialized_start=2616 - _globals['_BOOLSET']._serialized_end=2638 - _globals['_MAP']._serialized_start=2640 - _globals['_MAP']._serialized_end=2749 - _globals['_MAP_VALENTRY']._serialized_start=2687 - _globals['_MAP_VALENTRY']._serialized_end=2749 - _globals['_MAPLIST']._serialized_start=2751 - _globals['_MAPLIST']._serialized_end=2791 - _globals['_REPEATEDVALUE']._serialized_start=2793 - _globals['_REPEATEDVALUE']._serialized_end=2841 + _globals['_VALUETYPE_ENUM']._serialized_end=699 + _globals['_VALUE']._serialized_start=702 + _globals['_VALUE']._serialized_end=2454 + _globals['_BYTESLIST']._serialized_start=2456 + _globals['_BYTESLIST']._serialized_end=2480 + _globals['_STRINGLIST']._serialized_start=2482 + _globals['_STRINGLIST']._serialized_end=2507 + _globals['_INT32LIST']._serialized_start=2509 + _globals['_INT32LIST']._serialized_end=2533 + _globals['_INT64LIST']._serialized_start=2535 + _globals['_INT64LIST']._serialized_end=2559 + _globals['_DOUBLELIST']._serialized_start=2561 + _globals['_DOUBLELIST']._serialized_end=2586 + _globals['_FLOATLIST']._serialized_start=2588 + _globals['_FLOATLIST']._serialized_end=2612 + _globals['_BOOLLIST']._serialized_start=2614 + _globals['_BOOLLIST']._serialized_end=2637 + _globals['_BYTESSET']._serialized_start=2639 + _globals['_BYTESSET']._serialized_end=2662 + _globals['_STRINGSET']._serialized_start=2664 + _globals['_STRINGSET']._serialized_end=2688 + _globals['_INT32SET']._serialized_start=2690 + _globals['_INT32SET']._serialized_end=2713 + _globals['_INT64SET']._serialized_start=2715 + _globals['_INT64SET']._serialized_end=2738 + _globals['_DOUBLESET']._serialized_start=2740 + _globals['_DOUBLESET']._serialized_end=2764 + _globals['_FLOATSET']._serialized_start=2766 + _globals['_FLOATSET']._serialized_end=2789 + _globals['_BOOLSET']._serialized_start=2791 + _globals['_BOOLSET']._serialized_end=2813 + _globals['_MAP']._serialized_start=2815 + _globals['_MAP']._serialized_end=2924 + _globals['_MAP_VALENTRY']._serialized_start=2862 + _globals['_MAP_VALENTRY']._serialized_end=2924 + _globals['_MAPLIST']._serialized_start=2926 + _globals['_MAPLIST']._serialized_end=2966 + _globals['_REPEATEDVALUE']._serialized_start=2968 + _globals['_REPEATEDVALUE']._serialized_end=3016 # @@protoc_insertion_point(module_scope) diff --git a/sdk/python/feast/protos/feast/types/Value_pb2.pyi b/sdk/python/feast/protos/feast/types/Value_pb2.pyi index 53a7c800f0..c0b7bada7b 100644 --- a/sdk/python/feast/protos/feast/types/Value_pb2.pyi +++ b/sdk/python/feast/protos/feast/types/Value_pb2.pyi @@ -16,44 +16,46 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.message + +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor class _Null: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 -class _NullEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Null.ValueType], builtins.type): # noqa: F821 - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor +class _NullEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[_Null.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor NULL: _Null.ValueType # 0 class Null(_Null, metaclass=_NullEnumTypeWrapper): ... NULL: Null.ValueType # 0 -global___Null = Null +Global___Null: _TypeAlias = Null # noqa: Y015 -class ValueType(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class ValueType(_message.Message): + DESCRIPTOR: _descriptor.Descriptor class _Enum: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _EnumEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ValueType._Enum.ValueType], builtins.type): # noqa: F821 - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[ValueType._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor INVALID: ValueType._Enum.ValueType # 0 BYTES: ValueType._Enum.ValueType # 1 STRING: ValueType._Enum.ValueType # 2 @@ -94,6 +96,9 @@ class ValueType(google.protobuf.message.Message): TIME_UUID_SET: ValueType._Enum.ValueType # 41 VALUE_LIST: ValueType._Enum.ValueType # 42 VALUE_SET: ValueType._Enum.ValueType # 43 + DECIMAL: ValueType._Enum.ValueType # 44 + DECIMAL_LIST: ValueType._Enum.ValueType # 45 + DECIMAL_SET: ValueType._Enum.ValueType # 46 class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... INVALID: ValueType.Enum.ValueType # 0 @@ -136,442 +141,498 @@ class ValueType(google.protobuf.message.Message): TIME_UUID_SET: ValueType.Enum.ValueType # 41 VALUE_LIST: ValueType.Enum.ValueType # 42 VALUE_SET: ValueType.Enum.ValueType # 43 + DECIMAL: ValueType.Enum.ValueType # 44 + DECIMAL_LIST: ValueType.Enum.ValueType # 45 + DECIMAL_SET: ValueType.Enum.ValueType # 46 def __init__( self, ) -> None: ... -global___ValueType = ValueType - -class Value(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - BYTES_VAL_FIELD_NUMBER: builtins.int - STRING_VAL_FIELD_NUMBER: builtins.int - INT32_VAL_FIELD_NUMBER: builtins.int - INT64_VAL_FIELD_NUMBER: builtins.int - DOUBLE_VAL_FIELD_NUMBER: builtins.int - FLOAT_VAL_FIELD_NUMBER: builtins.int - BOOL_VAL_FIELD_NUMBER: builtins.int - UNIX_TIMESTAMP_VAL_FIELD_NUMBER: builtins.int - BYTES_LIST_VAL_FIELD_NUMBER: builtins.int - STRING_LIST_VAL_FIELD_NUMBER: builtins.int - INT32_LIST_VAL_FIELD_NUMBER: builtins.int - INT64_LIST_VAL_FIELD_NUMBER: builtins.int - DOUBLE_LIST_VAL_FIELD_NUMBER: builtins.int - FLOAT_LIST_VAL_FIELD_NUMBER: builtins.int - BOOL_LIST_VAL_FIELD_NUMBER: builtins.int - UNIX_TIMESTAMP_LIST_VAL_FIELD_NUMBER: builtins.int - NULL_VAL_FIELD_NUMBER: builtins.int - MAP_VAL_FIELD_NUMBER: builtins.int - MAP_LIST_VAL_FIELD_NUMBER: builtins.int - BYTES_SET_VAL_FIELD_NUMBER: builtins.int - STRING_SET_VAL_FIELD_NUMBER: builtins.int - INT32_SET_VAL_FIELD_NUMBER: builtins.int - INT64_SET_VAL_FIELD_NUMBER: builtins.int - DOUBLE_SET_VAL_FIELD_NUMBER: builtins.int - FLOAT_SET_VAL_FIELD_NUMBER: builtins.int - BOOL_SET_VAL_FIELD_NUMBER: builtins.int - UNIX_TIMESTAMP_SET_VAL_FIELD_NUMBER: builtins.int - JSON_VAL_FIELD_NUMBER: builtins.int - JSON_LIST_VAL_FIELD_NUMBER: builtins.int - STRUCT_VAL_FIELD_NUMBER: builtins.int - STRUCT_LIST_VAL_FIELD_NUMBER: builtins.int - UUID_VAL_FIELD_NUMBER: builtins.int - TIME_UUID_VAL_FIELD_NUMBER: builtins.int - UUID_LIST_VAL_FIELD_NUMBER: builtins.int - TIME_UUID_LIST_VAL_FIELD_NUMBER: builtins.int - UUID_SET_VAL_FIELD_NUMBER: builtins.int - TIME_UUID_SET_VAL_FIELD_NUMBER: builtins.int - LIST_VAL_FIELD_NUMBER: builtins.int - SET_VAL_FIELD_NUMBER: builtins.int - bytes_val: builtins.bytes - string_val: builtins.str - int32_val: builtins.int - int64_val: builtins.int - double_val: builtins.float - float_val: builtins.float - bool_val: builtins.bool - unix_timestamp_val: builtins.int - @property - def bytes_list_val(self) -> global___BytesList: ... - @property - def string_list_val(self) -> global___StringList: ... - @property - def int32_list_val(self) -> global___Int32List: ... - @property - def int64_list_val(self) -> global___Int64List: ... - @property - def double_list_val(self) -> global___DoubleList: ... - @property - def float_list_val(self) -> global___FloatList: ... - @property - def bool_list_val(self) -> global___BoolList: ... - @property - def unix_timestamp_list_val(self) -> global___Int64List: ... - null_val: global___Null.ValueType - @property - def map_val(self) -> global___Map: ... - @property - def map_list_val(self) -> global___MapList: ... - @property - def bytes_set_val(self) -> global___BytesSet: ... - @property - def string_set_val(self) -> global___StringSet: ... - @property - def int32_set_val(self) -> global___Int32Set: ... - @property - def int64_set_val(self) -> global___Int64Set: ... - @property - def double_set_val(self) -> global___DoubleSet: ... - @property - def float_set_val(self) -> global___FloatSet: ... - @property - def bool_set_val(self) -> global___BoolSet: ... - @property - def unix_timestamp_set_val(self) -> global___Int64Set: ... - json_val: builtins.str - @property - def json_list_val(self) -> global___StringList: ... - @property - def struct_val(self) -> global___Map: ... - @property - def struct_list_val(self) -> global___MapList: ... - uuid_val: builtins.str - time_uuid_val: builtins.str - @property - def uuid_list_val(self) -> global___StringList: ... - @property - def time_uuid_list_val(self) -> global___StringList: ... - @property - def uuid_set_val(self) -> global___StringSet: ... - @property - def time_uuid_set_val(self) -> global___StringSet: ... - @property - def list_val(self) -> global___RepeatedValue: ... - @property - def set_val(self) -> global___RepeatedValue: ... +Global___ValueType: _TypeAlias = ValueType # noqa: Y015 + +@_typing.final +class Value(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + BYTES_VAL_FIELD_NUMBER: _builtins.int + STRING_VAL_FIELD_NUMBER: _builtins.int + INT32_VAL_FIELD_NUMBER: _builtins.int + INT64_VAL_FIELD_NUMBER: _builtins.int + DOUBLE_VAL_FIELD_NUMBER: _builtins.int + FLOAT_VAL_FIELD_NUMBER: _builtins.int + BOOL_VAL_FIELD_NUMBER: _builtins.int + UNIX_TIMESTAMP_VAL_FIELD_NUMBER: _builtins.int + BYTES_LIST_VAL_FIELD_NUMBER: _builtins.int + STRING_LIST_VAL_FIELD_NUMBER: _builtins.int + INT32_LIST_VAL_FIELD_NUMBER: _builtins.int + INT64_LIST_VAL_FIELD_NUMBER: _builtins.int + DOUBLE_LIST_VAL_FIELD_NUMBER: _builtins.int + FLOAT_LIST_VAL_FIELD_NUMBER: _builtins.int + BOOL_LIST_VAL_FIELD_NUMBER: _builtins.int + UNIX_TIMESTAMP_LIST_VAL_FIELD_NUMBER: _builtins.int + NULL_VAL_FIELD_NUMBER: _builtins.int + MAP_VAL_FIELD_NUMBER: _builtins.int + MAP_LIST_VAL_FIELD_NUMBER: _builtins.int + BYTES_SET_VAL_FIELD_NUMBER: _builtins.int + STRING_SET_VAL_FIELD_NUMBER: _builtins.int + INT32_SET_VAL_FIELD_NUMBER: _builtins.int + INT64_SET_VAL_FIELD_NUMBER: _builtins.int + DOUBLE_SET_VAL_FIELD_NUMBER: _builtins.int + FLOAT_SET_VAL_FIELD_NUMBER: _builtins.int + BOOL_SET_VAL_FIELD_NUMBER: _builtins.int + UNIX_TIMESTAMP_SET_VAL_FIELD_NUMBER: _builtins.int + JSON_VAL_FIELD_NUMBER: _builtins.int + JSON_LIST_VAL_FIELD_NUMBER: _builtins.int + STRUCT_VAL_FIELD_NUMBER: _builtins.int + STRUCT_LIST_VAL_FIELD_NUMBER: _builtins.int + UUID_VAL_FIELD_NUMBER: _builtins.int + TIME_UUID_VAL_FIELD_NUMBER: _builtins.int + UUID_LIST_VAL_FIELD_NUMBER: _builtins.int + TIME_UUID_LIST_VAL_FIELD_NUMBER: _builtins.int + UUID_SET_VAL_FIELD_NUMBER: _builtins.int + TIME_UUID_SET_VAL_FIELD_NUMBER: _builtins.int + LIST_VAL_FIELD_NUMBER: _builtins.int + SET_VAL_FIELD_NUMBER: _builtins.int + DECIMAL_VAL_FIELD_NUMBER: _builtins.int + DECIMAL_LIST_VAL_FIELD_NUMBER: _builtins.int + DECIMAL_SET_VAL_FIELD_NUMBER: _builtins.int + bytes_val: _builtins.bytes + string_val: _builtins.str + int32_val: _builtins.int + int64_val: _builtins.int + double_val: _builtins.float + float_val: _builtins.float + bool_val: _builtins.bool + unix_timestamp_val: _builtins.int + null_val: Global___Null.ValueType + json_val: _builtins.str + uuid_val: _builtins.str + time_uuid_val: _builtins.str + decimal_val: _builtins.str + @_builtins.property + def bytes_list_val(self) -> Global___BytesList: ... + @_builtins.property + def string_list_val(self) -> Global___StringList: ... + @_builtins.property + def int32_list_val(self) -> Global___Int32List: ... + @_builtins.property + def int64_list_val(self) -> Global___Int64List: ... + @_builtins.property + def double_list_val(self) -> Global___DoubleList: ... + @_builtins.property + def float_list_val(self) -> Global___FloatList: ... + @_builtins.property + def bool_list_val(self) -> Global___BoolList: ... + @_builtins.property + def unix_timestamp_list_val(self) -> Global___Int64List: ... + @_builtins.property + def map_val(self) -> Global___Map: ... + @_builtins.property + def map_list_val(self) -> Global___MapList: ... + @_builtins.property + def bytes_set_val(self) -> Global___BytesSet: ... + @_builtins.property + def string_set_val(self) -> Global___StringSet: ... + @_builtins.property + def int32_set_val(self) -> Global___Int32Set: ... + @_builtins.property + def int64_set_val(self) -> Global___Int64Set: ... + @_builtins.property + def double_set_val(self) -> Global___DoubleSet: ... + @_builtins.property + def float_set_val(self) -> Global___FloatSet: ... + @_builtins.property + def bool_set_val(self) -> Global___BoolSet: ... + @_builtins.property + def unix_timestamp_set_val(self) -> Global___Int64Set: ... + @_builtins.property + def json_list_val(self) -> Global___StringList: ... + @_builtins.property + def struct_val(self) -> Global___Map: ... + @_builtins.property + def struct_list_val(self) -> Global___MapList: ... + @_builtins.property + def uuid_list_val(self) -> Global___StringList: ... + @_builtins.property + def time_uuid_list_val(self) -> Global___StringList: ... + @_builtins.property + def uuid_set_val(self) -> Global___StringSet: ... + @_builtins.property + def time_uuid_set_val(self) -> Global___StringSet: ... + @_builtins.property + def list_val(self) -> Global___RepeatedValue: ... + @_builtins.property + def set_val(self) -> Global___RepeatedValue: ... + @_builtins.property + def decimal_list_val(self) -> Global___StringList: ... + @_builtins.property + def decimal_set_val(self) -> Global___StringSet: ... def __init__( self, *, - bytes_val: builtins.bytes = ..., - string_val: builtins.str = ..., - int32_val: builtins.int = ..., - int64_val: builtins.int = ..., - double_val: builtins.float = ..., - float_val: builtins.float = ..., - bool_val: builtins.bool = ..., - unix_timestamp_val: builtins.int = ..., - bytes_list_val: global___BytesList | None = ..., - string_list_val: global___StringList | None = ..., - int32_list_val: global___Int32List | None = ..., - int64_list_val: global___Int64List | None = ..., - double_list_val: global___DoubleList | None = ..., - float_list_val: global___FloatList | None = ..., - bool_list_val: global___BoolList | None = ..., - unix_timestamp_list_val: global___Int64List | None = ..., - null_val: global___Null.ValueType = ..., - map_val: global___Map | None = ..., - map_list_val: global___MapList | None = ..., - bytes_set_val: global___BytesSet | None = ..., - string_set_val: global___StringSet | None = ..., - int32_set_val: global___Int32Set | None = ..., - int64_set_val: global___Int64Set | None = ..., - double_set_val: global___DoubleSet | None = ..., - float_set_val: global___FloatSet | None = ..., - bool_set_val: global___BoolSet | None = ..., - unix_timestamp_set_val: global___Int64Set | None = ..., - json_val: builtins.str = ..., - json_list_val: global___StringList | None = ..., - struct_val: global___Map | None = ..., - struct_list_val: global___MapList | None = ..., - uuid_val: builtins.str = ..., - time_uuid_val: builtins.str = ..., - uuid_list_val: global___StringList | None = ..., - time_uuid_list_val: global___StringList | None = ..., - uuid_set_val: global___StringSet | None = ..., - time_uuid_set_val: global___StringSet | None = ..., - list_val: global___RepeatedValue | None = ..., - set_val: global___RepeatedValue | None = ..., + bytes_val: _builtins.bytes = ..., + string_val: _builtins.str = ..., + int32_val: _builtins.int = ..., + int64_val: _builtins.int = ..., + double_val: _builtins.float = ..., + float_val: _builtins.float = ..., + bool_val: _builtins.bool = ..., + unix_timestamp_val: _builtins.int = ..., + bytes_list_val: Global___BytesList | None = ..., + string_list_val: Global___StringList | None = ..., + int32_list_val: Global___Int32List | None = ..., + int64_list_val: Global___Int64List | None = ..., + double_list_val: Global___DoubleList | None = ..., + float_list_val: Global___FloatList | None = ..., + bool_list_val: Global___BoolList | None = ..., + unix_timestamp_list_val: Global___Int64List | None = ..., + null_val: Global___Null.ValueType = ..., + map_val: Global___Map | None = ..., + map_list_val: Global___MapList | None = ..., + bytes_set_val: Global___BytesSet | None = ..., + string_set_val: Global___StringSet | None = ..., + int32_set_val: Global___Int32Set | None = ..., + int64_set_val: Global___Int64Set | None = ..., + double_set_val: Global___DoubleSet | None = ..., + float_set_val: Global___FloatSet | None = ..., + bool_set_val: Global___BoolSet | None = ..., + unix_timestamp_set_val: Global___Int64Set | None = ..., + json_val: _builtins.str = ..., + json_list_val: Global___StringList | None = ..., + struct_val: Global___Map | None = ..., + struct_list_val: Global___MapList | None = ..., + uuid_val: _builtins.str = ..., + time_uuid_val: _builtins.str = ..., + uuid_list_val: Global___StringList | None = ..., + time_uuid_list_val: Global___StringList | None = ..., + uuid_set_val: Global___StringSet | None = ..., + time_uuid_set_val: Global___StringSet | None = ..., + list_val: Global___RepeatedValue | None = ..., + set_val: Global___RepeatedValue | None = ..., + decimal_val: _builtins.str = ..., + decimal_list_val: Global___StringList | None = ..., + decimal_set_val: Global___StringSet | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["bool_list_val", b"bool_list_val", "bool_set_val", b"bool_set_val", "bool_val", b"bool_val", "bytes_list_val", b"bytes_list_val", "bytes_set_val", b"bytes_set_val", "bytes_val", b"bytes_val", "double_list_val", b"double_list_val", "double_set_val", b"double_set_val", "double_val", b"double_val", "float_list_val", b"float_list_val", "float_set_val", b"float_set_val", "float_val", b"float_val", "int32_list_val", b"int32_list_val", "int32_set_val", b"int32_set_val", "int32_val", b"int32_val", "int64_list_val", b"int64_list_val", "int64_set_val", b"int64_set_val", "int64_val", b"int64_val", "json_list_val", b"json_list_val", "json_val", b"json_val", "list_val", b"list_val", "map_list_val", b"map_list_val", "map_val", b"map_val", "null_val", b"null_val", "set_val", b"set_val", "string_list_val", b"string_list_val", "string_set_val", b"string_set_val", "string_val", b"string_val", "struct_list_val", b"struct_list_val", "struct_val", b"struct_val", "time_uuid_list_val", b"time_uuid_list_val", "time_uuid_set_val", b"time_uuid_set_val", "time_uuid_val", b"time_uuid_val", "unix_timestamp_list_val", b"unix_timestamp_list_val", "unix_timestamp_set_val", b"unix_timestamp_set_val", "unix_timestamp_val", b"unix_timestamp_val", "uuid_list_val", b"uuid_list_val", "uuid_set_val", b"uuid_set_val", "uuid_val", b"uuid_val", "val", b"val"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["bool_list_val", b"bool_list_val", "bool_set_val", b"bool_set_val", "bool_val", b"bool_val", "bytes_list_val", b"bytes_list_val", "bytes_set_val", b"bytes_set_val", "bytes_val", b"bytes_val", "double_list_val", b"double_list_val", "double_set_val", b"double_set_val", "double_val", b"double_val", "float_list_val", b"float_list_val", "float_set_val", b"float_set_val", "float_val", b"float_val", "int32_list_val", b"int32_list_val", "int32_set_val", b"int32_set_val", "int32_val", b"int32_val", "int64_list_val", b"int64_list_val", "int64_set_val", b"int64_set_val", "int64_val", b"int64_val", "json_list_val", b"json_list_val", "json_val", b"json_val", "list_val", b"list_val", "map_list_val", b"map_list_val", "map_val", b"map_val", "null_val", b"null_val", "set_val", b"set_val", "string_list_val", b"string_list_val", "string_set_val", b"string_set_val", "string_val", b"string_val", "struct_list_val", b"struct_list_val", "struct_val", b"struct_val", "time_uuid_list_val", b"time_uuid_list_val", "time_uuid_set_val", b"time_uuid_set_val", "time_uuid_val", b"time_uuid_val", "unix_timestamp_list_val", b"unix_timestamp_list_val", "unix_timestamp_set_val", b"unix_timestamp_set_val", "unix_timestamp_val", b"unix_timestamp_val", "uuid_list_val", b"uuid_list_val", "uuid_set_val", b"uuid_set_val", "uuid_val", b"uuid_val", "val", b"val"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["val", b"val"]) -> typing_extensions.Literal["bytes_val", "string_val", "int32_val", "int64_val", "double_val", "float_val", "bool_val", "unix_timestamp_val", "bytes_list_val", "string_list_val", "int32_list_val", "int64_list_val", "double_list_val", "float_list_val", "bool_list_val", "unix_timestamp_list_val", "null_val", "map_val", "map_list_val", "bytes_set_val", "string_set_val", "int32_set_val", "int64_set_val", "double_set_val", "float_set_val", "bool_set_val", "unix_timestamp_set_val", "json_val", "json_list_val", "struct_val", "struct_list_val", "uuid_val", "time_uuid_val", "uuid_list_val", "time_uuid_list_val", "uuid_set_val", "time_uuid_set_val", "list_val", "set_val"] | None: ... - -global___Value = Value - -class BytesList(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["bool_list_val", b"bool_list_val", "bool_set_val", b"bool_set_val", "bool_val", b"bool_val", "bytes_list_val", b"bytes_list_val", "bytes_set_val", b"bytes_set_val", "bytes_val", b"bytes_val", "decimal_list_val", b"decimal_list_val", "decimal_set_val", b"decimal_set_val", "decimal_val", b"decimal_val", "double_list_val", b"double_list_val", "double_set_val", b"double_set_val", "double_val", b"double_val", "float_list_val", b"float_list_val", "float_set_val", b"float_set_val", "float_val", b"float_val", "int32_list_val", b"int32_list_val", "int32_set_val", b"int32_set_val", "int32_val", b"int32_val", "int64_list_val", b"int64_list_val", "int64_set_val", b"int64_set_val", "int64_val", b"int64_val", "json_list_val", b"json_list_val", "json_val", b"json_val", "list_val", b"list_val", "map_list_val", b"map_list_val", "map_val", b"map_val", "null_val", b"null_val", "set_val", b"set_val", "string_list_val", b"string_list_val", "string_set_val", b"string_set_val", "string_val", b"string_val", "struct_list_val", b"struct_list_val", "struct_val", b"struct_val", "time_uuid_list_val", b"time_uuid_list_val", "time_uuid_set_val", b"time_uuid_set_val", "time_uuid_val", b"time_uuid_val", "unix_timestamp_list_val", b"unix_timestamp_list_val", "unix_timestamp_set_val", b"unix_timestamp_set_val", "unix_timestamp_val", b"unix_timestamp_val", "uuid_list_val", b"uuid_list_val", "uuid_set_val", b"uuid_set_val", "uuid_val", b"uuid_val", "val", b"val"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["bool_list_val", b"bool_list_val", "bool_set_val", b"bool_set_val", "bool_val", b"bool_val", "bytes_list_val", b"bytes_list_val", "bytes_set_val", b"bytes_set_val", "bytes_val", b"bytes_val", "decimal_list_val", b"decimal_list_val", "decimal_set_val", b"decimal_set_val", "decimal_val", b"decimal_val", "double_list_val", b"double_list_val", "double_set_val", b"double_set_val", "double_val", b"double_val", "float_list_val", b"float_list_val", "float_set_val", b"float_set_val", "float_val", b"float_val", "int32_list_val", b"int32_list_val", "int32_set_val", b"int32_set_val", "int32_val", b"int32_val", "int64_list_val", b"int64_list_val", "int64_set_val", b"int64_set_val", "int64_val", b"int64_val", "json_list_val", b"json_list_val", "json_val", b"json_val", "list_val", b"list_val", "map_list_val", b"map_list_val", "map_val", b"map_val", "null_val", b"null_val", "set_val", b"set_val", "string_list_val", b"string_list_val", "string_set_val", b"string_set_val", "string_val", b"string_val", "struct_list_val", b"struct_list_val", "struct_val", b"struct_val", "time_uuid_list_val", b"time_uuid_list_val", "time_uuid_set_val", b"time_uuid_set_val", "time_uuid_val", b"time_uuid_val", "unix_timestamp_list_val", b"unix_timestamp_list_val", "unix_timestamp_set_val", b"unix_timestamp_set_val", "unix_timestamp_val", b"unix_timestamp_val", "uuid_list_val", b"uuid_list_val", "uuid_set_val", b"uuid_set_val", "uuid_val", b"uuid_val", "val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_val: _TypeAlias = _typing.Literal["bytes_val", "string_val", "int32_val", "int64_val", "double_val", "float_val", "bool_val", "unix_timestamp_val", "bytes_list_val", "string_list_val", "int32_list_val", "int64_list_val", "double_list_val", "float_list_val", "bool_list_val", "unix_timestamp_list_val", "null_val", "map_val", "map_list_val", "bytes_set_val", "string_set_val", "int32_set_val", "int64_set_val", "double_set_val", "float_set_val", "bool_set_val", "unix_timestamp_set_val", "json_val", "json_list_val", "struct_val", "struct_list_val", "uuid_val", "time_uuid_val", "uuid_list_val", "time_uuid_list_val", "uuid_set_val", "time_uuid_set_val", "list_val", "set_val", "decimal_val", "decimal_list_val", "decimal_set_val"] # noqa: Y015 + _WhichOneofArgType_val: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_val) -> _WhichOneofReturnType_val | None: ... + +Global___Value: _TypeAlias = Value # noqa: Y015 + +@_typing.final +class BytesList(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.bytes]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.bytes] | None = ..., + val: _abc.Iterable[_builtins.bytes] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___BytesList = BytesList +Global___BytesList: _TypeAlias = BytesList # noqa: Y015 -class StringList(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class StringList(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.str] | None = ..., + val: _abc.Iterable[_builtins.str] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___StringList = StringList +Global___StringList: _TypeAlias = StringList # noqa: Y015 -class Int32List(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class Int32List(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.int]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.int] | None = ..., + val: _abc.Iterable[_builtins.int] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Int32List = Int32List +Global___Int32List: _TypeAlias = Int32List # noqa: Y015 -class Int64List(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class Int64List(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.int]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.int] | None = ..., + val: _abc.Iterable[_builtins.int] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Int64List = Int64List +Global___Int64List: _TypeAlias = Int64List # noqa: Y015 -class DoubleList(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class DoubleList(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.float]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.float] | None = ..., + val: _abc.Iterable[_builtins.float] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___DoubleList = DoubleList +Global___DoubleList: _TypeAlias = DoubleList # noqa: Y015 -class FloatList(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class FloatList(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.float]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.float] | None = ..., + val: _abc.Iterable[_builtins.float] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___FloatList = FloatList +Global___FloatList: _TypeAlias = FloatList # noqa: Y015 -class BoolList(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class BoolList(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bool]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.bool]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.bool] | None = ..., + val: _abc.Iterable[_builtins.bool] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___BoolList = BoolList +Global___BoolList: _TypeAlias = BoolList # noqa: Y015 -class BytesSet(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class BytesSet(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.bytes]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.bytes] | None = ..., + val: _abc.Iterable[_builtins.bytes] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___BytesSet = BytesSet +Global___BytesSet: _TypeAlias = BytesSet # noqa: Y015 -class StringSet(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class StringSet(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.str] | None = ..., + val: _abc.Iterable[_builtins.str] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___StringSet = StringSet +Global___StringSet: _TypeAlias = StringSet # noqa: Y015 -class Int32Set(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class Int32Set(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.int]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.int] | None = ..., + val: _abc.Iterable[_builtins.int] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Int32Set = Int32Set +Global___Int32Set: _TypeAlias = Int32Set # noqa: Y015 -class Int64Set(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class Int64Set(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.int]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.int] | None = ..., + val: _abc.Iterable[_builtins.int] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Int64Set = Int64Set +Global___Int64Set: _TypeAlias = Int64Set # noqa: Y015 -class DoubleSet(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class DoubleSet(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.float]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.float] | None = ..., + val: _abc.Iterable[_builtins.float] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___DoubleSet = DoubleSet +Global___DoubleSet: _TypeAlias = DoubleSet # noqa: Y015 -class FloatSet(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class FloatSet(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.float]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.float] | None = ..., + val: _abc.Iterable[_builtins.float] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___FloatSet = FloatSet +Global___FloatSet: _TypeAlias = FloatSet # noqa: Y015 -class BoolSet(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class BoolSet(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bool]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedScalarFieldContainer[_builtins.bool]: ... def __init__( self, *, - val: collections.abc.Iterable[builtins.bool] | None = ..., + val: _abc.Iterable[_builtins.bool] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___BoolSet = BoolSet +Global___BoolSet: _TypeAlias = BoolSet # noqa: Y015 -class Map(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class Map(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - class ValEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class ValEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - @property - def value(self) -> global___Value: ... + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___Value: ... def __init__( self, *, - key: builtins.str = ..., - value: global___Value | None = ..., + key: _builtins.str = ..., + value: Global___Value | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["value", b"value"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... - - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___Value]: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.MessageMap[_builtins.str, Global___Value]: ... def __init__( self, *, - val: collections.abc.Mapping[builtins.str, global___Value] | None = ..., + val: _abc.Mapping[_builtins.str, Global___Value] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Map = Map +Global___Map: _TypeAlias = Map # noqa: Y015 -class MapList(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class MapList(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Map]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedCompositeFieldContainer[Global___Map]: ... def __init__( self, *, - val: collections.abc.Iterable[global___Map] | None = ..., + val: _abc.Iterable[Global___Map] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___MapList = MapList +Global___MapList: _TypeAlias = MapList # noqa: Y015 -class RepeatedValue(google.protobuf.message.Message): +@_typing.final +class RepeatedValue(_message.Message): """This is to avoid an issue of being unable to specify `repeated value` in oneofs or maps In JSON "val" field can be omitted """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - VAL_FIELD_NUMBER: builtins.int - @property - def val(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Value]: ... + VAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def val(self) -> _containers.RepeatedCompositeFieldContainer[Global___Value]: ... def __init__( self, *, - val: collections.abc.Iterable[global___Value] | None = ..., + val: _abc.Iterable[Global___Value] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["val", b"val"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["val", b"val"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___RepeatedValue = RepeatedValue +Global___RepeatedValue: _TypeAlias = RepeatedValue # noqa: Y015 diff --git a/sdk/python/feast/type_map.py b/sdk/python/feast/type_map.py index 3c1cc5a938..691a398c8e 100644 --- a/sdk/python/feast/type_map.py +++ b/sdk/python/feast/type_map.py @@ -165,6 +165,14 @@ def feast_value_type_to_python_type( if val_attr in ("uuid_set_val", "time_uuid_set_val"): return {uuid_module.UUID(v) if isinstance(v, str) else v for v in val} + # Convert DECIMAL values to decimal.Decimal objects + if val_attr == "decimal_val": + return decimal.Decimal(val) if isinstance(val, str) else val + if val_attr == "decimal_list_val": + return [decimal.Decimal(v) if isinstance(v, str) else v for v in val] + if val_attr == "decimal_set_val": + return {decimal.Decimal(v) if isinstance(v, str) else v for v in val} + # Backward compatibility: handle UUIDs stored as string_val/string_list_val with feature_type hint if feature_type in (ValueType.UUID, ValueType.TIME_UUID) and isinstance(val, str): return uuid_module.UUID(val) @@ -227,6 +235,7 @@ def feast_value_type_to_pandas_type(value_type: ValueType) -> Any: ValueType.UNIX_TIMESTAMP: "datetime64[ns]", ValueType.UUID: "str", ValueType.TIME_UUID: "str", + ValueType.DECIMAL: "object", } if ( value_type.name in ("MAP", "JSON", "STRUCT", "VALUE_LIST", "VALUE_SET") @@ -291,6 +300,7 @@ def python_type_to_feast_value_type( "date": ValueType.UNIX_TIMESTAMP, "category": ValueType.STRING, "uuid": ValueType.UUID, + "decimal": ValueType.DECIMAL, } if type_name in type_map: @@ -466,6 +476,9 @@ def _convert_value_type_str_to_value_type(type_str: str) -> ValueType: "TIME_UUID_SET": ValueType.TIME_UUID_SET, "VALUE_LIST": ValueType.VALUE_LIST, "VALUE_SET": ValueType.VALUE_SET, + "DECIMAL": ValueType.DECIMAL, + "DECIMAL_LIST": ValueType.DECIMAL_LIST, + "DECIMAL_SET": ValueType.DECIMAL_SET, } return type_map.get(type_str, ValueType.STRING) @@ -507,6 +520,11 @@ def _type_err(item, dtype): "time_uuid_list_val", [np.str_, str, uuid_module.UUID], ), + ValueType.DECIMAL_LIST: ( + StringList, + "decimal_list_val", + [np.str_, str, decimal.Decimal], + ), } PYTHON_SET_VALUE_TYPE_TO_PROTO_VALUE: Dict[ @@ -538,6 +556,11 @@ def _type_err(item, dtype): "time_uuid_set_val", [np.str_, str, uuid_module.UUID], ), + ValueType.DECIMAL_SET: ( + StringSet, + "decimal_set_val", + [np.str_, str, decimal.Decimal], + ), } PYTHON_SCALAR_VALUE_TYPE_TO_PROTO_VALUE: Dict[ @@ -565,6 +588,7 @@ def _type_err(item, dtype): ValueType.BOOL: ("bool_val", lambda x: x, {bool, np.bool_, int, np.int_}), ValueType.UUID: ("uuid_val", lambda x: str(x), {str, uuid_module.UUID}), ValueType.TIME_UUID: ("time_uuid_val", lambda x: str(x), {str, uuid_module.UUID}), + ValueType.DECIMAL: ("decimal_val", lambda x: str(x), {decimal.Decimal, str}), } @@ -777,6 +801,19 @@ def convert_set_to_list(value: Any) -> Any: for value in converted_values ] + if feast_value_type == ValueType.DECIMAL_SET: + # decimal.Decimal objects must be converted to str for StringSet proto. + return [ + ( + ProtoValue( + **{set_field_name: set_proto_type(val=[str(e) for e in value])} # type: ignore[arg-type, misc] + ) + if value is not None + else ProtoValue() + ) + for value in converted_values + ] + # Generic set conversion return [ ProtoValue(**{set_field_name: set_proto_type(val=value)}) # type: ignore[arg-type] @@ -850,6 +887,19 @@ def _convert_list_values_to_proto( for value in values ] + if feast_value_type == ValueType.DECIMAL_LIST: + # decimal.Decimal objects must be converted to str for StringList proto. + return [ + ( + ProtoValue( + **{field_name: proto_type(val=[str(e) for e in value])} # type: ignore[arg-type, misc] + ) + if value is not None + else ProtoValue() + ) + for value in values + ] + # Generic list conversion return [ ProtoValue(**{field_name: proto_type(val=value)}) # type: ignore[arg-type] @@ -1217,6 +1267,9 @@ def python_values_to_proto_values( "time_uuid_val": ValueType.TIME_UUID, "uuid_list_val": ValueType.UUID_LIST, "time_uuid_list_val": ValueType.TIME_UUID_LIST, + "decimal_val": ValueType.DECIMAL, + "decimal_list_val": ValueType.DECIMAL_LIST, + "decimal_set_val": ValueType.DECIMAL_SET, } VALUE_TYPE_TO_PROTO_VALUE_MAP: Dict[ValueType, str] = { @@ -1516,6 +1569,9 @@ def _convert_value_name_to_snowflake_udf(value_name: str, project_name: str) -> "TIME_UUID_LIST": f"feast_{project_name}_snowflake_array_varchar_to_list_string_proto", "UUID_SET": f"feast_{project_name}_snowflake_array_varchar_to_list_string_proto", "TIME_UUID_SET": f"feast_{project_name}_snowflake_array_varchar_to_list_string_proto", + "DECIMAL": f"feast_{project_name}_snowflake_varchar_to_string_proto", + "DECIMAL_LIST": f"feast_{project_name}_snowflake_array_varchar_to_list_string_proto", + "DECIMAL_SET": f"feast_{project_name}_snowflake_array_varchar_to_list_string_proto", } return name_map[value_name].upper() @@ -1777,6 +1833,9 @@ def feast_value_type_to_pa( ValueType.TIME_UUID_LIST: pyarrow.list_(pyarrow.string()), ValueType.UUID_SET: pyarrow.list_(pyarrow.string()), ValueType.TIME_UUID_SET: pyarrow.list_(pyarrow.string()), + ValueType.DECIMAL: pyarrow.string(), + ValueType.DECIMAL_LIST: pyarrow.list_(pyarrow.string()), + ValueType.DECIMAL_SET: pyarrow.list_(pyarrow.string()), } return type_map[feast_type] diff --git a/sdk/python/feast/types.py b/sdk/python/feast/types.py index 7c89e74905..0a97037811 100644 --- a/sdk/python/feast/types.py +++ b/sdk/python/feast/types.py @@ -27,6 +27,7 @@ "IMAGE_BYTES": "IMAGE_BYTES", "UUID": "UUID", "TIME_UUID": "TIME_UUID", + "DECIMAL": "DECIMAL", "STRING": "STRING", "INT32": "INT32", "INT64": "INT64", @@ -91,6 +92,7 @@ class PrimitiveFeastType(Enum): JSON = 12 UUID = 13 TIME_UUID = 14 + DECIMAL = 15 def to_value_type(self) -> ValueType: """ @@ -127,6 +129,7 @@ def __hash__(self): Json = PrimitiveFeastType.JSON Uuid = PrimitiveFeastType.UUID TimeUuid = PrimitiveFeastType.TIME_UUID +Decimal = PrimitiveFeastType.DECIMAL SUPPORTED_BASE_TYPES = [ Invalid, @@ -144,6 +147,7 @@ def __hash__(self): Json, Uuid, TimeUuid, + Decimal, ] PRIMITIVE_FEAST_TYPES_TO_STRING = { @@ -162,6 +166,7 @@ def __hash__(self): "JSON": "Json", "UUID": "Uuid", "TIME_UUID": "TimeUuid", + "DECIMAL": "Decimal", } @@ -338,6 +343,9 @@ def __hash__(self): ValueType.TIME_UUID_LIST: Array(TimeUuid), ValueType.UUID_SET: Set(Uuid), ValueType.TIME_UUID_SET: Set(TimeUuid), + ValueType.DECIMAL: Decimal, + ValueType.DECIMAL_LIST: Array(Decimal), + ValueType.DECIMAL_SET: Set(Decimal), } FEAST_TYPES_TO_PYARROW_TYPES = { @@ -353,6 +361,7 @@ def __hash__(self): Json: pyarrow.large_string(), Uuid: pyarrow.string(), TimeUuid: pyarrow.string(), + Decimal: pyarrow.string(), } FEAST_VECTOR_TYPES: List[Union[ValueType, PrimitiveFeastType, ComplexFeastType]] = [ diff --git a/sdk/python/feast/value_type.py b/sdk/python/feast/value_type.py index 508493de6d..f09ae948d9 100644 --- a/sdk/python/feast/value_type.py +++ b/sdk/python/feast/value_type.py @@ -79,6 +79,9 @@ class ValueType(enum.Enum): TIME_UUID_SET = 41 VALUE_LIST = 42 VALUE_SET = 43 + DECIMAL = 44 + DECIMAL_LIST = 45 + DECIMAL_SET = 46 ListType = Union[ diff --git a/sdk/python/tests/unit/test_type_map.py b/sdk/python/tests/unit/test_type_map.py index e135f44ac6..8ec854d64a 100644 --- a/sdk/python/tests/unit/test_type_map.py +++ b/sdk/python/tests/unit/test_type_map.py @@ -1555,6 +1555,181 @@ def test_pg_uuid_type_mapping(self): assert pg_type_to_feast_value_type("uuid[]") == ValueType.UUID_LIST +class TestDecimalTypes: + """Test cases for DECIMAL, DECIMAL_LIST, and DECIMAL_SET value types.""" + + def test_decimal_string_roundtrip(self): + """Decimal string -> proto -> decimal.Decimal object roundtrip.""" + import decimal + + val = decimal.Decimal("3.14159265358979323846") + protos = python_values_to_proto_values([str(val)], ValueType.DECIMAL) + assert protos[0].decimal_val == str(val) + + result = feast_value_type_to_python_type(protos[0]) + assert isinstance(result, decimal.Decimal) + assert result == val + + def test_decimal_object_serialization(self): + """decimal.Decimal object -> proto serialization (str conversion automatic).""" + import decimal + + val = decimal.Decimal("99.99") + protos = python_values_to_proto_values([val], ValueType.DECIMAL) + assert protos[0].decimal_val == "99.99" + + def test_decimal_preserves_precision(self): + """High-precision decimal values survive the proto round-trip without loss.""" + import decimal + + high_prec = decimal.Decimal("1.23456789012345678901234567890") + protos = python_values_to_proto_values([high_prec], ValueType.DECIMAL) + result = feast_value_type_to_python_type(protos[0]) + assert result == high_prec + + def test_decimal_negative_value(self): + """Negative decimal values round-trip correctly.""" + import decimal + + val = decimal.Decimal("-9876.543210") + protos = python_values_to_proto_values([val], ValueType.DECIMAL) + result = feast_value_type_to_python_type(protos[0]) + assert result == val + + def test_decimal_zero(self): + """Zero decimal value round-trips correctly.""" + import decimal + + val = decimal.Decimal("0") + protos = python_values_to_proto_values([val], ValueType.DECIMAL) + result = feast_value_type_to_python_type(protos[0]) + assert result == val + + def test_decimal_list_roundtrip(self): + """DECIMAL_LIST string list -> proto -> list of decimal.Decimal roundtrip.""" + import decimal + + vals = [decimal.Decimal("1.1"), decimal.Decimal("2.2"), decimal.Decimal("3.3")] + val_strs = [str(v) for v in vals] + protos = python_values_to_proto_values([val_strs], ValueType.DECIMAL_LIST) + result = feast_value_type_to_python_type(protos[0]) + assert all(isinstance(r, decimal.Decimal) for r in result) + assert result == vals + + def test_decimal_object_list_roundtrip(self): + """List of decimal.Decimal objects -> proto -> list of decimal.Decimal roundtrip.""" + import decimal + + vals = [ + decimal.Decimal("10.5"), + decimal.Decimal("20.75"), + decimal.Decimal("30.125"), + ] + protos = python_values_to_proto_values([vals], ValueType.DECIMAL_LIST) + result = feast_value_type_to_python_type(protos[0]) + assert all(isinstance(r, decimal.Decimal) for r in result) + assert result == vals + + def test_decimal_set_roundtrip(self): + """DECIMAL_SET -> proto -> set of decimal.Decimal roundtrip.""" + import decimal + + vals = {decimal.Decimal("1.1"), decimal.Decimal("2.2"), decimal.Decimal("3.3")} + protos = python_values_to_proto_values([vals], ValueType.DECIMAL_SET) + result = feast_value_type_to_python_type(protos[0]) + assert isinstance(result, set) + assert all(isinstance(r, decimal.Decimal) for r in result) + assert result == vals + + def test_decimal_set_deduplication(self): + """Duplicate decimal values in a set are deduplicated.""" + import decimal + + vals = {decimal.Decimal("5.0"), decimal.Decimal("5.0"), decimal.Decimal("6.0")} + protos = python_values_to_proto_values([vals], ValueType.DECIMAL_SET) + result = feast_value_type_to_python_type(protos[0]) + assert isinstance(result, set) + assert len(result) == 2 + + def test_decimal_type_inference(self): + """python_type_to_feast_value_type infers DECIMAL from decimal.Decimal values.""" + import decimal + + from feast.type_map import python_type_to_feast_value_type + + assert ( + python_type_to_feast_value_type("price", decimal.Decimal("1.5")) + == ValueType.DECIMAL + ) + + def test_decimal_value_type_string_conversion(self): + """_convert_value_type_str_to_value_type handles DECIMAL strings.""" + from feast.type_map import _convert_value_type_str_to_value_type + + assert _convert_value_type_str_to_value_type("DECIMAL") == ValueType.DECIMAL + assert ( + _convert_value_type_str_to_value_type("DECIMAL_LIST") + == ValueType.DECIMAL_LIST + ) + assert ( + _convert_value_type_str_to_value_type("DECIMAL_SET") + == ValueType.DECIMAL_SET + ) + + def test_decimal_proto_field_name_mapping(self): + """PROTO_VALUE_TO_VALUE_TYPE_MAP and VALUE_TYPE_TO_PROTO_VALUE_MAP include DECIMAL.""" + from feast.type_map import ( + PROTO_VALUE_TO_VALUE_TYPE_MAP, + VALUE_TYPE_TO_PROTO_VALUE_MAP, + ) + + assert PROTO_VALUE_TO_VALUE_TYPE_MAP["decimal_val"] == ValueType.DECIMAL + assert ( + PROTO_VALUE_TO_VALUE_TYPE_MAP["decimal_list_val"] == ValueType.DECIMAL_LIST + ) + assert PROTO_VALUE_TO_VALUE_TYPE_MAP["decimal_set_val"] == ValueType.DECIMAL_SET + assert VALUE_TYPE_TO_PROTO_VALUE_MAP[ValueType.DECIMAL] == "decimal_val" + assert ( + VALUE_TYPE_TO_PROTO_VALUE_MAP[ValueType.DECIMAL_LIST] == "decimal_list_val" + ) + assert VALUE_TYPE_TO_PROTO_VALUE_MAP[ValueType.DECIMAL_SET] == "decimal_set_val" + + def test_decimal_pandas_type(self): + """feast_value_type_to_pandas_type returns 'object' for DECIMAL.""" + from feast.type_map import feast_value_type_to_pandas_type + + assert feast_value_type_to_pandas_type(ValueType.DECIMAL) == "object" + + def test_decimal_pyarrow_type(self): + """feast_value_type_to_pa returns pyarrow.string() for DECIMAL scalar/list/set.""" + import pyarrow + + from feast.type_map import feast_value_type_to_pa + + assert feast_value_type_to_pa(ValueType.DECIMAL) == pyarrow.string() + assert feast_value_type_to_pa(ValueType.DECIMAL_LIST) == pyarrow.list_( + pyarrow.string() + ) + assert feast_value_type_to_pa(ValueType.DECIMAL_SET) == pyarrow.list_( + pyarrow.string() + ) + + def test_decimal_snowflake_udf(self): + """_convert_value_name_to_snowflake_udf maps DECIMAL types to varchar UDFs.""" + from feast.type_map import _convert_value_name_to_snowflake_udf + + project = "myproject" + assert _convert_value_name_to_snowflake_udf("DECIMAL", project) == ( + f"FEAST_{project.upper()}_SNOWFLAKE_VARCHAR_TO_STRING_PROTO" + ) + assert _convert_value_name_to_snowflake_udf("DECIMAL_LIST", project) == ( + f"FEAST_{project.upper()}_SNOWFLAKE_ARRAY_VARCHAR_TO_LIST_STRING_PROTO" + ) + assert _convert_value_name_to_snowflake_udf("DECIMAL_SET", project) == ( + f"FEAST_{project.upper()}_SNOWFLAKE_ARRAY_VARCHAR_TO_LIST_STRING_PROTO" + ) + + class TestNestedCollectionTypes: """Tests for nested collection type proto conversion (VALUE_LIST, VALUE_SET).""" diff --git a/sdk/python/tests/unit/test_types.py b/sdk/python/tests/unit/test_types.py index 638a9bc729..aa89a1b4c6 100644 --- a/sdk/python/tests/unit/test_types.py +++ b/sdk/python/tests/unit/test_types.py @@ -5,6 +5,7 @@ from feast.types import ( Array, Bool, + Decimal, Float32, Float64, Int32, @@ -194,6 +195,23 @@ def test_uuid_set_feast_type(): assert from_value_type(set_time_uuid.to_value_type()) == set_time_uuid +def test_decimal_feast_type(): + assert Decimal.to_value_type() == ValueType.DECIMAL + assert from_value_type(ValueType.DECIMAL) == Decimal + + +def test_decimal_array_feast_type(): + array_decimal = Array(Decimal) + assert array_decimal.to_value_type() == ValueType.DECIMAL_LIST + assert from_value_type(array_decimal.to_value_type()) == array_decimal + + +def test_decimal_set_feast_type(): + set_decimal = Set(Decimal) + assert set_decimal.to_value_type() == ValueType.DECIMAL_SET + assert from_value_type(set_decimal.to_value_type()) == set_decimal + + def test_feast_type_str_roundtrip(): """_feast_type_to_str and _str_to_feast_type should roundtrip for nested types.""" from feast.field import _feast_type_to_str, _str_to_feast_type