Skip to content

Commit

Permalink
Rename FeastType to ComplexFeastType
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
  • Loading branch information
felixwang9817 committed Apr 4, 2022
1 parent fbfd251 commit d592c46
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions sdk/python/feast/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
}


class FeastType(ABC):
class ComplexFeastType(ABC):
"""
A FeastType represents a structured type that is recognized by Feast.
A ComplexFeastType represents a structured type that is recognized by Feast.
"""

def __init__(self):
"""Creates a FeastType object."""
"""Creates a ComplexFeastType object."""
pass

@abstractmethod
def to_int(self) -> int:
"""
Converts a FeastType object to the appropriate int value corresponding to
Converts a ComplexFeastType object to the appropriate int value corresponding to
the correct ValueTypeProto.Enum value.
"""
raise NotImplementedError
Expand All @@ -56,11 +56,11 @@ class PrimitiveFeastType(Enum):
INVALID = 0
BYTES = 1
STRING = 2
BOOL = 3
INT32 = 4
INT64 = 5
FLOAT32 = 6
FLOAT64 = 7
INT32 = 3
INT64 = 4
FLOAT32 = 5
FLOAT64 = 6
BOOL = 7
UNIX_TIMESTAMP = 8

def to_int(self) -> int:
Expand Down Expand Up @@ -92,17 +92,17 @@ def to_int(self) -> int:
]


class Array(FeastType):
class Array(ComplexFeastType):
"""
An Array represents a list of types.
Attributes:
base_type: The base type of the array.
"""

base_type: Union[PrimitiveFeastType, FeastType]
base_type: Union[PrimitiveFeastType, ComplexFeastType]

def __init__(self, base_type: Union[PrimitiveFeastType, FeastType]):
def __init__(self, base_type: Union[PrimitiveFeastType, ComplexFeastType]):
if base_type not in SUPPORTED_BASE_TYPES:
raise ValueError(
f"Type {type(base_type)} is currently not supported as a base type for Array."
Expand Down

0 comments on commit d592c46

Please sign in to comment.