Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove specifc handling of BQ list types
Signed-off-by: Judah Rand <17158624+judahrand@users.noreply.github.com>
  • Loading branch information
judahrand committed Sep 20, 2021
commit 268075e0bbe8fb76f870500ca91f4eb51ba697ae
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,10 @@ def assert_feature_list_types(
"bool": "bool",
}
assert str(historical_features_df.dtypes["value"]) == "object"
if provider == "gcp":
assert (
feature_list_dtype_to_expected_historical_feature_list_dtype[feature_dtype]
in type(historical_features_df.value[0]["list"][0]["item"]).__name__
)
else:
assert (
feature_list_dtype_to_expected_historical_feature_list_dtype[feature_dtype]
in type(historical_features_df.value[0][0]).__name__
)
assert (
Comment thread
judahrand marked this conversation as resolved.
Outdated
feature_list_dtype_to_expected_historical_feature_list_dtype[feature_dtype]
in type(historical_features_df.value[0][0]).__name__
)


def assert_expected_arrow_types(
Expand All @@ -280,18 +274,10 @@ def assert_expected_arrow_types(
feature_dtype
]
if feature_is_list:
if provider == "gcp":
assert str(
historical_features_arrow.schema.field_by_name("value").type
) in [
f"struct<list: list<item: struct<item: {arrow_type}>> not null>",
f"struct<list: list<item: struct<item: {arrow_type}>>>",
]
else:
assert (
str(historical_features_arrow.schema.field_by_name("value").type)
== f"list<item: {arrow_type}>"
)
assert (
str(historical_features_arrow.schema.field_by_name("value").type)
== f"list<item: {arrow_type}>"
)
else:
assert (
str(historical_features_arrow.schema.field_by_name("value").type)
Expand Down