-
Notifications
You must be signed in to change notification settings - Fork 3.2k
ExposeFeedRangeAsClassType #37444
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
Conversation
|
/azp run python - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
FabianMeiswinkel
left a comment
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
| 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
Second PR for exposingFeedRange in change feed query. In PR #36930, we have exposed feedRange as a
strtype, but it comes with perf penalty - for eachread_feed_rangesresponse, we would have to always do the base64 encoding, and for eachquery_items_change_feedusingfeed_rangewe have to decode the string.In this PR, we will expose a FeedRange class type