Skip to content

feat(json.set): add fpha option to json.set#3235

Merged
nkaradzhov merged 2 commits into
redis:masterfrom
nkaradzhov:feat/fpha
Apr 17, 2026
Merged

feat(json.set): add fpha option to json.set#3235
nkaradzhov merged 2 commits into
redis:masterfrom
nkaradzhov:feat/fpha

Conversation

@nkaradzhov
Copy link
Copy Markdown
Collaborator

@nkaradzhov nkaradzhov commented Apr 15, 2026

fpha - floating point homogenous array hint for how Redis should store arrays of fp values


Note

Low Risk
Low risk: small additive change to command argument building, gated by an explicit new option and covered by unit/integration tests (including Redis 8.8+ checks).

Overview
JSON.SET now accepts a new fpha option that appends FPHA <type> to the command, allowing callers to hint Redis on how to store floating-point homogeneous arrays (Redis 8.8+).

Tests are expanded to validate argument transformation for condition/legacy NX/XX plus fpha, and to run version-gated client integration checks for fpha behavior and interactions with NX/XX conditions.

Reviewed by Cursor Bugbot for commit eee134e. Bugbot is set up for automated code reviews on this repo. Configure here.

fpha - floating point homogenous array hint for how Redis should store arrays of fp values
Copy link
Copy Markdown
Contributor

@PavelPashov PavelPashov left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +15 to +18
/**
* If set, forces Redis to use the specified floating-point type for storing all FP homogeneous arrays.
*/
fpha?: 'BF16' | 'FP16' | 'FP32' | 'FP64';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: we can add available since 8.8 in the comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes, thanks!

@nkaradzhov nkaradzhov merged commit 4f15d0f into redis:master Apr 17, 2026
37 of 40 checks passed
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.

3 participants