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

Implement FUNCTION commands like redis #1788

Merged
merged 6 commits into from
Oct 1, 2023

Conversation

PragmaTwice
Copy link
Member

@PragmaTwice PragmaTwice commented Sep 29, 2023

It closes #879.

The current implementation supports FUNCTION LOAD, FUNCTION DELETE, FCALL and FUNCTION LIST.

Compatibility: Some information in FUNCTION LIST is currently missing. Besides, FUNCTION LISTFUNC is added as an extension which can fit our storage structure better.

The lazy-import strategy: Lua libraries do not need to be imported to the Lua runtime immediately while it is written to the storage. It can be imported while one of functions in the library is called via FCALL. This design makes the scripting more easily to work in read-only script mode, replication and data migration.

Refer to https://redis.io/docs/interact/programmability/functions-intro/

TODO:

  • some fixes
  • go tests

@PragmaTwice PragmaTwice marked this pull request as ready for review September 30, 2023 03:30
@PragmaTwice PragmaTwice added feature type new feature A-scripting area scripting A-command labels Sep 30, 2023
@git-hulk
Copy link
Member

wow, it's a very exciting feature.

Copy link
Member

@git-hulk git-hulk left a comment

Choose a reason for hiding this comment

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

LGTM, great!

@PragmaTwice PragmaTwice merged commit 548d5f5 into apache:unstable Oct 1, 2023
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-command A-scripting area scripting feature type new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for function commands like Redis
2 participants