This is an automated email from the ASF dual-hosted git repository.
twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 82e0219e Add README for KQIR (#2304)
82e0219e is described below
commit 82e0219eef119aa334b46eb72280e621c5d4e520
Author: Twice <[email protected]>
AuthorDate: Fri May 10 11:56:18 2024 +0900
Add README for KQIR (#2304)
---
assets/KQIR.png | Bin 0 -> 65729 bytes
src/search/README.md | 27 +++++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/assets/KQIR.png b/assets/KQIR.png
new file mode 100644
index 00000000..e0a605d9
Binary files /dev/null and b/assets/KQIR.png differ
diff --git a/src/search/README.md b/src/search/README.md
new file mode 100644
index 00000000..65c2bacc
--- /dev/null
+++ b/src/search/README.md
@@ -0,0 +1,27 @@
+## KQIR: Kvrocks Query Intermediate Representation
+
+Here, *KQIR* refers to both
+- the multiple-level *query intermediate representation* for Apache Kvrocks,
and
+- the *architecture and toolset* for the query optimization and execution.
+
+### Architecture
+
+
+
+### Components
+
+- User Interface: both SQL and Redis Query syntax is supported to be the
frontend language of KQIR
+ - SQL Parser: A parser that accepts an extended subset of MySQL syntax
+ - Redis Query Parser: A parser that accepts [Redis query
syntax](https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/query_syntax/)
(only DIALECT 2 or greater is planned to be supported)
+- KQIR: a multiple level query intermediate representation, currently
including two levels (syntactical IR and planning IR)
+ - Syntactical IR: A high level IR that syntactically represents the query
language
+ - Planning IR: A low level IR that represents plan operators for query
execution
+- KQIR passes: analysis and transformation procedures on KQIR
+ - Semantic Checker: to check if there is any semantic errors in the IR
+ - Expression Passes: passes for query expressions, especially for logical
expressions
+ - Numeric Passes: passes for numeric & arithmetic properties
+ - Plan Passes: passes on the plan operators
+ - Pass Manager: to manage the pass execution sequence and order
+ - Cost Model: to analyze the cost for the current plan, used by some plan
passes
+- Plan Executor: a component for query execution via iterator model
+- Indexer: to perform the indexing for various types of fields during data
changes