Skip to content
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.

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

fix: Check if on_demand_feature_views is an empty list rather than None for snowflake provider #3046

Merged
merged 1 commit into from Aug 10, 2022

Conversation

floOnfido
Copy link
Contributor

@floOnfido floOnfido commented Aug 9, 2022

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #3045

@floOnfido floOnfido changed the title Update snowflake.py fix: check if on_demand_feature_views is [] rather than None for snowflake provider Aug 9, 2022
@floOnfido floOnfido changed the title fix: check if on_demand_feature_views is [] rather than None for snowflake provider fix: check if on_demand_feature_views is empty list rather than None for snowflake provider Aug 9, 2022
@floOnfido floOnfido changed the title fix: check if on_demand_feature_views is empty list rather than None for snowflake provider fix: check if on_demand_feature_views is an empty list rather than None for snowflake provider Aug 9, 2022
@floOnfido floOnfido changed the title fix: check if on_demand_feature_views is an empty list rather than None for snowflake provider fix: Check if on_demand_feature_views is an empty list rather than None for snowflake provider Aug 9, 2022
@adchia
Copy link
Collaborator

adchia commented Aug 9, 2022

Thanks for the PR!

Can you sign your commits please?

@adchia
Copy link
Collaborator

adchia commented Aug 9, 2022

/ok-to-test

@@ -429,7 +429,7 @@ def _to_arrow_internal(self) -> pa.Table:

def to_snowflake(self, table_name: str, temporary=False) -> None:
"""Save dataset as a new Snowflake table"""
if self.on_demand_feature_views is not None:
if self.on_demand_feature_views is not []:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think you can just do if self.on_demand_feature_views ?

@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2022

Codecov Report

Merging #3046 (380b92e) into master (d4c15e7) will increase coverage by 8.24%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3046      +/-   ##
==========================================
+ Coverage   67.49%   75.73%   +8.24%     
==========================================
  Files         167      202      +35     
  Lines       14621    16776    +2155     
==========================================
+ Hits         9868    12706    +2838     
+ Misses       4753     4070     -683     
Flag Coverage Δ
integrationtests 67.07% <100.00%> (-0.42%) ⬇️
unittests 58.12% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
sdk/python/feast/infra/offline_stores/snowflake.py 84.18% <100.00%> (+2.12%) ⬆️
sdk/python/feast/infra/utils/aws_utils.py 62.85% <0.00%> (-14.03%) ⬇️
sdk/python/feast/type_map.py 61.72% <0.00%> (-1.55%) ⬇️
setup.py 0.00% <0.00%> (ø)
.../python/feast/infra/feature_servers/base_config.py 100.00% <0.00%> (ø)
...n/feast/infra/feature_servers/aws_lambda/config.py 100.00% <0.00%> (ø)
...fline_store/test_universal_historical_retrieval.py 100.00% <0.00%> (ø)
..._stores/contrib/postgres_offline_store/postgres.py 35.13% <0.00%> (ø)
...ontrib/postgres_offline_store/tests/data_source.py 51.02% <0.00%> (ø)
...s/contrib/trino_offline_store/tests/data_source.py 17.64% <0.00%> (ø)
... and 112 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -429,7 +429,7 @@ def _to_arrow_internal(self) -> pa.Table:

def to_snowflake(self, table_name: str, temporary=False) -> None:
"""Save dataset as a new Snowflake table"""
if self.on_demand_feature_views is not None:
if self.on_demand_feature_views is not []:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if self.on_demand_feature_views is not []:
if self.on_demand_feature_views:

@adchia
Copy link
Collaborator

adchia commented Aug 9, 2022

you'll also need to sign your commit btw!

Signed-off-by: floOnfido <florian.malbranque@onfido.com>
@floOnfido
Copy link
Contributor Author

Should be good now @adchia

@adchia
Copy link
Collaborator

adchia commented Aug 10, 2022

