Skip to content
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

Core: Update XREAD value_conversion to return Map<Map<String[]>> #1494

Conversation

acarbonetto
Copy link
Collaborator

Issue #, if available:

Description of changes:

Update XREAD value_conversion to return a Map<Map<String[]>> instead of a Map<String[String[]]>.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@acarbonetto acarbonetto requested a review from a team as a code owner May 29, 2024 21:56
@acarbonetto acarbonetto changed the title Core: Update XREAD value_conversion to return Map<Map<String[]>> Core: Update XREAD value_conversion to return Map<Map<String[]>> May 29, 2024
@Yury-Fridlyand
Copy link
Collaborator

Is return type Map<String, Map<String, String[]>> or Map<String, Map<String, String[][]>>?

glide-core/src/client/value_conversion.rs Outdated Show resolved Hide resolved
glide-core/src/client/value_conversion.rs Outdated Show resolved Hide resolved
glide-core/src/client/value_conversion.rs Outdated Show resolved Hide resolved
glide-core/src/client/value_conversion.rs Outdated Show resolved Hide resolved
glide-core/src/client/value_conversion.rs Show resolved Hide resolved
glide-core/src/client/value_conversion.rs Outdated Show resolved Hide resolved
glide-core/src/client/value_conversion.rs Outdated Show resolved Hide resolved
glide-core/src/client/value_conversion.rs Show resolved Hide resolved
node/src/BaseClient.ts Outdated Show resolved Hide resolved
@Yury-Fridlyand
Copy link
Collaborator

Rust CI fails.

@acarbonetto acarbonetto force-pushed the java/integ_acarbo_add_xread_value_conversion branch from 89e7529 to e31c756 Compare June 3, 2024 08:09
/// If `None` is given, then the key is not converted.
/// `value_type` is used to convert each value when collecting into the resulting map.
/// If `None` is given, then the value is not converted.
fn convert_inner_map_by_type(
Copy link
Collaborator

@barshaul barshaul Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it the same as Yuri did in #1489 in convert_map_entries? please reuse it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is similar. Although this PR is much more general since it applies to, and can override all existing Map conversions.

@acarbonetto acarbonetto force-pushed the java/integ_acarbo_add_xread_value_conversion branch from f078f04 to 1617da0 Compare June 3, 2024 22:56
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
@acarbonetto acarbonetto force-pushed the java/integ_acarbo_add_xread_value_conversion branch from 1617da0 to e956bb6 Compare June 4, 2024 18:36
Signed-off-by: Andrew Carbonetto <[email protected]>
@acarbonetto acarbonetto merged commit 58d960b into valkey-io:main Jun 4, 2024
47 checks passed
cyip10 pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 24, 2024
…alkey-io#1494)

* Update XREAD to read a Map of Map

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add changelog

Signed-off-by: Andrew Carbonetto <[email protected]>

* Fix test

Signed-off-by: Andrew Carbonetto <[email protected]>

* Node lint

Signed-off-by: Andrew Carbonetto <[email protected]>

* cargo fmt

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update CHANGELOG

Signed-off-by: Andrew Carbonetto <[email protected]>

* Change XREAD value_conversion to recursive maps

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add Node examples for XREAD; minor updates to value_conversion

Signed-off-by: Andrew Carbonetto <[email protected]>

* XREAD to array pairs

Signed-off-by: Andrew Carbonetto <[email protected]>

* Core: XREAD returns array of pairs

Signed-off-by: Andrew Carbonetto <[email protected]>

* Node: XREAD change reponse to array of pairs

Signed-off-by: Andrew Carbonetto <[email protected]>

* Revert java changes

Signed-off-by: Andrew Carbonetto <[email protected]>

* Cargo fmt

Signed-off-by: Andrew Carbonetto <[email protected]>

* SPOTLESS

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add Map(none, none) test

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update CHANGELOG

Signed-off-by: Andrew Carbonetto <[email protected]>

---------

Signed-off-by: Andrew Carbonetto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants