feat: query engine impl on datafusion (#10)

* feat: query engine impl on datafusion

* feat: adds physical_optimizer, physical_planner and executor

* feat: impl adpaters between datafuion and greptime query engine core APIs.

* feat: impl PhysicalPlanAdapter and ExecutionPlanAdapter

* feat: rename table datafusion mod to adapter

* fix: clippy warning

* fix: conflicts with develop branch

* feat: add database mod

* fix: CR comment

* fix: by CR comments

* fix: conflicts with develop branch

* fix: by CR comments
This commit is contained in:
dennis zhuang
2022-04-26 15:17:32 +08:00
committed by GitHub
parent e334e55bf7
commit 3a2f794f6c
35 changed files with 2597 additions and 8 deletions

View File

@@ -0,0 +1,7 @@
[package]
name = "common-query"
version = "0.1.0"
edition = "2021"
[dependencies]
datafusion = { git = "https://github.com/apache/arrow-datafusion.git" , branch = "arrow2", features = ["simd"]}

View File

@@ -0,0 +1 @@
pub mod logical_plan;

View File

@@ -0,0 +1,18 @@
use datafusion::logical_plan::Expr as DfExpr;
/// Central struct of query API.
/// Represent logical expressions such as `A + 1`, or `CAST(c1 AS int)`.
#[derive(Clone, PartialEq, Hash)]
pub struct Expr {
df_expr: DfExpr,
}
impl Expr {
pub fn new(df_expr: DfExpr) -> Self {
Self { df_expr }
}
pub fn df_expr(&self) -> &DfExpr {
&self.df_expr
}
}

View File

@@ -0,0 +1,3 @@
mod expr;
pub use self::expr::Expr;