-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: Add opt-in filter_by_created_timestamp cutoff to get_historical_features #6617
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
Merged
+618
−8
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5b226ef
feat: Add opt-in at_event_time created_timestamp cutoff to get_histor…
addenergyx aa0fb79
test: Add universal integration test and docs for at_event_time
addenergyx d47bf4f
refactor: Rename at_event_time to filter_by_created_timestamp and add…
addenergyx 81a44e3
refactor: Centralize filter_by_created_timestamp support behind a sto…
addenergyx 9a2f805
Merge branch 'master' into at-event-time
addenergyx 6d1cf1d
chore: Trim comments to the non-obvious constraints
addenergyx 6d237e5
docs: Tighten filter_by_created_timestamp docstring
addenergyx 90c0bb4
docs: Condense filter_by_created_timestamp caveats into a hint
addenergyx 6abf239
Merge branch 'master' into at-event-time
addenergyx 521eaab
Merge branch 'master' into at-event-time
addenergyx 48c4468
fix: Keep entity rows whose candidate versions are all future-created
addenergyx adbdebe
refactor: Normalize created timestamp on read, not in the join predicate
addenergyx 3fccd8e
Merge branch 'master' into at-event-time
addenergyx 3d2ea3e
Shorten comments in the created timestamp cutoff
addenergyx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor: Normalize created timestamp on read, not in the join predicate
The cutoff predicate cast created_timestamp to UTC while the event-timestamp comparison beside it did not. read_fv normalizes the event timestamp when it reads the source and left the created timestamp alone, so the predicate was compensating for a missing normalization at the one comparison site. Normalize both on read instead. The predicate then needs no cast and matches its neighbour. deduplicate() orders by created_timestamp_column regardless of the cutoff flag, so the normalization is unconditional rather than gated on it; casting a column that is already tz-aware compiles away, so this leaves the emitted query unchanged for tz-aware sources and retires the "mutate only if tz-naive" TODO. Signed-off-by: David <david-adeniji@hotmail.co.uk>
- Loading branch information
commit adbdebeb28c8b98d3d9e42af5723af2ccf7f8f42
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This predicate casts the created timestamp to UTC but the existing event-timestamp comparison on the same join doesn't cast. Compare with the existing predicate at line 433-434 which does no cast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ntkathole, made a change so read_fv now normalizes the created timestamp on read, as it already did for the event timestamp, so the predicate no longer casts. Made it unconditional since deduplicate() reads that column regardless of the flag.