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

@@ -3,9 +3,8 @@ name = "datatypes"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
arrow2 = "0.10"
common-base = { path = "../common/base" }
paste = "1.0"
serde ={ version = "1.0.136", features = ["derive"] }

View File

@@ -3,7 +3,6 @@
mod data_type;
pub mod prelude;
mod scalars;
mod schema;
pub mod type_id;
mod types;
pub mod value;
@@ -13,3 +12,4 @@ use arrow2::array::{BinaryArray, MutableBinaryArray};
pub type LargeBinaryArray = BinaryArray<i64>;
pub type MutableLargeBinaryArray = MutableBinaryArray<i64>;
pub mod schema;

View File

@@ -1 +1,25 @@
use std::sync::Arc;
use arrow2::datatypes::Schema as ArrowSchema;
#[derive(Debug, Clone)]
pub struct Schema {
arrow_schema: Arc<ArrowSchema>,
}
impl Schema {
pub fn new(arrow_schema: Arc<ArrowSchema>) -> Self {
Self { arrow_schema }
}
pub fn arrow_schema(&self) -> &Arc<ArrowSchema> {
&self.arrow_schema
}
}
pub type SchemaRef = Arc<Schema>;
impl From<Arc<ArrowSchema>> for Schema {
fn from(s: Arc<ArrowSchema>) -> Schema {
Schema::new(s)
}
}