CLIENT-4752: Add mapKeysIn(Value...) and align mapKeysIn with CDT key#598
Conversation
… rules Add CTX.mapKeysIn(Value...) for polymorphic map key filters (string, integer, blob via Value.get(byte[])), using ValueArray and the same 0x2a context id as other mapKeysIn overloads. Remove mapKeysIn(double...) and mapKeysIn(float...). Require IllegalArgumentException for a null String varargs array in mapKeysIn(String...), matching mapKeysIn(Value...). Modify Packer.packValueArray and packValueList to emit nil for null elements so ValueArray packing matches list packing. Extend TestCdtOperate with additional tests for mixed types.
| * @return a map key-list context | ||
| * @see #mapKeysIn(String...) | ||
| */ | ||
| public static CTX mapKeysIn(double... keys) { |
There was a problem hiding this comment.
not sure if we should remove these are mark as deprecated, considering it might already be released?
There was a problem hiding this comment.
This is all part of path expressions. From what I understand path expressions are still preview feature I would double check with product.
Test Results (gnu / 8.1.0.3_2)323 tests 289 ✅ 44s ⏱️ Results for commit 67e799f. ♻️ This comment has been updated with latest results. |
Test Results (gnu / 8.1.1.0_1)439 tests 379 ✅ 42s ⏱️ Results for commit 67e799f. ♻️ This comment has been updated with latest results. |
Test Results (bouncycastle / 8.1.1.0_1)439 tests 379 ✅ 45s ⏱️ Results for commit 67e799f. ♻️ This comment has been updated with latest results. |
Test Results (bouncycastle / 8.1.0.3_2)323 tests 289 ✅ 43s ⏱️ Results for commit 67e799f. ♻️ This comment has been updated with latest results. |
|
For this PR you will have to create equivalent for v8 branch. You can use the /port-to-jdk8 claude or cursor skill. |
BrianNichols
left a comment
There was a problem hiding this comment.
In Packer packValueArray()/packValueList(), why would an item in the array/list ever be null?
The list/array is passed as-is from the user. The client lib doesn't alter it anywhere. So it is possible that there could be Added a test to validate that. Removing the null check will fail this test: Of course, we can also keep it as it is and let the user see |
CTX.mapKeysIn(Value...)for polymorphic map key filtersmapKeysIn(double...)andmapKeysIn(float...).Packer.packValueArrayandpackValueListto emit nil for null elements so ValueArray packing matches list packing.TestCdtOperatewith additional tests for mixed types.