Skip to content

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

@PragmaTwice

Description

@PragmaTwice

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions