-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fixes UnsupportedOperationException when using readManyByPartitionKey for empty pages #49311
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
FabianMeiswinkel
merged 8 commits into
Azure:main
from
FabianMeiswinkel:users/fabianm/ReadManyByPKFix
Jun 1, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7173494
Fixes UnsupportedOperationException when using readManyByPartitionKey…
FabianMeiswinkel a442db3
Updated changelogs
FabianMeiswinkel 3ba04b0
Merge branch 'main' into users/fabianm/ReadManyByPKFix
FabianMeiswinkel 364d931
Update spark.yml JarStorageAccountName for ephemeral tenant rotation …
xinlian12 af2b89d
Merge branch 'upstream-main' into users/fabianm/ReadManyByPKFix
xinlian12 671d37d
Keeping FeedResponse.header final
FabianMeiswinkel ef4ac11
Merge branch 'users/fabianm/ReadManyByPKFix' of https://github.com/Fa…
FabianMeiswinkel 1766d57
Merge branch 'main' into users/fabianm/ReadManyByPKFix
FabianMeiswinkel 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
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
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
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
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
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
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
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
52 changes: 52 additions & 0 deletions
52
...re-cosmos-tests/src/test/java/com/azure/cosmos/implementation/UtilsImmutableMapTests.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| /* | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. | ||
| */ | ||
|
|
||
| package com.azure.cosmos.implementation; | ||
|
|
||
| import org.testng.annotations.Test; | ||
|
|
||
| import java.util.Collections; | ||
| import java.util.HashMap; | ||
| import java.util.LinkedHashMap; | ||
| import java.util.Map; | ||
|
|
||
| import static org.assertj.core.api.Assertions.assertThat; | ||
|
|
||
| /** | ||
| * Unit tests for {@link Utils#immutableMapOf(Object, Object)} and the matching detector | ||
| * {@link Utils#isImmutableMap(Map)}. These live next to the factory so that any future | ||
| * change to the factory's runtime class shape is caught by the same regression suite. | ||
| */ | ||
| public class UtilsImmutableMapTests { | ||
|
|
||
| @Test(groups = { "unit" }) | ||
| public void immutableMapOf_isDetectedAsImmutable() { | ||
| Map<String, String> m = Utils.immutableMapOf("k", "v"); | ||
| assertThat(Utils.isImmutableMap(m)).isTrue(); | ||
| } | ||
|
|
||
| @Test(groups = { "unit" }) | ||
| public void emptyMap_isDetectedAsImmutable() { | ||
| assertThat(Utils.isImmutableMap(Collections.emptyMap())).isTrue(); | ||
| } | ||
|
|
||
| @Test(groups = { "unit" }) | ||
| public void hashMap_isNotDetectedAsImmutable() { | ||
| assertThat(Utils.isImmutableMap(new HashMap<>())).isFalse(); | ||
| Map<String, String> populated = new HashMap<>(); | ||
| populated.put("k", "v"); | ||
| assertThat(Utils.isImmutableMap(populated)).isFalse(); | ||
| } | ||
|
|
||
| @Test(groups = { "unit" }) | ||
| public void linkedHashMap_isNotDetectedAsImmutable() { | ||
| assertThat(Utils.isImmutableMap(new LinkedHashMap<>())).isFalse(); | ||
| } | ||
|
|
||
| @Test(groups = { "unit" }) | ||
| public void nullMap_isNotDetectedAsImmutable() { | ||
| assertThat(Utils.isImmutableMap(null)).isFalse(); | ||
| } | ||
| } |
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.