mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-30 03:40:37 +00:00
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:
@@ -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"] }
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user