Skip to content

Commit

Permalink
chore: fix after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
discord9 committed May 14, 2024
1 parent 372e414 commit fd8caec
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/flow/src/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
//! and communicating with other parts of the database
#![warn(unused_imports)]

use std::borrow::BorrowMut;
use std::collections::{BTreeMap, HashMap};
use std::sync::Arc;

Expand Down
1 change: 0 additions & 1 deletion src/flow/src/adapter/flownode_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use api::v1::region::InsertRequests;
use common_error::ext::BoxedError;
use common_meta::error::{ExternalSnafu, Result, UnexpectedSnafu};
use common_meta::node_manager::Flownode;
use common_telemetry::debug;
use itertools::Itertools;
use snafu::ResultExt;

Expand Down
2 changes: 1 addition & 1 deletion src/flow/src/adapter/node_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use common_telemetry::debug;
use session::context::QueryContext;
use snafu::{OptionExt, ResultExt};
use table::metadata::TableId;
use tokio::sync::{broadcast, mpsc, watch};
use tokio::sync::{broadcast, mpsc};

use crate::adapter::error::{Error, EvalSnafu, TableNotFoundSnafu};
use crate::adapter::{FlowId, TableName, TableSource};
Expand Down
1 change: 0 additions & 1 deletion src/flow/src/adapter/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use std::collections::{BTreeMap, VecDeque};
use std::sync::Arc;

use common_telemetry::debug;
use hydroflow::scheduled::graph::Hydroflow;
use snafu::ResultExt;
use tokio::sync::{broadcast, mpsc, Mutex};
Expand Down
6 changes: 0 additions & 6 deletions src/flow/src/repr/relation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ impl Key {
}
}

impl Default for Key {
fn default() -> Self {
Self::new()
}
}

/// The type of a relation.
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize, Hash)]
pub struct RelationType {
Expand Down
11 changes: 7 additions & 4 deletions src/flow/src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ use substrait_proto::proto::extensions::simple_extension_declaration::MappingTyp
use substrait_proto::proto::extensions::SimpleExtensionDeclaration;

use crate::adapter::error::{
Error, ExternalSnafu, InvalidQueryPlanSnafu, InvalidQueryProstSnafu,
InvalidQuerySubstraitSnafu, NotImplementedSnafu, TableNotFoundSnafu, UnexpectedSnafu,
Error, ExternalSnafu, InvalidQueryProstSnafu, NotImplementedSnafu, TableNotFoundSnafu,
UnexpectedSnafu,
};
use crate::adapter::FlownodeContext;
use crate::expr::GlobalId;
Expand Down Expand Up @@ -110,12 +110,15 @@ pub async fn sql_to_flow_plan(
}
.build()
})?;
let stmt = QueryLanguageParser::parse_sql(sql, &query_ctx).context(InvalidQueryPlanSnafu)?;
let stmt = QueryLanguageParser::parse_sql(sql, &query_ctx)
.map_err(BoxedError::new)
.context(ExternalSnafu)?;
let plan = engine
.planner()
.plan(stmt, query_ctx)
.await
.context(InvalidQueryPlanSnafu)?;
.map_err(BoxedError::new)
.context(ExternalSnafu)?;
let LogicalPlan::DfPlan(plan) = plan;
let sub_plan = DFLogicalSubstraitConvertor {}
.to_sub_plan(&plan)
Expand Down
1 change: 0 additions & 1 deletion tests-integration/src/standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use common_procedure::ProcedureManagerRef;
use common_wal::config::{DatanodeWalConfig, MetasrvWalConfig};
use datanode::datanode::DatanodeBuilder;
use flow::FlownodeBuilder;
use frontend::frontend::FrontendOptions;
use frontend::instance::builder::FrontendBuilder;
use frontend::instance::{FrontendInstance, Instance, StandaloneDatanodeManager};
use meta_srv::metasrv::{FLOW_ID_SEQ, TABLE_ID_SEQ};
Expand Down

0 comments on commit fd8caec

Please sign in to comment.