Code Structure
Contents
Code Structure#
Hybridse SQL Engine#
hybridse/
βββ examples // demo db and hybrisde integration tests
βββ include // the include directory of codes, whose structure is similar to src
βββ src
βΒ Β βββ base // basic libraries catalogue
βΒ Β βββ benchmark
βΒ Β βββ case // cases for testing
βΒ Β βββ cmd // packaged demo
βΒ Β βββ codec // decode and encode
βΒ Β βββ codegen // llvm codes generation
βΒ Β βββ llvm_ext // llvm characters parsing
βΒ Β βββ node // the definition of logic plans', physical plans' and expressions' nodes and type nodes.
βΒ Β βββ passes // sql optimizer
βΒ Β βββ plan // logic execution plan generation
βΒ Β βββ planv2 // the transformation from zetasql syntax tree to nodes
βΒ Β βββ proto // the difinition of protobuf
βΒ Β βββ sdk
βΒ Β βββ testing
βΒ Β βββ udf // the registration and generation of udf and udaf
βΒ Β βββ vm // the generation of sql physical plan and execution plan, the compilation and execution entries of sql
βββ tools // codes related to benchmark
Online Storage Engine and External Service Interface#
src/
βββ apiserver
βββ base // basic libraries catalogue
βββ catalog
βββ client // the difinition and implementation of ns/tablet/taskmanager client interfaces
βββ cmd // CLI and OpenMLDB binary generation
βββ codec // decode and encode
βββ datacollector // online -> offline sync tool
βββ log // the formats, reading and writing of binlog and snapshot
βββ nameserver
βββ proto // definition of protobuf
βββ replica // the synchronization between leader and followers
βββ rpc // brpc request package
βββ schema // generate the resolution of schema and index
βββ sdk
βββ storage // storage engine
βββ tablet // the implementation of tablet interface
βββ test
βββ tools // packages of some gadgets
βββ zk // packages of zookeeper client
Java Modules#
java/
βββ hybridse-native // codes generated automatically by SQL engine swig
βββ hybridse-proto // proto of SQL engine
βββ hybridse-sdk // packaged sdk of SQL engine
βββ openmldb-batch // offline planner which translates the SQL logic to the spark execution plan
βββ openmldb-batchjob // codes related to offline tasks execution
βββ openmldb-common // some public codes and basic libraries of java sdk
βββ openmldb-import // data import tools
βββ openmldb-jdbc // java sdk
βββ openmldb-jmh // used for performance and stability testing
βββ openmldb-native // codes generated automatically by swig
βββ openmldb-spark-connector // the implementation of spark connector used for reading from and writing into OpenMLDB
βββ openmldb-synctool // online -> offline sync tool
βββ openmldb-taskmanager // offline tasks management module
Python SDK#
python
βββ openmldb
βΒ Β βββ dbapi // dbapi interface
βΒ Β βββ native // codes generated automatically by swig
βΒ Β βββ sdk // calling the underlying c++ interface
βΒ Β βββ sqlalchemy_openmldb // sqlalchemy interface
βΒ Β βββ sql_magic // notebook magic
βΒ Β βββ test