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

Proposal: A unified query intermediate representation for RediSearch and SQL #2071

Closed
Tracked by #2064
PragmaTwice opened this issue Jan 29, 2024 · 1 comment
Closed
Tracked by #2064

Comments

@PragmaTwice
Copy link
Member

PragmaTwice commented Jan 29, 2024

It is part of #2064.

RediSearch provides a special syntax for data query, while its semantics has no difference than a subset of SQL DQL.

To be comatible with RediSearch, we should support such query syntax. However, if we can also offer a SQL-like syntax simultaneously, it will greatly benefit users and minimize the learning curve. (Especially since the Redis query syntax is weird and has huge semantic gaps between different versions: v1 and v2.)

To support both syntaxes simultaneously, we can design a unified intermediate representation (called Kvrocks Query Intermediate Representation, KQIR) and transform both syntaxes into this representation when processing user input.

Hence, the frontend of KQIR will be:

  • Redis query syntax (v2) and FT.SEARCH fields (for maintainance consideration, v1 will NOT be supported),
  • SQL select statement (try to be compatible with MySQL)

Detailed design will be provided soon.

@jihuayu
Copy link
Member

jihuayu commented Jan 29, 2024

It seems like we don't need support JOIN because FT.SEARCH doesn't support JOIN.
It is a good news for KQIR design.

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

No branches or pull requests

2 participants