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

Add FT.ALTER in OM JSON and Hash repo #645

Merged
merged 5 commits into from
Oct 25, 2024
Merged

Add FT.ALTER in OM JSON and Hash repo #645

merged 5 commits into from
Oct 25, 2024

Conversation

imvtsl
Copy link
Contributor

@imvtsl imvtsl commented Oct 10, 2024

Signed-off-by: Vatsal [email protected]

Closes #632.

@rueian
Copy link
Collaborator

rueian commented Oct 24, 2024

Hi @imvtsl, are you still working on testing?

@imvtsl
Copy link
Contributor Author

imvtsl commented Oct 24, 2024

Hey @rueian
I took a pause after seeing the discussion on the issue. I was just about to ping you regarding this PR, but you beat me to it!

Before I dive back in, I wanted to clarify—are we still good with the solution developed in this PR?
Does this impact this PR in any way? Apologies if it's a basic question, I am new to this repository and Redis.

@rueian
Copy link
Collaborator

rueian commented Oct 24, 2024

The discussion doesn’t affect this PR. FT.ALTER itself is still a useful feature.

@imvtsl
Copy link
Contributor Author

imvtsl commented Oct 24, 2024

Thank you for clarification. I will resume right away!

@imvtsl
Copy link
Contributor Author

imvtsl commented Oct 25, 2024

Hi @rueian
I have added tests in hash_test and json_test for this feature and have verifed the coverage using dockertest.sh.

Is there any style guide that we reference? If yes, can you share that so I can look it up make any required changes before I update this PR from Draft to Ready for Review.

@imvtsl
Copy link
Contributor Author

imvtsl commented Oct 25, 2024

Also, I noticed an issue.

alter.Schema().Add().Field("$.Nested.F1").Options("TEXT").Build() works as in the test case, however
alter.Schema().Add().Field("$.Nested.F1").Options("TEXT SORTABLE").Build() fails with json_test.go:245: Invalid field type for field '$.Nested.F1\'. error.
I verified that it's valid command in cli, and this code change is correctly building up the command slice. Am I missing something here?

command slice cli

@rueian
Copy link
Collaborator

rueian commented Oct 25, 2024

Is there any style guide that we reference? If yes, can you share that so I can look it up make any required changes before I update this PR from Draft to Ready for Review.

The tests are already looked good to me.

alter.Schema().Add().Field("$.Nested.F1").Options("TEXT SORTABLE").Build() fails with json_test.go:245: Invalid field type for field '$.Nested.F1\'. error.

I think that was a bug caused by the wrong command definitions. The options should be marked as "multiple": true:

{
"name": "options",
"type": "string"
}

I think we can have another PR to fix that.

@imvtsl imvtsl marked this pull request as ready for review October 25, 2024 20:31
@imvtsl
Copy link
Contributor Author

imvtsl commented Oct 25, 2024

Thanks, I marked it as ready for review. I don't see the option to request review. @rueian can you review this PR?

I think that was a bug caused by the wrong command definitions. The options should be marked as "multiple": true:

rueidis/hack/cmds/commands_search.json

Lines 357 to 360 in 25821d0

{
"name": "options",
"type": "string"
}
I think we can have another PR to fix that.

Can I create the issue and raise PR if it's that small a change?

@rueian
Copy link
Collaborator

rueian commented Oct 25, 2024

Sure, thanks!

@imvtsl
Copy link
Contributor Author

imvtsl commented Oct 25, 2024

I created this issue for it. I will raise PR for it as soon as this PR is merged.

@rueian rueian merged commit b743fe0 into redis:main Oct 25, 2024
27 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.

how to add new index to old ones
2 participants