mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-25 01:10:37 +00:00
feat: Substrait logical plan (#704)
* feat: use Substrait logical plan to query data from Datanode in Frontend in distributed mode * fix: resolve PR comments * fix: resolve PR comments * fix: resolve PR comments Co-authored-by: luofucong <luofucong@greptime.com>
This commit is contained in:
@@ -20,6 +20,7 @@ use std::sync::Arc;
|
||||
|
||||
pub use arrow::datatypes::Metadata;
|
||||
use arrow::datatypes::{Field, Schema as ArrowSchema};
|
||||
use datafusion_common::DFSchemaRef;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use snafu::{ensure, ResultExt};
|
||||
|
||||
@@ -465,6 +466,15 @@ impl TryFrom<ArrowSchema> for Schema {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<DFSchemaRef> for Schema {
|
||||
type Error = Error;
|
||||
|
||||
fn try_from(value: DFSchemaRef) -> Result<Self> {
|
||||
let s: ArrowSchema = value.as_ref().into();
|
||||
s.try_into()
|
||||
}
|
||||
}
|
||||
|
||||
fn try_parse_version(metadata: &Metadata, key: &str) -> Result<u32> {
|
||||
if let Some(value) = metadata.get(key) {
|
||||
let version = value
|
||||
|
||||
Reference in New Issue
Block a user