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 timezone issue in materialize & materialize_incremental #1439

Merged
merged 1 commit into from
Apr 7, 2021

Conversation

tsotnet
Copy link
Collaborator

@tsotnet tsotnet commented Apr 4, 2021

Signed-off-by: Tsotne Tabidze [email protected]

What this PR does / why we need it: Fixes an issue of mixing tz-aware and tz-naive timestamps. This was happening in fs.materialize & fs.materialize_incremental (both call _materialize_single_feature_view where I applied the fix), in FeatureView where the time zones aren't persisted between to_proto & from_proto, and in LocalSqlite:pull_latest_from_table_or_query where the source dataframe could have some tz-naive timestamps.

I also refactored test_materialize_from_bigquery_to_datastore.py into test_materialize.py where I maintain both existing test cases but also add a unit test that runs in the local mode. Lastly, I made sure to mix in tz-naive and tz-aware timestamps so that we make sure this bug is now well-tested.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

Fixes tz-naive / tz-aware bug with materialization

@woop
Copy link
Member

woop commented Apr 4, 2021

/ok-to-test

Copy link
Member

@woop woop left a comment

Choose a reason for hiding this comment

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

Mostly looks good, just some comments on the test structure

@tsotnet tsotnet force-pushed the fix-timezone-issue branch 2 times, most recently from 38cf31a to 77c2e70 Compare April 7, 2021 17:45
@tsotnet tsotnet force-pushed the fix-timezone-issue branch from 77c2e70 to 293d973 Compare April 7, 2021 17:52
@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tsotnet, woop

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

@woop
Copy link
Member

woop commented Apr 7, 2021

/lgtm

@feast-ci-bot feast-ci-bot merged commit 6d7678f into master Apr 7, 2021
@woop woop deleted the fix-timezone-issue branch May 12, 2021 20:27
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.

3 participants