-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
ExposeFeedRangeAsClassType #37444
ExposeFeedRangeAsClassType #37444
Conversation
/azp run python - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
LGTM
sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_state.py
Outdated
Show resolved
Hide resolved
@@ -79,7 +80,7 @@ def apply_server_response_continuation(self, continuation: str, has_modified_res | |||
def from_json( | |||
container_link: str, | |||
container_rid: str, | |||
change_feed_state_context: Dict[str, Any]): | |||
change_feed_state_context: Dict[str, Any]) -> 'ChangeFeedState': |
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.
Looks like it should be a function, not a staticmethod.
sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/base_execution_context.py
Show resolved
Hide resolved
} | ||
|
||
def _to_feed_range_internal(self) -> 'FeedRangeInternal': | ||
return FeedRangeInternalEpk(self._feed_range) |
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.
The method feels a bit redundant - why can't the constructor of FeedRangeInternalEpk
just accept an instance of FeedRangeEpk
?
…seFeedRangeAsClassType
b75c260
into
Azure:users/xinlian/feature/feedRangeAndChangeFeed
Second PR for exposingFeedRange in change feed query. In PR #36930, we have exposed feedRange as a
str
type, but it comes with perf penalty - for eachread_feed_ranges
response, we would have to always do the base64 encoding, and for eachquery_items_change_feed
usingfeed_range
we have to decode the string.In this PR, we will expose a FeedRange class type