Skip to content

Commit a8aeb79

Browse files
authored
feat: Add date field support to spark (feast-dev#4913)
* add date field support to spark Signed-off-by: niklasvm <niklasvm@gmail.com> * add support for lists of dates Signed-off-by: niklasvm <niklasvm@gmail.com> --------- Signed-off-by: niklasvm <niklasvm@gmail.com>
1 parent a3dfbd5 commit a8aeb79

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sdk/python/feast/type_map.py

+2
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ def spark_to_feast_value_type(spark_type_as_str: str) -> ValueType:
815815
"float": ValueType.FLOAT,
816816
"boolean": ValueType.BOOL,
817817
"timestamp": ValueType.UNIX_TIMESTAMP,
818+
"date": ValueType.UNIX_TIMESTAMP,
818819
"array<byte>": ValueType.BYTES_LIST,
819820
"array<string>": ValueType.STRING_LIST,
820821
"array<int>": ValueType.INT32_LIST,
@@ -824,6 +825,7 @@ def spark_to_feast_value_type(spark_type_as_str: str) -> ValueType:
824825
"array<float>": ValueType.FLOAT_LIST,
825826
"array<boolean>": ValueType.BOOL_LIST,
826827
"array<timestamp>": ValueType.UNIX_TIMESTAMP_LIST,
828+
"array<date>": ValueType.UNIX_TIMESTAMP_LIST,
827829
}
828830
if spark_type_as_str.startswith("decimal"):
829831
spark_type_as_str = "decimal"

0 commit comments

Comments
 (0)