GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Fix type mapping spark by ElliotNguyen68 · Pull Request #4071 · feast-dev/feast

fix: Fix type mapping spark #4071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
haoxu0 merged 8 commits into feast-dev:master from ElliotNguyen68:fix_type_mapping_spark
Apr 15, 2024

Uh oh!

There was an error while loading. Please reload this page.

Merged

fix: Fix type mapping spark #4071

Changes from all commits
Commits
Show all changes
8 commits
Select commit Hold shift + click to select a range
2f37e07
feat: Enable Arrow-based columnar data transfers
ElliotNguyen68 Mar 19, 2024
8eb0c59
Merge branch 'feast-dev:master' into master
ElliotNguyen68 Mar 21, 2024
c1c9990
fix: Add __eq__, __hash__ to SparkSource for comparision
ElliotNguyen68 Mar 21, 2024
add7f3a
chore: simplify the logic
ElliotNguyen68 Mar 21, 2024
6cba191
Merge branch 'feast-dev:master' into master
ElliotNguyen68 Mar 23, 2024
21e5434
Merge branch 'feast-dev:master' into master
ElliotNguyen68 Apr 3, 2024
5bc1ec6
feat: Add decimal datatype to spark mapping to feast data type
ElliotNguyen68 Apr 8, 2024
8dc98b3
feat: add array decimal
ElliotNguyen68 Apr 10, 2024
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

8 changes: 7 additions & 1 deletion 8 sdk/python/feast/type_map.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ def _non_empty_value(value: Any) -> bool:

def spark_to_feast_value_type(spark_type_as_str: str) -> ValueType:
# TODO not all spark types are convertible
# Current non-convertible types: interval, map, struct, structfield, decimal, binary
# Current non-convertible types: interval, map, struct, structfield, binary
type_map: Dict[str, ValueType] = {
"null": ValueType.UNKNOWN,
"byte": ValueType.BYTES,
Expand All @@ -762,6 +762,7 @@ def spark_to_feast_value_type(spark_type_as_str: str) -> ValueType:
"bigint": ValueType.INT64,
"long": ValueType.INT64,
"double": ValueType.DOUBLE,
"decimal": ValueType.DOUBLE,
"float": ValueType.FLOAT,
"boolean": ValueType.BOOL,
"timestamp": ValueType.UNIX_TIMESTAMP,
Expand All @@ -770,10 +771,15 @@ def spark_to_feast_value_type(spark_type_as_str: str) -> ValueType:
"array<int>": ValueType.INT32_LIST,
"array<bigint>": ValueType.INT64_LIST,
"array<double>": ValueType.DOUBLE_LIST,
"array<decimal>": ValueType.DOUBLE_LIST,
"array<float>": ValueType.FLOAT_LIST,
"array<boolean>": ValueType.BOOL_LIST,
"array<timestamp>": ValueType.UNIX_TIMESTAMP_LIST,
}
if spark_type_as_str.startswith("decimal"):
spark_type_as_str = "decimal"
if spark_type_as_str.startswith("array<decimal"):
spark_type_as_str = "array<decimal>"
# TODO: Find better way of doing this.
if not isinstance(spark_type_as_str, str) or spark_type_as_str not in type_map:
return ValueType.NULL
Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.