Repository navigation
fix(mlops): generate valid DatasetBuilder SQL for String event times - #6442
Open
AkshayShah03 wants to merge 1 commit into
Open
AkshayShah03 wants to merge 1 commit into
AkshayShah03 wants to merge 1 commit into
Conversation
Two v3 regressions in DatasetBuilder query generation:
- Event time casts compared feature_type to FeatureTypeEnum.STRING, but
FeatureDefinition is now a pydantic shape that stores feature_type as a
plain str ('String'), so the comparison was always False and every
event-time range filter and point-in-time join wrapped ISO-8601 String
event times in from_unixtime(), which Athena rejects for varchar. Compare
the normalized type value instead.
- The deleted-records CTE joined event time conditions without a leading
space, so with_event_time_range() without as_of() produced
'WHERE is_deletedAND ...'. (v2 started the clause with a newline.)
AkshayShah03
requested a deployment
to
manual-approval
October 12, 2026 17:59 — with
GitHub Actions
Waiting
AkshayShah03
requested a deployment
to
manual-approval
October 12, 2026 17:59 — with
GitHub Actions
Waiting
AkshayShah03
requested a deployment
to
manual-approval
October 12, 2026 17:59 — with
GitHub Actions
Waiting
This branch is waiting to be deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue #, if available: N/A
Description of changes:
This fixes two v3 regressions in
DatasetBuilderquery generation.1. String event times are cast with
from_unixtime. The casts compare the feature type against an enum:FeatureDefinitionis now a pydantic shape that storesfeature_typeas a plain str ("String"), so the comparison is alwaysFalse. Everywith_event_time_range(...)filter andpoint_in_time_accurate_join()condition wrapped ISO-8601 String event times infrom_unixtime(), which Athena rejects for varchar. This is the common case for feature groups. The fix compares the normalized type value, via_is_string_feature_type, in the three places.2.
WHERE is_deletedAND .... The deleted-records CTE joined the event-time conditions without a leading space, sowith_event_time_range()withoutas_of()produced invalid SQL. v2 started that clause with a newline. The fix adds the separator.Testing:
TestDatasetBuilderStringEventTimeQuerybuilds the query for String event times with a range and a PIT join. It assertsfrom_iso8601_timestamp(...)is used and thatis_deletedANDdoesn't appear. It fails before this change.tests/unit/sagemaker/mlops/feature_store: 390 passed. The 28feature_processorcollection errors also happen on master.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.