Skip to content

Commit

Permalink
map Arrow list types to Redshift super type
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff <jeffxl@apple.com>
  • Loading branch information
Agent007 committed Nov 12, 2021
1 parent a80a9b8 commit af3dc6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdk/python/feast/type_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,9 @@ def pa_to_redshift_value_type(pa_type: pyarrow.DataType) -> str:
# PyArrow decimal types (e.g. "decimal(38,37)") luckily directly map to the Redshift type.
return pa_type_as_str

if pa_type_as_str.startswith("list"):
return "super"

# We have to take into account how arrow types map to parquet types as well.
# For example, null type maps to int32 in parquet, so we have to use int4 in Redshift.
# Other mappings have also been adjusted accordingly.
Expand Down

0 comments on commit af3dc6b

Please sign in to comment.