/lgtm

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adchia, floOnfido

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@adchia adchia merged commit 9b05e65 into feast-dev:master Aug 10, 2022
@floOnfido floOnfido deleted the fix-3045 branch August 10, 2022 12:53
adchia pushed a commit to adchia/feast that referenced this pull request Aug 10, 2022
…ne for snowflake provider (feast-dev#3046)

check if on_demand_feature_views is empty or None

Signed-off-by: floOnfido <florian.malbranque@onfido.com>
adchia pushed a commit that referenced this pull request Aug 10, 2022
## [0.23.1](v0.23.0...v0.23.1) (2022-08-10)

### Bug Fixes

* Check if on_demand_feature_views is an empty list rather than None for snowflake provider ([#3046](#3046)) ([6af401f](6af401f))
* Fix Feast Java inconsistency with int64 serialization vs python ([#3031](#3031)) ([f340aeb](f340aeb))
* Fixing Web UI, which fails for the SQL registry ([#3028](#3028)) ([d584ecd](d584ecd))
* More explicit error messages ([#2708](#2708)) ([ca48963](ca48963))
* Return an empty infra object from sql registry when it doesn't exist ([#3022](#3022)) ([9a64e77](9a64e77))
adchia pushed a commit that referenced this pull request Aug 10, 2022
…ne for snowflake provider (#3046)

check if on_demand_feature_views is empty or None

Signed-off-by: floOnfido <florian.malbranque@onfido.com>
adchia pushed a commit that referenced this pull request Aug 10, 2022
## [0.22.3](v0.22.2...v0.22.3) (2022-08-10)

### Bug Fixes

* Check if on_demand_feature_views is an empty list rather than None for snowflake provider ([#3046](#3046)) ([67af727](67af727))
* Fixing Web UI, which fails for the SQL registry ([#3028](#3028)) ([56d645c](56d645c))
* More explicit error messages ([#2708](#2708)) ([93c1c15](93c1c15))
* Move gcp back to 1.47.0 since grpcio-tools 1.48.0 got yanked from pypi ([#2990](#2990)) ([f7e44da](f7e44da))
* Return an empty infra object from sql registry when it doesn't exist ([#3022](#3022)) ([329bc47](329bc47))
franciscojavierarceo pushed a commit to franciscojavierarceo/feast that referenced this pull request Aug 13, 2022
…ne for snowflake provider (feast-dev#3046)

check if on_demand_feature_views is empty or None

Signed-off-by: floOnfido <florian.malbranque@onfido.com>
Signed-off-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
kevjumba pushed a commit that referenced this pull request Aug 25, 2022
# [0.24.0](v0.23.0...v0.24.0) (2022-08-25)

### Bug Fixes

* Check if on_demand_feature_views is an empty list rather than None for snowflake provider ([#3046](#3046)) ([9b05e65](9b05e65))
* FeatureStore.apply applies BatchFeatureView correctly ([#3098](#3098)) ([41be511](41be511))
* Fix Feast Java inconsistency with int64 serialization vs python ([#3031](#3031)) ([4bba787](4bba787))
* Fix feature service inference logic ([#3089](#3089)) ([4310ed7](4310ed7))
* Fix field mapping logic during feature inference ([#3067](#3067)) ([cdfa761](cdfa761))
* Fix incorrect on demand feature view diffing and improve Java tests ([#3074](#3074)) ([0702310](0702310))
* Fix Java helm charts to work with refactored logic. Fix FTS image ([#3105](#3105)) ([2b493e0](2b493e0))
* Fix on demand feature view output in feast plan + Web UI crash ([#3057](#3057)) ([bfae6ac](bfae6ac))
* Fix release workflow to release 0.24.0 ([#3138](#3138)) ([a69aaae](a69aaae))
* Fix Spark offline store type conversion to arrow ([#3071](#3071)) ([b26566d](b26566d))
* Fixing Web UI, which fails for the SQL registry ([#3028](#3028)) ([64603b6](64603b6))
* Force Snowflake Session to Timezone UTC ([#3083](#3083)) ([9f221e6](9f221e6))
* Make infer dummy entity join key idempotent ([#3115](#3115)) ([1f5b1e0](1f5b1e0))
* More explicit error messages ([#2708](#2708)) ([e4d7afd](e4d7afd))
* Parse inline data sources ([#3036](#3036)) ([c7ba370](c7ba370))
* Prevent overwriting existing file during `persist` ([#3088](#3088)) ([69af21f](69af21f))
* Register BatchFeatureView in feature repos correctly ([#3092](#3092)) ([b8e39ea](b8e39ea))
* Return an empty infra object from sql registry when it doesn't exist ([#3022](#3022)) ([8ba87d1](8ba87d1))
* Teardown tables for Snowflake Materialization testing ([#3106](#3106)) ([0a0c974](0a0c974))
* UI error when saved dataset is present in registry. ([#3124](#3124)) ([83cf753](83cf753))
* Update sql.py ([#3096](#3096)) ([2646a86](2646a86))
* Updated snowflake template ([#3130](#3130)) ([f0594e1](f0594e1))

### Features

* Add authentication option for snowflake connector ([#3039](#3039)) ([74c75f1](74c75f1))
* Add Cassandra/AstraDB online store contribution ([#2873](#2873)) ([feb6cb8](feb6cb8))
* Add Snowflake materialization engine ([#2948](#2948)) ([f3b522b](f3b522b))
* Adding saved dataset capabilities for Postgres  ([#3070](#3070)) ([d3253c3](d3253c3))
* Allow passing repo config path via flag ([#3077](#3077)) ([0d2d951](0d2d951))
* Contrib azure provider with synapse/mssql offline store and Azure registry store ([#3072](#3072)) ([9f7e557](9f7e557))
* Custom Docker image for Bytewax batch materialization ([#3099](#3099)) ([cdd1b07](cdd1b07))
* Feast AWS Athena offline store (again) ([#3044](#3044)) ([989ce08](989ce08))
* Implement spark offline store `offline_write_batch` method ([#3076](#3076)) ([5b0cc87](5b0cc87))
* Initial Bytewax materialization engine ([#2974](#2974)) ([55c61f9](55c61f9))
* Refactor feature server helm charts to allow passing feature_store.yaml in environment variables ([#3113](#3113)) ([85ee789](85ee789))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong condition in to_snowflake method of snowflake provider
5 participants