Skip to content

Node: Add FT.PROFILE command#2633

Merged
acarbonetto merged 34 commits intorelease-1.2from
node/acarbo_add_ft_profile
Nov 12, 2024
Merged

Node: Add FT.PROFILE command#2633
acarbonetto merged 34 commits intorelease-1.2from
node/acarbo_add_ft_profile

Conversation

@acarbonetto
Copy link
Copy Markdown
Contributor

@acarbonetto acarbonetto commented Nov 6, 2024

Issue link

This Pull Request is linked to issue (URL): #2527
depends on: #2554

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one issue.
  • Commit message has a detailed description of what changed and why.
  • Tests are added or updated.
  • CHANGELOG.md and documentation files are updated.
  • Destination branch is correct - main or release
  • Commits will be squashed upon merging.

Passing tests on 599a828
image

@Yury-Fridlyand Yury-Fridlyand added the node 🐢 Node.js wrapper label Nov 8, 2024
@acarbonetto acarbonetto force-pushed the node/acarbo_add_ft_profile branch from eb7e086 to b498c6c Compare November 8, 2024 06:04

it.each([ProtocolVersion.RESP2, ProtocolVersion.RESP3])(
"FT.AGGREGATE ft.aggregate",
"FT.INFO ft.info",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

moved from below

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.

i mightve missed the context but why is this the only test with upper and lower case descriptions?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't know how jest applies test filter (case sensitive or not) so I duplicated the test names

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Comment on lines +2764 to +2767
const aggregProfile: [
FtAggregateReturnType,
Record<string, number>,
] = await GlideFt.profileAggregate(
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think you can omit type there

Suggested change
const aggregProfile: [
FtAggregateReturnType,
Record<string, number>,
] = await GlideFt.profileAggregate(
const aggregProfile = await GlideFt.profileAggregate(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I prefer to add the type.

.sort((a, b) => (a["genre"]! > b["genre"]! ? 1 : -1)),
).toEqual(expectedAggreg);

const aggregProfile: [
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

so same here

expect(binaryResult).toEqual(expectedBinaryResult);

response = await GlideFt.info(client, index, {
const binaryProfileResult: [
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

and here

];
expect(stringResult).toEqual(expectedStringResult);

const stringProfileResult: [
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

and here

@acarbonetto acarbonetto merged commit c374d29 into release-1.2 Nov 12, 2024
@acarbonetto acarbonetto deleted the node/acarbo_add_ft_profile branch November 12, 2024 23:22
mo-amzn pushed a commit that referenced this pull request Nov 13, 2024
* Node: Add FT.PROFILE command

---------

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
mo-amzn pushed a commit to mo-amzn/valkey-glide that referenced this pull request Nov 13, 2024
* Node: Add FT.PROFILE command

---------

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Muhammad Awawdi <mawawdi@amazon.com>
mo-amzn pushed a commit to mo-amzn/valkey-glide that referenced this pull request Nov 13, 2024
* Node: Add FT.PROFILE command

---------

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
mo-amzn pushed a commit to mo-amzn/valkey-glide that referenced this pull request Nov 13, 2024
* Node: Add FT.PROFILE command

---------

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Muhammad Awawdi <mawawdi@amazon.com>
mo-amzn pushed a commit to mo-amzn/valkey-glide that referenced this pull request Nov 13, 2024
* Node: Add FT.PROFILE command

---------

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Muhammad Awawdi <mawawdi@amazon.com>
prateek-kumar-improving pushed a commit that referenced this pull request Nov 14, 2024
* Node: Add FT.PROFILE command

---------

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

node 🐢 Node.js wrapper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants