Skip to content

Commit

Permalink
feat: Add date field support to spark (feast-dev#4913)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
niklasvm authored Jan 10, 2025
1 parent a3dfbd5 commit a8aeb79
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk/python/feast/type_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ def spark_to_feast_value_type(spark_type_as_str: str) -> ValueType:
"float": ValueType.FLOAT,
"boolean": ValueType.BOOL,
"timestamp": ValueType.UNIX_TIMESTAMP,
"date": ValueType.UNIX_TIMESTAMP,
"array<byte>": ValueType.BYTES_LIST,
"array<string>": ValueType.STRING_LIST,
"array<int>": ValueType.INT32_LIST,
Expand All @@ -824,6 +825,7 @@ def spark_to_feast_value_type(spark_type_as_str: str) -> ValueType:
"array<float>": ValueType.FLOAT_LIST,
"array<boolean>": ValueType.BOOL_LIST,
"array<timestamp>": ValueType.UNIX_TIMESTAMP_LIST,
"array<date>": ValueType.UNIX_TIMESTAMP_LIST,
}
if spark_type_as_str.startswith("decimal"):
spark_type_as_str = "decimal"
Expand Down

0 comments on commit a8aeb79

Please sign in to comment.