@@ -752,7 +752,7 @@ def _non_empty_value(value: Any) -> bool:
752752
753753def spark_to_feast_value_type (spark_type_as_str : str ) -> ValueType :
754754 # TODO not all spark types are convertible
755- # Current non-convertible types: interval, map, struct, structfield, decimal, binary
755+ # Current non-convertible types: interval, map, struct, structfield, binary
756756 type_map : Dict [str , ValueType ] = {
757757 "null" : ValueType .UNKNOWN ,
758758 "byte" : ValueType .BYTES ,
@@ -762,6 +762,7 @@ def spark_to_feast_value_type(spark_type_as_str: str) -> ValueType:
762762 "bigint" : ValueType .INT64 ,
763763 "long" : ValueType .INT64 ,
764764 "double" : ValueType .DOUBLE ,
765+ "decimal" : ValueType .DOUBLE ,
765766 "float" : ValueType .FLOAT ,
766767 "boolean" : ValueType .BOOL ,
767768 "timestamp" : ValueType .UNIX_TIMESTAMP ,
@@ -774,6 +775,9 @@ def spark_to_feast_value_type(spark_type_as_str: str) -> ValueType:
774775 "array<boolean>" : ValueType .BOOL_LIST ,
775776 "array<timestamp>" : ValueType .UNIX_TIMESTAMP_LIST ,
776777 }
778+ if spark_type_as_str .startswith ('decimal' ):
779+ spark_type_as_str = "decimal"
780+
777781 # TODO: Find better way of doing this.
778782 if not isinstance (spark_type_as_str , str ) or spark_type_as_str not in type_map :
779783 return ValueType .NULL
0 commit comments